Commit 300b9bfa authored by Laurent Montel's avatar Laurent Montel 😁

Implement clear include widget

parent 57bce870
......@@ -84,6 +84,14 @@ SieveIncludeActionWidget::~SieveIncludeActionWidget()
{
}
void SieveIncludeActionWidget::clear()
{
mOptional->setChecked(false);
mOnce->setChecked(false);
mLocation->setCurrentIndex(0);
mIncludeName->setText(QString());
}
void SieveIncludeActionWidget::loadScript(const QDomElement &element, QString &error)
{
QDomNode node = element.firstChild();
......@@ -307,8 +315,10 @@ void SieveIncludeWidgetLister::reconnectWidget(SieveIncludeActionWidget *w)
void SieveIncludeWidgetLister::clearWidget(QWidget *aWidget)
{
//TODO
Q_UNUSED(aWidget);
if (aWidget) {
SieveIncludeActionWidget *widget = static_cast<SieveIncludeActionWidget *>(aWidget);
widget->clear();
}
Q_EMIT valueChanged();
}
......
......@@ -59,6 +59,7 @@ public:
void updateAddRemoveButton(bool addButtonEnabled, bool removeButtonEnabled);
void loadScript(const QDomElement &element, QString &error);
bool isInitialized() const;
void clear();
private Q_SLOTS:
void slotAddWidget();
......
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