summaryrefslogtreecommitdiff
path: root/src/tools/ivigenerator/templates/common/pagingmodel_simulation.h.tpl
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/ivigenerator/templates/common/pagingmodel_simulation.h.tpl')
-rw-r--r--src/tools/ivigenerator/templates/common/pagingmodel_simulation.h.tpl5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/tools/ivigenerator/templates/common/pagingmodel_simulation.h.tpl b/src/tools/ivigenerator/templates/common/pagingmodel_simulation.h.tpl
index ace6a72..be911f8 100644
--- a/src/tools/ivigenerator/templates/common/pagingmodel_simulation.h.tpl
+++ b/src/tools/ivigenerator/templates/common/pagingmodel_simulation.h.tpl
@@ -51,10 +51,13 @@
class {{class}} : public QIviPagingModelInterface
{
Q_OBJECT
+ Q_PROPERTY(int count READ count NOTIFY countChanged)
public:
explicit {{class}}(QObject *parent = nullptr);
~{{class}}();
+ int count() const;
+
Q_INVOKABLE void initialize() override;
Q_INVOKABLE void registerInstance(const QUuid &identifier) override;
Q_INVOKABLE void unregisterInstance(const QUuid &identifier) override;
@@ -67,7 +70,7 @@ public Q_SLOTS:
void move(int currentIndex, int newIndex);
void reset();
void update(int index, const {{property.type.nested}} &item);
- const {{property.type.nested}} &at(int index) const;
+ {{property.type.nested}} at(int index) const;
private:
QList<{{property.type.nested}}> m_list;