summaryrefslogtreecommitdiffstats
path: root/kmahjongg/Editor.h
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commitc90c389a8a8d9d8661e9772ec4144c5cf2039f23 (patch)
tree6d8391395bce9eaea4ad78958617edb20c6a7573 /kmahjongg/Editor.h
downloadtdegames-c90c389a8a8d9d8661e9772ec4144c5cf2039f23.tar.gz
tdegames-c90c389a8a8d9d8661e9772ec4144c5cf2039f23.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegames@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kmahjongg/Editor.h')
-rw-r--r--kmahjongg/Editor.h68
1 files changed, 68 insertions, 0 deletions
diff --git a/kmahjongg/Editor.h b/kmahjongg/Editor.h
new file mode 100644
index 00000000..5ced0daf
--- /dev/null
+++ b/kmahjongg/Editor.h
@@ -0,0 +1,68 @@
+#ifndef _EditorLoadBase_H
+#define _EditorLoadBase_H
+
+#include <qdialog.h>
+#include <qframe.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 QDialog
+{
+ Q_OBJECT
+
+public:
+
+
+ Editor
+ (
+ QWidget* parent = NULL,
+ const char* name = NULL
+ );
+
+ virtual ~Editor();
+
+
+
+protected slots:
+ void topToolbarOption(int w);
+ void drawFrameMousePressEvent ( QMouseEvent* );
+ void drawFrameMouseMovedEvent ( QMouseEvent *);
+
+
+protected:
+ enum {remove=98, insert=99, move=100};
+ void paintEvent( QPaintEvent* pa );
+ void setupToolbar();
+ void loadBoard();
+ bool saveBoard();
+ void newBoard();
+ void drawBackground(QPixmap *to);
+ void drawTiles(QPixmap *to);
+ bool testSave();
+ void transformPointToPosition(const QPoint &, POSITION &, bool align);
+ void drawCursor(POSITION &p, bool visible);
+ bool canInsert(POSITION &p);
+ void statusChanged();
+ QString statusText();
+private:
+ int mode;
+ int numTiles;
+ KToolBar *topToolbar;
+ FrameImage * drawFrame;
+ Tileset tiles;
+ BoardLayout theBoard;
+ bool clean;
+ POSITION currPos;
+ QLabel *theLabel;
+private:
+
+};
+
+#endif