Commit 13221b0d authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Allow to define filter name

parent b32da415
Pipeline #61530 failed with stage
in 10 minutes and 57 seconds
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
#include <QAction> #include <QAction>
#include <QCompleter> #include <QCompleter>
#include <QContextMenuEvent> #include <QContextMenuEvent>
#include <QInputDialog>
#include <QMenu> #include <QMenu>
#include <QPushButton> #include <QPushButton>
#include <QStandardPaths> #include <QStandardPaths>
...@@ -114,6 +115,21 @@ void SearchLineStatus::initializeActions() ...@@ -114,6 +115,21 @@ void SearchLineStatus::initializeActions()
mFilterSavedMenu = new FilterSavedMenu(this); mFilterSavedMenu = new FilterSavedMenu(this);
mSaveFilterAction->setMenu(mFilterSavedMenu); mSaveFilterAction->setMenu(mFilterSavedMenu);
connect(mSaveFilterAction, &QAction::triggered, this, &SearchLineStatus::showSavedFiltersMenu); connect(mSaveFilterAction, &QAction::triggered, this, &SearchLineStatus::showSavedFiltersMenu);
connect(mFilterSavedMenu, &FilterSavedMenu::saveFilter, this, &SearchLineStatus::slotSaveFilter);
connect(mFilterSavedMenu, &FilterSavedMenu::saveFilter, this, &SearchLineStatus::slotConfigureFilters);
}
void SearchLineStatus::slotConfigureFilters()
{
}
void SearchLineStatus::slotSaveFilter()
{
bool ok = false;
const QString str = QInputDialog::getText(this, i18n("Filter Name:"), i18n("Name:"), QLineEdit::Normal, {}, &ok);
if (ok && !str.trimmed().isEmpty()) {
// TODO
}
} }
void SearchLineStatus::slotToggledLockAction() void SearchLineStatus::slotToggledLockAction()
......
...@@ -62,6 +62,8 @@ private: ...@@ -62,6 +62,8 @@ private:
void changeSearchAgainstFromOrToText(); void changeSearchAgainstFromOrToText();
void slotClear(); void slotClear();
void showSavedFiltersMenu(); void showSavedFiltersMenu();
void slotSaveFilter();
void slotConfigureFilters();
bool mLocked = false; bool mLocked = false;
bool mHasFilter = false; bool mHasFilter = false;
......
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