Changeset View
Changeset View
Standalone View
Standalone View
src/ViewManager.h
Show First 20 Lines • Show All 116 Lines • ▼ Show 20 Line(s) | 114 | enum NavigationMethod { | |||
---|---|---|---|---|---|
117 | * can click on to navigate between open sessions. | 117 | * can click on to navigate between open sessions. | ||
118 | */ | 118 | */ | ||
119 | TabbedNavigation, | 119 | TabbedNavigation, | ||
120 | /** The container has no navigation widget. */ | 120 | /** The container has no navigation widget. */ | ||
121 | NoNavigation | 121 | NoNavigation | ||
122 | }; | 122 | }; | ||
123 | 123 | | |||
124 | /** | 124 | /** | ||
125 | * This enum describes where newly created tab should be placed. | | |||
126 | */ | | |||
127 | enum NewTabBehavior { | | |||
128 | /** Put newly created tab at the end. */ | | |||
129 | PutNewTabAtTheEnd = 0, | | |||
130 | /** Put newly created tab right after current tab. */ | | |||
131 | PutNewTabAfterCurrentTab = 1 | | |||
132 | }; | | |||
133 | | ||||
134 | /** | | |||
135 | * Describes the options for showing or hiding the container's navigation widget. | 125 | * Describes the options for showing or hiding the container's navigation widget. | ||
136 | */ | 126 | */ | ||
137 | enum NavigationVisibility { | 127 | enum NavigationVisibility { | ||
138 | NavigationNotSet, // Don't rely on this information, Only use the settings. | 128 | NavigationNotSet, // Don't rely on this information, Only use the settings. | ||
139 | AlwaysShowNavigation, | 129 | AlwaysShowNavigation, | ||
140 | ShowNavigationAsNeeded, | 130 | ShowNavigationAsNeeded, | ||
141 | AlwaysHideNavigation | 131 | AlwaysHideNavigation | ||
142 | }; | 132 | }; | ||
Show All 32 Lines | |||||
175 | SessionController *activeViewController() const; | 165 | SessionController *activeViewController() const; | ||
176 | 166 | | |||
177 | /** | 167 | /** | ||
178 | * Session management | 168 | * Session management | ||
179 | */ | 169 | */ | ||
180 | void saveSessions(KConfigGroup &group); | 170 | void saveSessions(KConfigGroup &group); | ||
181 | void restoreSessions(const KConfigGroup &group); | 171 | void restoreSessions(const KConfigGroup &group); | ||
182 | 172 | | |||
183 | void setNavigationBehavior(int behavior); | | |||
184 | int managerId() const; | 173 | int managerId() const; | ||
185 | 174 | | |||
186 | /** Returns a list of sessions in this ViewManager */ | 175 | /** Returns a list of sessions in this ViewManager */ | ||
187 | QList<Session *> sessions() | 176 | QList<Session *> sessions() | ||
188 | { | 177 | { | ||
189 | return _sessionMap.values(); | 178 | return _sessionMap.values(); | ||
190 | } | 179 | } | ||
191 | 180 | | |||
▲ Show 20 Lines • Show All 236 Lines • ▼ Show 20 Line(s) | 415 | private: | |||
428 | QPointer<SessionController> _pluggedController; | 417 | QPointer<SessionController> _pluggedController; | ||
429 | 418 | | |||
430 | QHash<TerminalDisplay *, Session *> _sessionMap; | 419 | QHash<TerminalDisplay *, Session *> _sessionMap; | ||
431 | 420 | | |||
432 | KActionCollection *_actionCollection; | 421 | KActionCollection *_actionCollection; | ||
433 | 422 | | |||
434 | NavigationMethod _navigationMethod; | 423 | NavigationMethod _navigationMethod; | ||
435 | NavigationVisibility _navigationVisibility; | 424 | NavigationVisibility _navigationVisibility; | ||
436 | NewTabBehavior _newTabBehavior; | | |||
437 | int _managerId; | 425 | int _managerId; | ||
438 | static int lastManagerId; | 426 | static int lastManagerId; | ||
439 | QList<TerminalDisplay *> _terminalDisplayHistory; | 427 | QList<TerminalDisplay *> _terminalDisplayHistory; | ||
440 | int _terminalDisplayHistoryIndex; | 428 | int _terminalDisplayHistoryIndex; | ||
441 | 429 | | |||
442 | // List of actions that should only be enabled when there are multiple view | 430 | // List of actions that should only be enabled when there are multiple view | ||
443 | // containers open | 431 | // containers open | ||
444 | QList<QAction *> _multiTabOnlyActions; | 432 | QList<QAction *> _multiTabOnlyActions; | ||
445 | QList<QAction *> _multiSplitterOnlyActions; | 433 | QList<QAction *> _multiSplitterOnlyActions; | ||
446 | 434 | | |||
447 | }; | 435 | }; | ||
448 | } | 436 | } | ||
449 | 437 | | |||
450 | #endif | 438 | #endif |