core/vgui/impl/qt/vgui_qt_menu.h
Go to the documentation of this file.
00001 #ifndef VGUI_QT_MENU_H_
00002 #define VGUI_QT_MENU_H_
00003 //:
00004 // \file
00005 // \brief vgui_menu wrapped into a QT popupmenu
00006 //
00007 // \author
00008 //  Joris Schouteden, ESAT, K.U.Leuven
00009 //
00010 // \verbatim
00011 //  Modifications
00012 //   24.03.2000 JS  Initial Version
00013 // \endverbatim
00014 //-----------------------------------------------------------------------------
00015 
00016 #include <vgui/vgui_menu.h>
00017 #include <vgui/vgui_command.h>
00018 #include <vbl/vbl_smart_ptr.h>
00019 
00020 #include <qpopupmenu.h>
00021 #include <qobject.h>
00022 
00023 typedef vbl_smart_ptr<vgui_command> vgui_command_sptr;
00024 
00025 //: QT implementation of vgui_menu.
00026 class vgui_qt_menu : public QPopupMenu
00027 {
00028   Q_OBJECT
00029  public:
00030   vgui_qt_menu(const vgui_menu& menuke);
00031  ~vgui_qt_menu() { delete[] commands_; }
00032 
00033  public slots:
00034   void  upon_activated(int id);
00035 
00036  private:
00037   vgui_command_sptr*  commands_;
00038 };
00039 
00040 #endif // VGUI_QT_MENU_H_