diff --git a/docs b/docs index d603e3d..cc201af 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit d603e3de533c74248621943bc85034620f4ef8c7 +Subproject commit cc201afd3a352a28f5daddbe00d7aed974d52d30 diff --git a/src/core/doc.hpp b/src/core/doc.hpp new file mode 100644 index 0000000..e4c907a --- /dev/null +++ b/src/core/doc.hpp @@ -0,0 +1,11 @@ +#pragma once + +// hide a property, function, or signal from typegen +#define QSDOC_HIDE + +// override the base class as seen by typegen +#define QSDOC_BASECLASS(baseclass) + +// make the type visible in the docs even if not a QML_ELEMENT +#define QSDOC_ELEMENT +#define QSDOC_NAMED_ELEMENT(name) diff --git a/src/core/panelinterface.hpp b/src/core/panelinterface.hpp index 626fcb0..f25e2b9 100644 --- a/src/core/panelinterface.hpp +++ b/src/core/panelinterface.hpp @@ -2,6 +2,7 @@ #include +#include "doc.hpp" #include "windowinterface.hpp" class Anchors { @@ -94,6 +95,7 @@ Q_ENUM_NS(Enum); /// } /// ``` class PanelWindowInterface: public WindowInterface { + QSDOC_NAMED_ELEMENT(PanelWindow); // clang-format off Q_OBJECT; /// Anchors attach a shell window to the sides of the screen. diff --git a/src/wayland/waylandlayershell.hpp b/src/wayland/waylandlayershell.hpp index 90075bc..793969c 100644 --- a/src/wayland/waylandlayershell.hpp +++ b/src/wayland/waylandlayershell.hpp @@ -7,10 +7,12 @@ #include #include +#include "../core/doc.hpp" #include "../core/proxywindow.hpp" #include "layershell.hpp" class WaylandLayershell: public ProxyWindowBase { + QSDOC_BASECLASS(PanelWindowInterface); // clang-format off Q_OBJECT; /// The shell layer the window sits in. Defaults to `Layer.Top`. @@ -22,10 +24,10 @@ class WaylandLayershell: public ProxyWindowBase { /// The degree of keyboard focus taken. Defaults to `KeyboardFocus.None`. Q_PROPERTY(KeyboardFocus::Enum keyboardFocus READ keyboardFocus WRITE setKeyboardFocus NOTIFY keyboardFocusChanged); - Q_PROPERTY(Anchors anchors READ anchors WRITE setAnchors NOTIFY anchorsChanged); - Q_PROPERTY(qint32 exclusiveZone READ exclusiveZone WRITE setExclusiveZone NOTIFY exclusiveZoneChanged); - Q_PROPERTY(ExclusionMode::Enum exclusionMode READ exclusionMode WRITE setExclusionMode NOTIFY exclusionModeChanged); - Q_PROPERTY(Margins margins READ margins WRITE setMargins NOTIFY marginsChanged); + QSDOC_HIDE Q_PROPERTY(Anchors anchors READ anchors WRITE setAnchors NOTIFY anchorsChanged); + QSDOC_HIDE Q_PROPERTY(qint32 exclusiveZone READ exclusiveZone WRITE setExclusiveZone NOTIFY exclusiveZoneChanged); + QSDOC_HIDE Q_PROPERTY(ExclusionMode::Enum exclusionMode READ exclusionMode WRITE setExclusionMode NOTIFY exclusionModeChanged); + QSDOC_HIDE Q_PROPERTY(Margins margins READ margins WRITE setMargins NOTIFY marginsChanged); QML_ATTACHED(WaylandLayershell); QML_ELEMENT; // clang-format on @@ -68,10 +70,10 @@ signals: void layerChanged(); void namespaceChanged(); void keyboardFocusChanged(); - void anchorsChanged(); - void exclusiveZoneChanged(); - void exclusionModeChanged(); - void marginsChanged(); + QSDOC_HIDE void anchorsChanged(); + QSDOC_HIDE void exclusiveZoneChanged(); + QSDOC_HIDE void exclusionModeChanged(); + QSDOC_HIDE void marginsChanged(); private slots: void updateAutoExclusion();