Changeset View
Changeset View
Standalone View
Standalone View
plugins/problemreporter/problemsview.h
Show All 20 Lines | |||||
21 | #define PROBLEMSVIEW_H | 21 | #define PROBLEMSVIEW_H | ||
22 | 22 | | |||
23 | #include <interfaces/itoolviewactionlistener.h> | 23 | #include <interfaces/itoolviewactionlistener.h> | ||
24 | 24 | | |||
25 | #include <QWidget> | 25 | #include <QWidget> | ||
26 | 26 | | |||
27 | class ProblemTreeView; | 27 | class ProblemTreeView; | ||
28 | 28 | | |||
29 | class KActionMenu; | | |||
30 | class KExpandableLineEdit; | 29 | class KExpandableLineEdit; | ||
31 | 30 | | |||
32 | class QAction; | 31 | class QAction; | ||
33 | class QActionGroup; | 32 | class QActionGroup; | ||
34 | class QLineEdit; | 33 | class QLineEdit; | ||
35 | class QTabWidget; | 34 | class QTabWidget; | ||
36 | 35 | | |||
37 | namespace KDevelop | 36 | namespace KDevelop | ||
38 | { | 37 | { | ||
39 | 38 | | |||
40 | struct ModelData; | 39 | struct ModelData; | ||
41 | 40 | | |||
41 | class ActionMenu; | ||||
42 | | ||||
42 | /** | 43 | /** | ||
43 | * @brief Provides a tabbed view for models in the ProblemModelSet. | 44 | * @brief Provides a tabbed view for models in the ProblemModelSet. | ||
44 | * | 45 | * | ||
45 | * | 46 | * | ||
46 | * Also provides a toolbar for actions for the models and shows the number of messages in each tab's text. | 47 | * Also provides a toolbar for actions for the models and shows the number of messages in each tab's text. | ||
47 | * When the load() method is called it looks up the models in the ProblemModelSet. | 48 | * When the load() method is called it looks up the models in the ProblemModelSet. | ||
48 | * For each model it creates a treeview, which is then added to the tabbed view and a new tab. | 49 | * For each model it creates a treeview, which is then added to the tabbed view and a new tab. | ||
49 | * The tab's text will be the name of the model + the number of items in the treeview. | 50 | * The tab's text will be the name of the model + the number of items in the treeview. | ||
Show All 32 Lines | |||||
82 | private: | 83 | private: | ||
83 | ProblemTreeView* currentView() const; | 84 | ProblemTreeView* currentView() const; | ||
84 | 85 | | |||
85 | void setupActions(); | 86 | void setupActions(); | ||
86 | void updateActions(); | 87 | void updateActions(); | ||
87 | 88 | | |||
88 | void handleSeverityActionToggled(); | 89 | void handleSeverityActionToggled(); | ||
89 | void setScope(int scope); | 90 | void setScope(int scope); | ||
91 | void setGrouping(int grouping); | ||||
90 | 92 | | |||
91 | /// Create a view for the model and add to the tabbed widget | 93 | /// Create a view for the model and add to the tabbed widget | ||
92 | void addModel(const ModelData& data); | 94 | void addModel(const ModelData& data); | ||
93 | 95 | | |||
94 | /// Update the tab's text (name + number of problems in that tab) | 96 | /// Update the tab's text (name + number of problems in that tab) | ||
95 | void updateTab(int idx, int rows); | 97 | void updateTab(int idx, int rows); | ||
96 | 98 | | |||
97 | QTabWidget* m_tabWidget; | 99 | QTabWidget* m_tabWidget; | ||
98 | 100 | | |||
99 | KActionMenu* m_scopeMenu = nullptr; | 101 | ActionMenu* m_scopeMenu = nullptr; | ||
100 | KActionMenu* m_groupingMenu = nullptr; | 102 | ActionMenu* m_groupingMenu = nullptr; | ||
101 | QAction* m_fullUpdateAction = nullptr; | 103 | QAction* m_fullUpdateAction = nullptr; | ||
102 | QAction* m_showImportsAction = nullptr; | 104 | QAction* m_showImportsAction = nullptr; | ||
103 | QActionGroup* m_severityActions = nullptr; | 105 | QActionGroup* m_severityActions = nullptr; | ||
104 | QAction* m_currentDocumentAction = nullptr; | | |||
105 | QAction* m_showAllAction = nullptr; | 106 | QAction* m_showAllAction = nullptr; | ||
106 | QAction* m_errorSeverityAction = nullptr; | 107 | QAction* m_errorSeverityAction = nullptr; | ||
107 | QAction* m_warningSeverityAction = nullptr; | 108 | QAction* m_warningSeverityAction = nullptr; | ||
108 | QAction* m_hintSeverityAction = nullptr; | 109 | QAction* m_hintSeverityAction = nullptr; | ||
109 | 110 | | |||
110 | void setFilter(const QString& filterText); | 111 | void setFilter(const QString& filterText); | ||
111 | void setFilter(const QString& filterText, int tabIdx); | 112 | void setFilter(const QString& filterText, int tabIdx); | ||
112 | 113 | | |||
113 | KExpandableLineEdit* m_filterEdit; | 114 | KExpandableLineEdit* m_filterEdit; | ||
114 | int m_prevTabIdx; | 115 | int m_prevTabIdx; | ||
115 | QVector<ModelData> m_models; | 116 | QVector<ModelData> m_models; | ||
116 | }; | 117 | }; | ||
117 | } | 118 | } | ||
118 | 119 | | |||
119 | #endif | 120 | #endif |