File tree Expand file tree Collapse file tree 2 files changed +36
-0
lines changed Expand file tree Collapse file tree 2 files changed +36
-0
lines changed Original file line number Diff line number Diff line change 48
48
#include < QApplication>
49
49
#include < QWindow>
50
50
#include < QWindowStateChangeEvent>
51
+ #include < QVector>
51
52
52
53
#include " FloatingDockContainer.h"
53
54
#include " DockOverlay.h"
@@ -94,6 +95,7 @@ enum eStateFileVersion
94
95
95
96
static CDockManager::ConfigFlags StaticConfigFlags = CDockManager::DefaultNonOpaqueConfig;
96
97
static CDockManager::AutoHideFlags StaticAutoHideConfigFlags; // auto hide feature is disabled by default
98
+ static QVector<QVariant> StaticConfigParams (CDockManager::ConfigParamCount);
97
99
98
100
static QString FloatingContainersTitle;
99
101
@@ -1475,6 +1477,20 @@ CDockWidget::DockWidgetFeatures CDockManager::globallyLockedDockWidgetFeatures()
1475
1477
}
1476
1478
1477
1479
1480
+ // ===========================================================================
1481
+ void CDockManager::setConfigParam (CDockManager::eConfigParam Param, QVariant Value)
1482
+ {
1483
+ StaticConfigParams[Param] = Value;
1484
+ }
1485
+
1486
+
1487
+ // ===========================================================================
1488
+ QVariant CDockManager::configParam (eConfigParam Param, QVariant Default)
1489
+ {
1490
+ return StaticConfigParams[Param].isValid () ? StaticConfigParams[Param] : Default;
1491
+ }
1492
+
1493
+
1478
1494
} // namespace ads
1479
1495
1480
1496
// ---------------------------------------------------------------------------
Original file line number Diff line number Diff line change @@ -263,6 +263,15 @@ public Q_SLOTS:
263
263
};
264
264
Q_DECLARE_FLAGS (AutoHideFlags, eAutoHideFlag)
265
265
266
+ /* *
267
+ * Global configuration parameters that you can set via setConfigParam()
268
+ */
269
+ enum eConfigParam
270
+ {
271
+ AutoHideOpenOnDragHoverDelay_ms, // /< Delay in ms before the dock opens on drag hover if AutoHideOpenOnDragHover flag is set
272
+ ConfigParamCount // just a delimiter to count number of config params
273
+ };
274
+
266
275
267
276
/* *
268
277
* Default Constructor.
@@ -324,6 +333,17 @@ public Q_SLOTS:
324
333
*/
325
334
static bool testAutoHideConfigFlag (eAutoHideFlag Flag);
326
335
336
+ /* *
337
+ * Sets the value for the given config parameter
338
+ */
339
+ static void setConfigParam (eConfigParam Param, QVariant Value);
340
+
341
+ /* *
342
+ * Returns the value for the given config parameter or the default value
343
+ * if the parameter is not set.
344
+ */
345
+ static QVariant configParam (eConfigParam Param, QVariant Default);
346
+
327
347
/* *
328
348
* Returns the global icon provider.
329
349
* The icon provider enables the use of custom icons in case using
You can’t perform that action at this time.
0 commit comments