2 Copyright (C) 1997 Mathias Mueller <in5y158@public.uni-hamburg.de>
3 Copyright (C) 2006 Mauricio Piacentini <mauricio@tabuleiro.com>
5 Kmahjongg is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 #ifndef _EditorLoadBase_H
21 #define _EditorLoadBase_H
26 #include <kstatusbar.h>
27 #include <kfiledialog.h>
29 #include "kmahjonggtileset.h"
30 #include "kmahjonggbackground.h"
31 #include "BoardLayout.h"
33 #include "FrameImage.h"
37 class KActionCollection
;
41 * @short This class implements
45 * @author Mauricio Piacentini <mauricio@tabuleiro.com>
47 class Editor
: public KDialog
53 * Constructor Description @param parent */
54 explicit Editor ( QWidget
* parent
= 0);
56 * Default Destructor */
62 void drawFrameMousePressEvent ( QMouseEvent
* );
65 void drawFrameMouseMovedEvent ( QMouseEvent
*);
71 * @return @c true if ...
72 * @return @c false if ...
83 void slotShiftRight();
92 void slotModeChanged(QAction
*);
96 /** @short Describe enum
99 remove
=98, /**< describe*/
100 insert
=99, /**< describe*/
101 move
=100 /**< describe*/
104 * Method Description */
105 void resizeEvent ( QResizeEvent
* event
);
107 * Method Description */
108 void paintEvent( QPaintEvent
* pa
);
110 * Method Description */
113 * Method Description */
114 void drawBackground(QPixmap
*to
);
116 * Method Description @param to destination QPixmap to draw to */
117 void drawTiles(QPixmap
*to
);
122 * @return @c false if
126 * Method Description */
127 void transformPointToPosition(const QPoint
&, POSITION
&, bool align
);
133 void drawCursor(POSITION
&p
, bool visible
);
139 * @return @c false if
141 bool canInsert(POSITION
&p
);
143 * Method Description */
144 void statusChanged();
146 * Method Description @return status description */
147 QString
statusText();
151 KToolBar
*topToolbar
;
152 KActionCollection
* actionCollection
;
153 FrameImage
* drawFrame
;
154 KMahjonggTileset tiles
;
155 BoardLayout theBoard
;