docs: use new member reference shorthand

This commit is contained in:
outfoxxed 2024-07-21 17:41:49 -07:00
parent dfcf533424
commit a9e4720fae
Signed by untrusted user: outfoxxed
GPG key ID: 4C88A185FB89301E
35 changed files with 182 additions and 146 deletions

View file

@ -29,9 +29,13 @@ namespace qs::hyprland::ipc {
/// Live Hyprland IPC event. Holding this object after the
/// signal handler exits is undefined as the event instance
/// is reused.
///
/// Emitted by @@Hyprland.rawEvent(s).
class HyprlandIpcEvent: public QObject {
Q_OBJECT;
/// The name of the event.
///
/// See [Hyprland Wiki: IPC](https://wiki.hyprland.org/IPC/) for a list of events.
Q_PROPERTY(QString name READ nameStr CONSTANT);
/// The unparsed data of the event.
Q_PROPERTY(QString data READ dataStr CONSTANT);

View file

@ -25,7 +25,7 @@ class HyprlandMonitor: public QObject {
///
/// > [!WARNING] This is *not* updated unless the monitor object is fetched again from
/// > Hyprland. If you need a value that is subject to change and does not have a dedicated
/// > property, run `HyprlandIpc.refreshMonitors()` and wait for this property to update.
/// > property, run @@Hyprland.refreshMonitors() and wait for this property to update.
Q_PROPERTY(QVariantMap lastIpcObject READ lastIpcObject NOTIFY lastIpcObjectChanged);
/// The currently active workspace on this monitor. May be null.
Q_PROPERTY(HyprlandWorkspace* activeWorkspace READ activeWorkspace NOTIFY activeWorkspaceChanged);

View file

@ -19,7 +19,7 @@ class HyprlandWorkspace: public QObject {
///
/// > [!WARNING] This is *not* updated unless the workspace object is fetched again from
/// > Hyprland. If you need a value that is subject to change and does not have a dedicated
/// > property, run `HyprlandIpc.refreshWorkspaces()` and wait for this property to update.
/// > property, run @@Hyprland.refreshWorkspaces() and wait for this property to update.
Q_PROPERTY(QVariantMap lastIpcObject READ lastIpcObject NOTIFY lastIpcObjectChanged);
Q_PROPERTY(HyprlandMonitor* monitor READ monitor NOTIFY monitorChanged);
QML_ELEMENT;

View file

@ -17,7 +17,7 @@ class ToplevelHandle;
///! Window from another application.
/// A window/toplevel from another application, retrievable from
/// the @@ToplevelManager$.
/// the @@ToplevelManager.
class Toplevel: public QObject {
Q_OBJECT;
Q_PROPERTY(QString appId READ appId NOTIFY appIdChanged);
@ -26,7 +26,7 @@ class Toplevel: public QObject {
Q_PROPERTY(Toplevel* parent READ parent NOTIFY parentChanged);
/// If the window is currently activated or focused.
///
/// Activation can be requested with the `activate()` function.
/// Activation can be requested with the @@activate() function.
Q_PROPERTY(bool activated READ activated NOTIFY activatedChanged);
/// If the window is currently maximized.
///
@ -42,7 +42,7 @@ class Toplevel: public QObject {
///
/// Fullscreen can be requested by setting this property, though it may
/// be ignored by the compositor.
/// Fullscreen can be requested on a specific screen with the `fullscreenOn()` function.
/// Fullscreen can be requested on a specific screen with the @@fullscreenOn() function.
Q_PROPERTY(bool fullscreen READ fullscreen WRITE setFullscreen NOTIFY fullscreenChanged);
QML_ELEMENT;
QML_UNCREATABLE("Toplevels must be acquired from the ToplevelManager.");

View file

@ -15,9 +15,10 @@
///! Wlroots layershell window
/// Decorationless window that can be attached to the screen edges using the [zwlr_layer_shell_v1] protocol.
///
/// #### Attached property
/// `WlrLayershell` works as an attached property of @@Quickshell.PanelWindow which you should use instead if you can,
/// #### Attached object
/// `WlrLayershell` works as an attached object of @@Quickshell.PanelWindow which you should use instead if you can,
/// as it is platform independent.
///
/// ```qml
/// PanelWindow {
/// // When PanelWindow is backed with WlrLayershell this will work

View file

@ -9,7 +9,8 @@
#include "../../core/panelinterface.hpp"
///! WlrLayershell layer
///! WlrLayershell layer.
/// See @@WlrLayershell.layer.
namespace WlrLayer { // NOLINT
Q_NAMESPACE;
QML_ELEMENT;
@ -30,6 +31,7 @@ Q_ENUM_NS(Enum);
} // namespace WlrLayer
///! WlrLayershell keyboard focus mode
/// See @@WlrLayershell.keyboardFocus.
namespace WlrKeyboardFocus { // NOLINT
Q_NAMESPACE;
QML_ELEMENT;
@ -41,7 +43,7 @@ enum Enum {
///
/// > [!WARNING] You **CANNOT** use this to make a secure lock screen.
/// >
/// > If you want to make a lock screen, use @@WlSessionLock$.
/// > If you want to make a lock screen, use @@WlSessionLock.
Exclusive = 1,
/// Access to the keyboard as determined by the operating system.
///