-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathhelpmainpartwidget.h
48 lines (41 loc) · 1.11 KB
/
helpmainpartwidget.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
#ifndef HELPMAINPARTWIDGET_H
#define HELPMAINPARTWIDGET_H
// File must include
#include <QPixmap>
#include <QPointF>
#include <QString>
#include <QVector>
class QPainter;
/**
* @brief A class to show the main part of the help.
*/
class HelpMainPartWidget
{
public:
/**
*@brief Constructor.
*
*@param background Path The path of the background of the background.
*@param animCenters The centers of the parts with animation.
*@param animPaths The paths of the parts with animation.
*/
HelpMainPartWidget(QString backgroundPath,
QVector<QPointF> animCenters,
QVector<QString> animPaths);
/**
*@brief Paint the main part.
*
*@param painter The painter.
*@param width The width.
*@param height The height.
*@param frame The index of the frame to show.
*/
void paint(QPainter *painter, int width, int height, int frame);
private:
int backgroundFrameCounts;
QVector<QPixmap> backgroundPixmaps;
QVector<QPointF> animCenterPoints;
QVector<int> animFrameCounts;
QVector<QVector<QPixmap> > animPixmaps;
};
#endif // HELPMAINPARTWIDGET_H