-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathhelpwidget2.h
84 lines (71 loc) · 1.62 KB
/
helpwidget2.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
#ifndef HELPWIDGET2_H
#define HELPWIDGET2_H
// File must include
#include "abstractpixmapwidget.h"
#include <QVector>
#include <QPointF>
#include <QPixmap>
// Forward declaration
class AbstractItem;
class HelpItem;
class HelpMainPartWidget;
/**
* @brief A class of a help widget which shows the help.
*/
class HelpWidget2 : public AbstractPixmapWidget
{
Q_OBJECT
public:
/**
* @brief Constructor.
*/
HelpWidget2();
/**
* @brief Destructor.
*/
~HelpWidget2();
virtual void makePixmap(
#ifdef USE_PIXMAP
QPixmap& pixmap,
#else
QPainter* painter,
#endif
int width,
int height);
virtual void makeBasicPixmap(
#ifdef USE_PIXMAP
QPixmap& pixmap,
#else
QPainter* painter,
#endif
int width,
int height);
virtual void addEffect(
#ifdef USE_PIXMAP
QPixmap& pixmap,
#else
QPainter* painter,
#endif
int width,
int height);
virtual QPointF toScene(double xRate, double yRate);
virtual void dealPressed(QPointF mousePos, Qt::MouseButton button);
virtual void dealMoved(QPointF mousePos, Qt::MouseButton button);
virtual void dealReleased(QPointF mousePos, Qt::MouseButton button);
virtual void getForcus(){}
virtual void loseForcus(){}
private:
// Items of the game
HelpItem **helpThemeItems;
AbstractItem *exitItem;
HelpMainPartWidget **helpThemeWidgets;
// A vector stores the items,
// used to paint and release the space
QVector<AbstractItem *> myItems;
// A value records the item at the
// position which user press
AbstractItem *itemAtPressPos;
int currentItemIndex;
int mainPartFrameCount;
};
#endif // HELPWIDGET2_H