diff --git a/src/KDDockWidgets.h b/src/KDDockWidgets.h index f1536a94..c42437e3 100644 --- a/src/KDDockWidgets.h +++ b/src/KDDockWidgets.h @@ -65,7 +65,9 @@ Q_ENUM_NS(MainWindowOptions) enum class FrontendType { QtWidgets = 1, - QtQuick + QtQuick, + FIRST = QtWidgets, + LAST = QtQuick // keep pointing to last }; Q_ENUM_NS(FrontendType) diff --git a/src/Platform.cpp b/src/Platform.cpp index eed4eff8..7333905b 100644 --- a/src/Platform.cpp +++ b/src/Platform.cpp @@ -37,3 +37,15 @@ bool Platform::hasActivePopup() const { return false; } + +/**static*/ +std::vector Platform::frontendTypes() +{ + std::vector types; + types.reserve(int(FrontendType::LAST)); + for (int i = int(FrontendType::FIRST); i <= int(FrontendType::LAST); ++i) { + types.push_back(FrontendType(i)); + } + + return types; +} diff --git a/src/Platform.h b/src/Platform.h index ff3216bc..b7d2a70a 100644 --- a/src/Platform.h +++ b/src/Platform.h @@ -13,10 +13,13 @@ #include "docks_export.h" #include "ViewWrapper.h" +#include "KDDockWidgets.h" #include "kdbindings/signal.h" #include + +#include #include namespace KDDockWidgets { @@ -70,6 +73,10 @@ public: virtual QSize screenSizeFor(View *) const = 0; #ifdef DOCKS_DEVELOPER_MODE + + /// @brief list the list of frontend types supported by this build + static std::vector frontendTypes(); + /// @brief Waits for the specified window to be active (have the keyboard focus) /// Window::isActive() should return true /// @sa Window::isActive()