00001 #ifndef _M_GUIDRIVER_HH_ 00002 #define _M_GUIDRIVER_HH_ 00003 00034 #include "QDriver.hh" 00035 #include <stdarg.h> 00036 #include "QGDInclude.hh" 00037 00038 class TSocket; 00039 namespace Cuore {class QRunData;} 00040 00041 class MGuiDriver : public QDriver { 00042 00043 public: 00045 MGuiDriver(QSequence* s); 00046 00048 ~MGuiDriver(); 00049 00051 Action Init(); 00052 00054 Action Do(QEvent* ev); 00055 00057 Action Done(); 00058 private: 00059 enum MenuLevel { 00060 ML_Init = 0, 00061 ML_Do, 00062 ML_Done, 00063 }; 00064 00066 Action Menu(MenuLevel level); 00067 00069 Action HandleCommand(QGDCommand cmd); 00070 00072 QGDCommand GetCommand(MenuLevel level); 00073 00075 void SendCommands(MenuLevel level); 00076 00078 void ListModules(); 00079 00081 void ListModuleParameters(int modIndex); 00082 00084 void ChangeModuleParameter(int modIndex, const QVdt& val); 00085 00087 void SendData(const std::string& type); 00088 00090 void SendTObject(const TObject& obj); 00091 00092 TSocket* fSocket; 00093 QEvent* fCurrentEvent; 00094 QRunData* fRunData; 00095 }; 00096 00097 #endif 00098