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

Allow to edit rule too

parent 8e5cda58
......@@ -41,21 +41,21 @@ void ConfirmBeforeDeletingWidget::fillRules()
// TODO
}
void ConfirmBeforeDeletingWidget::slotEditRule()
{
// TODO
}
void ConfirmBeforeDeletingWidget::slotCustomContextMenuRequested(const QPoint &p)
{
QMenu menu(this);
menu.addAction(QIcon::fromTheme(QStringLiteral("document-open")), i18n("Add Rule..."), this, &ConfirmBeforeDeletingWidget::slotAddRule);
QTreeWidgetItem *item = mTreeWidget->currentItem();
if (!item) {
// TODO
}
#if 0
menu.addAction(QIcon::fromTheme(QStringLiteral("document-open")), i18n("Open"), this, &ConfirmBeforeDeletingWidget::slotOpenItem);
if (filterValueIsNotEmpty) {
if (item) {
menu.addAction(QIcon::fromTheme(QStringLiteral("document-open")), i18n("Open"), this, &ConfirmBeforeDeletingWidget::slotEditRule);
menu.addSeparator();
menu.addAction(QIcon::fromTheme(QStringLiteral("edit-delete")), i18n("Remove filter"), this, &ConfirmBeforeDeletingWidget::slotRemoveRule);
}
#endif
menu.exec(QCursor::pos());
}
......
......@@ -21,5 +21,6 @@ private:
void slotRemoveRule();
void slotAddRule();
void fillRules();
void slotEditRule();
QTreeWidget *const mTreeWidget;
};
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