Changeset View
Changeset View
Standalone View
Standalone View
addons/tabswitcher/tabswitcher.h
Show All 28 Lines | |||||
29 | #include <QVariant> | 29 | #include <QVariant> | ||
30 | 30 | | |||
31 | #include <KXMLGUIClient> | 31 | #include <KXMLGUIClient> | ||
32 | 32 | | |||
33 | class TabSwitcherPluginView; | 33 | class TabSwitcherPluginView; | ||
34 | class TabSwitcherTreeView; | 34 | class TabSwitcherTreeView; | ||
35 | class QStandardItemModel; | 35 | class QStandardItemModel; | ||
36 | class QModelIndex; | 36 | class QModelIndex; | ||
37 | namespace detail { | ||||
38 | class TabswitcherFilesModel; | ||||
39 | } | ||||
37 | 40 | | |||
38 | class TabSwitcherPlugin : public KTextEditor::Plugin | 41 | class TabSwitcherPlugin : public KTextEditor::Plugin | ||
39 | { | 42 | { | ||
40 | Q_OBJECT | 43 | Q_OBJECT | ||
41 | 44 | | |||
42 | friend TabSwitcherPluginView; | 45 | friend TabSwitcherPluginView; | ||
43 | 46 | | |||
44 | public: | 47 | public: | ||
▲ Show 20 Lines • Show All 86 Lines • ▼ Show 20 Line(s) | 128 | protected: | |||
131 | /** | 134 | /** | ||
132 | * Make sure the popup view has a sane size. | 135 | * Make sure the popup view has a sane size. | ||
133 | */ | 136 | */ | ||
134 | void updateViewGeometry(); | 137 | void updateViewGeometry(); | ||
135 | 138 | | |||
136 | private: | 139 | private: | ||
137 | TabSwitcherPlugin *m_plugin; | 140 | TabSwitcherPlugin *m_plugin; | ||
138 | KTextEditor::MainWindow *m_mainWindow; | 141 | KTextEditor::MainWindow *m_mainWindow; | ||
139 | QStandardItemModel * m_model; | 142 | detail::TabswitcherFilesModel * m_model; | ||
dhaumann: Since we also have a TabSwitcherTreeView which is not in the detail namespace, I think putting… | |||||
140 | QSet<KTextEditor::Document *> m_documents; | 143 | QSet<KTextEditor::Document *> m_documents; | ||
141 | TabSwitcherTreeView * m_treeView; | 144 | TabSwitcherTreeView * m_treeView; | ||
142 | }; | 145 | }; | ||
143 | 146 | | |||
144 | #endif // KTEXTEDITOR_TAB_SWITCHER_PLUGIN_H | 147 | #endif // KTEXTEDITOR_TAB_SWITCHER_PLUGIN_H |
Since we also have a TabSwitcherTreeView which is not in the detail namespace, I think putting the model into the detail namespace adds more inconsistency than it solves. In fact, Given the tabswitcher plugin is just 3 files, it is arguable what is a "detail" and what not. In other words: Overengineering? :-)