From 35e3c767858dcd1d6ce1d535f6b414dd9d6ad88d Mon Sep 17 00:00:00 2001 From: Robin Stuart Date: Mon, 14 Jun 2010 22:31:10 +0100 Subject: [PATCH] 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. --- frontend_qt4/mainWindow.ui | 481 +++++++++++++----------------------- frontend_qt4/mainwindow.cpp | 35 --- frontend_qt4/mainwindow.h | 5 - 3 files changed, 174 insertions(+), 347 deletions(-) diff --git a/frontend_qt4/mainWindow.ui b/frontend_qt4/mainWindow.ui index 65915307..9e18eec0 100644 --- a/frontend_qt4/mainWindow.ui +++ b/frontend_qt4/mainWindow.ui @@ -5,241 +5,73 @@ Qt::NonModal - - - 0 - 0 - 749 - 711 - + + + 0 + 0 + - 749 - 711 + 590 + 600 - 749 - 711 + 590 + 600 - Zint Barcode Studio + Zint Barcode Studio 2.4 :/images/zint.png:/images/zint.png + + false + + + + - + - + + + + 0 + 0 + + + + + 0 + 0 + + + + + 1000 + 1000 + + + + Resulting barcode shown here + false - - Preview - - - - - - - 0 - 0 - - - - false - - - - - - - - 28 - 28 - - - - - 28 - 28 - - - - Zoom out - - - ... - - - - :/images/zoomout.png:/images/zoomout.png - - - - 22 - 22 - - - - - - - - Adjust zoom - - - - - - 50 - - - 400 - - - 100 - - - Qt::Vertical - - - true - - - false - - - - - - - - 28 - 28 - - - - - 28 - 28 - - - - Zoom in - - - - :/images/zoomin.png:/images/zoomin.png - - - - 22 - 22 - - - - - - - - - 28 - 28 - - - - - 28 - 28 - - - - Rotate anti-clockwise - - - - - - - :/images/rotateleft.png:/images/rotateleft.png - - - - 22 - 22 - - - - - - - - Adjust Rotation - - - - - - 360 - - - 15 - - - Qt::Horizontal - - - QSlider::TicksBelow - - - 90 - - - - - - - - 28 - 28 - - - - - 28 - 28 - - - - Rotate clockwise - - - - :/images/rotateright.png:/images/rotateright.png - - - - 22 - 22 - - - - - - QLayout::SetMaximumSize + QLayout::SetMinimumSize @@ -267,7 +99,7 @@ - Select type of barcode to generate. + Type of barcode @@ -276,7 +108,7 @@ - + 0 0 @@ -294,7 +126,7 @@ - 1 + 0 @@ -304,7 +136,7 @@ - + 0 0 @@ -316,7 +148,7 @@ - Enter data to be encoded. + Data to encode Your Data Here! @@ -325,11 +157,37 @@ + + + 0 + 24 + + + + Encode more data +or import from file + ... + + + + + 0 + 24 + + + + Encode a sequence + + + 123.. + + + @@ -339,7 +197,7 @@ true - + 0 0 @@ -365,7 +223,7 @@ - Create a composite symbol. + Create a composite symbol Add &2D Component @@ -403,6 +261,9 @@ false + + Type of 2D component + Automatic @@ -429,13 +290,16 @@ + + QLayout::SetMinimumSize + false - 2D Component Data: + 2D &Component Data: txtComposite @@ -460,14 +324,15 @@ - + Data to be encoded in 2D component +Remember to place [square brackets] around AI data <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:9pt;">Your Data Here!</span></p></body></html> +</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Your Data Here!</p></body></html> false @@ -479,19 +344,6 @@ p, li { white-space: pre-wrap; } - - - - Qt::Vertical - - - - 20 - 40 - - - - @@ -556,7 +408,7 @@ p, li { white-space: pre-wrap; } - Adjust overall symbol height. + Overall symbol height X @@ -575,7 +427,7 @@ p, li { white-space: pre-wrap; } - Adjust width of boundary bars or border. + Width of boundary bars or border X @@ -594,7 +446,7 @@ p, li { white-space: pre-wrap; } - Adjust whitespace to left and right of barcode. + Width of whitespace X @@ -604,7 +456,7 @@ p, li { white-space: pre-wrap; } - Adjust image size when output to file. + Image scale when output to file @@ -629,7 +481,7 @@ p, li { white-space: pre-wrap; } - Border Ty&pe: + Border &Type: Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter @@ -641,6 +493,9 @@ p, li { white-space: pre-wrap; } + + Add border or box + No border @@ -660,6 +515,9 @@ p, li { white-space: pre-wrap; } + + Change ink colour + &Foreground Colour @@ -668,19 +526,32 @@ p, li { white-space: pre-wrap; } - + Change paper colour &Backgound Colour + + + + Reset to black on white + + + &Reset Colours + + + + + Show text in image + - Show Human Readable Text + Show H&uman Readable Text true @@ -692,6 +563,9 @@ p, li { white-space: pre-wrap; } Qt::Vertical + + QSizePolicy::Minimum + 20 @@ -706,63 +580,67 @@ p, li { white-space: pre-wrap; } - - - - - - &About Zint - - - - - - - Reset zoom, rotation and colour. - - - &Reset Preview - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - Se&quence - - - - - - - Save barcode image to file. - - - &Save - - - - - - - E&xit - - - - + + + + + + + + + 100 + 0 + + + + About Zint + + + &About + + + + + + + + 100 + 0 + + + + Save image to file + + + &Save + + + + + + + + 100 + 0 + + + + E&xit + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + @@ -774,17 +652,6 @@ p, li { white-space: pre-wrap; } chkComposite cmbCompType txtComposite - btnAbout - btnReset - btnSave - btnExit - view - btnZoomOut - scaleSlider - btnZoomIn - btnRotateLeft - rotateSlider - btnRotatRight diff --git a/frontend_qt4/mainwindow.cpp b/frontend_qt4/mainwindow.cpp index f34711f9..5232d35d 100644 --- a/frontend_qt4/mainwindow.cpp +++ b/frontend_qt4/mainwindow.cpp @@ -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()); -} diff --git a/frontend_qt4/mainwindow.h b/frontend_qt4/mainwindow.h index 8c6078cc..52291810 100644 --- a/frontend_qt4/mainwindow.h +++ b/frontend_qt4/mainwindow.h @@ -116,11 +116,6 @@ public slots: void datamatrix_options(); void maxi_primary(); void change_print_scale(); - void scaleRotate(); - void zoomIn(void); - void zoomOut(void); - void rotateLeft(void); - void rotateRight(void); private slots: bool save();