-
Notifications
You must be signed in to change notification settings - Fork 0
/
documentbox.h
75 lines (65 loc) · 1.96 KB
/
documentbox.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
#ifndef DOCUMENTBOX_H
#define DOCUMENTBOX_H
#include <QWidget>
#include <QPointer>
#include <QVBoxLayout>
#include <QHBoxLayout>
#include <QToolButton>
#include "placeroutine.h"
class DocumentLayer;
class CurrencyChartWidget;
class GraphicWidget;
class DocumentBoxButtons;
class SearchInput;
class DocumentBox : public QWidget
{
Q_OBJECT
public:
explicit DocumentBox(DocumentLayer *parent);
DocumentLayer* layer() const;
void setOrderIndex(int value);
int orderIndex() const;
void setStackRect(const QRectF &value);
QRectF stackRect() const;
void setGridRect(const QRect &value);
QRect gridRect() const;
void setScreenRect(const QRect &value);
QRect screenRect() const;
void setWideMode(bool value);
bool isWideMode() const;
signals:
void resizing(RectBoundType boundType, const QPoint &point);
void moving(const QPoint &point);
void wideModeChanging();
void closing();
protected:
void paintEvent(QPaintEvent *event) override;
void mousePressEvent(QMouseEvent *event) override;
void mouseMoveEvent(QMouseEvent *event) override;
void mouseReleaseEvent(QMouseEvent *event) override;
bool eventFilter(QObject *object, QEvent *event) override;
void focusInEvent(QFocusEvent *event) override;
private slots:
void onWideModeButtonClicked();
void onCloseButtonClicked();
void onInstrumentChanged();
private:
DocumentLayer *m_layer;
int m_orderIndex;
QVBoxLayout *m_centralLayout;
QHBoxLayout *m_headerLayout;
SearchInput *m_searchInput;
GraphicWidget *m_buttonsWidget;
DocumentBoxButtons *m_buttonsObject;
CurrencyChartWidget *m_chartWidget;
QRectF m_stackRect;
QRect m_gridRect;
QRect m_screenRect;
bool m_isWideMode;
RectBoundType m_clickBound;
QPoint m_clickPoint;
RectBoundType findBound(const QPoint &point) const;
};
typedef QPointer<DocumentBox> DocumentBoxPtr;
typedef QList<DocumentBox*> DocumentBoxList;
#endif // DOCUMENTBOX_H