diff options
author | Javier <dev.git@javispedro.com> | 2015-06-07 21:22:45 +0200 |
---|---|---|
committer | Javier <dev.git@javispedro.com> | 2015-06-07 21:22:45 +0200 |
commit | a69e97943539a8abc4d2762638c169dc19c88516 (patch) | |
tree | f3516ea29745db65971247cee4c260b49f1067b2 /pageitem.h | |
download | scribiu-a69e97943539a8abc4d2762638c169dc19c88516.tar.gz scribiu-a69e97943539a8abc4d2762638c169dc19c88516.zip |
initial import
Diffstat (limited to 'pageitem.h')
-rw-r--r-- | pageitem.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/pageitem.h b/pageitem.h new file mode 100644 index 0000000..2e6059a --- /dev/null +++ b/pageitem.h @@ -0,0 +1,32 @@ +#ifndef PAGEITEM_H +#define PAGEITEM_H + +#include <QtGui/QGraphicsItem> + +#include "afdnotebook.h" + +class PageItem : public QGraphicsItem +{ +public: + explicit PageItem(AfdNotebook *nb, int pageNum, QGraphicsItem *parent = 0); + + enum { Type = UserType + 'p' }; + + QRectF boundingRect() const; + void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget); + int type() const; + + int pageNum() const; + +private: + void createStrokes(); + +private: + AfdNotebook *_nb; + int _pageNum; + QSize _pageSize; + QRect _pageTrim; + bool _strokesLoaded; +}; + +#endif // PAGEITEM_H |