Canorus  0.7
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
toolbuttonpopup.h
Go to the documentation of this file.
1 
8 #ifndef TOOLBUTTONPOPUP_H_
9 #define TOOLBUTTONPOPUP_H_
10 
11 #include <QWidget>
12 
13 class CAToolButtonPopup: public QWidget {
14 Q_OBJECT
15 public:
16  CAToolButtonPopup(QWidget* parent = 0);
17  ~CAToolButtonPopup() { /* widget is not destroyed! */ }
18  inline void setWidget(QWidget* w) { _widget = w; w->setParent(this); }
19  inline QWidget* widget() { return _widget; }
20  inline QSize sizeHint() const { return (_widget)?_widget->sizeHint():QSize(0,0); }
21 protected:
22  void mousePressEvent(QMouseEvent* e);
24 };
25 
26 #endif /* TOOLBUTTONPOPUP_H_ */