forked from quickshell/quickshell
docs: use new member reference shorthand
This commit is contained in:
parent
dfcf533424
commit
a9e4720fae
src
core
desktopentry.hppfloatingwindow.hpplazyloader.hppmodel.hppobjectrepeater.hpppanelinterface.hppqmlglobal.hppqsmenu.hppregion.hppreload.hppretainable.hpptransformwatcher.hppvariants.hpp
dbus/dbusmenu
io
services
greetd
mpris
notifications
pam
pipewire
status_notifier
upower
wayland
|
@ -27,7 +27,7 @@ class DesktopEntry: public QObject {
|
|||
Q_PROPERTY(QString comment MEMBER mComment CONSTANT);
|
||||
/// Name of the icon associated with this application. May be empty.
|
||||
Q_PROPERTY(QString icon MEMBER mIcon CONSTANT);
|
||||
/// The raw `Exec` string from the desktop entry. You probably want `execute()`.
|
||||
/// The raw `Exec` string from the desktop entry. You probably want @@execute().
|
||||
Q_PROPERTY(QString execString MEMBER mExecString CONSTANT);
|
||||
/// The working directory to execute from.
|
||||
Q_PROPERTY(QString workingDirectory MEMBER mWorkingDirectory CONSTANT);
|
||||
|
@ -44,7 +44,7 @@ public:
|
|||
|
||||
void parseEntry(const QString& text);
|
||||
|
||||
/// Run the application. Currently ignores `runInTerminal` and field codes.
|
||||
/// Run the application. Currently ignores @@runInTerminal and field codes.
|
||||
Q_INVOKABLE void execute() const;
|
||||
|
||||
[[nodiscard]] bool isValid() const;
|
||||
|
@ -81,7 +81,7 @@ class DesktopAction: public QObject {
|
|||
Q_PROPERTY(QString id MEMBER mId CONSTANT);
|
||||
Q_PROPERTY(QString name MEMBER mName CONSTANT);
|
||||
Q_PROPERTY(QString icon MEMBER mIcon CONSTANT);
|
||||
/// The raw `Exec` string from the desktop entry. You probably want `execute()`.
|
||||
/// The raw `Exec` string from the desktop entry. You probably want @@execute().
|
||||
Q_PROPERTY(QString execString MEMBER mExecString CONSTANT);
|
||||
QML_ELEMENT;
|
||||
QML_UNCREATABLE("DesktopAction instances must be retrieved from a DesktopEntry");
|
||||
|
@ -92,7 +92,7 @@ public:
|
|||
, entry(entry)
|
||||
, mId(std::move(id)) {}
|
||||
|
||||
/// Run the application. Currently ignores `runInTerminal` and field codes.
|
||||
/// Run the application. Currently ignores @@DesktopEntry.runInTerminal and field codes.
|
||||
Q_INVOKABLE void execute() const;
|
||||
|
||||
private:
|
||||
|
|
|
@ -17,7 +17,7 @@ public:
|
|||
void setHeight(qint32 height) override;
|
||||
};
|
||||
|
||||
///! Standard floating window.
|
||||
///! Standard toplevel operating system window that looks like any other application.
|
||||
class FloatingWindowInterface: public WindowInterface {
|
||||
Q_OBJECT;
|
||||
QML_NAMED_ELEMENT(FloatingWindow);
|
||||
|
|
|
@ -87,8 +87,8 @@
|
|||
/// > meaning if you create all windows inside of lazy loaders, none of them will ever load.
|
||||
class LazyLoader: public Reloadable {
|
||||
Q_OBJECT;
|
||||
/// The fully loaded item if the loader is `loading` or `active`, or `null`
|
||||
/// if neither `loading` or `active`.
|
||||
/// The fully loaded item if the loader is @@loading or @@active, or `null`
|
||||
/// if neither @@loading nor @@active.
|
||||
///
|
||||
/// Note that the item is owned by the LazyLoader, and destroying the LazyLoader
|
||||
/// will destroy the item.
|
||||
|
@ -96,7 +96,7 @@ class LazyLoader: public Reloadable {
|
|||
/// > [!WARNING] If you access the `item` of a loader that is currently loading,
|
||||
/// > it will block as if you had set `active` to true immediately beforehand.
|
||||
/// >
|
||||
/// > You can instead set `loading` and listen to the `activeChanged` signal to
|
||||
/// > You can instead set @@loading and listen to @@activeChanged(s) signal to
|
||||
/// > ensure loading happens asynchronously.
|
||||
Q_PROPERTY(QObject* item READ item NOTIFY itemChanged);
|
||||
/// If the loader is actively loading.
|
||||
|
@ -105,7 +105,7 @@ class LazyLoader: public Reloadable {
|
|||
/// loading it asynchronously. If the component is already loaded, setting
|
||||
/// this property has no effect.
|
||||
///
|
||||
/// See also: [activeAsync](#prop.activeAsync).
|
||||
/// See also: @@activeAsync.
|
||||
Q_PROPERTY(bool loading READ isLoading WRITE setLoading NOTIFY loadingChanged);
|
||||
/// If the component is fully loaded.
|
||||
///
|
||||
|
@ -113,17 +113,17 @@ class LazyLoader: public Reloadable {
|
|||
/// blocking the UI, and setting it to `false` will destroy the component, requiring
|
||||
/// it to be loaded again.
|
||||
///
|
||||
/// See also: [activeAsync](#prop.activeAsync).
|
||||
/// See also: @@activeAsync.
|
||||
Q_PROPERTY(bool active READ isActive WRITE setActive NOTIFY activeChanged);
|
||||
/// If the component is fully loaded.
|
||||
///
|
||||
/// Setting this property to true will asynchronously load the component similarly to
|
||||
/// [loading](#prop.loading). Reading it or setting it to false will behanve
|
||||
/// the same as [active](#prop.active).
|
||||
/// @@loading. Reading it or setting it to false will behanve
|
||||
/// the same as @@active.
|
||||
Q_PROPERTY(bool activeAsync READ isActive WRITE setActiveAsync NOTIFY activeChanged);
|
||||
/// The component to load. Mutually exclusive to `source`.
|
||||
/// The component to load. Mutually exclusive to @@source.
|
||||
Q_PROPERTY(QQmlComponent* component READ component WRITE setComponent NOTIFY componentChanged);
|
||||
/// The URI to load the component from. Mutually exclusive to `component`.
|
||||
/// The URI to load the component from. Mutually exclusive to @@component.
|
||||
Q_PROPERTY(QString source READ source WRITE setSource NOTIFY sourceChanged);
|
||||
Q_CLASSINFO("DefaultProperty", "component");
|
||||
QML_ELEMENT;
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
/// property var foo: model[3]
|
||||
/// ```
|
||||
///
|
||||
/// You can work around this limitation using the `values` property of the model to view it as a list.
|
||||
/// You can work around this limitation using the @@values property of the model to view it as a list.
|
||||
/// ```qml
|
||||
/// // will update reactively
|
||||
/// property var foo: model.values[3]
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
#include "model.hpp"
|
||||
|
||||
///! A Repeater / for loop / map for non Item derived objects.
|
||||
/// > [!ERROR] Removed in favor of QtQml.Models.Instantiator
|
||||
/// > [!ERROR] Removed in favor of @@QtQml.Models.Instantiator
|
||||
///
|
||||
/// The ObjectRepeater creates instances of the provided delegate for every entry in the
|
||||
/// given model, similarly to a @@QtQuick.Repeater but for non visual types.
|
||||
|
@ -19,7 +19,7 @@ class ObjectRepeater: public ObjectModel<QObject> {
|
|||
Q_OBJECT;
|
||||
/// The model providing data to the ObjectRepeater.
|
||||
///
|
||||
/// Currently accepted model types are QML `list<T>` lists, javascript arrays,
|
||||
/// Currently accepted model types are `list<T>` lists, javascript arrays,
|
||||
/// and [QAbstractListModel] derived models, though only one column will be repeated
|
||||
/// from the latter.
|
||||
///
|
||||
|
|
|
@ -57,6 +57,8 @@ public:
|
|||
qint32 mBottom = 0;
|
||||
};
|
||||
|
||||
///! Panel exclusion mode
|
||||
/// See @@PanelWindow.exclusionMode.
|
||||
namespace ExclusionMode { // NOLINT
|
||||
Q_NAMESPACE;
|
||||
QML_ELEMENT;
|
||||
|
@ -111,15 +113,19 @@ class PanelWindowInterface: public WindowInterface {
|
|||
/// > [!INFO] Only applies to edges with anchors
|
||||
Q_PROPERTY(Margins margins READ margins WRITE setMargins NOTIFY marginsChanged);
|
||||
/// The amount of space reserved for the shell layer relative to its anchors.
|
||||
/// Setting this property sets `exclusionMode` to `Normal`.
|
||||
/// Setting this property sets @@exclusionMode to `ExclusionMode.Normal`.
|
||||
///
|
||||
/// > [!INFO] Either 1 or 3 anchors are required for the zone to take effect.
|
||||
Q_PROPERTY(qint32 exclusiveZone READ exclusiveZone WRITE setExclusiveZone NOTIFY exclusiveZoneChanged);
|
||||
/// Defaults to `ExclusionMode.Auto`.
|
||||
Q_PROPERTY(ExclusionMode::Enum exclusionMode READ exclusionMode WRITE setExclusionMode NOTIFY exclusionModeChanged);
|
||||
/// If the panel should render above standard windows. Defaults to true.
|
||||
///
|
||||
/// Note: On Wayland this property corrosponds to @@Quickshell.Wayland.WlrLayershell.layer.
|
||||
Q_PROPERTY(bool aboveWindows READ aboveWindows WRITE setAboveWindows NOTIFY aboveWindowsChanged);
|
||||
/// Defaults to false.
|
||||
/// If the panel should accept keyboard focus. Defaults to false.
|
||||
///
|
||||
/// Note: On Wayland this property corrosponds to @@Quickshell.Wayland.WlrLayershell.keyboardFocus.
|
||||
Q_PROPERTY(bool focusable READ focusable WRITE setFocusable NOTIFY focusableChanged);
|
||||
// clang-format on
|
||||
QSDOC_NAMED_ELEMENT(PanelWindow);
|
||||
|
|
|
@ -112,22 +112,18 @@ public:
|
|||
|
||||
QQmlListProperty<QuickshellScreenInfo> screens();
|
||||
|
||||
/// Reload the shell from the [ShellRoot].
|
||||
/// Reload the shell.
|
||||
///
|
||||
/// `hard` - perform a hard reload. If this is false, Quickshell will attempt to reuse windows
|
||||
/// that already exist. If true windows will be recreated.
|
||||
///
|
||||
/// See [Reloadable] for more information on what can be reloaded and how.
|
||||
///
|
||||
/// [Reloadable]: ../reloadable
|
||||
/// See @@Reloadable for more information on what can be reloaded and how.
|
||||
Q_INVOKABLE void reload(bool hard);
|
||||
|
||||
/// Returns the string value of an environment variable or null if it is not set.
|
||||
Q_INVOKABLE QVariant env(const QString& variable);
|
||||
|
||||
/// Returns a source string usable in an [Image] for a given system icon.
|
||||
///
|
||||
/// [Image]: https://doc.qt.io/qt-6/qml-qtquick-image.html
|
||||
/// Returns a string usable for a @@QtQuick.Image.source for a given system icon.
|
||||
Q_INVOKABLE static QString iconPath(const QString& icon);
|
||||
|
||||
[[nodiscard]] QString workingDirectory() const;
|
||||
|
|
|
@ -12,6 +12,8 @@
|
|||
|
||||
namespace qs::menu {
|
||||
|
||||
///! Button type associated with a QsMenuEntry.
|
||||
/// See @@QsMenuEntry.buttonType.
|
||||
class QsMenuButtonType: public QObject {
|
||||
Q_OBJECT;
|
||||
QML_ELEMENT;
|
||||
|
@ -35,7 +37,7 @@ class QsMenuEntry: public QObject {
|
|||
Q_OBJECT;
|
||||
/// If this menu item should be rendered as a separator between other items.
|
||||
///
|
||||
/// No other properties have a meaningful value when `isSeparator` is true.
|
||||
/// No other properties have a meaningful value when @@isSeparator is true.
|
||||
Q_PROPERTY(bool isSeparator READ isSeparator NOTIFY isSeparatorChanged);
|
||||
Q_PROPERTY(bool enabled READ enabled NOTIFY enabledChanged);
|
||||
/// Text of the menu item.
|
||||
|
|
|
@ -9,7 +9,8 @@
|
|||
#include <qtmetamacros.h>
|
||||
#include <qtypes.h>
|
||||
|
||||
/// Shape of a Region.
|
||||
///! Shape of a Region.
|
||||
/// See @@Region.shape.
|
||||
namespace RegionShape { // NOLINT
|
||||
Q_NAMESPACE;
|
||||
QML_ELEMENT;
|
||||
|
@ -23,6 +24,7 @@ Q_ENUM_NS(Enum);
|
|||
} // namespace RegionShape
|
||||
|
||||
///! Intersection strategy for Regions.
|
||||
/// See @@Region.intersection.
|
||||
namespace Intersection { // NOLINT
|
||||
Q_NAMESPACE;
|
||||
QML_ELEMENT;
|
||||
|
@ -44,6 +46,7 @@ Q_ENUM_NS(Enum);
|
|||
} // namespace Intersection
|
||||
|
||||
///! A composable region used as a mask.
|
||||
/// See @@QsWindow.mask.
|
||||
class PendingRegion: public QObject {
|
||||
Q_OBJECT;
|
||||
/// Defaults to `Rect`.
|
||||
|
@ -52,16 +55,16 @@ class PendingRegion: public QObject {
|
|||
Q_PROPERTY(Intersection::Enum intersection MEMBER mIntersection NOTIFY intersectionChanged);
|
||||
|
||||
/// The item that determines the geometry of the region.
|
||||
/// `item` overrides `x`, `y`, `width` and `height`.
|
||||
/// `item` overrides @@x, @@y, @@width and @@height.
|
||||
Q_PROPERTY(QQuickItem* item MEMBER mItem WRITE setItem NOTIFY itemChanged);
|
||||
|
||||
/// Defaults to 0. Does nothing if `item` is set.
|
||||
/// Defaults to 0. Does nothing if @@item is set.
|
||||
Q_PROPERTY(qint32 x MEMBER mX NOTIFY xChanged);
|
||||
/// Defaults to 0. Does nothing if `item` is set.
|
||||
/// Defaults to 0. Does nothing if @@item is set.
|
||||
Q_PROPERTY(qint32 y MEMBER mY NOTIFY yChanged);
|
||||
/// Defaults to 0. Does nothing if `item` is set.
|
||||
/// Defaults to 0. Does nothing if @@item is set.
|
||||
Q_PROPERTY(qint32 width MEMBER mWidth NOTIFY widthChanged);
|
||||
/// Defaults to 0. Does nothing if `item` is set.
|
||||
/// Defaults to 0. Does nothing if @@item is set.
|
||||
Q_PROPERTY(qint32 height MEMBER mHeight NOTIFY heightChanged);
|
||||
|
||||
/// Regions to apply on top of this region.
|
||||
|
|
|
@ -25,7 +25,7 @@ class Reloadable
|
|||
/// this object in the current revision, and facilitate smoother reloading.
|
||||
///
|
||||
/// Note that identifiers are scoped, and will try to do the right thing in context.
|
||||
/// For example if you have a `Variants` wrapping an object with an identified element inside,
|
||||
/// For example if you have a @@Variants wrapping an object with an identified element inside,
|
||||
/// a scope is created at the variant level.
|
||||
///
|
||||
/// ```qml
|
||||
|
@ -83,10 +83,9 @@ private:
|
|||
};
|
||||
|
||||
///! Scope that propagates reloads to child items in order.
|
||||
/// Convenience type equivalent to setting `reloadableId` on properties in a
|
||||
/// QtObject instance.
|
||||
/// Convenience type equivalent to setting @@Reloadable.reloadableId for all children.
|
||||
///
|
||||
/// Note that this does not work for visible `Item`s (all widgets).
|
||||
/// Note that this does not work for visible @@QtQuick.Item$s (all widgets).
|
||||
///
|
||||
/// ```qml
|
||||
/// ShellRoot {
|
||||
|
|
|
@ -12,11 +12,11 @@ class Retainable;
|
|||
/// kept around (retained) after they would normally be destroyed, which
|
||||
/// is especially useful for things like exit transitions.
|
||||
///
|
||||
/// An object that is retainable will have `Retainable` as an attached property.
|
||||
/// An object that is retainable will have @@Retainable as an attached property.
|
||||
/// All retainable objects will say that they are retainable on their respective
|
||||
/// typeinfo pages.
|
||||
///
|
||||
/// > [!INFO] Working directly with Retainable is often overly complicated and
|
||||
/// > [!INFO] Working directly with @@Retainable is often overly complicated and
|
||||
/// > error prone. For this reason @@RetainableLock should
|
||||
/// > usually be used instead.
|
||||
class RetainableHook: public QObject {
|
||||
|
@ -46,11 +46,11 @@ public:
|
|||
/// > Using @@RetainableLock is recommended as it will help
|
||||
/// > avoid this scenario and make misuse more obvious.
|
||||
Q_INVOKABLE void lock();
|
||||
/// Remove a lock on the object. See `lock()` for more information.
|
||||
/// Remove a lock on the object. See @@lock() for more information.
|
||||
Q_INVOKABLE void unlock();
|
||||
/// Forcibly remove all locks, destroying the object.
|
||||
///
|
||||
/// `unlock()` should usually be preferred.
|
||||
/// @@unlock() should usually be preferred.
|
||||
Q_INVOKABLE void forceUnlock();
|
||||
|
||||
[[nodiscard]] bool isRetained() const;
|
||||
|
@ -121,7 +121,7 @@ private:
|
|||
/// ```
|
||||
class RetainableLock: public QObject {
|
||||
Q_OBJECT;
|
||||
/// The object to lock. Must be [Retainable](../retainable).
|
||||
/// The object to lock. Must be @@Retainable.
|
||||
Q_PROPERTY(QObject* object READ object WRITE setObject NOTIFY objectChanged);
|
||||
/// If the object should be locked.
|
||||
Q_PROPERTY(bool locked READ locked WRITE setLocked NOTIFY lockedChanged);
|
||||
|
@ -143,9 +143,9 @@ public:
|
|||
[[nodiscard]] bool isRetained() const;
|
||||
|
||||
signals:
|
||||
/// Rebroadcast of the object's `dropped()` signal.
|
||||
/// Rebroadcast of the object's @@Retainable.dropped(s).
|
||||
void dropped();
|
||||
/// Rebroadcast of the object's `aboutToDestroy()` signal.
|
||||
/// Rebroadcast of the object's @@Retainable.aboutToDestroy(s).
|
||||
void aboutToDestroy();
|
||||
void retainedChanged();
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ class TestTransformWatcher;
|
|||
|
||||
///! Monitor of all geometry changes between two objects.
|
||||
/// The TransformWatcher monitors all properties that affect the geometry
|
||||
/// of two `Item`s relative to eachother.
|
||||
/// of two @@QtQuick.Item$s relative to eachother.
|
||||
///
|
||||
/// > [!INFO] The algorithm responsible for determining the relationship
|
||||
/// > between `a` and `b` is biased towards `a` being a parent of `b`,
|
||||
|
|
|
@ -28,11 +28,11 @@ public:
|
|||
///! Creates instances of a component based on a given model.
|
||||
/// Creates and destroys instances of the given component when the given property changes.
|
||||
///
|
||||
/// `Variants` is similar to @@QtQuick.Repeater except it is for *non Item* objects, and acts as
|
||||
/// `Variants` is similar to @@QtQuick.Repeater except it is for *non @@QtQuick.Item$* objects, and acts as
|
||||
/// a reload scope.
|
||||
///
|
||||
/// Each non duplicate value passed to [model](#prop.model) will create a new instance of
|
||||
/// [delegate](#prop.delegate) with its `modelData` property set to that value.
|
||||
/// Each non duplicate value passed to @@model will create a new instance of
|
||||
/// @@delegate with a `modelData` property set to that value.
|
||||
///
|
||||
/// See @@Quickshell.screens for an example of using `Variants` to create copies of a window per
|
||||
/// screen.
|
||||
|
@ -44,7 +44,7 @@ class Variants: public Reloadable {
|
|||
/// The component to create instances of.
|
||||
///
|
||||
/// The delegate should define a `modelData` property that will be popuplated with a value
|
||||
/// from the [model](#prop.model).
|
||||
/// from the @@model.
|
||||
Q_PROPERTY(QQmlComponent* delegate MEMBER mDelegate);
|
||||
/// The list of sets of properties to create instances with.
|
||||
/// Each set creates an instance of the component, which are updated when the input sets update.
|
||||
|
|
|
@ -48,7 +48,7 @@ public:
|
|||
/// Usually you shouldn't need to call this manually but some applications providing
|
||||
/// menus do not update them correctly. Call this if menus don't update their state.
|
||||
///
|
||||
/// The `layoutUpdated` signal will be sent when a response is received.
|
||||
/// The @@layoutUpdated(s) signal will be sent when a response is received.
|
||||
Q_INVOKABLE void updateLayout() const;
|
||||
|
||||
[[nodiscard]] DBusMenu* menuHandle() const;
|
||||
|
|
|
@ -43,7 +43,7 @@ protected:
|
|||
};
|
||||
|
||||
///! Parser for streamed input data.
|
||||
/// See also: @@DataStream$, @@SplitParser
|
||||
/// See also: @@DataStream, @@SplitParser.
|
||||
class DataStreamParser: public QObject {
|
||||
Q_OBJECT;
|
||||
QML_ELEMENT;
|
||||
|
@ -61,9 +61,7 @@ signals:
|
|||
};
|
||||
|
||||
///! Parser for delimited data streams.
|
||||
/// Parser for delimited data streams. [read()] is emitted once per delimited chunk of the stream.
|
||||
///
|
||||
/// [read()]: ../datastreamparser#sig.read
|
||||
/// Parser for delimited data streams. @@read() is emitted once per delimited chunk of the stream.
|
||||
class SplitParser: public DataStreamParser {
|
||||
Q_OBJECT;
|
||||
/// The delimiter for parsed data. May be multiple characters. Defaults to `\n`.
|
||||
|
|
|
@ -30,7 +30,7 @@ class Process: public QObject {
|
|||
/// Setting this property to true will start the process if command has at least
|
||||
/// one element.
|
||||
/// Setting it to false will send SIGTERM. To immediately kill the process,
|
||||
/// use [signal](#func.signal) with SIGKILL. The process will be killed when
|
||||
/// use @@signal() with SIGKILL. The process will be killed when
|
||||
/// quickshell dies.
|
||||
///
|
||||
/// If you want to run the process in a loop, use the onRunningChanged signal handler
|
||||
|
@ -42,7 +42,7 @@ class Process: public QObject {
|
|||
/// }
|
||||
/// ```
|
||||
Q_PROPERTY(bool running READ isRunning WRITE setRunning NOTIFY runningChanged);
|
||||
/// The process ID of the running process or `null` if `running` is false.
|
||||
/// The process ID of the running process or `null` if @@running is false.
|
||||
Q_PROPERTY(QVariant processId READ processId NOTIFY processIdChanged);
|
||||
/// The command to execute. Each argument is its own string, which means you don't have
|
||||
/// to deal with quoting anything.
|
||||
|
@ -65,8 +65,8 @@ class Process: public QObject {
|
|||
/// Environment of the executed process.
|
||||
///
|
||||
/// This is a javascript object (json). Environment variables can be added by setting
|
||||
/// them to a string and removed by setting them to null (except when [clearEnvironment] is true,
|
||||
/// in which case this behavior is inverted, see [clearEnvironment] for details).
|
||||
/// them to a string and removed by setting them to null (except when @@clearEnvironment is true,
|
||||
/// in which case this behavior is inverted, see @@clearEnvironment for details).
|
||||
///
|
||||
///
|
||||
/// ```qml
|
||||
|
@ -82,13 +82,11 @@ class Process: public QObject {
|
|||
/// If the process is already running changing this property will affect the next
|
||||
/// started process. If the property has been changed after starting a process it will
|
||||
/// return the new value, not the one for the currently running process.
|
||||
///
|
||||
/// [clearEnvironment]: #prop.clearEnvironment
|
||||
Q_PROPERTY(QMap<QString, QVariant> environment READ environment WRITE setEnvironment NOTIFY environmentChanged);
|
||||
/// If the process's environment should be cleared prior to applying [environment](#prop.environment).
|
||||
/// If the process's environment should be cleared prior to applying @@environment.
|
||||
/// Defaults to false.
|
||||
///
|
||||
/// If true, all environment variables will be removed before the [environment](#prop.environment)
|
||||
/// If true, all environment variables will be removed before the @@environment
|
||||
/// object is applied, meaning the variables listed will be the only ones visible to the process.
|
||||
/// This changes the behavior of `null` to pass in the system value of the variable if present instead
|
||||
/// of removing it.
|
||||
|
@ -112,7 +110,7 @@ class Process: public QObject {
|
|||
/// and no further data will be read, even if a new parser is attached.
|
||||
Q_PROPERTY(DataStreamParser* stderr READ stderrParser WRITE setStderrParser NOTIFY stderrParserChanged);
|
||||
/// If stdin is enabled. Defaults to false. If this property is false the process's stdin channel
|
||||
/// will be closed and [write](#func.write) will do nothing, even if set back to true.
|
||||
/// will be closed and @@write() will do nothing, even if set back to true.
|
||||
Q_PROPERTY(bool stdinEnabled READ stdinEnabled WRITE setStdinEnabled NOTIFY stdinEnabledChanged);
|
||||
/// If the process should be killed when the Process object is destroyed or quickshell exits.
|
||||
/// Defaults to true.
|
||||
|
@ -130,10 +128,10 @@ public:
|
|||
~Process() override;
|
||||
Q_DISABLE_COPY_MOVE(Process);
|
||||
|
||||
/// Sends a signal to the process if `running` is true, otherwise does nothing.
|
||||
/// Sends a signal to the process if @@running is true, otherwise does nothing.
|
||||
Q_INVOKABLE void signal(qint32 signal);
|
||||
|
||||
/// Writes to the process's stdin. Does nothing if `running` is false.
|
||||
/// Writes to the process's stdin. Does nothing if @@running is false.
|
||||
Q_INVOKABLE void write(const QString& data);
|
||||
|
||||
[[nodiscard]] bool isRunning() const;
|
||||
|
|
|
@ -23,7 +23,7 @@ class Socket: public DataStream {
|
|||
/// update the property immediately. Setting the property to false will begin disconnecting
|
||||
/// the socket, and setting it to true will begin connecting the socket if path is not empty.
|
||||
Q_PROPERTY(bool connected READ isConnected WRITE setConnected NOTIFY connectionStateChanged);
|
||||
/// The path to connect this socket to when `connected` is set to true.
|
||||
/// The path to connect this socket to when @@connected is set to true.
|
||||
///
|
||||
/// Changing this property will have no effect while the connection is active.
|
||||
Q_PROPERTY(QString path READ path WRITE setPath NOTIFY pathChanged);
|
||||
|
@ -105,9 +105,9 @@ class SocketServer
|
|||
///
|
||||
/// Setting this property while the server is active will have no effect.
|
||||
Q_PROPERTY(QString path READ path WRITE setPath NOTIFY pathChanged);
|
||||
/// Connection handler component. Must creeate a `Socket`.
|
||||
/// Connection handler component. Must creeate a @@Socket.
|
||||
///
|
||||
/// The created socket should not set `connected` or `path` or the incoming
|
||||
/// The created socket should not set @@connected or @@path or the incoming
|
||||
/// socket connection will be dropped (they will be set by the socket server.)
|
||||
/// Setting `connected` to false on the created socket after connection will
|
||||
/// close and delete it.
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
#include <qqmlintegration.h>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
///! State of the Greetd connection.
|
||||
/// See @@Greetd.state.
|
||||
class GreetdState: public QObject {
|
||||
Q_OBJECT;
|
||||
QML_ELEMENT;
|
||||
|
|
|
@ -33,29 +33,29 @@ public:
|
|||
Q_INVOKABLE static void cancelSession();
|
||||
/// Respond to an authentication message.
|
||||
///
|
||||
/// May only be called in response to an `authMessage` with responseRequired set to true.
|
||||
/// May only be called in response to an @@authMessage(s) with `responseRequired` set to true.
|
||||
Q_INVOKABLE static void respond(QString response);
|
||||
|
||||
// docgen currently can't handle default params
|
||||
|
||||
// clang-format off
|
||||
/// Launch the session, exiting quickshell.
|
||||
/// `readyToLaunch` must be true to call this function.
|
||||
/// @@state must be `GreetdState.ReadyToLaunch` to call this function.
|
||||
Q_INVOKABLE static void launch(const QList<QString>& command);
|
||||
/// Launch the session, exiting quickshell.
|
||||
/// `readyToLaunch` must be true to call this function.
|
||||
/// @@state must be `GreetdState.ReadyToLaunch` to call this function.
|
||||
Q_INVOKABLE static void launch(const QList<QString>& command, const QList<QString>& environment);
|
||||
/// Launch the session, exiting quickshell if `quit` is true.
|
||||
/// `readyToLaunch` must be true to call this function.
|
||||
/// Launch the session, exiting quickshell if @@quit is true.
|
||||
/// @@state must be `GreetdState.ReadyToLaunch` to call this function.
|
||||
///
|
||||
/// The `launched` signal can be used to perform an action after greetd has acknowledged
|
||||
/// The @@launched signal can be used to perform an action after greetd has acknowledged
|
||||
/// the desired session.
|
||||
///
|
||||
/// > [!WARNING] Note that greetd expects the greeter to terminate as soon as possible
|
||||
/// > after setting a target session, and waiting too long may lead to unexpected behavior
|
||||
/// > such as the greeter restarting.
|
||||
/// >
|
||||
/// > Performing animations and such should be done *before* calling `launch`.
|
||||
/// > Performing animations and such should be done *before* calling @@launch.
|
||||
Q_INVOKABLE static void launch(const QList<QString>& command, const QList<QString>& environment, bool quit);
|
||||
// clang-format on
|
||||
|
||||
|
|
|
@ -13,6 +13,8 @@
|
|||
|
||||
namespace qs::service::mpris {
|
||||
|
||||
///! Playback state of an MprisPlayer
|
||||
/// See @@MprisPlayer.playbackState.
|
||||
class MprisPlaybackState: public QObject {
|
||||
Q_OBJECT;
|
||||
QML_ELEMENT;
|
||||
|
@ -29,6 +31,8 @@ public:
|
|||
Q_INVOKABLE static QString toString(MprisPlaybackState::Enum status);
|
||||
};
|
||||
|
||||
///! Loop state of an MprisPlayer
|
||||
/// See @@MprisPlayer.loopState.
|
||||
class MprisLoopState: public QObject {
|
||||
Q_OBJECT;
|
||||
QML_ELEMENT;
|
||||
|
@ -72,17 +76,17 @@ class MprisPlayer: public QObject {
|
|||
/// The name of the desktop entry for the media player, or an empty string if not provided.
|
||||
Q_PROPERTY(QString desktopEntry READ desktopEntry NOTIFY desktopEntryChanged);
|
||||
/// The current position in the playing track, as seconds, with millisecond precision,
|
||||
/// or `0` if `positionSupported` is false.
|
||||
/// or `0` if @@positionSupported is false.
|
||||
///
|
||||
/// May only be written to if `canSeek` and `positionSupported` are true.
|
||||
/// May only be written to if @@canSeek and @@positionSupported are true.
|
||||
///
|
||||
/// > [!WARNING] To avoid excessive property updates wasting CPU while `position` is not
|
||||
/// > actively monitored, `position` usually will not update reactively, unless a nonlinear
|
||||
/// > change in position occurs, however reading it will always return the current position.
|
||||
/// >
|
||||
/// > If you want to actively monitor the position, the simplest way it to emit the `positionChanged`
|
||||
/// > signal manually for the duration you are monitoring it, Using a [FrameAnimation] if you need
|
||||
/// > the value to update smoothly, such as on a slider, or a [Timer] if not, as shown below.
|
||||
/// > If you want to actively monitor the position, the simplest way it to emit the @@positionChanged(s)
|
||||
/// > signal manually for the duration you are monitoring it, Using a @@QtQuick.FrameAnimation if you need
|
||||
/// > the value to update smoothly, such as on a slider, or a @@QtQuick.Timer if not, as shown below.
|
||||
/// >
|
||||
/// > ```qml {filename="Using a FrameAnimation"}
|
||||
/// > FrameAnimation {
|
||||
|
@ -104,18 +108,15 @@ class MprisPlayer: public QObject {
|
|||
/// > onTriggered: player.positionChanged()
|
||||
/// > }
|
||||
/// > ```
|
||||
///
|
||||
/// [FrameAnimation]: https://doc.qt.io/qt-6/qml-qtquick-frameanimation.html
|
||||
/// [Timer]: https://doc.qt.io/qt-6/qml-qtqml-timer.html
|
||||
Q_PROPERTY(qreal position READ position WRITE setPosition NOTIFY positionChanged);
|
||||
Q_PROPERTY(bool positionSupported READ positionSupported NOTIFY positionSupportedChanged);
|
||||
/// The length of the playing track, as seconds, with millisecond precision,
|
||||
/// or the value of `position` if `lengthSupported` is false.
|
||||
/// or the value of @@position if @@lengthSupported is false.
|
||||
Q_PROPERTY(qreal length READ length NOTIFY lengthChanged);
|
||||
Q_PROPERTY(bool lengthSupported READ lengthSupported NOTIFY lengthSupportedChanged);
|
||||
/// The volume of the playing track from 0.0 to 1.0, or 1.0 if `volumeSupported` is false.
|
||||
/// The volume of the playing track from 0.0 to 1.0, or 1.0 if @@volumeSupported is false.
|
||||
///
|
||||
/// May only be written to if `canControl` and `volumeSupported` are true.
|
||||
/// May only be written to if @@canControl and @@volumeSupported are true.
|
||||
Q_PROPERTY(qreal volume READ volume WRITE setVolume NOTIFY volumeChanged);
|
||||
Q_PROPERTY(bool volumeSupported READ volumeSupported NOTIFY volumeSupportedChanged);
|
||||
/// Metadata of the current track.
|
||||
|
@ -123,7 +124,7 @@ class MprisPlayer: public QObject {
|
|||
/// A map of common properties is available [here](https://www.freedesktop.org/wiki/Specifications/mpris-spec/metadata).
|
||||
/// Do not count on any of them actually being present.
|
||||
///
|
||||
/// Note that the `trackTitle`, `trackAlbum`, `trackAlbumArtist`, `trackArtists` and `trackArtUrl`
|
||||
/// Note that the @@trackTitle, @@trackAlbum, @@trackAlbumArtist, @@trackArtists and @@trackArtUrl
|
||||
/// properties have extra logic to guard against bad players sending weird metadata, and should
|
||||
/// be used over grabbing the properties directly from the metadata.
|
||||
Q_PROPERTY(QVariantMap metadata READ metadata NOTIFY metadataChanged);
|
||||
|
@ -139,37 +140,37 @@ class MprisPlayer: public QObject {
|
|||
Q_PROPERTY(QString trackArtUrl READ trackArtUrl NOTIFY trackArtUrlChanged);
|
||||
/// The playback state of the media player.
|
||||
///
|
||||
/// - If `canPlay` is false, you cannot assign the `Playing` state.
|
||||
/// - If `canPause` is false, you cannot assign the `Paused` state.
|
||||
/// - If `canControl` is false, you cannot assign the `Stopped` state.
|
||||
/// - If @@canPlay is false, you cannot assign the `Playing` state.
|
||||
/// - If @@canPause is false, you cannot assign the `Paused` state.
|
||||
/// - If @@canControl is false, you cannot assign the `Stopped` state.
|
||||
/// (or any of the others, though their repsective properties will also be false)
|
||||
Q_PROPERTY(MprisPlaybackState::Enum playbackState READ playbackState WRITE setPlaybackState NOTIFY playbackStateChanged);
|
||||
/// The loop state of the media player, or `None` if `loopSupported` is false.
|
||||
/// The loop state of the media player, or `None` if @@loopSupported is false.
|
||||
///
|
||||
/// May only be written to if `canControl` and `loopSupported` are true.
|
||||
/// May only be written to if @@canControl and @@loopSupported are true.
|
||||
Q_PROPERTY(MprisLoopState::Enum loopState READ loopState WRITE setLoopState NOTIFY loopStateChanged);
|
||||
Q_PROPERTY(bool loopSupported READ loopSupported NOTIFY loopSupportedChanged);
|
||||
/// The speed the song is playing at, as a multiplier.
|
||||
///
|
||||
/// Only values between `minRate` and `maxRate` (inclusive) may be written to the property.
|
||||
/// Only values between @@minRate and @@maxRate (inclusive) may be written to the property.
|
||||
/// Additionally, It is recommended that you only write common values such as `0.25`, `0.5`, `1.0`, `2.0`
|
||||
/// to the property, as media players are free to ignore the value, and are more likely to
|
||||
/// accept common ones.
|
||||
Q_PROPERTY(qreal rate READ rate WRITE setRate NOTIFY rateChanged);
|
||||
Q_PROPERTY(qreal minRate READ minRate NOTIFY minRateChanged);
|
||||
Q_PROPERTY(qreal maxRate READ maxRate NOTIFY maxRateChanged);
|
||||
/// If the play queue is currently being shuffled, or false if `shuffleSupported` is false.
|
||||
/// If the play queue is currently being shuffled, or false if @@shuffleSupported is false.
|
||||
///
|
||||
/// May only be written if `canControl` and `shuffleSupported` are true.
|
||||
/// May only be written if @@canControl and @@shuffleSupported are true.
|
||||
Q_PROPERTY(bool shuffle READ shuffle WRITE setShuffle NOTIFY shuffleChanged);
|
||||
Q_PROPERTY(bool shuffleSupported READ shuffleSupported NOTIFY shuffleSupportedChanged);
|
||||
/// If the player is currently shown in fullscreen.
|
||||
///
|
||||
/// May only be written to if `canSetFullscreen` is true.
|
||||
/// May only be written to if @@canSetFullscreen is true.
|
||||
Q_PROPERTY(bool fullscreen READ fullscreen WRITE setFullscreen NOTIFY fullscreenChanged);
|
||||
/// Uri schemes supported by `openUri`.
|
||||
/// Uri schemes supported by @@openUri().
|
||||
Q_PROPERTY(QList<QString> supportedUriSchemes READ supportedUriSchemes NOTIFY supportedUriSchemesChanged);
|
||||
/// Mime types supported by `openUri`.
|
||||
/// Mime types supported by @@openUri().
|
||||
Q_PROPERTY(QList<QString> supportedMimeTypes READ supportedMimeTypes NOTIFY supportedMimeTypesChanged);
|
||||
// clang-format on
|
||||
QML_ELEMENT;
|
||||
|
@ -180,42 +181,42 @@ public:
|
|||
|
||||
/// Bring the media player to the front of the window stack.
|
||||
///
|
||||
/// May only be called if `canRaise` is true.
|
||||
/// May only be called if @@canRaise is true.
|
||||
Q_INVOKABLE void raise();
|
||||
/// Quit the media player.
|
||||
///
|
||||
/// May only be called if `canQuit` is true.
|
||||
/// May only be called if @@canQuit is true.
|
||||
Q_INVOKABLE void quit();
|
||||
/// Open the given URI in the media player.
|
||||
///
|
||||
/// Many players will silently ignore this, especially if the uri
|
||||
/// does not match `supportedUriSchemes` and `supportedMimeTypes`.
|
||||
/// does not match @@supportedUriSchemes and @@supportedMimeTypes.
|
||||
Q_INVOKABLE void openUri(const QString& uri);
|
||||
/// Play the next song.
|
||||
///
|
||||
/// May only be called if `canGoNext` is true.
|
||||
/// May only be called if @@canGoNext is true.
|
||||
Q_INVOKABLE void next();
|
||||
/// Play the previous song, or go back to the beginning of the current one.
|
||||
///
|
||||
/// May only be called if `canGoPrevious` is true.
|
||||
/// May only be called if @@canGoPrevious is true.
|
||||
Q_INVOKABLE void previous();
|
||||
/// Change `position` by an offset.
|
||||
///
|
||||
/// Even if `positionSupported` is false and you cannot set `position`,
|
||||
/// Even if @@positionSupported is false and you cannot set `position`,
|
||||
/// this function may work.
|
||||
///
|
||||
/// May only be called if `canSeek` is true.
|
||||
/// May only be called if @@canSeek is true.
|
||||
Q_INVOKABLE void seek(qreal offset);
|
||||
/// Equivalent to setting `playbackState` to `Playing`.
|
||||
/// Equivalent to setting @@playbackState to `Playing`.
|
||||
Q_INVOKABLE void play();
|
||||
/// Equivalent to setting `playbackState` to `Paused`.
|
||||
/// Equivalent to setting @@playbackState to `Paused`.
|
||||
Q_INVOKABLE void pause();
|
||||
/// Equivalent to setting `playbackState` to `Stopped`.
|
||||
/// Equivalent to setting @@playbackState to `Stopped`.
|
||||
Q_INVOKABLE void stop();
|
||||
/// Equivalent to calling `play()` if not playing or `pause()` if playing.
|
||||
/// Equivalent to calling @@play() if not playing or @@pause() if playing.
|
||||
///
|
||||
/// May only be called if `canTogglePlaying` is true, which is equivalent to
|
||||
/// `canPlay` or `canPause` depending on the current playback state.
|
||||
/// May only be called if @@canTogglePlaying is true, which is equivalent to
|
||||
/// @@canPlay or @@canPause() depending on the current playback state.
|
||||
Q_INVOKABLE void togglePlaying();
|
||||
|
||||
[[nodiscard]] bool isValid() const;
|
||||
|
|
|
@ -14,6 +14,8 @@ namespace qs::service::notifications {
|
|||
|
||||
class NotificationImage;
|
||||
|
||||
///! The urgency level of a Notification.
|
||||
/// See @@Notification.urgency.
|
||||
class NotificationUrgency: public QObject {
|
||||
Q_OBJECT;
|
||||
QML_ELEMENT;
|
||||
|
@ -30,6 +32,8 @@ public:
|
|||
Q_INVOKABLE static QString toString(NotificationUrgency::Enum value);
|
||||
};
|
||||
|
||||
///! The reason a Notification was closed.
|
||||
/// See @@Notification.closed(s).
|
||||
class NotificationCloseReason: public QObject {
|
||||
Q_OBJECT;
|
||||
QML_ELEMENT;
|
||||
|
@ -53,7 +57,8 @@ class NotificationAction;
|
|||
|
||||
///! A notification emitted by a NotificationServer.
|
||||
/// A notification emitted by a NotificationServer.
|
||||
/// > [!INFO] This type is @@Quickshell.Retainable$. It
|
||||
///
|
||||
/// > [!INFO] This type is @@Quickshell.Retainable. It
|
||||
/// > can be retained after destruction if necessary.
|
||||
class Notification
|
||||
: public QObject
|
||||
|
@ -63,13 +68,13 @@ class Notification
|
|||
Q_PROPERTY(quint32 id READ id CONSTANT);
|
||||
/// If the notification is tracked by the notification server.
|
||||
///
|
||||
/// Setting this property to false is equivalent to calling `dismiss()`.
|
||||
/// Setting this property to false is equivalent to calling @@dismiss().
|
||||
Q_PROPERTY(bool tracked READ isTracked WRITE setTracked NOTIFY trackedChanged);
|
||||
/// If this notification was carried over from the last generation
|
||||
/// when quickshell reloaded.
|
||||
///
|
||||
/// Notifications from the last generation will only be emitted
|
||||
/// if @@NotificationServer.keepOnReloadis true.
|
||||
/// if @@NotificationServer.keepOnReload is 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);
|
||||
|
@ -190,6 +195,8 @@ private:
|
|||
QVariantMap mHints;
|
||||
};
|
||||
|
||||
///! An action associated with a Notification.
|
||||
/// See @@Notification.actions.
|
||||
class NotificationAction: public QObject {
|
||||
Q_OBJECT;
|
||||
/// The identifier of the action.
|
||||
|
|
|
@ -13,7 +13,8 @@
|
|||
|
||||
Q_DECLARE_LOGGING_CATEGORY(logPam);
|
||||
|
||||
/// The result of an authentication.
|
||||
///! The result of an authentication.
|
||||
/// See @@PamContext.completed(s).
|
||||
class PamResult: public QObject {
|
||||
Q_OBJECT;
|
||||
QML_ELEMENT;
|
||||
|
@ -35,7 +36,8 @@ public:
|
|||
Q_INVOKABLE static QString toString(PamResult::Enum value);
|
||||
};
|
||||
|
||||
/// An error that occurred during an authentication.
|
||||
///! An error that occurred during an authentication.
|
||||
/// See @@PamContext.error(s).
|
||||
class PamError: public QObject {
|
||||
Q_OBJECT;
|
||||
QML_ELEMENT;
|
||||
|
|
|
@ -20,23 +20,23 @@ class PamContext
|
|||
// clang-format off
|
||||
/// If the pam context is actively performing an authentication.
|
||||
///
|
||||
/// Setting this value behaves exactly the same as calling `start()` and `abort()`.
|
||||
/// Setting this value behaves exactly the same as calling @@start() and @@abort().
|
||||
Q_PROPERTY(bool active READ isActive WRITE setActive NOTIFY activeChanged);
|
||||
/// The pam configuration to use. Defaults to "login".
|
||||
///
|
||||
/// The configuration should name a file inside `configDirectory`.
|
||||
/// The configuration should name a file inside @@configDirectory.
|
||||
///
|
||||
/// This property may not be set while `active` is true.
|
||||
/// This property may not be set while @@active is true.
|
||||
Q_PROPERTY(QString config READ config WRITE setConfig NOTIFY configChanged);
|
||||
/// The pam configuration directory to use. Defaults to "/etc/pam.d".
|
||||
///
|
||||
/// The configuration directory is resolved relative to the current file if not an absolute path.
|
||||
///
|
||||
/// This property may not be set while `active` is true.
|
||||
/// This property may not be set while @@active is true.
|
||||
Q_PROPERTY(QString configDirectory READ configDirectory WRITE setConfigDirectory NOTIFY configDirectoryChanged);
|
||||
/// The user to authenticate as. If unset the current user will be used.
|
||||
///
|
||||
/// This property may not be set while `active` is true.
|
||||
/// This property may not be set while @@active is true.
|
||||
Q_PROPERTY(QString user READ user WRITE setUser NOTIFY userChanged);
|
||||
/// The last message sent by pam.
|
||||
Q_PROPERTY(QString message READ message NOTIFY messageChanged);
|
||||
|
@ -44,9 +44,9 @@ class PamContext
|
|||
Q_PROPERTY(bool messageIsError READ messageIsError NOTIFY messageIsErrorChanged);
|
||||
/// If pam currently wants a response.
|
||||
///
|
||||
/// Responses can be returned with the `respond()` function.
|
||||
/// Responses can be returned with the @@respond() function.
|
||||
Q_PROPERTY(bool responseRequired READ isResponseRequired NOTIFY responseRequiredChanged);
|
||||
/// If the user's response should be visible. Only valid when `responseRequired` is true.
|
||||
/// If the user's response should be visible. Only valid when @@responseRequired is true.
|
||||
Q_PROPERTY(bool responseVisible READ isResponseVisible NOTIFY responseVisibleChanged);
|
||||
// clang-format on
|
||||
QML_ELEMENT;
|
||||
|
@ -68,7 +68,7 @@ public:
|
|||
|
||||
/// Respond to pam.
|
||||
///
|
||||
/// May not be called unless `responseRequired` is true.
|
||||
/// May not be called unless @@responseRequired is true.
|
||||
Q_INVOKABLE void respond(const QString& response);
|
||||
|
||||
[[nodiscard]] bool isActive() const;
|
||||
|
@ -93,7 +93,7 @@ signals:
|
|||
void completed(PamResult::Enum result);
|
||||
/// Emitted if pam fails to perform authentication normally.
|
||||
///
|
||||
/// A `completed(false)` will be emitted after this event.
|
||||
/// A `completed(PamResult.Error)` will be emitted after this event.
|
||||
void error(PamError::Enum error);
|
||||
|
||||
/// Emitted whenever pam sends a new message, after the change signals for
|
||||
|
|
|
@ -13,6 +13,8 @@
|
|||
|
||||
namespace qs::service::pipewire {
|
||||
|
||||
///! State of a pipewire link.
|
||||
/// See @@PwLink.state.
|
||||
class PwLinkState: public QObject {
|
||||
Q_OBJECT;
|
||||
QML_ELEMENT;
|
||||
|
|
|
@ -18,6 +18,8 @@
|
|||
|
||||
namespace qs::service::pipewire {
|
||||
|
||||
///! Audio channel of a pipewire node.
|
||||
/// See @@PwNodeAudio.channels.
|
||||
class PwAudioChannel: public QObject {
|
||||
Q_OBJECT;
|
||||
QML_ELEMENT;
|
||||
|
|
|
@ -136,6 +136,9 @@ private:
|
|||
};
|
||||
|
||||
///! Audio specific properties of pipewire nodes.
|
||||
/// Extra properties of a @@PwNode if the node is an audio node.
|
||||
///
|
||||
/// See @@PwNode.audio.
|
||||
class PwNodeAudioIface: public QObject {
|
||||
Q_OBJECT;
|
||||
/// If the node is currently muted. Setting this property changes the mute state.
|
||||
|
@ -152,8 +155,8 @@ class PwNodeAudioIface: public QObject {
|
|||
/// > [!WARNING] This property is invalid unless the node is [bound](../pwobjecttracker).
|
||||
Q_PROPERTY(QVector<PwAudioChannel::Enum> channels READ channels NOTIFY channelsChanged);
|
||||
/// The volumes of each audio channel individually. Each entry corrosponds to
|
||||
/// the channel at the same index in `channels`. `volumes` and `channels` will always be
|
||||
/// the same length.
|
||||
/// the volume of the channel at the same index in @@channels. @@volumes and @@channels
|
||||
/// will always be the same length.
|
||||
///
|
||||
/// > [!WARNING] This property is invalid unless the node is [bound](../pwobjecttracker).
|
||||
Q_PROPERTY(QVector<float> volumes READ volumes WRITE setVolumes NOTIFY volumesChanged);
|
||||
|
@ -195,11 +198,11 @@ class PwNodeIface: public PwObjectIface {
|
|||
Q_PROPERTY(QString name READ name CONSTANT);
|
||||
/// The node's description, corrosponding to the object's `node.description` property.
|
||||
///
|
||||
/// May be empty. Generally more human readable than `name`.
|
||||
/// May be empty. Generally more human readable than @@name.
|
||||
Q_PROPERTY(QString description READ description CONSTANT);
|
||||
/// The node's nickname, corrosponding to the object's `node.nickname` property.
|
||||
///
|
||||
/// May be empty. Generally but not always more human readable than `description`.
|
||||
/// May be empty. Generally but not always more human readable than @@description.
|
||||
Q_PROPERTY(QString nickname READ nickname CONSTANT);
|
||||
/// If `true`, then the node accepts audio input from other nodes,
|
||||
/// if `false` the node outputs audio to other nodes.
|
||||
|
@ -249,7 +252,7 @@ private:
|
|||
|
||||
///! A connection between pipewire nodes.
|
||||
/// Note that there is one link per *channel* of a connection between nodes.
|
||||
/// You usually want @@PwLinkGroup$.
|
||||
/// You usually want @@PwLinkGroup.
|
||||
class PwLinkIface: public PwObjectIface {
|
||||
Q_OBJECT;
|
||||
/// The pipewire object id of the link.
|
||||
|
|
|
@ -8,6 +8,8 @@
|
|||
#include "../../core/model.hpp"
|
||||
#include "item.hpp"
|
||||
|
||||
///! Statis of a SystemTrayItem.
|
||||
/// See @@SystemTrayItem.status.
|
||||
namespace SystemTrayStatus { // NOLINT
|
||||
Q_NAMESPACE;
|
||||
QML_ELEMENT;
|
||||
|
@ -24,6 +26,8 @@ Q_ENUM_NS(Enum);
|
|||
|
||||
} // namespace SystemTrayStatus
|
||||
|
||||
///! Category of a SystemTrayItem.
|
||||
/// See @@SystemTrayItem.category.
|
||||
namespace SystemTrayCategory { // NOLINT
|
||||
Q_NAMESPACE;
|
||||
QML_ELEMENT;
|
||||
|
@ -60,8 +64,8 @@ class SystemTrayItem: public QObject {
|
|||
Q_PROPERTY(QString icon READ icon NOTIFY iconChanged);
|
||||
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$.
|
||||
/// If this tray item has an associated menu accessible via @@display()
|
||||
/// 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);
|
||||
|
@ -110,7 +114,7 @@ signals:
|
|||
///! System tray
|
||||
/// Referencing the SystemTray singleton will make quickshell start tracking
|
||||
/// system tray contents, which are updated as the tray changes, and can be
|
||||
/// accessed via the `items` property.
|
||||
/// accessed via the @@items property.
|
||||
class SystemTray: public QObject {
|
||||
Q_OBJECT;
|
||||
/// List of all system tray icons.
|
||||
|
@ -141,7 +145,7 @@ class SystemTrayMenuWatcher: public QObject {
|
|||
Q_OBJECT;
|
||||
/// The tray item to watch.
|
||||
Q_PROPERTY(SystemTrayItem* trayItem READ trayItem WRITE setTrayItem NOTIFY trayItemChanged);
|
||||
/// The menu associated with the tray item. Will be null if `trayItem` is null
|
||||
/// The menu associated with the tray item. Will be null if @@trayItem is null
|
||||
/// or has no associated menu.
|
||||
Q_PROPERTY(DBusMenuItem* menu READ menu NOTIFY menuChanged);
|
||||
QML_ELEMENT;
|
||||
|
|
|
@ -55,7 +55,7 @@ class UPowerQml: public QObject {
|
|||
QML_SINGLETON;
|
||||
/// UPower's DisplayDevice for your system. Can be `null`.
|
||||
///
|
||||
/// This is an aggregate device and not a physical one, meaning you will not find it in `devices`.
|
||||
/// This is an aggregate device and not a physical one, meaning you will not find it in @@devices.
|
||||
/// It is typically the device that is used for displaying information in desktop environments.
|
||||
Q_PROPERTY(UPowerDevice* displayDevice READ displayDevice NOTIFY displayDeviceChanged);
|
||||
/// All connected UPower devices.
|
||||
|
|
|
@ -12,6 +12,8 @@
|
|||
|
||||
namespace qs::service::upower {
|
||||
|
||||
///! Power state of a UPower device.
|
||||
/// See @@UPowerDevice.state.
|
||||
class UPowerDeviceState: public QObject {
|
||||
Q_OBJECT;
|
||||
QML_ELEMENT;
|
||||
|
@ -34,6 +36,8 @@ public:
|
|||
Q_INVOKABLE static QString toString(UPowerDeviceState::Enum status);
|
||||
};
|
||||
|
||||
///! Type of a UPower device.
|
||||
/// See @@UPowerDevice.type.
|
||||
class UPowerDeviceType: public QObject {
|
||||
Q_OBJECT;
|
||||
QML_ELEMENT;
|
||||
|
@ -100,7 +104,7 @@ class UPowerDevice: public QObject {
|
|||
Q_PROPERTY(qreal timeToFull READ timeToFull NOTIFY timeToFullChanged);
|
||||
/// Current charge level as a percentage.
|
||||
///
|
||||
/// This would be equivalent to `energy / energyCapacity`.
|
||||
/// This would be equivalent to @@energy / @@energyCapacity.
|
||||
Q_PROPERTY(qreal percentage READ percentage NOTIFY percentageChanged);
|
||||
/// If the power source is present in the bay or slot, useful for hot-removable batteries.
|
||||
///
|
||||
|
@ -115,7 +119,7 @@ class UPowerDevice: public QObject {
|
|||
Q_PROPERTY(QString iconName READ iconName NOTIFY iconNameChanged);
|
||||
/// If the device is a laptop battery or not. Use this to check if your device is a valid battery.
|
||||
///
|
||||
/// This will be equivalent to `type == Battery && powerSupply == true`.
|
||||
/// This will be equivalent to @@type == Battery && @@powerSupply == true.
|
||||
Q_PROPERTY(bool isLaptopBattery READ isLaptopBattery NOTIFY isLaptopBatteryChanged);
|
||||
/// Native path of the device specific to your OS.
|
||||
Q_PROPERTY(QString nativePath READ nativePath NOTIFY nativePathChanged);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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.");
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
///
|
||||
|
|
Loading…
Reference in a new issue