Back to index

texmacs  1.0.7.15
qt_menu.hpp
Go to the documentation of this file.
00001 
00002 /******************************************************************************
00003 * MODULE     : qt_menu.h
00004 * DESCRIPTION: QT menu proxies
00005 * COPYRIGHT  : (C) 2007  Massimiliano Gubinelli
00006 *******************************************************************************
00007 * This software falls under the GNU general public license version 3 or later.
00008 * It comes WITHOUT ANY WARRANTY WHATSOEVER. For details, see the file LICENSE
00009 * in the root directory or <http://www.gnu.org/licenses/gpl-3.0.html>.
00010 ******************************************************************************/
00011 
00012 #ifndef QT_MENU_HPP
00013 #define QT_MENU_HPP
00014 
00015 #include "qt_widget.hpp"
00016 #include <QMenu>
00017 #include <QAction>
00018 
00019 
00020 
00021 class qt_menu_rep: public qt_widget_rep {
00022 public:
00023   QAction  *item;
00024   qt_menu_rep (QAction* _item);
00025   ~qt_menu_rep () { 
00026     delete item; // the submenu is usually also deleted since item is a QTMAction
00027   }
00028   
00029   virtual QMenu *get_qmenu() { return (item ? item->menu() : NULL); }
00030   
00031   virtual void send (slot s, blackbox val);
00032   virtual widget make_popup_widget ();
00033   virtual widget popup_window_widget (string s);
00034   virtual widget plain_window_widget (string s, command q);
00035   virtual QAction* as_qaction ();
00036 };
00037 
00038 
00039 #endif // defined QT_MENU_HPP