summary refs log tree commit diff
path: root/src/timeline/DelegateChooser.h
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2021-09-18 00:22:33 +0200
committerNicolas Werner <nicolas.werner@hotmail.de>2021-09-18 00:45:50 +0200
commitcfca7157b98c9dc8e0852fe6484bc3f75008af7d (patch)
tree32b92340908a9374214ec7b84c1fac7ea338f56d /src/timeline/DelegateChooser.h
parentMerge pull request #728 from Thulinma/goto (diff)
downloadnheko-cfca7157b98c9dc8e0852fe6484bc3f75008af7d.tar.xz
Change indentation to 4 spaces
Diffstat (limited to 'src/timeline/DelegateChooser.h')
-rw-r--r--src/timeline/DelegateChooser.h94
1 files changed, 47 insertions, 47 deletions
diff --git a/src/timeline/DelegateChooser.h b/src/timeline/DelegateChooser.h
index 22e423a2..3e4b16d7 100644
--- a/src/timeline/DelegateChooser.h
+++ b/src/timeline/DelegateChooser.h
@@ -18,73 +18,73 @@ class QQmlAdaptorModel;
 
 class DelegateChoice : public QObject
 {
-        Q_OBJECT
-        Q_CLASSINFO("DefaultProperty", "delegate")
+    Q_OBJECT
+    Q_CLASSINFO("DefaultProperty", "delegate")
 
 public:
-        Q_PROPERTY(QVariant roleValue READ roleValue WRITE setRoleValue NOTIFY roleValueChanged)
-        Q_PROPERTY(QQmlComponent *delegate READ delegate WRITE setDelegate NOTIFY delegateChanged)
+    Q_PROPERTY(QVariant roleValue READ roleValue WRITE setRoleValue NOTIFY roleValueChanged)
+    Q_PROPERTY(QQmlComponent *delegate READ delegate WRITE setDelegate NOTIFY delegateChanged)
 
-        QQmlComponent *delegate() const;
-        void setDelegate(QQmlComponent *delegate);
+    QQmlComponent *delegate() const;
+    void setDelegate(QQmlComponent *delegate);
 
-        QVariant roleValue() const;
-        void setRoleValue(const QVariant &value);
+    QVariant roleValue() const;
+    void setRoleValue(const QVariant &value);
 
 signals:
-        void delegateChanged();
-        void roleValueChanged();
-        void changed();
+    void delegateChanged();
+    void roleValueChanged();
+    void changed();
 
 private:
-        QVariant roleValue_;
-        QQmlComponent *delegate_ = nullptr;
+    QVariant roleValue_;
+    QQmlComponent *delegate_ = nullptr;
 };
 
 class DelegateChooser : public QQuickItem
 {
-        Q_OBJECT
-        Q_CLASSINFO("DefaultProperty", "choices")
+    Q_OBJECT
+    Q_CLASSINFO("DefaultProperty", "choices")
 
 public:
-        Q_PROPERTY(QQmlListProperty<DelegateChoice> choices READ choices CONSTANT)
-        Q_PROPERTY(QVariant roleValue READ roleValue WRITE setRoleValue NOTIFY roleValueChanged)
-        Q_PROPERTY(QQuickItem *child READ child NOTIFY childChanged)
+    Q_PROPERTY(QQmlListProperty<DelegateChoice> choices READ choices CONSTANT)
+    Q_PROPERTY(QVariant roleValue READ roleValue WRITE setRoleValue NOTIFY roleValueChanged)
+    Q_PROPERTY(QQuickItem *child READ child NOTIFY childChanged)
 
-        QQmlListProperty<DelegateChoice> choices();
+    QQmlListProperty<DelegateChoice> choices();
 
-        QVariant roleValue() const;
-        void setRoleValue(const QVariant &value);
+    QVariant roleValue() const;
+    void setRoleValue(const QVariant &value);
 
-        QQuickItem *child() const { return child_; }
+    QQuickItem *child() const { return child_; }
 
-        void recalcChild();
-        void componentComplete() override;
+    void recalcChild();
+    void componentComplete() override;
 
 signals:
-        void roleChanged();
-        void roleValueChanged();
-        void childChanged();
+    void roleChanged();
+    void roleValueChanged();
+    void childChanged();
 
 private:
-        struct DelegateIncubator : public QQmlIncubator
-        {
-                DelegateIncubator(DelegateChooser &parent)
-                  : QQmlIncubator(QQmlIncubator::AsynchronousIfNested)
-                  , chooser(parent)
-                {}
-                void statusChanged(QQmlIncubator::Status status) override;
-
-                DelegateChooser &chooser;
-        };
-
-        QVariant roleValue_;
-        QList<DelegateChoice *> choices_;
-        QQuickItem *child_ = nullptr;
-        DelegateIncubator incubator{*this};
-
-        static void appendChoice(QQmlListProperty<DelegateChoice> *, DelegateChoice *);
-        static int choiceCount(QQmlListProperty<DelegateChoice> *);
-        static DelegateChoice *choice(QQmlListProperty<DelegateChoice> *, int index);
-        static void clearChoices(QQmlListProperty<DelegateChoice> *);
+    struct DelegateIncubator : public QQmlIncubator
+    {
+        DelegateIncubator(DelegateChooser &parent)
+          : QQmlIncubator(QQmlIncubator::AsynchronousIfNested)
+          , chooser(parent)
+        {}
+        void statusChanged(QQmlIncubator::Status status) override;
+
+        DelegateChooser &chooser;
+    };
+
+    QVariant roleValue_;
+    QList<DelegateChoice *> choices_;
+    QQuickItem *child_ = nullptr;
+    DelegateIncubator incubator{*this};
+
+    static void appendChoice(QQmlListProperty<DelegateChoice> *, DelegateChoice *);
+    static int choiceCount(QQmlListProperty<DelegateChoice> *);
+    static DelegateChoice *choice(QQmlListProperty<DelegateChoice> *, int index);
+    static void clearChoices(QQmlListProperty<DelegateChoice> *);
 };