summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRalf Habacker <[email protected]>2015-06-01 13:42:54 +0200
committerRalf Habacker <[email protected]>2015-06-01 13:42:54 +0200
commitdbc9c7035e77cfbabcd5be802093d57f6c0117c4 (patch)
treedc98e98176c7995bff44de47e004d0d07adafe11
parentc832c82935166a479bf4ba0bd1c4cce53e6d446e (diff)
Merge remaining Qt5 variants of KDialogButtonBox from frameworks branch.
-rw-r--r--umbrello/dialogs/pages/classifierlistpage.cpp10
-rw-r--r--umbrello/dialogs/umlforeignkeyconstraintdialog.cpp8
-rw-r--r--umbrello/dialogs/umloperationdialog.cpp10
-rw-r--r--umbrello/dialogs/umluniqueconstraintdialog.cpp8
4 files changed, 36 insertions, 0 deletions
diff --git a/umbrello/dialogs/pages/classifierlistpage.cpp b/umbrello/dialogs/pages/classifierlistpage.cpp
index 382476b..2be34e0 100644
--- a/umbrello/dialogs/pages/classifierlistpage.cpp
+++ b/umbrello/dialogs/pages/classifierlistpage.cpp
@@ -200,12 +200,22 @@ void ClassifierListPage::setupMoveButtons(QHBoxLayout* parentLayout)
*/
void ClassifierListPage::setupActionButtons(const QString& itemType, QVBoxLayout* parentLayout)
{
+#if QT_VERSION >= 0x050000
+ QDialogButtonBox* buttonBox = new QDialogButtonBox(m_pItemListGB);
+ m_pNewClassifierListItemButton = buttonBox->addButton(itemType, QDialogButtonBox::ActionRole);
+ connect(m_pNewClassifierListItemButton, SIGNAL(clicked()), this, SLOT(slotNewListItem()));
+ m_pDeleteListItemButton = buttonBox->addButton(i18n("&Delete"), QDialogButtonBox::ActionRole);
+ connect(m_pDeleteListItemButton, SIGNAL(clicked()), this, SLOT(slotDelete()));
+ m_pPropertiesButton = buttonBox->addButton(i18n("&Properties"), QDialogButtonBox::ActionRole);
+ connect(m_pPropertiesButton, SIGNAL(clicked()), this, SLOT(slotProperties()));
+#else
KDialogButtonBox* buttonBox = new KDialogButtonBox(m_pItemListGB);
m_pNewClassifierListItemButton = buttonBox->addButton(itemType, KDialogButtonBox::ActionRole, this,
SLOT(slotNewListItem()));
m_pDeleteListItemButton = buttonBox->addButton(i18n("&Delete"),
KDialogButtonBox::ActionRole, this, SLOT(slotDelete()));
m_pPropertiesButton = buttonBox->addButton(i18n("&Properties"), KDialogButtonBox::ActionRole, this, SLOT(slotProperties()));
+#endif
parentLayout->addWidget(buttonBox);
}
diff --git a/umbrello/dialogs/umlforeignkeyconstraintdialog.cpp b/umbrello/dialogs/umlforeignkeyconstraintdialog.cpp
index 5ea4e53..d92bc2b 100644
--- a/umbrello/dialogs/umlforeignkeyconstraintdialog.cpp
+++ b/umbrello/dialogs/umlforeignkeyconstraintdialog.cpp
@@ -313,11 +313,19 @@ void UMLForeignKeyConstraintDialog::setupColumnPage()
m_ColumnWidgets.referencedColumnCB = new KComboBox();
columnsLayout->addWidget(m_ColumnWidgets.referencedColumnCB, 1, 1);
+#if QT_VERSION >= 0x050000
+ QDialogButtonBox* buttonBox = new QDialogButtonBox();
+ m_ColumnWidgets.addPB = buttonBox->addButton(i18n("&Add"), QDialogButtonBox::ActionRole);
+ connect(m_ColumnWidgets.addPB, SIGNAL(clicked()), this, SLOT(slotAddPair()));
+ m_ColumnWidgets.removePB = buttonBox->addButton(i18n("&Delete"), QDialogButtonBox::ActionRole);
+ connect(m_ColumnWidgets.removePB, SIGNAL(clicked()), this, SLOT(slotDeletePair()));
+#else
KDialogButtonBox* buttonBox = new KDialogButtonBox(page);
m_ColumnWidgets.addPB = buttonBox->addButton(i18n("&Add"), KDialogButtonBox::ActionRole, this,
SLOT(slotAddPair()));
m_ColumnWidgets.removePB = buttonBox->addButton(i18n("&Delete"), KDialogButtonBox::ActionRole, this,
SLOT(slotDeletePair()));
+#endif
columnsLayout->addWidget(buttonBox, 2, 1);
diff --git a/umbrello/dialogs/umloperationdialog.cpp b/umbrello/dialogs/umloperationdialog.cpp
index 88fcf3a..5d3e0eb 100644
--- a/umbrello/dialogs/umloperationdialog.cpp
+++ b/umbrello/dialogs/umloperationdialog.cpp
@@ -141,6 +141,15 @@ void UMLOperationDialog::setupDialog()
m_pDownButton->setEnabled(false);
buttonLayout->addWidget(m_pDownButton);
+#if QT_VERSION >= 0x050000
+ QDialogButtonBox* buttonBox = new QDialogButtonBox(m_pParmsGB);
+ QPushButton* newParam = buttonBox->addButton(i18n("Ne&w Parameter..."), QDialogButtonBox::ActionRole);
+ connect(newParam, SIGNAL(clicked()), this, SLOT(slotNewParameter()));
+ m_pDeleteButton = buttonBox->addButton(i18n("&Delete"), QDialogButtonBox::ActionRole);
+ connect(m_pDeleteButton, SIGNAL(clicked()), this, SLOT(slotDeleteParameter()));
+ m_pPropertiesButton = buttonBox->addButton(i18n("&Properties"), QDialogButtonBox::ActionRole);
+ connect(m_pPropertiesButton, SIGNAL(clicked()), this, SLOT(slotParameterProperties()));
+#else
KDialogButtonBox* buttonBox = new KDialogButtonBox(m_pParmsGB);
buttonBox->addButton(i18n("Ne&w Parameter..."), KDialogButtonBox::ActionRole,
this, SLOT(slotNewParameter()));
@@ -148,6 +157,7 @@ void UMLOperationDialog::setupDialog()
this, SLOT(slotDeleteParameter()));
m_pPropertiesButton = buttonBox->addButton(i18n("&Properties"), KDialogButtonBox::ActionRole,
this, SLOT(slotParameterProperties()));
+#endif
parmsHBoxLayout->addWidget(m_pParmsLW);
parmsHBoxLayout->addLayout(buttonLayout);
diff --git a/umbrello/dialogs/umluniqueconstraintdialog.cpp b/umbrello/dialogs/umluniqueconstraintdialog.cpp
index 3a22b40..6a20ff4 100644
--- a/umbrello/dialogs/umluniqueconstraintdialog.cpp
+++ b/umbrello/dialogs/umluniqueconstraintdialog.cpp
@@ -109,11 +109,19 @@ void UMLUniqueConstraintDialog::setupDialog()
comboButtonHBoxLayout->addWidget(m_pAttributeCB);
//the action buttons
+#if QT_VERSION >= 0x050000
+ QDialogButtonBox* buttonBox = new QDialogButtonBox(m_pAttributeListGB);
+ m_pAddPB = buttonBox->addButton(i18n("&Add"), QDialogButtonBox::ActionRole);
+ connect(m_pAddPB, SIGNAL(clicked()), this, SLOT(slotAddAttribute()));
+ m_pRemovePB = buttonBox->addButton(i18n("&Delete"), QDialogButtonBox::ActionRole);
+ connect(m_pRemovePB, SIGNAL(clicked()), this, SLOT(slotDeleteAttribute()));
+#else
KDialogButtonBox* buttonBox = new KDialogButtonBox(m_pAttributeListGB);
m_pAddPB = buttonBox->addButton(i18n("&Add"), KDialogButtonBox::ActionRole, this,
SLOT(slotAddAttribute()));
m_pRemovePB = buttonBox->addButton(i18n("&Delete"), KDialogButtonBox::ActionRole, this,
SLOT(slotDeleteAttribute()));
+#endif
comboButtonHBoxLayout->addWidget(buttonBox);