Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit c810af7a authored by Laurent Montel's avatar Laurent Montel 😁

improve it

parent 06ab3bc3
......@@ -35,6 +35,8 @@ GravatarUpdateDialog::GravatarUpdateDialog(QWidget *parent)
mGravatarUpdateWidget->setObjectName(QLatin1String("gravatarupdatewidget"));
mainLayout->addWidget(mGravatarUpdateWidget);
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok|QDialogButtonBox::Cancel);
connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept()));
connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
buttonBox->setObjectName(QLatin1String("buttonbox"));
mainLayout->addWidget(buttonBox);
readConfig();
......@@ -45,6 +47,11 @@ GravatarUpdateDialog::~GravatarUpdateDialog()
writeConfig();
}
void GravatarUpdateDialog::setEmail(const QString &email)
{
mGravatarUpdateWidget->setEmail(email);
}
void GravatarUpdateDialog::readConfig()
{
KConfigGroup grp( KGlobal::config(), "GravatarUpdateDialog" );
......
......@@ -27,6 +27,9 @@ class GravatarUpdateDialog : public QDialog
public:
explicit GravatarUpdateDialog(QWidget *parent=0);
~GravatarUpdateDialog();
void setEmail(const QString &email);
private:
void readConfig();
void writeConfig();
......
......@@ -28,3 +28,9 @@ GravatarUpdateWidget::~GravatarUpdateWidget()
{
}
void GravatarUpdateWidget::setEmail(const QString &email)
{
mEmail = email;
}
......@@ -26,6 +26,11 @@ class GravatarUpdateWidget : public QWidget
public:
explicit GravatarUpdateWidget(QWidget *parent=0);
~GravatarUpdateWidget();
void setEmail(const QString &email);
private:
QString mEmail;
};
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment