1 #ifndef DOCUMENTATTRIBUTELIST_H 2 #define DOCUMENTATTRIBUTELIST_H 3 4 #include <QObject> 5 6 #include "telegramqml_global.h" 7 8 class DocumentAttribute; 9 class DocumentAttributeObject; 10 class DocumentAttributeListPrivate; 11 class TELEGRAMQMLSHARED_EXPORT DocumentAttributeList : public QObject 12 { 13 Q_OBJECT 14 15 Q_PROPERTY(DocumentAttributeObject* first READ first NOTIFY firstChanged) 16 Q_PROPERTY(DocumentAttributeObject* last READ last NOTIFY lastChanged) 17 Q_PROPERTY(int count READ count NOTIFY countChanged) 18 19 public: 20 DocumentAttributeList(QObject *parent = 0); 21 DocumentAttributeList(const QList<DocumentAttribute> & another, QObject *parent = 0); 22 ~DocumentAttributeList(); 23 24 void operator =( const QList<DocumentAttribute> & another ); 25 26 DocumentAttributeObject *first() const; 27 DocumentAttributeObject *last() const; 28 29 int count() const; 30 31 public Q_SLOTS: 32 DocumentAttributeObject *at( int idx ); 33 34 Q_SIGNALS: 35 void firstChanged(); 36 void lastChanged(); 37 void countChanged(); 38 39 private: 40 DocumentAttributeListPrivate *p; 41 }; 42 43 Q_DECLARE_METATYPE(DocumentAttributeList*) 44 45 #endif // DOCUMENTATTRIBUTELIST_H 46