forked from quickshell/quickshell
feat: begin work on docs, also minor refactoring
This commit is contained in:
parent
5de0ae095b
commit
424a45be05
12 changed files with 197 additions and 13 deletions
|
@ -21,10 +21,20 @@ public:
|
|||
QList<QPair<K, V>> values;
|
||||
};
|
||||
|
||||
///! Creates instances of a component based on a given set of variants.
|
||||
/// Creates and destroys instances of the given component when the given property changes.
|
||||
///
|
||||
/// See [QuickShell.screens] for an example of using `Variants` to create copies of a window per
|
||||
/// screen.
|
||||
///
|
||||
/// [QuickShell.screens]: ../quickshell#prop.screens
|
||||
class Variants: public Scavenger, virtual public Scavengeable {
|
||||
Q_OBJECT;
|
||||
/// The component to create instances of
|
||||
Q_PROPERTY(QQmlComponent* component MEMBER mComponent);
|
||||
Q_PROPERTY(QVariantList variants MEMBER mVariants WRITE setVariants);
|
||||
/// 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.
|
||||
Q_PROPERTY(QList<QVariant> variants MEMBER mVariants WRITE setVariants);
|
||||
Q_CLASSINFO("DefaultProperty", "component");
|
||||
QML_ELEMENT;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue