@@ -41,6 +41,7 @@ namespace ads
4141struct DockAreaWidgetPrivate ;
4242class CDockManager ;
4343class CDockContainerWidget ;
44+ struct DockContainerWidgetPrivate ;
4445class CDockWidget ;
4546
4647
@@ -55,12 +56,48 @@ class ADS_EXPORT CDockAreaWidget : public QFrame
5556private:
5657 DockAreaWidgetPrivate* d; // /< private data (pimpl)
5758 friend struct DockAreaWidgetPrivate ;
59+ friend class CDockContainerWidget ;
60+ friend class DockContainerWidgetPrivate ;
61+ friend class CDockWidgetTab ;
5862
5963private slots:
6064 void onDockWidgetTitleClicked ();
6165 void onTabsMenuActionTriggered (QAction* Action);
6266 void onCloseButtonClicked ();
6367
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+
64101public:
65102 /* *
66103 * Default Constructor
@@ -83,26 +120,6 @@ private slots:
83120 */
84121 CDockContainerWidget* dockContainer () const ;
85122
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-
106123 /* *
107124 * Returns the rectangle of the title area
108125 */
@@ -118,12 +135,6 @@ private slots:
118135 */
119136 int tabIndex (CDockWidget* DockWidget);
120137
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-
127138 /* *
128139 * Returns a list of all dock widgets in this dock area.
129140 * This list contains open and closed dock widgets.
@@ -145,11 +156,6 @@ private slots:
145156 */
146157 CDockWidget* dockWidget (int Index) const ;
147158
148- /* *
149- * Reorder the index position of DockWidget at fromIndx to toIndex.
150- */
151- void reorderDockWidget (int fromIndex, int toIndex);
152-
153159 /* *
154160 * Returns the index of the current active dock widget
155161 */
@@ -161,7 +167,7 @@ private slots:
161167 CDockWidget* currentDockWidget () const ;
162168
163169 /* *
164- * Shows the tab with tghe given dock widget
170+ * Shows the tab with the given dock widget
165171 */
166172 void setCurrentDockWidget (CDockWidget* DockWidget);
167173
0 commit comments