forked from quickshell/quickshell
docs: add macro hints for typegen to paper over weird interfaces
This commit is contained in:
parent
c0faebc700
commit
0034edd0f8
2
docs
2
docs
|
@ -1 +1 @@
|
|||
Subproject commit d603e3de533c74248621943bc85034620f4ef8c7
|
||||
Subproject commit cc201afd3a352a28f5daddbe00d7aed974d52d30
|
11
src/core/doc.hpp
Normal file
11
src/core/doc.hpp
Normal file
|
@ -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)
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
#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.
|
||||
|
|
|
@ -7,10 +7,12 @@
|
|||
#include <qtmetamacros.h>
|
||||
#include <qtypes.h>
|
||||
|
||||
#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();
|
||||
|
|
Loading…
Reference in a new issue