aboutsummaryrefslogtreecommitdiff
path: root/pageitem.h
blob: 2e6059a306afe8e921e2c1198b3754d4aefbf73c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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