1 #include <QtCore/QObject>
2 #include <QtGui/QMainWindow>
20 int bbox_l
, bbox_r
, bbox_u
, bbox_d
;
22 int pw
, ph
; /* pixmap size (w, h are area size) */
23 int ox
, oy
; /* offset of pixmap in drawing area */
26 class Canvas
: public QWidget
32 virtual QSize
sizeHint() const;
33 void do_resize(const QSize
& size
);
35 void paintEvent (QPaintEvent
*event
);
36 void resizeEvent (QResizeEvent
*event
);
37 void mousePressEvent (QMouseEvent
*event
);
38 void mouseReleaseEvent (QMouseEvent
*event
);
39 void mouseMoveEvent (QMouseEvent
*event
);
42 class PuzzleWindow
: public QMainWindow
{
46 PuzzleWindow(QWidget
*parent
=0, Qt::WFlags fl
=0);
54 void preset(QObject
*);
57 // Simple QObject wrapper around game_params
58 class GameParams
: public QObject
{
61 GameParams(game_params
*params
)