Changeset View
Changeset View
Standalone View
Standalone View
src/ViewContainer.h
Show First 20 Lines • Show All 97 Lines • ▼ Show 20 Line(s) | 64 | public: | |||
---|---|---|---|---|---|
98 | /** Changes the active view to the last view */ | 98 | /** Changes the active view to the last view */ | ||
99 | void activateLastView(); | 99 | void activateLastView(); | ||
100 | 100 | | |||
101 | /** Changes the active view to the last used view */ | 101 | /** Changes the active view to the last used view */ | ||
102 | void activateLastUsedView(bool reverse); | 102 | void activateLastUsedView(bool reverse); | ||
103 | 103 | | |||
104 | void setCss(const QString& styleSheet = QString()); | 104 | void setCss(const QString& styleSheet = QString()); | ||
105 | void setCssFromFile(const QUrl& url); | 105 | void setCssFromFile(const QUrl& url); | ||
106 | | ||||
107 | ViewSplitter *activeViewSplitter(); | ||||
106 | /** | 108 | /** | ||
107 | * This enum describes the directions | 109 | * This enum describes the directions | ||
108 | * in which views can be re-arranged within the container | 110 | * in which views can be re-arranged within the container | ||
109 | * using the moveActiveView() method. | 111 | * using the moveActiveView() method. | ||
110 | */ | 112 | */ | ||
111 | enum MoveDirection { | 113 | enum MoveDirection { | ||
112 | /** Moves the view to the left. */ | 114 | /** Moves the view to the left. */ | ||
113 | MoveViewLeft, | 115 | MoveViewLeft, | ||
Show All 21 Lines | |||||
135 | void closeCurrentTab(); | 137 | void closeCurrentTab(); | ||
136 | void wheelScrolled(int delta); | 138 | void wheelScrolled(int delta); | ||
137 | 139 | | |||
138 | void tabDoubleClicked(int index); | 140 | void tabDoubleClicked(int index); | ||
139 | void openTabContextMenu(const QPoint &point); | 141 | void openTabContextMenu(const QPoint &point); | ||
140 | void setNavigationVisibility(ViewManager::NavigationVisibility navigationVisibility); | 142 | void setNavigationVisibility(ViewManager::NavigationVisibility navigationVisibility); | ||
141 | void moveTabToWindow(int index, QWidget *window); | 143 | void moveTabToWindow(int index, QWidget *window); | ||
142 | 144 | | |||
145 | void maximizeCurrentTerminal(); | ||||
146 | void restoreOtherTerminals(); | ||||
143 | /* return the widget(int index) casted to TerminalDisplay* | 147 | /* return the widget(int index) casted to TerminalDisplay* | ||
144 | * | 148 | * | ||
145 | * The only thing that this class holds are TerminalDisplays, so | 149 | * The only thing that this class holds are TerminalDisplays, so | ||
146 | * this is the only thing that should be used to retrieve widgets. | 150 | * this is the only thing that should be used to retrieve widgets. | ||
147 | */ | 151 | */ | ||
148 | TerminalDisplay *terminalAt(int index); | 152 | ViewSplitter *viewSplitterAt(int index); | ||
149 | Q_SIGNALS: | 153 | Q_SIGNALS: | ||
150 | /** Emitted when the container has no more children */ | 154 | /** Emitted when the container has no more children */ | ||
151 | void empty(TabbedViewContainer *container); | 155 | void empty(TabbedViewContainer *container); | ||
152 | 156 | | |||
153 | /** Emitted when the user requests to open a new view */ | 157 | /** Emitted when the user requests to open a new view */ | ||
154 | void newViewRequest(TabbedViewContainer *thisContainer); | 158 | void newViewRequest(TabbedViewContainer *thisContainer); | ||
155 | 159 | | |||
156 | /** Requests creation of a new view, with the selected profile. */ | 160 | /** Requests creation of a new view, with the selected profile. */ | ||
Show All 36 Lines | 187 | protected: | |||
193 | void closeTerminalTab(int idx); | 197 | void closeTerminalTab(int idx); | ||
194 | 198 | | |||
195 | void keyReleaseEvent(QKeyEvent *event) Q_DECL_OVERRIDE; | 199 | void keyReleaseEvent(QKeyEvent *event) Q_DECL_OVERRIDE; | ||
196 | private Q_SLOTS: | 200 | private Q_SLOTS: | ||
197 | void viewDestroyed(QObject *view); | 201 | void viewDestroyed(QObject *view); | ||
198 | void konsoleConfigChanged(); | 202 | void konsoleConfigChanged(); | ||
199 | 203 | | |||
200 | private: | 204 | private: | ||
201 | void forgetView(TerminalDisplay *view); | 205 | void forgetView(ViewSplitter *view); | ||
202 | void updateTabHistory(TerminalDisplay *view, bool remove = false); | 206 | void updateTabHistory(TerminalDisplay *view, bool remove = false); | ||
203 | 207 | | |||
204 | QList<TerminalDisplay *> _tabHistory; | 208 | QList<TerminalDisplay *> _tabHistory; | ||
205 | ViewManager *_connectedViewManager; | 209 | ViewManager *_connectedViewManager; | ||
206 | QMenu *_contextPopupMenu; | 210 | QMenu *_contextPopupMenu; | ||
207 | QToolButton *_newTabButton; | 211 | QToolButton *_newTabButton; | ||
208 | QToolButton *_closeTabButton; | 212 | QToolButton *_closeTabButton; | ||
209 | int _contextMenuTabIndex; | 213 | int _contextMenuTabIndex; | ||
210 | ViewManager::NavigationVisibility _navigationVisibility; | 214 | ViewManager::NavigationVisibility _navigationVisibility; | ||
211 | int _tabHistoryIndex; | 215 | int _tabHistoryIndex; | ||
216 | ViewSplitter *_viewSplitter; | ||||
212 | }; | 217 | }; | ||
213 | 218 | | |||
214 | 219 | | |||
215 | } | 220 | } | ||
216 | #endif //VIEWCONTAINER_H | 221 | #endif //VIEWCONTAINER_H |