From 581eb1f563df9e7fa72371d936521e0bd55d9f18 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Wed, 27 May 2020 23:09:30 +0200 Subject: filter: create a primitive "create filter preset" dialog The dialog asks the user for a name and warns if the name already exists, i.e. an old filter preset will be overwritten. Possibly, this should contain an auto-completion facility in the case that the user wants to overwrite old presets. Signed-off-by: Berthold Stoeger --- desktop-widgets/simplewidgets.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'desktop-widgets/simplewidgets.h') diff --git a/desktop-widgets/simplewidgets.h b/desktop-widgets/simplewidgets.h index 6075aa660..d68c14bd4 100644 --- a/desktop-widgets/simplewidgets.h +++ b/desktop-widgets/simplewidgets.h @@ -20,6 +20,7 @@ class FilterModelBase; #include "ui_urldialog.h" #include "ui_divecomponentselection.h" #include "ui_listfilter.h" +#include "ui_addfilterpreset.h" #include "core/exif.h" #include "core/dive.h" @@ -138,6 +139,18 @@ private: struct dive_components *what; }; +class AddFilterPresetDialog : public QDialog { + Q_OBJECT +public: + explicit AddFilterPresetDialog(QWidget *parent); + QString doit(); // returns name of filter preset or empty string if user cancelled the dialog +private +slots: + void nameChanged(const QString &text); +private: + Ui::AddFilterPresetDialog ui; +}; + class TextHyperlinkEventFilter : public QObject { Q_OBJECT public: -- cgit v1.2.3-70-g09d2