summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <montel@kde.org>2016-10-02 05:43:45 (GMT)
committerMontel Laurent <montel@kde.org>2016-10-02 05:43:45 (GMT)
commite92a74f9e15e0e806798ed34153e85956d6085f5 (patch)
tree4307a24fb6aa7d1c3513e3c63f07c955e7f3058f
parent478b1d244dee8820acd625bf38e6c5da48970aa2 (diff)
Allow to access to QDialogButtonBox
-rw-r--r--CMakeLists.txt2
-rw-r--r--src/configureplugins/configureplugindialog.cpp20
-rw-r--r--src/configureplugins/configureplugindialog.h3
3 files changed, 17 insertions, 8 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 32dd83f..ab72843 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -21,7 +21,7 @@ include(ECMQtDeclareLoggingCategory)
include(ECMAddTests)
include(ECMInstallIcons)
-set(PIM_VERSION "5.3.59")
+set(PIM_VERSION "5.3.60")
set(PIMCOMMON_LIB_VERSION ${PIM_VERSION})
set(AKONADIMIME_LIB_VERSION "5.3.40")
diff --git a/src/configureplugins/configureplugindialog.cpp b/src/configureplugins/configureplugindialog.cpp
index 2496a80..c841b1d 100644
--- a/src/configureplugins/configureplugindialog.cpp
+++ b/src/configureplugins/configureplugindialog.cpp
@@ -28,7 +28,8 @@
using namespace PimCommon;
ConfigurePluginDialog::ConfigurePluginDialog(QWidget *parent)
- : QDialog(parent)
+ : QDialog(parent),
+ mButtonBox(Q_NULLPTR)
{
}
@@ -42,12 +43,12 @@ void ConfigurePluginDialog::initLayout()
QVBoxLayout *layout = new QVBoxLayout(this);
layout->addWidget(createLayout());
- QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok|QDialogButtonBox::Cancel|QDialogButtonBox::RestoreDefaults|QDialogButtonBox::Help, this);
- layout->addWidget(buttonBox);
- connect(buttonBox, &QDialogButtonBox::accepted, this, &ConfigurePluginDialog::slotAccepted);
- connect(buttonBox, &QDialogButtonBox::rejected, this, &ConfigurePluginDialog::reject);
- connect(buttonBox, &QDialogButtonBox::helpRequested, this, &ConfigurePluginDialog::slotHelpClicked);
- connect(buttonBox->button(QDialogButtonBox::RestoreDefaults), &QPushButton::clicked, this, &ConfigurePluginDialog::slotRestoreDefaultClicked);
+ mButtonBox = new QDialogButtonBox(QDialogButtonBox::Ok|QDialogButtonBox::Cancel|QDialogButtonBox::RestoreDefaults|QDialogButtonBox::Help, this);
+ layout->addWidget(mButtonBox);
+ connect(mButtonBox, &QDialogButtonBox::accepted, this, &ConfigurePluginDialog::slotAccepted);
+ connect(mButtonBox, &QDialogButtonBox::rejected, this, &ConfigurePluginDialog::reject);
+ connect(mButtonBox, &QDialogButtonBox::helpRequested, this, &ConfigurePluginDialog::slotHelpClicked);
+ connect(mButtonBox->button(QDialogButtonBox::RestoreDefaults), &QPushButton::clicked, this, &ConfigurePluginDialog::slotRestoreDefaultClicked);
readConfig();
load();
}
@@ -61,6 +62,11 @@ void ConfigurePluginDialog::help()
{
}
+QDialogButtonBox *ConfigurePluginDialog::buttonBox() const
+{
+ return mButtonBox;
+}
+
void ConfigurePluginDialog::showHelp(const QString &name, const QString &anchor)
{
PimCommon::Util::invokeHelp(name, anchor);
diff --git a/src/configureplugins/configureplugindialog.h b/src/configureplugins/configureplugindialog.h
index 1a59383..e5f6506 100644
--- a/src/configureplugins/configureplugindialog.h
+++ b/src/configureplugins/configureplugindialog.h
@@ -20,6 +20,7 @@
#include <QDialog>
#include "pimcommon_export.h"
+class QDialogButtonBox;
namespace PimCommon
{
class PIMCOMMON_EXPORT ConfigurePluginDialog : public QDialog
@@ -40,6 +41,7 @@ protected:
virtual void help();
+ QDialogButtonBox *buttonBox() const;
private:
void slotHelpClicked();
@@ -47,6 +49,7 @@ private:
void slotRestoreDefaultClicked();
void saveConfig();
void readConfig();
+ QDialogButtonBox *mButtonBox;
};
}
#endif // CONFIGUREPLUGINDIALOG_H