-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathspritetable.h
91 lines (66 loc) · 1.9 KB
/
spritetable.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
#ifndef SPRITETABLE_H
#define SPRITETABLE_H
#include <QTableWidget>
#include "commandchain.h"
class ImageView;
class SpriteTable : public QTableWidget
{
Q_OBJECT
typedef QTableWidget super;
public:
CommandList command_list;
static bool clipboardHasImage();
explicit SpriteTable(QWidget *parent = Q_NULLPTR);
SpriteTable(int rows, int columns, QWidget *parent = Q_NULLPTR);
~SpriteTable();
bool dropMimeData(int row, int column, const QMimeData * data, Qt::DropAction action);
Qt::DropActions supportedDropActions() const;
bool editReplaceImage(QImage &image, int row, int column);
bool editReplaceImage(QImage &image);
void editInsertRow();
bool editClear(int row, int column);
bool editDelete(int row, int column);
static
QImage imageFromeMime(QMimeData * data);
void mousePressEvent(QMouseEvent * event);
void dropEvent(QDropEvent * event);
void dragMoveEvent(QDragMoveEvent * event);
void dragEnterEvent(QDragEnterEvent * event);
void toolsClearRow(int row);
void toolsPruneC2Sprites(char part);
void toolsPruneC3Sprites(char part);
void toolsSelectEveryNthSprite(int offset, int N);
public slots:
void editUndo();
void editRedo();
bool editCopy();
bool editPaste();
bool editCut()
{
return editCopy() && editDelete();
}
bool editDelete();
bool editImport();
bool editExport();
void menuInsert();
void menuSelect();
void menuClear();
void menuDelete();
void toolsInterpolateColor();
void toolsBlurAlpha();
void toolsScaleImages();
void toolsRearrangeRotationOrder();
void toolsSelectNthSprite();
void toolsSelectEveryNthSprite();
void toolsClearNthRow();
void toolsClearEveryNthRow();
void toolsRemoveNthRow();
void toolsRemoveEveryNthRow();
void customMenuRequested(QPoint pos);
private:
bool loadImage(const QString &, QImage&);
bool saveImage(const QString &, const QImage&);
QImage openImage();
QImage imageFromClipboard();
};
#endif // SPRITETABLE_H