Changeset View
Changeset View
Standalone View
Standalone View
src/MainWindow.h
Show All 23 Lines | |||||
24 | #include <QPointer> | 24 | #include <QPointer> | ||
25 | #include <QUrl> | 25 | #include <QUrl> | ||
26 | 26 | | |||
27 | // KDE | 27 | // KDE | ||
28 | #include <KXmlGuiWindow> | 28 | #include <KXmlGuiWindow> | ||
29 | 29 | | |||
30 | // Konsole | 30 | // Konsole | ||
31 | #include "Profile.h" | 31 | #include "Profile.h" | ||
32 | #include "ViewSplitter.h" | ||||
32 | 33 | | |||
33 | class QAction; | 34 | class QAction; | ||
34 | class KActionMenu; | 35 | class KActionMenu; | ||
35 | class KToggleAction; | 36 | class KToggleAction; | ||
36 | 37 | | |||
37 | namespace Konsole { | 38 | namespace Konsole { | ||
38 | class IncrementalSearchBar; | 39 | class IncrementalSearchBar; | ||
39 | class ViewManager; | 40 | class ViewManager; | ||
Show All 29 Lines | 62 | public: | |||
69 | * Returns the view manager associated with this window. The view manager can be used to | 70 | * Returns the view manager associated with this window. The view manager can be used to | ||
70 | * create new views on particular session objects inside this window. | 71 | * create new views on particular session objects inside this window. | ||
71 | */ | 72 | */ | ||
72 | ViewManager *viewManager() const; | 73 | ViewManager *viewManager() const; | ||
73 | 74 | | |||
74 | /** | 75 | /** | ||
75 | * Create a new session. | 76 | * Create a new session. | ||
76 | * | 77 | * | ||
77 | * @param tabWidget where the new widget should be added. | | |||
78 | * @param profile The profile to use to create the new session. | 78 | * @param profile The profile to use to create the new session. | ||
79 | * @param directory Initial working directory for the new session or empty | 79 | * @param directory Initial working directory for the new session or empty | ||
80 | * 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. | ||
81 | */ | 81 | */ | ||
82 | Session *createSession(TabbedViewContainer *tabWidget, Profile::Ptr profile, const QString &directory); | 82 | Session *createSession(Profile::Ptr profile, const QString &directory); | ||
83 | 83 | | |||
84 | /** | 84 | /** | ||
85 | * create a new SSH session. | 85 | * create a new SSH session. | ||
86 | * | 86 | * | ||
87 | * @param tabWidget where the new widget should be added. | | |||
88 | * @param profile The profile to use to create the new session. | 87 | * @param profile The profile to use to create the new session. | ||
89 | * @param url the URL representing the new SSH connection | 88 | * @param url the URL representing the new SSH connection | ||
90 | */ | 89 | */ | ||
91 | Session *createSSHSession(TabbedViewContainer *tabWidget, Profile::Ptr profile, const QUrl &url); | 90 | Session *createSSHSession(Profile::Ptr profile, const QUrl &url); | ||
92 | 91 | | |||
93 | /** | 92 | /** | ||
94 | * Helper method to make this window get input focus | 93 | * Helper method to make this window get input focus | ||
95 | */ | 94 | */ | ||
96 | void setFocus(); | 95 | void setFocus(); | ||
97 | 96 | | |||
98 | /** | 97 | /** | ||
99 | * Set the initial visibility of the menubar. | 98 | * Set the initial visibility of the menubar. | ||
Show All 20 Lines | 110 | Q_SIGNALS: | |||
120 | * if the default working directory associated with the profile should | 119 | * if the default working directory associated with the profile should | ||
121 | * be used. | 120 | * be used. | ||
122 | */ | 121 | */ | ||
123 | void newWindowRequest(const Profile::Ptr &profile, const QString &directory); | 122 | void newWindowRequest(const Profile::Ptr &profile, const QString &directory); | ||
124 | 123 | | |||
125 | /** | 124 | /** | ||
126 | * Emitted when a view for one session is detached from this window | 125 | * Emitted when a view for one session is detached from this window | ||
127 | */ | 126 | */ | ||
128 | void viewDetached(Session *session); | 127 | void terminalsDetached(ViewSplitter *splitter, QHash<TerminalDisplay*, Session*> sessionsMap); | ||
129 | 128 | | |||
130 | protected: | 129 | protected: | ||
131 | // Reimplemented for internal reasons. | 130 | // Reimplemented for internal reasons. | ||
132 | void showEvent(QShowEvent *event) Q_DECL_OVERRIDE; | 131 | void showEvent(QShowEvent *event) Q_DECL_OVERRIDE; | ||
133 | bool eventFilter(QObject *obj, QEvent *event) Q_DECL_OVERRIDE; | 132 | bool eventFilter(QObject *obj, QEvent *event) Q_DECL_OVERRIDE; | ||
134 | 133 | | |||
135 | // reimplemented from KMainWindow | 134 | // reimplemented from KMainWindow | ||
136 | bool queryClose() Q_DECL_OVERRIDE; | 135 | bool queryClose() Q_DECL_OVERRIDE; | ||
137 | void saveProperties(KConfigGroup &group) Q_DECL_OVERRIDE; | 136 | void saveProperties(KConfigGroup &group) Q_DECL_OVERRIDE; | ||
138 | void readProperties(const KConfigGroup &group) Q_DECL_OVERRIDE; | 137 | void readProperties(const KConfigGroup &group) Q_DECL_OVERRIDE; | ||
139 | void saveGlobalProperties(KConfig *config) Q_DECL_OVERRIDE; | 138 | void saveGlobalProperties(KConfig *config) Q_DECL_OVERRIDE; | ||
140 | void readGlobalProperties(KConfig *config) Q_DECL_OVERRIDE; | 139 | void readGlobalProperties(KConfig *config) Q_DECL_OVERRIDE; | ||
141 | 140 | | |||
142 | // reimplemented from QWidget | 141 | // reimplemented from QWidget | ||
143 | bool focusNextPrevChild(bool next) Q_DECL_OVERRIDE; | 142 | bool focusNextPrevChild(bool next) Q_DECL_OVERRIDE; | ||
144 | 143 | | |||
145 | private Q_SLOTS: | 144 | private Q_SLOTS: | ||
146 | void newTab(TabbedViewContainer *tabWidget); | 145 | void newTab(); | ||
147 | void cloneTab(); | 146 | void cloneTab(); | ||
148 | void newWindow(); | 147 | void newWindow(); | ||
149 | void showManageProfilesDialog(); | 148 | void showManageProfilesDialog(); | ||
150 | void activateMenuBar(); | 149 | void activateMenuBar(); | ||
151 | void showSettingsDialog(const bool showProfilePage = false); | 150 | void showSettingsDialog(const bool showProfilePage = false); | ||
152 | void showShortcutsDialog(); | 151 | void showShortcutsDialog(); | ||
153 | void newFromProfile(TabbedViewContainer *tabWidget, const Profile::Ptr &profile); | 152 | void newFromProfile(const Profile::Ptr &profile); | ||
154 | void activeViewChanged(SessionController *controller); | 153 | void activeViewChanged(SessionController *controller); | ||
155 | void disconnectController(SessionController *controller); | 154 | void disconnectController(SessionController *controller); | ||
156 | void activeViewTitleChanged(ViewProperties *); | 155 | void activeViewTitleChanged(ViewProperties *); | ||
157 | 156 | | |||
158 | void profileListChanged(const QList<QAction *> &sessionActions); | 157 | void profileListChanged(const QList<QAction *> &sessionActions); | ||
159 | void configureNotifications(); | 158 | void configureNotifications(); | ||
160 | void setBlur(bool blur); | 159 | void setBlur(bool blur); | ||
161 | 160 | | |||
▲ Show 20 Lines • Show All 46 Lines • Show Last 20 Lines |