Changeset View
Changeset View
Standalone View
Standalone View
src/ViewManager.h
Show All 31 Lines | |||||
32 | class KActionCollection; | 32 | class KActionCollection; | ||
33 | class KConfigGroup; | 33 | class KConfigGroup; | ||
34 | 34 | | |||
35 | namespace Konsole { | 35 | namespace Konsole { | ||
36 | class ColorScheme; | 36 | class ColorScheme; | ||
37 | class IncrementalSearchBar; | 37 | class IncrementalSearchBar; | ||
38 | class Session; | 38 | class Session; | ||
39 | class TerminalDisplay; | 39 | class TerminalDisplay; | ||
40 | 40 | class TerminalWidget; | |||
41 | class SessionController; | 41 | class SessionController; | ||
42 | class ViewProperties; | 42 | class ViewProperties; | ||
43 | class ViewSplitter; | 43 | class ViewSplitter; | ||
44 | 44 | | |||
45 | /** | 45 | /** | ||
46 | * Manages the terminal display widgets in a Konsole window or part. | 46 | * Manages the terminal display widgets in a Konsole window or part. | ||
47 | * | 47 | * | ||
48 | * When a view manager is created, it constructs a splitter widget ( accessed via | 48 | * When a view manager is created, it constructs a splitter widget ( accessed via | ||
▲ Show 20 Lines • Show All 100 Lines • ▼ Show 20 Line(s) | 69 | public: | |||
149 | 149 | | |||
150 | /** | 150 | /** | ||
151 | * Returns the controller for the active view. activeViewChanged() is | 151 | * Returns the controller for the active view. activeViewChanged() is | ||
152 | * emitted when this changes. | 152 | * emitted when this changes. | ||
153 | */ | 153 | */ | ||
154 | SessionController *activeViewController() const; | 154 | SessionController *activeViewController() const; | ||
155 | 155 | | |||
156 | /** | 156 | /** | ||
157 | * Returns the search bar. | | |||
158 | */ | | |||
159 | IncrementalSearchBar *searchBar() const; | | |||
160 | | ||||
161 | /** | | |||
162 | * Session management | 157 | * Session management | ||
163 | */ | 158 | */ | ||
164 | void saveSessions(KConfigGroup &group); | 159 | void saveSessions(KConfigGroup &group); | ||
165 | void restoreSessions(const KConfigGroup &group); | 160 | void restoreSessions(const KConfigGroup &group); | ||
166 | 161 | | |||
167 | void setNavigationVisibility(int visibility); | 162 | void setNavigationVisibility(int visibility); | ||
168 | void setNavigationPosition(int position); | 163 | void setNavigationPosition(int position); | ||
169 | void setNavigationBehavior(int behavior); | 164 | void setNavigationBehavior(int behavior); | ||
▲ Show 20 Lines • Show All 211 Lines • ▼ Show 20 Line(s) | 375 | void takeView(ViewManager *otherManager, ViewContainer *otherContainer, | |||
381 | ViewContainer *newContainer, TerminalDisplay *view); | 376 | ViewContainer *newContainer, TerminalDisplay *view); | ||
382 | void splitView(Qt::Orientation orientation); | 377 | void splitView(Qt::Orientation orientation); | ||
383 | 378 | | |||
384 | // creates a new container which can hold terminal displays | 379 | // creates a new container which can hold terminal displays | ||
385 | ViewContainer *createContainer(); | 380 | ViewContainer *createContainer(); | ||
386 | // removes a container and emits appropriate signals | 381 | // removes a container and emits appropriate signals | ||
387 | void removeContainer(ViewContainer *container); | 382 | void removeContainer(ViewContainer *container); | ||
388 | 383 | | |||
389 | // creates a new terminal display | | |||
390 | // the 'session' is used so that the terminal display's random seed | | |||
391 | // can be set to something which depends uniquely on that session | | |||
392 | TerminalDisplay *createTerminalDisplay(Session *session = nullptr); | | |||
393 | | ||||
394 | // creates a new controller for a session/display pair which provides the menu | 384 | // creates a new controller for a session/display pair which provides the menu | ||
395 | // actions associated with that view, and exposes basic information | 385 | // actions associated with that view, and exposes basic information | ||
396 | // about the session ( such as title and associated icon ) to the display. | 386 | // about the session ( such as title and associated icon ) to the display. | ||
397 | SessionController *createController(Session *session, TerminalDisplay *view); | 387 | SessionController *createController(Session *session, TerminalWidget *view); | ||
398 | 388 | | |||
399 | private: | 389 | private: | ||
400 | QPointer<ViewSplitter> _viewSplitter; | 390 | QPointer<ViewSplitter> _viewSplitter; | ||
401 | QPointer<SessionController> _pluggedController; | 391 | QPointer<SessionController> _pluggedController; | ||
402 | 392 | | |||
403 | QHash<TerminalDisplay *, Session *> _sessionMap; | 393 | QHash<TerminalDisplay *, Session *> _sessionMap; | ||
404 | 394 | | |||
405 | KActionCollection *_actionCollection; | 395 | KActionCollection *_actionCollection; | ||
Show All 16 Lines |