bookpage.h 596 B

123456789101112131415161718192021222324252627282930313233343536
  1. #ifndef BOOKPAGE_H
  2. #define BOOKPAGE_H
  3. #include <QObject>
  4. #include <QUrl>
  5. #include <QtDeclarative/QDeclarativeItem>
  6. class BookPage : public QObject
  7. {
  8. Q_OBJECT
  9. Q_PROPERTY(int pageNumber READ pageNumber CONSTANT)
  10. Q_PROPERTY(QUrl pageUrl READ pageUrl CONSTANT)
  11. public:
  12. BookPage(QObject *parent = 0);
  13. void setPage(QString name);
  14. QUrl pageUrl() const;
  15. void setNumber(int index);
  16. int pageNumber() const;
  17. signals:
  18. public slots:
  19. private:
  20. QUrl m_page;
  21. int m_index;
  22. };
  23. QML_DECLARE_TYPE(BookPage)
  24. #endif // BOOKPAGE_H