clickable.h
00001 /*************************************************************************** 00002 * Copyright (C) 2003 by Ralph M. Churchill * 00003 * mrchucho@yahoo.com * 00004 * * 00005 * This program is free software; you can redistribute it and/or modify * 00006 * it under the terms of the GNU General Public License as published by * 00007 * the Free Software Foundation; either version 2 of the License, or * 00008 * (at your option) any later version. * 00009 ***************************************************************************/ 00010 00011 #ifndef CLICKABLE_H 00012 #define CLICKABLE_H 00013 00014 #include <qstring.h> 00015 #include <qrect.h> 00016 #include <qevent.h> 00017 00018 00023 class Clickable 00024 { 00025 public: 00026 Clickable(int x, int y, int w, int h ); 00027 00028 virtual ~Clickable(); 00029 00030 virtual void click( QMouseEvent* ) = 0; 00031 /* 00032 void setOnClick( QString ); 00033 void setOnMiddleClick( QString ); 00034 */ 00035 00036 virtual QRect getBoundingBox(); 00037 00038 protected: 00039 QRect boundingBox; 00040 /* 00041 QString onClick; 00042 QString onMiddleClick; 00043 */ 00044 }; 00045 00046 #endif