Canorus  0.7
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
/home/iurt/rpm/BUILD/canorus-0.7.R1002/src/widgets/toolbuttonpopup.h
Go to the documentation of this file.
00001 
00008 #ifndef TOOLBUTTONPOPUP_H_
00009 #define TOOLBUTTONPOPUP_H_
00010 
00011 #include <QWidget>
00012 
00013 class CAToolButtonPopup: public QWidget {
00014 Q_OBJECT
00015 public:
00016                 CAToolButtonPopup(QWidget* parent = 0);
00017                 ~CAToolButtonPopup() { /* widget is not destroyed! */ } 
00018                 inline void setWidget(QWidget* w) { _widget = w; w->setParent(this); }
00019                 inline QWidget* widget() { return _widget; }
00020                 inline QSize sizeHint() const { return (_widget)?_widget->sizeHint():QSize(0,0); } 
00021 protected:
00022                 void mousePressEvent(QMouseEvent* e);
00023                 QWidget* _widget;
00024 };
00025 
00026 #endif /* TOOLBUTTONPOPUP_H_ */