Back to index

texmacs  1.0.7.15
QTMGuiHelper.hpp
Go to the documentation of this file.
00001 
00002 /******************************************************************************
00003 * MODULE     : QTMGuiHelper.hpp
00004 * DESCRIPTION: QT Gui helper class. Infrastructure for delayed menu installation 
00005 * COPYRIGHT  : (C) 2008 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 QTMGUIHELPER_HPP
00013 #define QTMGUIHELPER_HPP
00014 
00015 #include "qt_gui.hpp"
00016 #include <QObject>
00017 #include <QTranslator>
00018 
00019 class QTMGuiHelper : public QObject {
00020   Q_OBJECT
00021   qt_gui_rep* gui;
00022 
00023 public:
00024   inline QTMGuiHelper (qt_gui_rep *_gui) : QObject (), gui (_gui) {}
00025 
00026 protected:
00027   bool eventFilter (QObject *obj, QEvent *event);
00028   
00029 public slots:
00030   void doUpdate ();
00031   void doRefresh ();
00032   void doReadSocketNotification (int socket);  
00033   void doWriteSocketNotification (int socket);  
00034   
00035   void aboutToShowMainMenu ();
00036   void aboutToHideMainMenu ();
00037   void doPopWaitingWidgets ();
00038  
00039 signals:
00040   void refresh ();  
00041 };
00042 
00043 
00044 class QTMTranslator : public QTranslator {
00045   
00046   Q_OBJECT
00047   
00048 public:
00049   QTMTranslator(QObject * parent = NULL ) : QTranslator(parent) {};
00050   virtual QString translate ( const char * context, const char * sourceText, 
00051                              const char * disambiguation = 0 ) const ;  
00052 };
00053 
00054 #endif // QTMGUIHELPER_HPP