SWMMVis  6.0.0-alpha.4
Qt6/C++ GIS-based graphical user interface for the SWMMVis engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
shortcuteditorwidget.h
Go to the documentation of this file.
1#ifndef SHORTCUTEDITORWIDGET_H
2#define SHORTCUTEDITORWIDGET_H
3
18#include <QWidget>
19
20class QKeySequenceEdit;
21class QLabel;
22class QLineEdit;
23class QPushButton;
24class QTreeWidget;
25class QTreeWidgetItem;
26
27namespace openswmmvis::ui {
28
29class ShortcutEditorWidget : public QWidget
30{
31 Q_OBJECT
32
33public:
34 explicit ShortcutEditorWidget(QWidget *parent = nullptr);
35
37 void reload();
38
40 void selectCommand(const QString &id);
41 QString selectedCommandId() const;
42
43 // Test / integration surface.
44 QTreeWidget *tree() const { return mTree; }
45 QKeySequenceEdit *sequenceEdit() const { return mSequenceEdit; }
46 QPushButton *assignButton() const { return mAssign; }
47 QPushButton *clearButton() const { return mClear; }
48 QPushButton *resetButton() const { return mReset; }
49 QPushButton *resetAllButton() const { return mResetAll; }
50 QLabel *conflictLabel() const { return mConflict; }
51
52private:
53 void onFilterChanged(const QString &text);
54 void onSelectionChanged();
55 void onSequenceChanged();
56 void onAssign();
57 void onClear();
58 void onReset();
59 void onResetAll();
60 void refreshItem(QTreeWidgetItem *item);
61
62 QLineEdit *mFilter = nullptr;
63 QTreeWidget *mTree = nullptr;
64 QKeySequenceEdit *mSequenceEdit = nullptr;
65 QPushButton *mAssign = nullptr;
66 QPushButton *mClear = nullptr;
67 QPushButton *mReset = nullptr;
68 QPushButton *mResetAll = nullptr;
69 QLabel *mConflict = nullptr;
70};
71
72} // namespace openswmmvis::ui
73
74#endif // SHORTCUTEDITORWIDGET_H
Definition shortcuteditorwidget.h:30
QLabel * conflictLabel() const
Definition shortcuteditorwidget.h:50
QPushButton * assignButton() const
Definition shortcuteditorwidget.h:46
void reload()
Definition shortcuteditorwidget.cpp:115
QTreeWidget * tree() const
Definition shortcuteditorwidget.h:44
void selectCommand(const QString &id)
Definition shortcuteditorwidget.cpp:173
QPushButton * resetAllButton() const
Definition shortcuteditorwidget.h:49
QPushButton * resetButton() const
Definition shortcuteditorwidget.h:48
QString selectedCommandId() const
Definition shortcuteditorwidget.cpp:167
QKeySequenceEdit * sequenceEdit() const
Definition shortcuteditorwidget.h:45
QPushButton * clearButton() const
Definition shortcuteditorwidget.h:47
Definition openswmmvislayer.h:43
QVector< int > parent
union-find
Definition pslgminsize.cpp:176
QString text
Definition queryparser.cpp:35