00001 // $Id: historyframe.h,v 1.1 2005/06/13 13:07:04 rcr_muc Exp $ 00002 // shows a frame with a user defined rColor - clickable 00003 // 2005-06-04 rcr 00004 00005 #ifndef HISTORYFRAME_H 00006 #define HISTORYFRAME_H 00007 00008 #include <qpopupmenu.h> 00009 #include <qpixmap.h> 00010 #include <qframe.h> 00011 #include "rcolor.h" 00012 00013 class HistoryFrame : public QFrame 00014 { 00015 Q_OBJECT 00016 00017 rColor curColor; 00018 QSize pmSize; 00019 QPixmap txt, fg, bg; 00020 QPopupMenu* popper; 00021 public: 00022 HistoryFrame( QWidget* parent = 0, const char* name = 0, WFlags f = 0 ); 00023 void setColor( const rColor& ); 00024 const rColor& getColor() { return curColor; } 00025 00026 public slots: 00027 void useColor() { emit historySelected( curColor ); } 00028 void delColor() { emit deleteColor( this ); } 00029 00030 signals: 00031 void historySelected( const rColor& ); 00032 void deleteColor( HistoryFrame* ); 00033 00034 protected: 00035 void mouseReleaseEvent( QMouseEvent* ); 00036 void resizeEvent( QResizeEvent* ); 00037 }; 00038 00039 #endif // HISTORYFRAME_H