Index: scribus/ui/guidemanager.ui =================================================================== --- scribus/ui/guidemanager.ui (revision 27810) +++ scribus/ui/guidemanager.ui (working copy) @@ -8,7 +8,7 @@ 0 0 - 428 + 340 368 @@ -35,7 +35,7 @@ - &Single + &Manual Guides @@ -55,10 +55,13 @@ - Horizontals + &Horizontal Guides - + + 5 + + true @@ -66,33 +69,37 @@ QAbstractItemView::SelectRows + + true + - - - - Add a new horizontal guide - - - &Add - - - Alt+A - - - - - - - Delete the selected horizontal guide - - - D&elete - - - Alt+E - - + + + + 5 + + + + + Add a new horizontal guide + + + + + + + + + + Delete the selected horizontal guide + + + + + + + @@ -100,10 +107,13 @@ - Verticals + &Vertical Guides - + + 5 + + true @@ -111,70 +121,81 @@ QAbstractItemView::SelectRows + + true + - - - - Add a new vertical guide - - - A&dd - - - Alt+D - - - - - - - Delete the selected vertical guide - - - De&lete - - - Alt+L - - + + + + 5 + + + + + Add a new vertical guide + + + + + + + + + + Delete the selected vertical guide + + + + + + + - - - - Lock the guides - - - &Lock Guides - - - Alt+L - - - - - - - Apply to all pages + + + + 8 - - Appl&y to All Pages - - - Alt+Y - - + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 40 + 20 + + + + + + + + Replace the manual guides on all other pages with the manual guides from the current page + + + Copy Guides to All Pages + + + + - &Column/Row + &Rows && Columns @@ -189,299 +210,384 @@ 9 - - - - Apply the shown guides to all pages in the document - - - Appl&y to All Pages - - - Alt+Y - - - - Horizontals + &Horizontal Guides + + 20 + + + 8 + - - - &Number: - - - false - - - horizontalAutoCountSpin - - - - - - - Number of horizontal guides to create - - - - - - 0 - - - 0 - - - - - - - Create rows with guides, with an additional gap between the rows - - - U&se Gap: - - - Alt+S - - - - - - - - - - Refer to - - - - + + + Relative to + + + + 5 + + + 0 + + + 0 + + + 0 + + + 0 + + + - Create the selected number of horizontal guides relative to the current page + Relative to page - &Page + - - Alt+P + + true true + + true + - - + + - Create the selected number of horizontal guides relative to the current page's margins + Relative to margins - M&argins + - - Alt+A + + true + + + true - - + + - Create the selected number of horizontal guides relative to the current selection of items + Relative to selection - S&election + + + + true - - Alt+E + + true - - - - - - - Verticals - - - - - - Nu&mber: - - - false - - - verticalAutoCountSpin - + + + + Number + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + 100 + 0 + + + + + 100 + 16777215 + + + + Number of horizontal guides to create + + + + + + 0 + + + 0 + + + + - - + + - Number of vertical guides to create - - - - - - 0 + Set the gap between adjacent generated rows - - 0 + + Gap: - - - - Create columns with guides, with an additional gap between the columns + + + + + 100 + 0 + + + + + 100 + 16777215 + - - Use &Gap: - - - Alt+G + + Set the gap between adjacent generated rows - - - - - - - Refer to - - - - + + + + + + + &Vertical Guides + + + + 20 + + + 8 + + + + + Relative to + + + + 5 + + + 0 + + + 0 + + + 0 + + + 0 + + + - Create the selected number of vertical guides relative to the current page + Relative to page - &Page + - - Alt+P + + true true + + true + - - + + - Create the selected number of vertical guides relative to the current page's margins + Relative to margins - M&argins + - - Alt+A + + true + + + true - - + + - Create the selected number of vertical guides relative to the current selection of items + Relative to selection - S&election + + + + true - - Alt+E + + true + + + + Number + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + 100 + 0 + + + + + 100 + 16777215 + + + + Number of vertical guides to create + + + + + + 0 + + + 0 + + + + + + + + + + Set the gap between adjacent generated columns + + + Gap: + + + + + + + + 100 + 0 + + + + + 100 + 16777215 + + + + Set the gap between adjacent generated columns + + + - - - - Qt::Vertical + + + + 8 - - - 20 - 0 - - - - - - - - - &Misc - - - - 9 - - - 9 - - - 9 - - - 9 - - - - - Delete all guides from the current page - - - Delete Guides from Current &Page - - - Alt+P - - - - - - - Delete all guides from the current document - - - Delete Guides from &All Pages - - - Alt+A - - + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 40 + 20 + + + + + + + + Apply the current row and column guide settings to all pages in the document + + + Apply Settings to All Pages + + + + - - + + Qt::Vertical - - QSizePolicy::Expanding - 20 - 40 + 0 @@ -490,10 +596,80 @@ + + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + Lock the guides + + + Lock Guides + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 40 + 20 + + + + + + + + Delete all guides from the current page + + + Clear Page Guides + + + + + + + Delete all guides from the current document + + + Clear All Guides + + + + + + + FormWidget + QWidget +
ui/widgets/form_widget.h
+ 1 +
+ ScrSpinBox QDoubleSpinBox
ui/scrspinbox.h
Index: scribus/ui/guidemanager.cpp =================================================================== --- scribus/ui/guidemanager.cpp (revision 27810) +++ scribus/ui/guidemanager.cpp (working copy) @@ -27,6 +27,7 @@ #include "guidemanager.h" #include "guidesdelegate.h" #include "guidesmodel.h" +#include "iconmanager.h" #include "scpage.h" #include "scribuscore.h" #include "scribusdoc.h" @@ -41,6 +42,7 @@ { setupUi(this); tabWidget->setEnabled(false); + globalGuideControls->setEnabled(false); horizontalAutoGapSpin->setMinimum(0.0); horizontalAutoGapSpin->setMaximum(10000.0); verticalAutoGapSpin->setMinimum(0.0); @@ -48,6 +50,18 @@ horizontalAutoCountSpin->setDecimals(0); verticalAutoCountSpin->setDecimals(0); + IconManager& im = IconManager::instance(); + addHorButton->setIcon(im.loadIcon("list-add")); + delHorButton->setIcon(im.loadIcon("edit-delete")); + addVerButton->setIcon(im.loadIcon("list-add")); + delVerButton->setIcon(im.loadIcon("edit-delete")); + horizontalPageAutoButton->setIcon(im.loadIcon("align-to-page")); + horizontalMarginsAutoButton->setIcon(im.loadIcon("align-to-margin")); + horizontalSelectionAutoButton->setIcon(im.loadIcon("align-to-last-selection")); + verticalPageAutoButton->setIcon(im.loadIcon("align-to-page")); + verticalMarginsAutoButton->setIcon(im.loadIcon("align-to-margin")); + verticalSelectionAutoButton->setIcon(im.loadIcon("align-to-last-selection")); + // MVC horizontalModel = new GuidesModel(this); verticalModel = new GuidesModel(this); @@ -122,6 +136,7 @@ if (!m_doc) currentPage = nullptr; tabWidget->setEnabled(doc != nullptr); + globalGuideControls->setEnabled(doc != nullptr); } void GuideManager::setVisible(bool visible) @@ -243,20 +258,14 @@ if (!m_doc) return; - // a little bit magic to get Verticals (unit) into group boxes - horizontalGroupBox->setTitle(horizontalGroupBox->title().remove(" ("+suffix.trimmed()+")")); - verticalGroupBox->setTitle(verticalGroupBox->title().remove(" ("+suffix.trimmed()+")")); docUnitIndex = m_doc->unitIndex(); int docUnitDecimals = unitGetPrecisionFromIndex(docUnitIndex); QSignalBlocker horizontalAutoGapSpinBlock(horizontalAutoGapSpin); QSignalBlocker verticalAutoGapSpinBlock(verticalAutoGapSpin); - suffix = unitGetSuffixFromIndex(docUnitIndex); horizontalAutoGapSpin->setNewUnit(docUnitIndex); verticalAutoGapSpin->setNewUnit(docUnitIndex); - horizontalGroupBox->setTitle(horizontalGroupBox->title() + " ("+suffix.trimmed()+")"); - verticalGroupBox->setTitle(verticalGroupBox->title() + " ("+suffix.trimmed()+")"); // models display horizontalModel->unitChange(docUnitIndex, docUnitDecimals, m_doc->rulerYoffset); verticalModel->unitChange(docUnitIndex, docUnitDecimals, m_doc->rulerXoffset); Index: scribus/ui/guidemanager.h =================================================================== --- scribus/ui/guidemanager.h (revision 27810) +++ scribus/ui/guidemanager.h (working copy) @@ -92,9 +92,6 @@ //! \brief Document measurements and metrics int docUnitIndex { 0 }; - //! \brief suffix of the unit [mm, ...] - QString suffix; - /*! \brief Copy guides from currentPage to all remaining. All gudes are deleted before copying. \param t a type to clear and copy.*/ Index: scribus/guidesmodel.cpp =================================================================== --- scribus/guidesmodel.cpp (revision 27810) +++ scribus/guidesmodel.cpp (working copy) @@ -43,7 +43,7 @@ return QVariant(l.toString(pts2value(m_values.at(index.row()) - m_rule, m_docUnitIndex), 'f', m_docUnitDecimals) - ); + + unitGetSuffixFromIndex(m_docUnitIndex)); } if (role == Qt::EditRole) return pts2value(m_values.at(index.row()) - m_rule, m_docUnitIndex);