File tree Expand file tree Collapse file tree 4 files changed +35
-0
lines changed Expand file tree Collapse file tree 4 files changed +35
-0
lines changed Original file line number Diff line number Diff line change @@ -381,6 +381,13 @@ void CDockFocusController::onStateRestored()
381
381
}
382
382
}
383
383
384
+
385
+ // ==========================================================================
386
+ CDockWidget* CDockFocusController::focusedDockWidget () const
387
+ {
388
+ return d->FocusedDockWidget .data ();
389
+ }
390
+
384
391
} // namespace ads
385
392
386
393
// ---------------------------------------------------------------------------
Original file line number Diff line number Diff line change @@ -77,6 +77,12 @@ private slots:
77
77
*/
78
78
void notifyFloatingWidgetDrop (CFloatingDockContainer* FloatingWidget);
79
79
80
+ /* *
81
+ * Returns the dock widget that has focus style in the ui or a nullptr if
82
+ * not dock widget is painted focused.
83
+ */
84
+ CDockWidget* focusedDockWidget () const ;
85
+
80
86
public slots:
81
87
/* *
82
88
* Request a focus change to the given dock widget
Original file line number Diff line number Diff line change @@ -1042,6 +1042,20 @@ void CDockManager::setDockWidgetFocused(CDockWidget* DockWidget)
1042
1042
}
1043
1043
1044
1044
1045
+ // ===========================================================================
1046
+ CDockWidget* CDockManager::focusedDockWidget () const
1047
+ {
1048
+ if (!d->FocusController )
1049
+ {
1050
+ return nullptr ;
1051
+ }
1052
+ else
1053
+ {
1054
+ return d->FocusController ->focusedDockWidget ();
1055
+ }
1056
+ }
1057
+
1058
+
1045
1059
} // namespace ads
1046
1060
1047
1061
// ---------------------------------------------------------------------------
Original file line number Diff line number Diff line change @@ -476,6 +476,14 @@ class ADS_EXPORT CDockManager : public CDockContainerWidget
476
476
bool eventFilter (QObject *obj, QEvent *e) override ;
477
477
#endif
478
478
479
+ /* *
480
+ * Returns the dock widget that has focus style in the ui or a nullptr if
481
+ * not dock widget is painted focused.
482
+ * If the flag FocusHighlighting is disabled, this function always returns
483
+ * nullptr.
484
+ */
485
+ CDockWidget* focusedDockWidget () const ;
486
+
479
487
public slots:
480
488
/* *
481
489
* Opens the perspective with the given name.
You can’t perform that action at this time.
0 commit comments