forked from quickshell/quickshell
all: use type/prop shorthand in docs
This commit is contained in:
parent
c4cc662bcc
commit
e9cacbd92d
17 changed files with 38 additions and 63 deletions
|
@ -53,7 +53,7 @@ class NotificationAction;
|
|||
|
||||
///! A notification emitted by a NotificationServer.
|
||||
/// A notification emitted by a NotificationServer.
|
||||
/// > [!INFO] This type is [Retainable](/docs/types/quickshell/retainable). It
|
||||
/// > [!INFO] This type is @@Quickshell.Retainable$. It
|
||||
/// > can be retained after destruction if necessary.
|
||||
class Notification
|
||||
: public QObject
|
||||
|
@ -68,8 +68,8 @@ class Notification
|
|||
/// If this notification was carried over from the last generation
|
||||
/// when quickshell reloaded.
|
||||
///
|
||||
/// Notifications from the last generation will only be emitted if
|
||||
/// [NotificationServer.keepOnReload](../notificationserver#prop.keepOnReload) is true.
|
||||
/// Notifications from the last generation will only be emitted
|
||||
/// if @@NotificationServer.keepOnReloadis true.
|
||||
Q_PROPERTY(bool lastGeneration READ isLastGeneration CONSTANT);
|
||||
/// Time in seconds the notification should be valid for
|
||||
Q_PROPERTY(qreal expireTimeout READ expireTimeout NOTIFY expireTimeoutChanged);
|
||||
|
@ -86,7 +86,7 @@ class Notification
|
|||
Q_PROPERTY(QVector<NotificationAction*> actions READ actions NOTIFY actionsChanged);
|
||||
/// If actions associated with this notification have icons available.
|
||||
///
|
||||
/// See [NotificationAction.identifier](../notificationaction#prop.identifier) for details.
|
||||
/// See @@NotificationAction.identifier for details.
|
||||
Q_PROPERTY(bool hasActionIcons READ hasActionIcons NOTIFY hasActionIconsChanged);
|
||||
/// If true, the notification will not be destroyed after an action is invoked.
|
||||
Q_PROPERTY(bool resident READ isResident NOTIFY isResidentChanged);
|
||||
|
@ -194,10 +194,8 @@ class NotificationAction: public QObject {
|
|||
Q_OBJECT;
|
||||
/// The identifier of the action.
|
||||
///
|
||||
/// When [Notification.hasActionIcons] is true, this property will be an icon name.
|
||||
/// When @@Notification.hasActionIcons is true, this property will be an icon name.
|
||||
/// When it is false, this property is irrelevant.
|
||||
///
|
||||
/// [Notification.hasActionIcons]: ../notification#prop.hasActionIcons
|
||||
Q_PROPERTY(QString identifier READ identifier CONSTANT);
|
||||
/// The localized text that should be displayed on a button.
|
||||
Q_PROPERTY(QString text READ text NOTIFY textChanged);
|
||||
|
@ -211,9 +209,7 @@ public:
|
|||
, mIdentifier(std::move(identifier))
|
||||
, mText(std::move(text)) {}
|
||||
|
||||
/// Invoke the action. If [Notification.resident] is false it will be dismissed.
|
||||
///
|
||||
/// [Notification.resident]: ../notification#prop.resident
|
||||
/// Invoke the action. If @@Notification.resident is false it will be dismissed.
|
||||
Q_INVOKABLE void invoke();
|
||||
|
||||
[[nodiscard]] QString identifier() const;
|
||||
|
|
|
@ -27,7 +27,7 @@ class NotificationServerQml
|
|||
// clang-format off
|
||||
/// If notifications should be re-emitted when quickshell reloads. Defaults to true.
|
||||
///
|
||||
/// The [lastGeneration](../notification#prop.lastGeneration) flag will be
|
||||
/// The @@Notification.lastGeneration flag will be
|
||||
/// set on notifications from the prior generation for further filtering/handling.
|
||||
Q_PROPERTY(bool keepOnReload READ keepOnReload WRITE setKeepOnReload NOTIFY keepOnReloadChanged);
|
||||
/// If the notification server should advertise that it can persist notifications in the background
|
||||
|
@ -42,11 +42,9 @@ class NotificationServerQml
|
|||
/// If notification body text should be advertised as supporting markup as described in [the specification]
|
||||
/// Defaults to false.
|
||||
///
|
||||
/// Note that returned notifications may still contain markup if this property is false, as it is only a hint.
|
||||
/// By default Text objects will try to render markup. To avoid this if any is sent, change [Text.textFormat] to `PlainText`.
|
||||
///
|
||||
/// [the specification]: https://specifications.freedesktop.org/notification-spec/notification-spec-latest.html#markup
|
||||
/// [Text.textFormat]: https://doc.qt.io/qt-6/qml-qtquick-text.html#textFormat-prop
|
||||
/// Note that returned notifications may still contain markup if this property is false,
|
||||
/// as it is only a hint. By default Text objects will try to render markup. To avoid this
|
||||
/// if any is sent, change @@QtQuick.Text.textFormat to `PlainText`.
|
||||
Q_PROPERTY(bool bodyMarkupSupported READ bodyMarkupSupported WRITE setBodyMarkupSupported NOTIFY bodyMarkupSupportedChanged);
|
||||
/// If notification body text should be advertised as supporting hyperlinks as described in [the specification]
|
||||
/// Defaults to false.
|
||||
|
|
|
@ -249,7 +249,7 @@ private:
|
|||
|
||||
///! A connection between pipewire nodes.
|
||||
/// Note that there is one link per *channel* of a connection between nodes.
|
||||
/// You usually want [PwLinkGroup](../pwlinkgroup).
|
||||
/// You usually want @@PwLinkGroup$.
|
||||
class PwLinkIface: public PwObjectIface {
|
||||
Q_OBJECT;
|
||||
/// The pipewire object id of the link.
|
||||
|
|
|
@ -61,7 +61,7 @@ class SystemTrayItem: public QObject {
|
|||
Q_PROPERTY(QString tooltipTitle READ tooltipTitle NOTIFY tooltipTitleChanged);
|
||||
Q_PROPERTY(QString tooltipDescription READ tooltipDescription NOTIFY tooltipDescriptionChanged);
|
||||
/// If this tray item has an associated menu accessible via `display`
|
||||
/// or a [SystemTrayMenuWatcher](../systemtraymenuwatcher).
|
||||
/// or a @@SystemTrayMenuWatcher$.
|
||||
Q_PROPERTY(bool hasMenu READ hasMenu NOTIFY hasMenuChanged);
|
||||
/// If this tray item only offers a menu and activation will do nothing.
|
||||
Q_PROPERTY(bool onlyMenu READ onlyMenu NOTIFY onlyMenuChanged);
|
||||
|
@ -133,7 +133,7 @@ private:
|
|||
|
||||
///! Accessor for SystemTrayItem menus.
|
||||
/// SystemTrayMenuWatcher provides access to the associated
|
||||
/// [DBusMenuItem](../../quickshell.dbusmenu/dbusmenuitem) for a tray item.
|
||||
/// @@Quickshell.DBusMenu.DBusMenuItem for a tray item.
|
||||
class SystemTrayMenuWatcher: public QObject {
|
||||
using DBusMenu = qs::dbus::dbusmenu::DBusMenu;
|
||||
using DBusMenuItem = qs::dbus::dbusmenu::DBusMenuItem;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue