Changeset View
Changeset View
Standalone View
Standalone View
src/MainWindow.h
Show All 36 Lines | |||||
37 | namespace Konsole { | 37 | namespace Konsole { | ||
38 | class IncrementalSearchBar; | 38 | class IncrementalSearchBar; | ||
39 | class ViewManager; | 39 | class ViewManager; | ||
40 | class ViewProperties; | 40 | class ViewProperties; | ||
41 | class Session; | 41 | class Session; | ||
42 | class SessionController; | 42 | class SessionController; | ||
43 | class ProfileList; | 43 | class ProfileList; | ||
44 | class BookmarkHandler; | 44 | class BookmarkHandler; | ||
45 | class TabbedViewContainer; | ||||
45 | 46 | | |||
46 | /** | 47 | /** | ||
47 | * The main window. This contains the menus and an area which contains the terminal displays. | 48 | * The main window. This contains the menus and an area which contains the terminal displays. | ||
48 | * | 49 | * | ||
49 | * The main window does not create the views or the container widgets which hold the views. | 50 | * The main window does not create the views or the container widgets which hold the views. | ||
50 | * This is done by the ViewManager class. When a MainWindow is instantiated, it creates | 51 | * This is done by the ViewManager class. When a MainWindow is instantiated, it creates | ||
51 | * a new ViewManager. The ViewManager can then be used to create new terminal displays | 52 | * a new ViewManager. The ViewManager can then be used to create new terminal displays | ||
52 | * inside the window. | 53 | * inside the window. | ||
Show All 15 Lines | 61 | public: | |||
68 | * Returns the view manager associated with this window. The view manager can be used to | 69 | * Returns the view manager associated with this window. The view manager can be used to | ||
69 | * create new views on particular session objects inside this window. | 70 | * create new views on particular session objects inside this window. | ||
70 | */ | 71 | */ | ||
71 | ViewManager *viewManager() const; | 72 | ViewManager *viewManager() const; | ||
72 | 73 | | |||
73 | /** | 74 | /** | ||
74 | * Create a new session. | 75 | * Create a new session. | ||
75 | * | 76 | * | ||
77 | * @param tabWidget where the new widget should be added. | ||||
76 | * @param profile The profile to use to create the new session. | 78 | * @param profile The profile to use to create the new session. | ||
77 | * @param directory Initial working directory for the new session or empty | 79 | * @param directory Initial working directory for the new session or empty | ||
78 | * if the default working directory associated with the profile should be used. | 80 | * if the default working directory associated with the profile should be used. | ||
79 | */ | 81 | */ | ||
80 | Session *createSession(Profile::Ptr profile, const QString &directory); | 82 | Session *createSession(TabbedViewContainer *tabWidget, Profile::Ptr profile, const QString &directory); | ||
81 | 83 | | |||
82 | /** | 84 | /** | ||
83 | * create a new SSH session. | 85 | * create a new SSH session. | ||
84 | * | 86 | * | ||
87 | * @param tabWidget where the new widget should be added. | ||||
85 | * @param profile The profile to use to create the new session. | 88 | * @param profile The profile to use to create the new session. | ||
86 | * @param url the URL representing the new SSH connection | 89 | * @param url the URL representing the new SSH connection | ||
87 | */ | 90 | */ | ||
88 | Session *createSSHSession(Profile::Ptr profile, const QUrl &url); | 91 | Session *createSSHSession(TabbedViewContainer *tabWidget, Profile::Ptr profile, const QUrl &url); | ||
89 | 92 | | |||
90 | /** | 93 | /** | ||
91 | * Helper method to make this window get input focus | 94 | * Helper method to make this window get input focus | ||
92 | */ | 95 | */ | ||
93 | void setFocus(); | 96 | void setFocus(); | ||
94 | 97 | | |||
95 | /** | 98 | /** | ||
96 | * Set the initial visibility of the menubar. | 99 | * Set the initial visibility of the menubar. | ||
Show All 30 Lines | 122 | protected: | |||
127 | void readProperties(const KConfigGroup &group) Q_DECL_OVERRIDE; | 130 | void readProperties(const KConfigGroup &group) Q_DECL_OVERRIDE; | ||
128 | void saveGlobalProperties(KConfig *config) Q_DECL_OVERRIDE; | 131 | void saveGlobalProperties(KConfig *config) Q_DECL_OVERRIDE; | ||
129 | void readGlobalProperties(KConfig *config) Q_DECL_OVERRIDE; | 132 | void readGlobalProperties(KConfig *config) Q_DECL_OVERRIDE; | ||
130 | 133 | | |||
131 | // reimplemented from QWidget | 134 | // reimplemented from QWidget | ||
132 | bool focusNextPrevChild(bool next) Q_DECL_OVERRIDE; | 135 | bool focusNextPrevChild(bool next) Q_DECL_OVERRIDE; | ||
133 | 136 | | |||
134 | private Q_SLOTS: | 137 | private Q_SLOTS: | ||
135 | void newTab(); | 138 | void newTab(TabbedViewContainer *tabWidget); | ||
136 | void cloneTab(); | 139 | void cloneTab(); | ||
137 | void newWindow(); | 140 | void newWindow(); | ||
138 | void showManageProfilesDialog(); | 141 | void showManageProfilesDialog(); | ||
139 | void activateMenuBar(); | 142 | void activateMenuBar(); | ||
140 | void showSettingsDialog(const bool showProfilePage = false); | 143 | void showSettingsDialog(const bool showProfilePage = false); | ||
141 | void showShortcutsDialog(); | 144 | void showShortcutsDialog(); | ||
142 | void newFromProfile(Profile::Ptr profile); | 145 | void newFromProfile(TabbedViewContainer *tabWidget, Profile::Ptr profile); | ||
143 | void activeViewChanged(SessionController *controller); | 146 | void activeViewChanged(SessionController *controller); | ||
144 | void disconnectController(SessionController *controller); | 147 | void disconnectController(SessionController *controller); | ||
145 | void activeViewTitleChanged(ViewProperties *); | 148 | void activeViewTitleChanged(ViewProperties *); | ||
146 | 149 | | |||
147 | void profileListChanged(const QList<QAction *> &sessionActions); | 150 | void profileListChanged(const QList<QAction *> &sessionActions); | ||
148 | void configureNotifications(); | 151 | void configureNotifications(); | ||
149 | void setBlur(bool blur); | 152 | void setBlur(bool blur); | ||
150 | 153 | | |||
▲ Show 20 Lines • Show All 46 Lines • Show Last 20 Lines |