-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathworkspace.h
93 lines (66 loc) · 2.03 KB
/
workspace.h
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
#ifndef WORKSPACE_H
#define WORKSPACE_H
#include "basespace.h"
#include "graphicsitemtype.h"
#include <QGraphicsItem>
QT_BEGIN_NAMESPACE
class QWebEngineView;
QT_END_NAMESPACE
class RectElement;
class BaseElement;
class Document;
class Page;
class BaseNode;
class QtRuleBar;
class QtCornerBox;
//class WorkSheet : public QGraphicsItem
//{
// QRectF m_geometry;
// QBrush m_background;
// Outline * m_outline;
//public:
// enum { Type = UserType+ GRAPHICSITEM_TYPE_WORKSHEET };
// int type() const
// {
// // Enable the use of qgraphicsitem_cast with this item.
// return Type;
// }
//public:
// WorkSheet(QGraphicsItem * parent= Q_NULLPTR);
// QRectF boundingRect() const override;
// void paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
// QWidget *widget) override;
// void setSize(const QSizeF & value);
// inline QSizeF size() const {return m_geometry.size();}
// void setGeometry(qreal x,qreal y,qreal w,qreal h);
// void setGeometry(const QRectF & value);
// inline QRectF geometry() const {return m_geometry;}
// inline void setBackground(const QBrush & value) {m_background = value;}
// inline QBrush Background() const { return m_background;}
// void clear();
//};
class Workspace: public BaseSpace
{
Q_OBJECT
Document * m_document;
//WorkSheet * m_currentSheet;
QtRuleBar * m_hruler;
QtRuleBar * m_vruler;
QtCornerBox * box;
public:
Workspace(QWidget *parent = Q_NULLPTR);
~Workspace();
virtual void init() override;
private:
QPixmap getTileRect();
public slots:
void setDocument(Document * const &document);
protected:
void mouseMoveEvent(QMouseEvent * event) Q_DECL_OVERRIDE;
void resizeEvent(QResizeEvent *event) Q_DECL_OVERRIDE;
void scrollContentsBy(int dx, int dy) Q_DECL_OVERRIDE;
private slots:
void changePageSize(QSize pageSize);
void updateRuler();
};
#endif // WORKSPACE_H