diff options
Diffstat (limited to 'src/tagrulesdialog.h')
| -rw-r--r-- | src/tagrulesdialog.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/tagrulesdialog.h b/src/tagrulesdialog.h index 948ebe2..c91dc0c 100644 --- a/src/tagrulesdialog.h +++ b/src/tagrulesdialog.h @@ -19,6 +19,7 @@ #pragma once #include <QDialog> +#include <QStringList> #include "rulequery.h" #include "tagrules.h" @@ -55,6 +56,11 @@ public: /// handle and notmuch permits one per process. QStringList countQueries() const; + /// Account subdirectory names, for the Folder row's dropdown. Supplied by + /// the caller rather than read here: Config knows them, and this dialog + /// deliberately holds no Config of its own. + void setFolders(const QStringList &folders); + /// Test seams. The builder's state is otherwise reachable only through /// synthetic clicks on widgets whose geometry the offscreen platform does /// not guarantee. @@ -108,8 +114,15 @@ private: QComboBox *field = nullptr; QComboBox *op = nullptr; QLineEdit *value = nullptr; + /// Shown in place of `value` for a Folder row. Never visible together. + QComboBox *folder = nullptr; }; + /// Reads a row's value from whichever of its two widgets the field selects, + /// so the read and write paths cannot disagree about where it lives. + QString rowValue(const Row &row) const; + void setRowValue(Row *row, const QString &value); + Row *addRow(bool exclusion); void removeRow(bool exclusion, int index); void populateOperators(bool exclusion); @@ -127,6 +140,8 @@ private: /// left alone. RuleQuery m_loadedQuery; + QStringList m_folders; + QList<Row> m_rows; QList<Row> m_exclusionRows; |
