Commit cebc67bf authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Add valid addresses

parent af54c6c8
......@@ -38,7 +38,7 @@ ConfirmAddressDialog::ConfirmAddressDialog(QWidget *parent)
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, this);
buttonBox->setObjectName(QStringLiteral("buttonbox"));
connect(buttonBox, &QDialogButtonBox::accepted, this, &ConfirmAddressDialog::slotAccepted);
connect(buttonBox, &QDialogButtonBox::accepted, this, &ConfirmAddressDialog::accept);
connect(buttonBox, &QDialogButtonBox::rejected, this, &ConfirmAddressDialog::reject);
mainLayout->addWidget(buttonBox);
readConfig();
......@@ -49,12 +49,6 @@ ConfirmAddressDialog::~ConfirmAddressDialog()
writeConfig();
}
void ConfirmAddressDialog::slotAccepted()
{
//TODO
accept();
}
void ConfirmAddressDialog::writeConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), "ConfirmAddressDialog");
......@@ -69,3 +63,13 @@ void ConfirmAddressDialog::readConfig()
resize(sizeDialog);
}
}
void ConfirmAddressDialog::setValidAddresses(const QStringList &addresses)
{
mConfirmWidget->setValidAddresses(addresses);
}
void ConfirmAddressDialog::setInvalidAddresses(const QStringList &addresses)
{
mConfirmWidget->setInvalidAddresses(addresses);
}
......@@ -29,10 +29,8 @@ public:
explicit ConfirmAddressDialog(QWidget *parent = Q_NULLPTR);
~ConfirmAddressDialog();
//TODO add list of emails
private Q_SLOTS:
void slotAccepted();
void setValidAddresses(const QStringList &addresses);
void setInvalidAddresses(const QStringList &addresses);
private:
void writeConfig();
void readConfig();
......
......@@ -39,3 +39,13 @@ ConfirmAddressWidget::~ConfirmAddressWidget()
{
}
void ConfirmAddressWidget::setValidAddresses(const QStringList &addresses)
{
//TODO
}
void ConfirmAddressWidget::setInvalidAddresses(const QStringList &addresses)
{
//TODO
}
......@@ -28,6 +28,9 @@ class ConfirmAddressWidget : public QWidget
public:
explicit ConfirmAddressWidget(QWidget *parent = Q_NULLPTR);
~ConfirmAddressWidget();
void setValidAddresses(const QStringList &addresses);
void setInvalidAddresses(const QStringList &addresses);
private:
QListWidget *listEmails;
};
......
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