r25018 by craig - QDialogButtonBox migration: Annotations, master page dialog, move page,

scribus-commit scribus-commit at lists.scribus.net
Fri Mar 11 22:44:40 UTC 2022


Author: craig
Date: Fri Mar 11 22:44:40 2022
New Revision: 25018

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=25018
Log:
QDialogButtonBox migration: Annotations, master page dialog, move page,
create range, multiple duplicate and item transform

Modified:
    trunk/Scribus/scribus/ui/annot.cpp
    trunk/Scribus/scribus/ui/annot.h
    trunk/Scribus/scribus/ui/annot.ui
    trunk/Scribus/scribus/ui/annota.cpp
    trunk/Scribus/scribus/ui/annota.h
    trunk/Scribus/scribus/ui/applytemplatedialog.cpp
    trunk/Scribus/scribus/ui/applytemplatedialog.h
    trunk/Scribus/scribus/ui/createrange.cpp
    trunk/Scribus/scribus/ui/createrange.ui
    trunk/Scribus/scribus/ui/movepage.cpp
    trunk/Scribus/scribus/ui/multipleduplicate.cpp
    trunk/Scribus/scribus/ui/multipleduplicate.h
    trunk/Scribus/scribus/ui/multipleduplicate.ui
    trunk/Scribus/scribus/ui/transformdialog.h

Modified: trunk/Scribus/scribus/ui/annot.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25018&path=/trunk/Scribus/scribus/ui/annot.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/annot.cpp	(original)
+++ trunk/Scribus/scribus/ui/annot.cpp	Fri Mar 11 22:44:40 2022
@@ -9,24 +9,25 @@
 #include <QCheckBox>
 #include <QComboBox>
 #include <QDateTime>
+#include <QDialogButtonBox>
 #include <QFrame>
+#include <QGridLayout>
 #include <QGroupBox>
 #include <QHBoxLayout>
-#include <QGridLayout>
-#include <QVBoxLayout>
 #include <QLabel>
 #include <QLineEdit>
 #include <QList>
 #include <QPixmap>
 #include <QPushButton>
+#include <QRadioButton>
+#include <QSpacerItem>
 #include <QSpinBox>
+#include <QStackedWidget>
+#include <QStringList>
 #include <QTabWidget>
 #include <QTextEdit>
 #include <QToolTip>
-#include <QRadioButton>
-#include <QSpacerItem>
-#include <QStackedWidget>
-#include <QStringList>
+#include <QVBoxLayout>
 #include <QWidget>
 
 #include "annotation.h"
@@ -396,10 +397,8 @@
 	else
 		SetAnnotationType(m_annotation.Type()-2);
 
-	PushButton1->setDefault( true );
-
-	connect(PushButton1, SIGNAL(clicked()), this, SLOT(SetValues()));
-	connect(PushButton2, SIGNAL(clicked()), this, SLOT(reject()));
+	connect(buttonBox, &QDialogButtonBox::accepted, this, &ScAnnot::SetValues);
+	connect(buttonBox, &QDialogButtonBox::rejected, this, &ScAnnot::reject);
 	connect(EditFormat, SIGNAL(clicked()), this, SLOT(editFormatSc()));
 	connect(EditKeystr, SIGNAL(clicked()), this, SLOT(editKeySc()));
 	connect(EditValScript, SIGNAL(clicked()), this, SLOT(editValidSc()));
@@ -1079,7 +1078,7 @@
 {
 	bool AAct = false;
 	QString tmp, tmp2;
-	QString Nfo("");
+	QString Nfo;
 	
 	Annotation& annotation = m_item->annotation();
 	annotation = m_annotation;

Modified: trunk/Scribus/scribus/ui/annot.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25018&path=/trunk/Scribus/scribus/ui/annot.h
==============================================================================
--- trunk/Scribus/scribus/ui/annot.h	(original)
+++ trunk/Scribus/scribus/ui/annot.h	Fri Mar 11 22:44:40 2022
@@ -19,9 +19,9 @@
 class ColorCombo;
 class Navigator;
 class PageItem;
+class PrefsContext;
 class ScribusDoc;
 class ScribusView;
-class PrefsContext;
 
 class SCRIBUS_API ScAnnot : public QDialog, Ui::ScAnnot
 {

Modified: trunk/Scribus/scribus/ui/annot.ui
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25018&path=/trunk/Scribus/scribus/ui/annot.ui
==============================================================================
--- trunk/Scribus/scribus/ui/annot.ui	(original)
+++ trunk/Scribus/scribus/ui/annot.ui	Fri Mar 11 22:44:40 2022
@@ -7,7 +7,7 @@
     <x>0</x>
     <y>0</y>
     <width>537</width>
-    <height>562</height>
+    <height>621</height>
    </rect>
   </property>
   <property name="windowTitle">
@@ -2256,35 +2256,11 @@
     </widget>
    </item>
    <item>
-    <layout class="QHBoxLayout" name="horizontalLayout_2">
-     <item>
-      <spacer name="horizontalSpacer">
-       <property name="orientation">
-        <enum>Qt::Horizontal</enum>
-       </property>
-       <property name="sizeHint" stdset="0">
-        <size>
-         <width>40</width>
-         <height>20</height>
-        </size>
-       </property>
-      </spacer>
-     </item>
-     <item>
-      <widget class="QPushButton" name="PushButton1">
-       <property name="text">
-        <string>OK</string>
-       </property>
-      </widget>
-     </item>
-     <item>
-      <widget class="QPushButton" name="PushButton2">
-       <property name="text">
-        <string>Cancel</string>
-       </property>
-      </widget>
-     </item>
-    </layout>
+    <widget class="QDialogButtonBox" name="buttonBox">
+     <property name="standardButtons">
+      <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
+     </property>
+    </widget>
    </item>
   </layout>
  </widget>

Modified: trunk/Scribus/scribus/ui/annota.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25018&path=/trunk/Scribus/scribus/ui/annota.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/annota.cpp	(original)
+++ trunk/Scribus/scribus/ui/annota.cpp	Fri Mar 11 22:44:40 2022
@@ -20,7 +20,6 @@
 #include <QGridLayout>
 #include <QGroupBox>
 #include <QHBoxLayout>
-#include <QVBoxLayout>
 #include <QLabel>
 #include <QLineEdit>
 #include <QPixmap>
@@ -29,6 +28,7 @@
 #include <QSpacerItem>
 #include <QStackedWidget>
 #include <QStringList>
+#include <QVBoxLayout>
 
 #include "annota.h"
 #include "commonstrings.h"
@@ -218,21 +218,11 @@
 	GroupBox1Layout->addWidget( ySpin, 4, 1 );
 	Fram->addWidget(GroupBox1);
 
-	Layout1_2 = new QHBoxLayout;
-	Layout1_2->setSpacing(6);
-	Layout1_2->setContentsMargins(0, 0, 0, 0);
-
-	QSpacerItem* spacer = new QSpacerItem( 2, 2, QSizePolicy::Expanding, QSizePolicy::Minimum );
-	Layout1_2->addItem( spacer );
-	okButton = new QPushButton( CommonStrings::tr_OK, this );
-	okButton->setDefault( true );
-	Layout1_2->addWidget( okButton );
-	cancelButton = new QPushButton( CommonStrings::tr_Cancel, this );
-	Layout1_2->addWidget( cancelButton );
-	AnnotLayout->addLayout( Layout1_2 );
-
-	connect(okButton, SIGNAL(clicked()), this, SLOT(SetValues()));
-	connect(cancelButton, SIGNAL(clicked()), this, SLOT(reject()));
+	buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
+	AnnotLayout->addWidget(buttonBox);
+
+	connect(buttonBox, &QDialogButtonBox::accepted, this, &Annota::SetValues);
+	connect(buttonBox, &QDialogButtonBox::rejected, this, &Annota::reject);
 	connect(typeCombo, SIGNAL(activated(int)), this, SLOT(SetTarget(int)));
 	connect(pageSpin, SIGNAL(valueChanged(double)), this, SLOT(SetPage(double)));
 	connect(navigator, SIGNAL(Coords(double,double)), this, SLOT(SetCoords(double,double)));

Modified: trunk/Scribus/scribus/ui/annota.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25018&path=/trunk/Scribus/scribus/ui/annota.h
==============================================================================
--- trunk/Scribus/scribus/ui/annota.h	(original)
+++ trunk/Scribus/scribus/ui/annota.h	Fri Mar 11 22:44:40 2022
@@ -16,6 +16,7 @@
 #define ANNOTA_H
 
 #include <QDialog>
+#include <QDialogButtonBox>
 class QHBoxLayout;
 class QGridLayout;
 class QVBoxLayout;
@@ -68,7 +69,6 @@
 	QHBoxLayout* Layout1 { nullptr };
 	QGridLayout* GroupBox1Layout { nullptr };
 	QGridLayout* GroupBox2Layout { nullptr };
-	QHBoxLayout* Layout1_2 { nullptr };
 	
 	QStackedWidget* Fram { nullptr };
 	QLabel* typeComboLabel { nullptr };
@@ -84,13 +84,11 @@
 	ScrSpinBox* pageSpin { nullptr };
 	ScrSpinBox* xSpin { nullptr };
 	ScrSpinBox* ySpin { nullptr };
-//	QFrame* Frame9;
-	QPushButton* okButton { nullptr };
-	QPushButton* cancelButton { nullptr };
 	QGroupBox* GroupBox2 { nullptr };
 	QLabel* iconComboLabel { nullptr };
 	QComboBox* iconCombo { nullptr };
 	QCheckBox* textIsOpen { nullptr };
+	QDialogButtonBox* buttonBox { nullptr };
 };
 
 #endif // ANNOT_H

Modified: trunk/Scribus/scribus/ui/applytemplatedialog.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25018&path=/trunk/Scribus/scribus/ui/applytemplatedialog.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/applytemplatedialog.cpp	(original)
+++ trunk/Scribus/scribus/ui/applytemplatedialog.cpp	Fri Mar 11 22:44:40 2022
@@ -117,18 +117,8 @@
 	applyToPageButtonGroupLayout->addLayout( rangeLayout );
 	ApplyMasterPageDialogLayout->addWidget( applyToPageButtonGroup );
 
-	layout8 = new QHBoxLayout;
-	layout8->setSpacing(6);
-	layout8->setContentsMargins(0, 0, 0, 0);
-	spacer1 = new QSpacerItem( 1, 1, QSizePolicy::Expanding, QSizePolicy::Minimum );
-	layout8->addItem( spacer1 );
-
-	okButton = new QPushButton( this );
-	layout8->addWidget( okButton );
-
-	cancelButton = new QPushButton( this );
-	layout8->addWidget( cancelButton );
-	ApplyMasterPageDialogLayout->addLayout( layout8 );
+	buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
+	ApplyMasterPageDialogLayout->addWidget(buttonBox);
 	languageChange();
 	resize( QSize(268, 230).expandedTo(minimumSizeHint()) );
 
@@ -140,8 +130,8 @@
 	connect( allPagesRadioButton, SIGNAL( clicked() ), this, SLOT( rangeSelectable() ) );
 	connect( fromPageSpinBox, SIGNAL( valueChanged(double) ), this, SLOT( checkRangeFrom() ) );
 	connect( toPageSpinBox, SIGNAL( valueChanged(double) ), this, SLOT( checkRangeTo() ) );
-	connect( okButton, SIGNAL( clicked() ), this, SLOT( accept() ) );
-	connect( cancelButton, SIGNAL( clicked() ), this, SLOT( reject() ) );
+	connect(buttonBox, &QDialogButtonBox::accepted, this, &ApplyMasterPageDialog::accept);
+	connect(buttonBox, &QDialogButtonBox::rejected, this, &ApplyMasterPageDialog::reject);
 
 	// buddies
 	masterPageLabel->setBuddy( masterPageComboBox );
@@ -277,8 +267,4 @@
 	useRangeCheckBox->setShortcut( QKeySequence( tr( "Alt+W" ) ) );
 	useRangeCheckBox->setToolTip( "<qt>" + tr( "Apply the selected master page to even, odd or all pages within the following range") + "</qt>" );
 	toPageLabel->setText( tr( "to" ) );
-	okButton->setText( CommonStrings::tr_OK );
-	okButton->setShortcut( QKeySequence( tr( "Alt+O" ) ) );
-	cancelButton->setText( CommonStrings::tr_Cancel );
-	cancelButton->setShortcut( QKeySequence( tr( "Alt+C" ) ) );
-}
+}

Modified: trunk/Scribus/scribus/ui/applytemplatedialog.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25018&path=/trunk/Scribus/scribus/ui/applytemplatedialog.h
==============================================================================
--- trunk/Scribus/scribus/ui/applytemplatedialog.h	(original)
+++ trunk/Scribus/scribus/ui/applytemplatedialog.h	Fri Mar 11 22:44:40 2022
@@ -16,6 +16,7 @@
 #define APPLYMASTERPAGEDIALOG_H
 
 #include <QDialog>
+#include <QDialogButtonBox>
 #include <QString>
 
 #include "scribusapi.h"
@@ -53,8 +54,6 @@
 	ScrSpinBox* fromPageSpinBox { nullptr };
 	QLabel* toPageLabel { nullptr };
 	ScrSpinBox* toPageSpinBox { nullptr };
-	QPushButton* okButton { nullptr };
-	QPushButton* cancelButton { nullptr };
 
 	virtual void setup(ScribusDoc* doc, const QString& Nam);
 	virtual QString getMasterPageName();
@@ -70,8 +69,7 @@
 	QVBoxLayout* applyToPageButtonGroupLayout { nullptr };
 	QHBoxLayout* rangeLayout { nullptr };
 	QSpacerItem* spacer3 { nullptr };
-	QHBoxLayout* layout8 { nullptr };
-	QSpacerItem* spacer1 { nullptr };
+	QDialogButtonBox* buttonBox { nullptr };
 	
 	void changeEvent(QEvent *e) override;
 

Modified: trunk/Scribus/scribus/ui/createrange.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25018&path=/trunk/Scribus/scribus/ui/createrange.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/createrange.cpp	(original)
+++ trunk/Scribus/scribus/ui/createrange.cpp	Fri Mar 11 22:44:40 2022
@@ -8,6 +8,7 @@
 
 #include "usertaskstructs.h"
 
+#include <QDialogButtonBox>
 #include <QGroupBox>
 #include <QLabel>
 #include <QListWidget>
@@ -49,8 +50,8 @@
 	connect(basicRangeUpButton, SIGNAL(clicked()), this, SLOT(basicMoveUp()));
 	connect(basicRangeDownButton, SIGNAL(clicked()), this, SLOT(basicMoveDown()));
 	connect(advPageGroupSizeSpinBox, SIGNAL(valueChanged(double)), this, SLOT(advSpinChange()));
-	connect(okButton, SIGNAL(clicked()), this, SLOT(accept()));
-	connect(cancelButton, SIGNAL(clicked()), this, SLOT(reject()));
+	connect(buttonBox, &QDialogButtonBox::accepted, this, &CreateRange::accept);
+	connect(buttonBox, &QDialogButtonBox::rejected, this, &CreateRange::reject);
 	advPageGroupSizeSpinBox->setValue(4);
 }
 
@@ -195,7 +196,7 @@
 
 void CreateRange::advSpinChange()
 {
-	m_PageString="";
+	m_PageString.clear();
 	int mp1=m_PageCount+1;
 	//locked at 4 for now.
 	if (m_PageCount % 4 == 0)

Modified: trunk/Scribus/scribus/ui/createrange.ui
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25018&path=/trunk/Scribus/scribus/ui/createrange.ui
==============================================================================
--- trunk/Scribus/scribus/ui/createrange.ui	(original)
+++ trunk/Scribus/scribus/ui/createrange.ui	Fri Mar 11 22:44:40 2022
@@ -7,7 +7,7 @@
     <x>0</x>
     <y>0</y>
     <width>605</width>
-    <height>386</height>
+    <height>392</height>
    </rect>
   </property>
   <property name="windowTitle">
@@ -26,62 +26,6 @@
    <property name="bottomMargin">
     <number>9</number>
    </property>
-   <item row="0" column="0">
-    <layout class="QHBoxLayout">
-     <item>
-      <widget class="QLabel" name="pageCountLabel">
-       <property name="text">
-        <string>Number of Pages in Document:</string>
-       </property>
-       <property name="wordWrap">
-        <bool>false</bool>
-       </property>
-      </widget>
-     </item>
-     <item>
-      <widget class="QLabel" name="pageCountValueLabel">
-       <property name="text">
-        <string/>
-       </property>
-       <property name="wordWrap">
-        <bool>false</bool>
-       </property>
-      </widget>
-     </item>
-     <item>
-      <spacer>
-       <property name="orientation">
-        <enum>Qt::Horizontal</enum>
-       </property>
-       <property name="sizeType">
-        <enum>QSizePolicy::Expanding</enum>
-       </property>
-       <property name="sizeHint" stdset="0">
-        <size>
-         <width>80</width>
-         <height>20</height>
-        </size>
-       </property>
-      </spacer>
-     </item>
-     <item>
-      <spacer>
-       <property name="orientation">
-        <enum>Qt::Horizontal</enum>
-       </property>
-       <property name="sizeType">
-        <enum>QSizePolicy::Expanding</enum>
-       </property>
-       <property name="sizeHint" stdset="0">
-        <size>
-         <width>72</width>
-         <height>20</height>
-        </size>
-       </property>
-      </spacer>
-     </item>
-    </layout>
-   </item>
    <item row="1" column="0">
     <widget class="QTabWidget" name="tabWidget">
      <property name="currentIndex">
@@ -393,7 +337,34 @@
     </widget>
    </item>
    <item row="2" column="0">
+    <widget class="QDialogButtonBox" name="buttonBox">
+     <property name="standardButtons">
+      <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
+     </property>
+    </widget>
+   </item>
+   <item row="0" column="0">
     <layout class="QHBoxLayout">
+     <item>
+      <widget class="QLabel" name="pageCountLabel">
+       <property name="text">
+        <string>Number of Pages in Document:</string>
+       </property>
+       <property name="wordWrap">
+        <bool>false</bool>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QLabel" name="pageCountValueLabel">
+       <property name="text">
+        <string/>
+       </property>
+       <property name="wordWrap">
+        <bool>false</bool>
+       </property>
+      </widget>
+     </item>
      <item>
       <spacer>
        <property name="orientation">
@@ -404,31 +375,27 @@
        </property>
        <property name="sizeHint" stdset="0">
         <size>
-         <width>40</width>
+         <width>80</width>
          <height>20</height>
         </size>
        </property>
       </spacer>
      </item>
      <item>
-      <widget class="QPushButton" name="okButton">
-       <property name="text">
-        <string>&OK</string>
-       </property>
-       <property name="shortcut">
-        <string>Alt+O</string>
-       </property>
-      </widget>
-     </item>
-     <item>
-      <widget class="QPushButton" name="cancelButton">
-       <property name="text">
-        <string>&Cancel</string>
-       </property>
-       <property name="shortcut">
-        <string>Alt+C</string>
-       </property>
-      </widget>
+      <spacer>
+       <property name="orientation">
+        <enum>Qt::Horizontal</enum>
+       </property>
+       <property name="sizeType">
+        <enum>QSizePolicy::Expanding</enum>
+       </property>
+       <property name="sizeHint" stdset="0">
+        <size>
+         <width>72</width>
+         <height>20</height>
+        </size>
+       </property>
+      </spacer>
      </item>
     </layout>
    </item>

Modified: trunk/Scribus/scribus/ui/movepage.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25018&path=/trunk/Scribus/scribus/ui/movepage.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/movepage.cpp	(original)
+++ trunk/Scribus/scribus/ui/movepage.cpp	Fri Mar 11 22:44:40 2022
@@ -97,7 +97,7 @@
 	dialogLayout->addLayout( fromToLayout );
 
 	buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
-	dialogLayout->addWidget( buttonBox );
+	dialogLayout->addWidget(buttonBox);
 	setMaximumSize(sizeHint());
 
 	// signals and slots connections

Modified: trunk/Scribus/scribus/ui/multipleduplicate.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25018&path=/trunk/Scribus/scribus/ui/multipleduplicate.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/multipleduplicate.cpp	(original)
+++ trunk/Scribus/scribus/ui/multipleduplicate.cpp	Fri Mar 11 22:44:40 2022
@@ -6,6 +6,7 @@
 */
 #include "multipleduplicate.h"
 
+#include <QDialogButtonBox>
 #include <QGroupBox>
 #include <QLabel>
 #include <QPushButton>
@@ -63,6 +64,8 @@
 
 	connect(lineEditPageRange, &QLineEdit::textChanged, this, &MultipleDuplicate::selectRangeOfPages);
 	connect(toolButtonPageRange, &QToolButton::clicked, this, &MultipleDuplicate::createPageNumberRange);
+	connect(buttonBox, &QDialogButtonBox::accepted, this, &MultipleDuplicate::accept);
+	connect(buttonBox, &QDialogButtonBox::rejected, this, &MultipleDuplicate::reject);
 }
 
 MultipleDuplicate::~MultipleDuplicate()

Modified: trunk/Scribus/scribus/ui/multipleduplicate.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25018&path=/trunk/Scribus/scribus/ui/multipleduplicate.h
==============================================================================
--- trunk/Scribus/scribus/ui/multipleduplicate.h	(original)
+++ trunk/Scribus/scribus/ui/multipleduplicate.h	Fri Mar 11 22:44:40 2022
@@ -20,7 +20,7 @@
 		void getMultiplyData(ItemMultipleDuplicateData&);
 	protected:
 		// int m_unitIndex;
-		ScribusDoc *m_Doc;
+		ScribusDoc *m_Doc { nullptr };
 		double m_unitRatio;
 	protected slots:
 		void setCopiesShift();

Modified: trunk/Scribus/scribus/ui/multipleduplicate.ui
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25018&path=/trunk/Scribus/scribus/ui/multipleduplicate.ui
==============================================================================
--- trunk/Scribus/scribus/ui/multipleduplicate.ui	(original)
+++ trunk/Scribus/scribus/ui/multipleduplicate.ui	Fri Mar 11 22:44:40 2022
@@ -10,7 +10,7 @@
     <x>0</x>
     <y>0</y>
     <width>426</width>
-    <height>291</height>
+    <height>294</height>
    </rect>
   </property>
   <property name="sizePolicy">
@@ -375,8 +375,7 @@
             <widget class="QLineEdit" name="lineEditPageRange"/>
            </item>
            <item>
-            <widget class="QToolButton" name="toolButtonPageRange">
-            </widget>
+            <widget class="QToolButton" name="toolButtonPageRange"/>
            </item>
           </layout>
          </item>
@@ -411,53 +410,11 @@
     </widget>
    </item>
    <item>
-    <layout class="QHBoxLayout">
-     <item>
-      <spacer>
-       <property name="orientation">
-        <enum>Qt::Horizontal</enum>
-       </property>
-       <property name="sizeType">
-        <enum>QSizePolicy::Expanding</enum>
-       </property>
-       <property name="sizeHint" stdset="0">
-        <size>
-         <width>20</width>
-         <height>20</height>
-        </size>
-       </property>
-      </spacer>
-     </item>
-     <item>
-      <widget class="QPushButton" name="buttonOk">
-       <property name="text">
-        <string>&OK</string>
-       </property>
-       <property name="shortcut">
-        <string/>
-       </property>
-       <property name="autoDefault">
-        <bool>true</bool>
-       </property>
-       <property name="default">
-        <bool>true</bool>
-       </property>
-      </widget>
-     </item>
-     <item>
-      <widget class="QPushButton" name="buttonCancel">
-       <property name="text">
-        <string>&Cancel</string>
-       </property>
-       <property name="shortcut">
-        <string/>
-       </property>
-       <property name="autoDefault">
-        <bool>true</bool>
-       </property>
-      </widget>
-     </item>
-    </layout>
+    <widget class="QDialogButtonBox" name="buttonBox">
+     <property name="standardButtons">
+      <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
+     </property>
+    </widget>
    </item>
   </layout>
  </widget>
@@ -479,8 +436,6 @@
   <tabstop>gridColsSpinBox</tabstop>
   <tabstop>horizRCGapSpinBox</tabstop>
   <tabstop>vertRCGapSpinBox</tabstop>
-  <tabstop>buttonOk</tabstop>
-  <tabstop>buttonCancel</tabstop>
  </tabstops>
  <includes>
   <include location="local">ui/scrspinbox.h</include>
@@ -490,40 +445,7 @@
   <include location="local">ui/scrspinbox.h</include>
  </includes>
  <resources/>
- <connections>
-  <connection>
-   <sender>buttonOk</sender>
-   <signal>clicked()</signal>
-   <receiver>MultipleDuplicate</receiver>
-   <slot>accept()</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>147</x>
-     <y>326</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>20</x>
-     <y>20</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>buttonCancel</sender>
-   <signal>clicked()</signal>
-   <receiver>MultipleDuplicate</receiver>
-   <slot>reject()</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>230</x>
-     <y>326</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>20</x>
-     <y>20</y>
-    </hint>
-   </hints>
-  </connection>
- </connections>
+ <connections/>
  <buttongroups>
   <buttongroup name="buttonGroup"/>
  </buttongroups>

Modified: trunk/Scribus/scribus/ui/transformdialog.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25018&path=/trunk/Scribus/scribus/ui/transformdialog.h
==============================================================================
--- trunk/Scribus/scribus/ui/transformdialog.h	(original)
+++ trunk/Scribus/scribus/ui/transformdialog.h	Fri Mar 11 22:44:40 2022
@@ -78,8 +78,8 @@
 	void removeTransform();
 
 private:
-	QMenu *newTransformMenu;
-	ScribusDoc *m_doc;
+	QMenu *newTransformMenu { nullptr };
+	ScribusDoc *m_doc { nullptr };
 	double m_unitRatio;
 	QString m_suffix;
 };




More information about the scribus-commit mailing list