Changeset View
Changeset View
Standalone View
Standalone View
src/ViewContainer.h
Show All 33 Lines | |||||
34 | #include "Profile.h" | 34 | #include "Profile.h" | ||
35 | #include "ViewManager.h" | 35 | #include "ViewManager.h" | ||
36 | 36 | | |||
37 | // Qt | 37 | // Qt | ||
38 | class QPoint; | 38 | class QPoint; | ||
39 | class QToolButton; | 39 | class QToolButton; | ||
40 | class QMenu; | 40 | class QMenu; | ||
41 | class QDropEvent; | 41 | class QDropEvent; | ||
42 | class QDragEnterEvent; | ||||
42 | 43 | | |||
43 | namespace Konsole { | 44 | namespace Konsole { | ||
44 | class IncrementalSearchBar; | 45 | class IncrementalSearchBar; | ||
45 | class ViewProperties; | 46 | class ViewProperties; | ||
46 | class ViewManager; | 47 | class ViewManager; | ||
47 | class TabbedViewContainer; | 48 | class TabbedViewContainer; | ||
48 | 49 | | |||
49 | /** | 50 | /** | ||
▲ Show 20 Lines • Show All 80 Lines • ▼ Show 20 Line(s) | 64 | public: | |||
130 | ViewManager *connectedViewManager(); | 131 | ViewManager *connectedViewManager(); | ||
131 | void currentTabChanged(int index); | 132 | void currentTabChanged(int index); | ||
132 | void closeCurrentTab(); | 133 | void closeCurrentTab(); | ||
133 | void wheelScrolled(int delta); | 134 | void wheelScrolled(int delta); | ||
134 | 135 | | |||
135 | void tabDoubleClicked(int index); | 136 | void tabDoubleClicked(int index); | ||
136 | void openTabContextMenu(const QPoint &point); | 137 | void openTabContextMenu(const QPoint &point); | ||
137 | void setNavigationVisibility(ViewManager::NavigationVisibility navigationVisibility); | 138 | void setNavigationVisibility(ViewManager::NavigationVisibility navigationVisibility); | ||
138 | 139 | void moveTabToWindow(int index, QWidget *window); | |||
139 | Q_SIGNALS: | 140 | Q_SIGNALS: | ||
140 | /** Emitted when the container has no more children */ | 141 | /** Emitted when the container has no more children */ | ||
141 | void empty(TabbedViewContainer *container); | 142 | void empty(TabbedViewContainer *container); | ||
142 | 143 | | |||
143 | /** Emitted when the user requests to open a new view */ | 144 | /** Emitted when the user requests to open a new view */ | ||
144 | void newViewRequest(); | 145 | void newViewRequest(); | ||
145 | 146 | | |||
146 | /** Requests creation of a new view, with the selected profile. */ | 147 | /** Requests creation of a new view, with the selected profile. */ | ||
147 | void newViewRequest(Profile::Ptr); | 148 | void newViewRequest(Profile::Ptr); | ||
148 | 149 | | |||
149 | /** | 150 | /** | ||
150 | * Emitted when the user requests to move a view from another container | 151 | * Emitted when the user requests to move a view from another container | ||
151 | * into this container. If 'success' is set to true by a connected slot | 152 | * into this container. If 'success' is set to true by a connected slot | ||
152 | * then the original view will be removed. | 153 | * then the original view will be removed. | ||
153 | * | 154 | * | ||
154 | * @param index Index at which to insert the new view in the container or -1 | 155 | * @param index Index at which to insert the new view in the container or -1 | ||
155 | * to append it. This index should be passed to addView() when the new view | 156 | * to append it. This index should be passed to addView() when the new view | ||
156 | * has been created. | 157 | * has been created. | ||
157 | * @param id The identifier of the view. | 158 | * @param id The identifier of the view. | ||
158 | * @param success The slot handling this signal should set this to true if the | | |||
159 | * new view was successfully created. | | |||
160 | * @param sourceContainer Initial move event Tabbed view container. | 159 | * @param sourceContainer Initial move event Tabbed view container. | ||
161 | */ | 160 | */ | ||
162 | void moveViewRequest(int index, int id, bool &success, TabbedViewContainer *sourceContainer); | 161 | void moveViewRequest(int index, int id, TabbedViewContainer *sourceContainer); | ||
163 | 162 | | |||
164 | /** Emitted when the active view changes */ | 163 | /** Emitted when the active view changes */ | ||
165 | void activeViewChanged(QWidget *view); | 164 | void activeViewChanged(QWidget *view); | ||
166 | 165 | | |||
167 | /** Emitted when a view is added to the container. */ | 166 | /** Emitted when a view is added to the container. */ | ||
168 | void viewAdded(QWidget *view, ViewProperties *properties); | 167 | void viewAdded(QWidget *view, ViewProperties *properties); | ||
169 | 168 | | |||
170 | /** Emitted when a view is removed from the container. */ | 169 | /** Emitted when a view is removed from the container. */ | ||
Show All 11 Lines | 175 | protected: | |||
182 | * | 181 | * | ||
183 | * @param fromIndex Current index of the widget to move | 182 | * @param fromIndex Current index of the widget to move | ||
184 | * @param toIndex New index for the widget | 183 | * @param toIndex New index for the widget | ||
185 | */ | 184 | */ | ||
186 | void moveViewWidget(int fromIndex, int toIndex); | 185 | void moveViewWidget(int fromIndex, int toIndex); | ||
187 | 186 | | |||
188 | // close tabs and unregister | 187 | // close tabs and unregister | ||
189 | void closeTerminalTab(int idx); | 188 | void closeTerminalTab(int idx); | ||
190 | | ||||
191 | private Q_SLOTS: | 189 | private Q_SLOTS: | ||
192 | void viewDestroyed(QObject *view); | 190 | void viewDestroyed(QObject *view); | ||
193 | void konsoleConfigChanged(); | 191 | void konsoleConfigChanged(); | ||
194 | 192 | | |||
195 | private: | 193 | private: | ||
196 | void forgetView(QWidget *view); | 194 | void forgetView(QWidget *view); | ||
197 | 195 | | |||
198 | QHash<QWidget *, ViewProperties *> _navigation; | 196 | QHash<QWidget *, ViewProperties *> _navigation; | ||
Show All 11 Lines |