mirror of
https://git.code.sf.net/p/zint/code
synced 2025-05-16 16:14:36 -04:00
Tidy up and simplification of UI
Removal of sliders and zoom / rotate buttons. Rearrangement of buttons to reduce amount of grey space. Reduction of size of preview and of main window. Smaller, tigter layout works better on small screens and is less complex.
This commit is contained in:
parent
e3f3dddbf0
commit
35e3c76785
3 changed files with 174 additions and 347 deletions
|
@ -120,8 +120,6 @@ MainWindow::MainWindow(QWidget* parent, Qt::WFlags fl)
|
|||
connect(chkComposite, SIGNAL(stateChanged( int )), SLOT(composite_enable()));
|
||||
connect(chkComposite, SIGNAL(stateChanged( int )), SLOT(update_preview()));
|
||||
connect(cmbCompType, SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
|
||||
connect(rotateSlider, SIGNAL(valueChanged(int)), SLOT(scaleRotate()));
|
||||
connect(scaleSlider, SIGNAL(valueChanged(int)), SLOT(scaleRotate()));
|
||||
connect(spnWhitespace, SIGNAL(valueChanged( int )), SLOT(update_preview()));
|
||||
connect(btnAbout, SIGNAL(clicked( bool )), SLOT(about()));
|
||||
connect(btnSave, SIGNAL(clicked( bool )), SLOT(save()));
|
||||
|
@ -131,10 +129,6 @@ MainWindow::MainWindow(QWidget* parent, Qt::WFlags fl)
|
|||
connect(btnMoreData, SIGNAL(clicked( bool )), SLOT(open_data_dialog()));
|
||||
connect(btnSequence, SIGNAL(clicked( bool )), SLOT(open_sequence_dialog()));
|
||||
connect(chkHRTHide, SIGNAL(stateChanged( int )), SLOT(update_preview()));
|
||||
connect(btnZoomIn, SIGNAL(clicked(void)), SLOT(zoomIn(void)));
|
||||
connect(btnZoomOut, SIGNAL(clicked(void)), SLOT(zoomOut(void)));
|
||||
connect(btnRotateLeft, SIGNAL(clicked(void)), SLOT(rotateLeft(void)));
|
||||
connect(btnRotatRight, SIGNAL(clicked(void)), SLOT(rotateRight(void)));
|
||||
}
|
||||
|
||||
MainWindow::~MainWindow()
|
||||
|
@ -143,20 +137,11 @@ MainWindow::~MainWindow()
|
|||
|
||||
void MainWindow::reset_view()
|
||||
{
|
||||
scaleSlider->setSliderPosition( 100 );
|
||||
rotateSlider->setSliderPosition( 0 );
|
||||
m_fgcolor=qRgb(0,0,0);
|
||||
m_bgcolor=qRgb(0xff,0xff,0xff);
|
||||
update_preview();
|
||||
}
|
||||
|
||||
void MainWindow::scaleRotate()
|
||||
{
|
||||
view->resetTransform();
|
||||
view->rotate(rotateSlider->value());
|
||||
view->scale((double)scaleSlider->value()/100,(double)scaleSlider->value()/100);
|
||||
}
|
||||
|
||||
bool MainWindow::save()
|
||||
{
|
||||
bool status;
|
||||
|
@ -852,23 +837,3 @@ void MainWindow::update_preview()
|
|||
view->scene()->update();
|
||||
}
|
||||
|
||||
void
|
||||
MainWindow::zoomIn(void)
|
||||
{
|
||||
scaleSlider->setValue(scaleSlider->value() + scaleSlider->singleStep());
|
||||
}
|
||||
void
|
||||
MainWindow::zoomOut(void)
|
||||
{
|
||||
scaleSlider->setValue(scaleSlider->value() - scaleSlider->singleStep());
|
||||
}
|
||||
void
|
||||
MainWindow::rotateLeft(void)
|
||||
{
|
||||
rotateSlider->setValue(rotateSlider->value() - rotateSlider->singleStep());
|
||||
}
|
||||
void
|
||||
MainWindow::rotateRight(void)
|
||||
{
|
||||
rotateSlider->setValue(rotateSlider->value() + rotateSlider->singleStep());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue