blob: a42f237dfa68e1e50761184302d4dadaadef1a55 (
plain)
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
|
#ifndef _EditorLoadBase_H
#define _EditorLoadBase_H
#include <tqdialog.h>
#include <tqframe.h>
#include <ktoolbar.h>
#include <kstatusbar.h>
#include <kfiledialog.h>
#include "Tileset.h"
#include "BoardLayout.h"
#include "Background.h"
#include "Preview.h"
class Editor: public TQDialog
{
Q_OBJECT
TQ_OBJECT
public:
Editor
(
TQWidget* tqparent = NULL,
const char* name = NULL
);
virtual ~Editor();
protected slots:
void topToolbarOption(int w);
void drawFrameMousePressEvent ( TQMouseEvent* );
void drawFrameMouseMovedEvent ( TQMouseEvent *);
protected:
enum {remove=98, insert=99, move=100};
void paintEvent( TQPaintEvent* pa );
void setupToolbar();
void loadBoard();
bool saveBoard();
void newBoard();
void drawBackground(TQPixmap *to);
void drawTiles(TQPixmap *to);
bool testSave();
void transformPointToPosition(const TQPoint &, POSITION &, bool align);
void drawCursor(POSITION &p, bool visible);
bool canInsert(POSITION &p);
void statusChanged();
TQString statusText();
private:
int mode;
int numTiles;
KToolBar *topToolbar;
FrameImage * drawFrame;
Tileset tiles;
BoardLayout theBoard;
bool clean;
POSITION currPos;
TQLabel *theLabel;
private:
};
#endif
|