53 lines
911 B
C
53 lines
911 B
C
|
#ifndef LEVELDATA_H
|
||
|
#define LEVELDATA_H
|
||
|
|
||
|
#include <vector>
|
||
|
#include <QObject>
|
||
|
#include <QPoint>
|
||
|
|
||
|
class MainWindow;
|
||
|
|
||
|
struct TPoly
|
||
|
{
|
||
|
std::vector<QPoint> pointArr;
|
||
|
};
|
||
|
|
||
|
class LevelData : public QObject
|
||
|
{
|
||
|
Q_OBJECT
|
||
|
public:
|
||
|
std::vector<QPoint> tempPointArr;
|
||
|
std::vector<TPoly> PolyArr;
|
||
|
|
||
|
int selectedPoly;
|
||
|
int selectedPoint;
|
||
|
QPoint LastMouseDownPos;
|
||
|
|
||
|
MainWindow* mainWindow;
|
||
|
|
||
|
explicit LevelData(QObject *parent = 0);
|
||
|
|
||
|
~LevelData();
|
||
|
|
||
|
void RefreshPixmap();
|
||
|
void ResetSelected();
|
||
|
void ResetTempPoints();
|
||
|
|
||
|
void Clear();
|
||
|
|
||
|
public slots:
|
||
|
void OnSelectPoint(int x, int y);
|
||
|
void OnMovePoint(int x, int y);
|
||
|
|
||
|
void OnAddPoint(int x, int y);
|
||
|
void OnApplyPointList(int x, int y);
|
||
|
|
||
|
void OnMouseDown(int x, int y);
|
||
|
|
||
|
void DeleteLastTempPoint();
|
||
|
void DeleteSelectedPoint();
|
||
|
|
||
|
};
|
||
|
|
||
|
#endif // LEVELDATA_H
|