- Main Page
- Classes
- Files

- File List

# qaugmentedrealitycameramodel.h

    00001 #ifndef QAUGMENTEDREALITYCAMERAMODEL_H
    00002 #define QAUGMENTEDREALITYCAMERAMODEL_H
    00003
    00004 #include <QAbstractListModel>
    00005 #include <QDeclarativeListProperty>
    00006
    00007 #include "qdll_global.h"
    00008 #include "qaugmentedrealitycameraitem.h"
    00009
    00010 class QDLLSHARED_EXPORT QAugmentedRealityCameraModel : public QAbstractListModel
    00011 {
    00012     Q_OBJECT
    00013     Q_CLASSINFO("Author", "Sebastiano Galazzo")
    00014     Q_CLASSINFO("Email", "sebastiano.galazzo@gmail.com")
    00015     Q_PROPERTY(QDeclarativeListProperty<QAugmentedRealityCameraItem> pins READ pins)
    00016
    00017 public:
    00018   explicit QAugmentedRealityCameraModel(QObject* parent = 0);
    00019   ~QAugmentedRealityCameraModel();
    00020
    00021   int rowCount(const QModelIndex &parent = QModelIndex()) const;
    00022   QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
    00023   QHash<int, QByteArray> roleNames() const;
    00024
    00025   Q_INVOKABLE void append(QVariantMap item);
    00026   void appendRow(QAugmentedRealityCameraItem* item);
    00027   void appendRows(const QList<QAugmentedRealityCameraItem*> &items);
    00028   void insertRow(int row, QAugmentedRealityCameraItem* item);
    00029   bool removeRow(int row, const QModelIndex &parent = QModelIndex());
    00030   bool removeRows(int row, int count, const QModelIndex &parent = QModelIndex());
    00031   QAugmentedRealityCameraItem* at(int row);
    00032   QAugmentedRealityCameraItem* takeRow(int row);
    00033   QAugmentedRealityCameraItem* find(const QString &id) const;
    00034   QModelIndex indexFromItem( const QAugmentedRealityCameraItem* item) const;
    00035   void clear();
    00036
    00037   QDeclarativeListProperty<QAugmentedRealityCameraItem> pins();
    00038
    00039 private slots:
    00040   void handleItemChange();
    00041
    00042 private:
    00043   QAugmentedRealityCameraItem* m_prototype;
    00044   QList<QAugmentedRealityCameraItem*> m_list;
    00045
    00046 };
    00047 #endif // QAUGMENTEDREALITYCAMERAMODEL_H

All Classes Functions