kmahjongg
FrameImage.h
Go to the documentation of this file.00001 /* 00002 Copyright (C) 1997 Mathias Mueller <in5y158@public.uni-hamburg.de> 00003 00004 Kmahjongg is free software; you can redistribute it and/or modify 00005 it under the terms of the GNU General Public License as published by 00006 the Free Software Foundation; either version 2 of the License, or 00007 (at your option) any later version. 00008 00009 This program is distributed in the hope that it will be useful, 00010 but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 GNU General Public License for more details. 00013 00014 You should have received a copy of the GNU General Public License 00015 along with this program; if not, write to the Free Software 00016 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 00017 */ 00018 00019 #ifndef _FrameImage_H 00020 #define _FrameImage_H 00021 00022 #include <kdialog.h> 00023 00024 #include <qframe.h> 00025 #include "kgamecanvas.h" 00026 00027 #include "kmahjonggtileset.h" 00028 #include "kmahjonggbackground.h" 00029 #include "BoardLayout.h" 00030 00031 class QComboBox; 00032 class QPixmap; 00033 00041 class FrameImage: public KGameCanvasWidget 00042 { 00043 Q_OBJECT 00044 public: 00051 FrameImage(QWidget *parent, const QSize& initialImageSize); 00054 ~FrameImage(); 00060 QPixmap *getPreviewPixmap() {return thePixmap;} 00071 void setRect(int x, int y, int w, int h, int ss, int type); 00072 signals: 00075 void mousePressed(QMouseEvent *e); 00078 void mouseMoved(QMouseEvent *e); 00079 protected: 00082 void mousePressEvent(QMouseEvent *e); 00085 void mouseMoveEvent(QMouseEvent *e); 00088 void resizeEvent(QResizeEvent *e); 00091 void paintEvent( QPaintEvent* pa ); 00092 private: 00093 QPixmap *thePixmap; 00094 int rx; 00095 int ry; 00096 int rw; 00097 int rh; 00098 int rs; 00099 int rt; 00100 }; 00101 00102 #endif
KDE 4.2 API Reference