Changeset View
Changeset View
Standalone View
Standalone View
plugins/standardoutputview/outputwidget.h
Show All 16 Lines | |||||
17 | * along with this program; if not, write to the Free Software | 17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA | 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA | ||
19 | * 02110-1301, USA. | 19 | * 02110-1301, USA. | ||
20 | */ | 20 | */ | ||
21 | 21 | | |||
22 | #ifndef KDEVPLATFORM_PLUGIN_OUTPUTWIDGET_H | 22 | #ifndef KDEVPLATFORM_PLUGIN_OUTPUTWIDGET_H | ||
23 | #define KDEVPLATFORM_PLUGIN_OUTPUTWIDGET_H | 23 | #define KDEVPLATFORM_PLUGIN_OUTPUTWIDGET_H | ||
24 | 24 | | |||
25 | #include <QMap> | 25 | #include <QHash> | ||
26 | #include <QWidget> | 26 | #include <QWidget> | ||
27 | #include <QSharedPointer> | | |||
28 | 27 | | |||
29 | #include <interfaces/itoolviewactionlistener.h> | 28 | #include <interfaces/itoolviewactionlistener.h> | ||
30 | #include <outputview/ioutputviewmodel.h> | 29 | #include <outputview/ioutputviewmodel.h> | ||
31 | #include <outputview/ioutputview.h> | 30 | #include <outputview/ioutputview.h> | ||
32 | 31 | | |||
33 | class KExpandableLineEdit; | 32 | class KExpandableLineEdit; | ||
34 | class KToggleAction; | 33 | class KToggleAction; | ||
35 | class StandardOutputViewTest; | 34 | class StandardOutputViewTest; | ||
Show All 14 Lines | |||||
50 | { | 49 | { | ||
51 | Q_OBJECT | 50 | Q_OBJECT | ||
52 | Q_INTERFACES(KDevelop::IToolViewActionListener) | 51 | Q_INTERFACES(KDevelop::IToolViewActionListener) | ||
53 | 52 | | |||
54 | friend class StandardOutputViewTest; | 53 | friend class StandardOutputViewTest; | ||
55 | 54 | | |||
56 | public: | 55 | public: | ||
57 | OutputWidget(QWidget* parent, const ToolViewData* data); | 56 | OutputWidget(QWidget* parent, const ToolViewData* data); | ||
57 | ~OutputWidget() override; | ||||
58 | | ||||
58 | void removeOutput( int id ); | 59 | void removeOutput( int id ); | ||
59 | void raiseOutput( int id ); | 60 | void raiseOutput( int id ); | ||
60 | public Q_SLOTS: | 61 | public Q_SLOTS: | ||
61 | void addOutput( int id ); | 62 | void addOutput( int id ); | ||
62 | void changeModel( int id ); | 63 | void changeModel( int id ); | ||
63 | void changeDelegate( int id ); | 64 | void changeDelegate( int id ); | ||
64 | void closeActiveView(); | 65 | void closeActiveView(); | ||
65 | void closeOtherViews(); | 66 | void closeOtherViews(); | ||
Show All 32 Lines | 87 | private: | |||
98 | void enableActions(); | 99 | void enableActions(); | ||
99 | KDevelop::IOutputViewModel* outputViewModel() const; | 100 | KDevelop::IOutputViewModel* outputViewModel() const; | ||
100 | QAbstractItemView* outputView() const; | 101 | QAbstractItemView* outputView() const; | ||
101 | void activateIndex(const QModelIndex& index, QAbstractItemView* view, KDevelop::IOutputViewModel* iface); | 102 | void activateIndex(const QModelIndex& index, QAbstractItemView* view, KDevelop::IOutputViewModel* iface); | ||
102 | void eventuallyDoFocus(); | 103 | void eventuallyDoFocus(); | ||
103 | int currentOutputIndex(); | 104 | int currentOutputIndex(); | ||
104 | 105 | | |||
105 | struct FilteredView { | 106 | struct FilteredView { | ||
106 | QSharedPointer<QTreeView> view; | 107 | QTreeView* view = nullptr; | ||
107 | QSharedPointer<QSortFilterProxyModel> proxyModel; | 108 | QSortFilterProxyModel* proxyModel = nullptr; | ||
108 | QString filter; | 109 | QString filter; | ||
109 | }; | 110 | }; | ||
110 | QHash<int, FilteredView>::iterator findFilteredView(QAbstractItemView *view); | 111 | QHash<int, FilteredView>::iterator findFilteredView(QAbstractItemView *view); | ||
111 | 112 | | |||
112 | QHash<int, FilteredView> m_views; | 113 | QHash<int, FilteredView> m_views; | ||
113 | QTabWidget* m_tabwidget; | 114 | QTabWidget* m_tabwidget; | ||
114 | QStackedWidget* m_stackwidget; | 115 | QStackedWidget* m_stackwidget; | ||
115 | const ToolViewData* data; | 116 | const ToolViewData* data; | ||
Show All 12 Lines |