summaryrefslogtreecommitdiffstats
path: root/src/mainwindow.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainwindow.h')
-rw-r--r--src/mainwindow.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/mainwindow.h b/src/mainwindow.h
index 18fbbb4..8b43fd0 100644
--- a/src/mainwindow.h
+++ b/src/mainwindow.h
@@ -49,6 +49,7 @@ class QPlainTextEdit;
class QSplitter;
class QProgressBar;
class QTimer;
+class QVBoxLayout;
class ThreadListModel;
class MessageView;
@@ -231,6 +232,26 @@ private:
/// is what widgets connect to.
void runQuery(FlatResult flat);
+ /// Builds the row of saved-query buttons, the overflow menu and Sent.
+ ///
+ /// Its own row since item 23: an unbounded list of buttons sharing the
+ /// query row squeezed the field, which is the whole reason for the
+ /// pinned/unpinned split.
+ void buildSavedQueryRow(QWidget *parent, QVBoxLayout *layout);
+
+ /// Runs a saved query, taking its account scope through the dropdown.
+ ///
+ /// Not by pre-scoping the text: runQuery() already wraps the query in the
+ /// selected account's path, so a scope baked in here would be applied
+ /// twice. Setting the dropdown also shows the user what scope they are in.
+ void runSavedQuery(const SavedQuery &saved);
+
+ /// Names the current query and stores it in queries.json.
+ void saveCurrentQuery();
+
+ /// Rebuilds the saved-query row in place after the stored list changed.
+ void rebuildSavedQueryRow();
+
private slots:
void runCurrentQuery() { runQuery(FlatResult::No); }