From 33e2d3dee383bf8aa67c843466471feda37429b8 Mon Sep 17 00:00:00 2001 From: Jim Evins Date: Sun, 12 May 2019 17:30:42 -0400 Subject: [PATCH] Tweaks to PrintView. - Increased range of copies spinbox to 100x the number of iterms per page (#51) - Fixed issue that blocked user from holding down on spinbox controls - Minor layout tweaks --- glabels/PrintView.cpp | 8 ++++-- glabels/ui/PrintView.ui | 55 ++++++++++++++++++++++++------------ glabels/ui/PropertiesView.ui | 6 ++++ 3 files changed, 49 insertions(+), 20 deletions(-) diff --git a/glabels/PrintView.cpp b/glabels/PrintView.cpp index a900af3..a6f3f7d 100644 --- a/glabels/PrintView.cpp +++ b/glabels/PrintView.cpp @@ -70,6 +70,9 @@ namespace glabels connect( mModel, SIGNAL(changed()), this, SLOT(onModelChanged()) ); + copiesSpin->setRange( 1, 100*mModel->frame()->nLabels() ); + copiesStartSpin->setRange( 1, mModel->frame()->nLabels() ); + onFormChanged(); } @@ -79,6 +82,9 @@ namespace glabels /// void PrintView::onModelChanged() { + copiesSpin->setRange( 1, 100*mModel->frame()->nLabels() ); + copiesStartSpin->setRange( 1, mModel->frame()->nLabels() ); + updateView(); } @@ -88,8 +94,6 @@ namespace glabels /// void PrintView::updateView() { - copiesStartSpin->setRange( 1, mModel->frame()->nLabels() ); - if ( mRenderer.nPages() == 1 ) { if ( mRenderer.nItems() == 1 ) diff --git a/glabels/ui/PrintView.ui b/glabels/ui/PrintView.ui index d4ea498..b7303ae 100644 --- a/glabels/ui/PrintView.ui +++ b/glabels/ui/PrintView.ui @@ -6,7 +6,7 @@ 0 0 - 759 + 852 792 @@ -73,21 +73,8 @@ Copies - - - - - - 0 - 0 - - - - (Will print a total of xx items on nn pages.) - - - - + + @@ -104,11 +91,20 @@ + + QAbstractSpinBox::UpDownArrows + + + true + 1 - 96 + 9999 + + + QAbstractSpinBox::DefaultStepType @@ -127,7 +123,7 @@ - + @@ -183,6 +179,29 @@ + + + + + + + 0 + 0 + + + + + 330 + 0 + + + + (Will print a total of xxxx items on nnn pages.) + + + + + diff --git a/glabels/ui/PropertiesView.ui b/glabels/ui/PropertiesView.ui index 60c0632..6b8f115 100644 --- a/glabels/ui/PropertiesView.ui +++ b/glabels/ui/PropertiesView.ui @@ -241,6 +241,12 @@ + + + 330 + 0 + + <html><head/><body><p>Select another product for this gLabels project.</p></body></html>