Changeset View
Changeset View
Standalone View
Standalone View
plugins/standardoutputview/outputwidget.h
Show First 20 Lines • Show All 49 Lines • ▼ Show 20 Line(s) | |||||
50 | { | 50 | { | ||
51 | Q_OBJECT | 51 | Q_OBJECT | ||
52 | Q_INTERFACES(KDevelop::IToolViewActionListener) | 52 | Q_INTERFACES(KDevelop::IToolViewActionListener) | ||
53 | 53 | | |||
54 | friend class StandardOutputViewTest; | 54 | friend class StandardOutputViewTest; | ||
55 | 55 | | |||
56 | public: | 56 | public: | ||
57 | OutputWidget(QWidget* parent, const ToolViewData* data); | 57 | OutputWidget(QWidget* parent, const ToolViewData* data); | ||
58 | ~OutputWidget() override; | ||||
59 | | ||||
58 | void removeOutput( int id ); | 60 | void removeOutput( int id ); | ||
59 | void raiseOutput( int id ); | 61 | void raiseOutput( int id ); | ||
60 | public Q_SLOTS: | 62 | public Q_SLOTS: | ||
61 | void addOutput( int id ); | 63 | void addOutput( int id ); | ||
62 | void changeModel( int id ); | 64 | void changeModel( int id ); | ||
63 | void changeDelegate( int id ); | 65 | void changeDelegate( int id ); | ||
64 | void closeActiveView(); | 66 | void closeActiveView(); | ||
65 | void closeOtherViews(); | 67 | void closeOtherViews(); | ||
Show All 32 Lines | 88 | private: | |||
98 | void enableActions(); | 100 | void enableActions(); | ||
99 | KDevelop::IOutputViewModel* outputViewModel() const; | 101 | KDevelop::IOutputViewModel* outputViewModel() const; | ||
100 | QAbstractItemView* outputView() const; | 102 | QAbstractItemView* outputView() const; | ||
101 | void activateIndex(const QModelIndex& index, QAbstractItemView* view, KDevelop::IOutputViewModel* iface); | 103 | void activateIndex(const QModelIndex& index, QAbstractItemView* view, KDevelop::IOutputViewModel* iface); | ||
102 | void eventuallyDoFocus(); | 104 | void eventuallyDoFocus(); | ||
103 | int currentOutputIndex(); | 105 | int currentOutputIndex(); | ||
104 | 106 | | |||
105 | struct FilteredView { | 107 | struct FilteredView { | ||
106 | QSharedPointer<QTreeView> view; | 108 | QTreeView* view = nullptr; | ||
107 | QSharedPointer<QSortFilterProxyModel> proxyModel; | 109 | QSortFilterProxyModel* proxyModel = nullptr; | ||
108 | QString filter; | 110 | QString filter; | ||
109 | }; | 111 | }; | ||
110 | QHash<int, FilteredView>::iterator findFilteredView(QAbstractItemView *view); | 112 | QHash<int, FilteredView>::iterator findFilteredView(QAbstractItemView *view); | ||
111 | 113 | | |||
112 | QHash<int, FilteredView> m_views; | 114 | QHash<int, FilteredView> m_views; | ||
113 | QTabWidget* m_tabwidget; | 115 | QScopedPointer<QTabWidget> m_tabwidget; | ||
114 | QStackedWidget* m_stackwidget; | 116 | QScopedPointer<QStackedWidget> m_stackwidget; | ||
115 | const ToolViewData* data; | 117 | const ToolViewData* data; | ||
116 | QToolButton* m_closeButton; | 118 | QToolButton* m_closeButton; | ||
117 | QAction* m_closeOthersAction; | 119 | QAction* m_closeOthersAction; | ||
118 | QAction* m_nextAction; | 120 | QAction* m_nextAction; | ||
119 | QAction* m_previousAction; | 121 | QAction* m_previousAction; | ||
120 | KToggleAction* m_activateOnSelect; | 122 | KToggleAction* m_activateOnSelect; | ||
121 | KToggleAction* m_focusOnSelect; | 123 | KToggleAction* m_focusOnSelect; | ||
122 | KExpandableLineEdit* m_filterInput; | 124 | KExpandableLineEdit* m_filterInput; | ||
123 | QWidgetAction* m_filterAction; | 125 | QWidgetAction* m_filterAction; | ||
124 | }; | 126 | }; | ||
125 | 127 | | |||
126 | #endif | 128 | #endif | ||
127 | 129 | |