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
|
@ -13,7 +13,7 @@
|
|||
|
||||
class DesktopAction;
|
||||
|
||||
/// A desktop entry. See [DesktopEntries](../desktopentries) for details.
|
||||
/// A desktop entry. See @@DesktopEntries for details.
|
||||
class DesktopEntry: public QObject {
|
||||
Q_OBJECT;
|
||||
Q_PROPERTY(QString id MEMBER mId CONSTANT);
|
||||
|
@ -75,7 +75,7 @@ private:
|
|||
friend class DesktopAction;
|
||||
};
|
||||
|
||||
/// An action of a [DesktopEntry](../desktopentry).
|
||||
/// An action of a @@DesktopEntry$.
|
||||
class DesktopAction: public QObject {
|
||||
Q_OBJECT;
|
||||
Q_PROPERTY(QString id MEMBER mId CONSTANT);
|
||||
|
|
|
@ -79,7 +79,7 @@
|
|||
/// > [!WARNING] Components that internally load other components must explicitly
|
||||
/// > support asynchronous loading to avoid blocking.
|
||||
/// >
|
||||
/// > Notably, [Variants](../variants) does not corrently support asynchronous
|
||||
/// > Notably, @@Variants does not corrently support asynchronous
|
||||
/// > loading, meaning using it inside a LazyLoader will block similarly to not
|
||||
/// > having a loader to start with.
|
||||
///
|
||||
|
|
|
@ -14,9 +14,7 @@
|
|||
/// > [!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 [Repeater] but for non visual types.
|
||||
///
|
||||
/// [Repeater]: https://doc.qt.io/qt-6/qml-qtquick-repeater.html
|
||||
/// given model, similarly to a @@QtQuick.Repeater but for non visual types.
|
||||
class ObjectRepeater: public ObjectModel<QObject> {
|
||||
Q_OBJECT;
|
||||
/// The model providing data to the ObjectRepeater.
|
||||
|
@ -25,10 +23,9 @@ class ObjectRepeater: public ObjectModel<QObject> {
|
|||
/// and [QAbstractListModel] derived models, though only one column will be repeated
|
||||
/// from the latter.
|
||||
///
|
||||
/// Note: [ObjectModel] is a [QAbstractListModel] with a single column.
|
||||
/// Note: @@ObjectModel is a [QAbstractListModel] with a single column.
|
||||
///
|
||||
/// [QAbstractListModel]: https://doc.qt.io/qt-6/qabstractlistmodel.html
|
||||
/// [ObjectModel]: ../objectmodel
|
||||
Q_PROPERTY(QVariant model READ model WRITE setModel NOTIFY modelChanged);
|
||||
/// The delegate component to repeat.
|
||||
///
|
||||
|
@ -39,10 +36,9 @@ class ObjectRepeater: public ObjectModel<QObject> {
|
|||
/// exposed containing the entry from the model. If the model is a [QAbstractListModel],
|
||||
/// the roles from the model will be exposed.
|
||||
///
|
||||
/// Note: [ObjectModel] has a single role named `modelData` for compatibility with normal lists.
|
||||
/// Note: @@ObjectModel has a single role named `modelData` for compatibility with normal lists.
|
||||
///
|
||||
/// [QAbstractListModel]: https://doc.qt.io/qt-6/qabstractlistmodel.html
|
||||
/// [ObjectModel]: ../objectmodel
|
||||
Q_PROPERTY(QQmlComponent* delegate READ delegate WRITE setDelegate NOTIFY delegateChanged);
|
||||
Q_CLASSINFO("DefaultProperty", "delegate");
|
||||
QML_ELEMENT;
|
||||
|
|
|
@ -12,17 +12,14 @@
|
|||
|
||||
// unfortunately QQuickScreenInfo is private.
|
||||
|
||||
/// Monitor object useful for setting the monitor for a [ShellWindow]
|
||||
/// Monitor object useful for setting the monitor for a @@QsWindow
|
||||
/// or querying information about the monitor.
|
||||
///
|
||||
/// > [!WARNING] If the monitor is disconnected than any stored copies of its ShellMonitor will
|
||||
/// > be marked as dangling and all properties will return default values.
|
||||
/// > Reconnecting the monitor will not reconnect it to the ShellMonitor object.
|
||||
///
|
||||
/// Due to some technical limitations, it was not possible to reuse the native qml [Screen] type.
|
||||
///
|
||||
/// [ShellWindow]: ../shellwindow
|
||||
/// [Screen]: https://doc.qt.io/qt-6/qml-qtquick-screen.html
|
||||
/// Due to some technical limitations, it was not possible to reuse the native qml @@QtQuick.Screen type.
|
||||
class QuickshellScreenInfo: public QObject {
|
||||
Q_OBJECT;
|
||||
QML_NAMED_ELEMENT(ShellScreen);
|
||||
|
|
|
@ -60,7 +60,7 @@ class QsMenuEntry: public QObject {
|
|||
/// The check state of the checkbox or radiobutton if applicable, as a
|
||||
/// [Qt.CheckState](https://doc.qt.io/qt-6/qt.html#CheckState-enum).
|
||||
Q_PROPERTY(Qt::CheckState checkState READ checkState NOTIFY checkStateChanged);
|
||||
/// If this menu item has children that can be accessed through a [QsMenuOpener](../qsmenuopener).
|
||||
/// If this menu item has children that can be accessed through a @@QsMenuOpener$.
|
||||
Q_PROPERTY(bool hasChildren READ hasChildren NOTIFY hasChildrenChanged);
|
||||
QML_ELEMENT;
|
||||
QML_UNCREATABLE("QsMenuEntry cannot be directly created");
|
||||
|
|
|
@ -11,10 +11,7 @@ class EngineGeneration;
|
|||
|
||||
///! The base class of all types that can be reloaded.
|
||||
/// Reloadables will attempt to take specific state from previous config revisions if possible.
|
||||
/// Some examples are [ProxyWindowBase] and [PersistentProperties]
|
||||
///
|
||||
/// [ProxyWindowBase]: ../proxywindowbase
|
||||
/// [PersistentProperties]: ../persistentproperties
|
||||
/// Some examples are @@ProxyWindowBase and @@PersistentProperties
|
||||
class Reloadable
|
||||
: public QObject
|
||||
, public QQmlParserStatus {
|
||||
|
|
|
@ -17,7 +17,7 @@ class Retainable;
|
|||
/// typeinfo pages.
|
||||
///
|
||||
/// > [!INFO] Working directly with Retainable is often overly complicated and
|
||||
/// > error prone. For this reason [RetainableLock](../retainablelock) should
|
||||
/// > error prone. For this reason @@RetainableLock should
|
||||
/// > usually be used instead.
|
||||
class RetainableHook: public QObject {
|
||||
Q_OBJECT;
|
||||
|
@ -43,7 +43,7 @@ public:
|
|||
/// > [!WARNING] It is easy to forget to unlock a locked object.
|
||||
/// > Doing so will create what is effectively a memory leak.
|
||||
/// >
|
||||
/// > Using [RetainableLock](../retainablelock) is recommended as it will help
|
||||
/// > 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.
|
||||
|
@ -105,8 +105,8 @@ private:
|
|||
|
||||
///! A helper for easily using Retainable.
|
||||
/// A RetainableLock provides extra safety and ease of use for locking
|
||||
/// [Retainable](../retainable) objects. A retainable object can be locked
|
||||
/// by multiple locks at once, and each lock re-exposes relevant properties
|
||||
/// @@Retainable objects. A retainable object can be locked by multiple
|
||||
/// locks at once, and each lock re-exposes relevant properties
|
||||
/// of the retained objects.
|
||||
///
|
||||
/// #### Example
|
||||
|
|
|
@ -28,20 +28,17 @@ 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 [Repeater] except it is for *non Item* objects, and acts as
|
||||
/// `Variants` is similar to @@QtQuick.Repeater except it is for *non 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.
|
||||
///
|
||||
/// See [Quickshell.screens] for an example of using `Variants` to create copies of a window per
|
||||
/// See @@Quickshell.screens for an example of using `Variants` to create copies of a window per
|
||||
/// screen.
|
||||
///
|
||||
/// > [!WARNING] BUG: Variants currently fails to reload children if the variant set is changed as
|
||||
/// > it is instantiated. (usually due to a mutation during variant creation)
|
||||
///
|
||||
/// [Repeater]: https://doc.qt.io/qt-6/qml-qtquick-repeater.html
|
||||
/// [Quickshell.screens]: ../quickshell#prop.screens
|
||||
class Variants: public Reloadable {
|
||||
Q_OBJECT;
|
||||
/// The component to create instances of.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue