@@ -41,6 +41,7 @@ namespace ads
41
41
struct DockAreaWidgetPrivate ;
42
42
class CDockManager ;
43
43
class CDockContainerWidget ;
44
+ struct DockContainerWidgetPrivate ;
44
45
class CDockWidget ;
45
46
46
47
@@ -55,12 +56,48 @@ class ADS_EXPORT CDockAreaWidget : public QFrame
55
56
private:
56
57
DockAreaWidgetPrivate* d; // /< private data (pimpl)
57
58
friend struct DockAreaWidgetPrivate ;
59
+ friend class CDockContainerWidget ;
60
+ friend class DockContainerWidgetPrivate ;
61
+ friend class CDockWidgetTab ;
58
62
59
63
private slots:
60
64
void onDockWidgetTitleClicked ();
61
65
void onTabsMenuActionTriggered (QAction* Action);
62
66
void onCloseButtonClicked ();
63
67
68
+ protected:
69
+ /* *
70
+ * Inserts a dock widget into dock area.
71
+ * All dockwidgets in the dock area tabified in a stacked layout with tabs.
72
+ * The index indicates the index of the new dockwidget in the tabbar and
73
+ * in the stacked layout. If the Activate parameter is true, the new
74
+ * DockWidget will be the active one in the stacked layout
75
+ */
76
+ void insertDockWidget (int index, CDockWidget* DockWidget, bool Activate = true );
77
+
78
+ /* *
79
+ * Add a new dock widget to dock area.
80
+ * All dockwidgets in the dock area tabified in a stacked layout with tabs
81
+ */
82
+ void addDockWidget (CDockWidget* DockWidget);
83
+
84
+ /* *
85
+ * Removes the given dock widget from the dock area
86
+ */
87
+ void removeDockWidget (CDockWidget* DockWidget);
88
+
89
+ /* *
90
+ * Returns the index of contents of the title widget that is located at
91
+ * mouse position pos
92
+ */
93
+ int indexOfContentByTitlePos (const QPoint& pos, QWidget* exclude = nullptr ) const ;
94
+
95
+ /* *
96
+ * Reorder the index position of DockWidget at fromIndx to toIndex.
97
+ */
98
+ void reorderDockWidget (int fromIndex, int toIndex);
99
+
100
+
64
101
public:
65
102
/* *
66
103
* Default Constructor
@@ -83,26 +120,6 @@ private slots:
83
120
*/
84
121
CDockContainerWidget* dockContainer () const ;
85
122
86
- /* *
87
- * Inserts a dock widget into dock area.
88
- * All dockwidgets in the dock area tabified in a stacked layout with tabs.
89
- * The index indicates the index of the new dockwidget in the tabbar and
90
- * in the stacked layout. If the Activate parameter is true, the new
91
- * DockWidget will be the active one in the stacked layout
92
- */
93
- void insertDockWidget (int index, CDockWidget* DockWidget, bool Activate = true );
94
-
95
- /* *
96
- * Add a new dock widget to dock area.
97
- * All dockwidgets in the dock area tabified in a stacked layout with tabs
98
- */
99
- void addDockWidget (CDockWidget* DockWidget);
100
-
101
- /* *
102
- * Removes the given dock widget from the dock area
103
- */
104
- void removeDockWidget (CDockWidget* DockWidget);
105
-
106
123
/* *
107
124
* Returns the rectangle of the title area
108
125
*/
@@ -118,12 +135,6 @@ private slots:
118
135
*/
119
136
int tabIndex (CDockWidget* DockWidget);
120
137
121
- /* *
122
- * Returns the index of contents of the title widget that is located at
123
- * mouse position pos
124
- */
125
- int indexOfContentByTitlePos (const QPoint& pos, QWidget* exclude = nullptr ) const ;
126
-
127
138
/* *
128
139
* Returns a list of all dock widgets in this dock area.
129
140
* This list contains open and closed dock widgets.
@@ -145,11 +156,6 @@ private slots:
145
156
*/
146
157
CDockWidget* dockWidget (int Index) const ;
147
158
148
- /* *
149
- * Reorder the index position of DockWidget at fromIndx to toIndex.
150
- */
151
- void reorderDockWidget (int fromIndex, int toIndex);
152
-
153
159
/* *
154
160
* Returns the index of the current active dock widget
155
161
*/
@@ -161,7 +167,7 @@ private slots:
161
167
CDockWidget* currentDockWidget () const ;
162
168
163
169
/* *
164
- * Shows the tab with tghe given dock widget
170
+ * Shows the tab with the given dock widget
165
171
*/
166
172
void setCurrentDockWidget (CDockWidget* DockWidget);
167
173
0 commit comments