gwenhywfar
4.3.3
|
00001 /*************************************************************************** 00002 begin : Mon Feb 15 2010 00003 copyright : (C) 2010 by Martin Preuss 00004 email : martin@libchipcard.de 00005 00006 *************************************************************************** 00007 * Please see toplevel file COPYING for license details * 00008 ***************************************************************************/ 00009 00010 #ifndef QT4_DIALOG_HPP 00011 #define QT4_DIALOG_HPP 00012 00013 #include <gwen-gui-cpp/cppdialog.hpp> 00014 #include "qt4_gui.hpp" 00015 00016 #include <gwenhywfar/dialog_be.h> 00017 #include <gwenhywfar/widget_be.h> 00018 00019 #include <QObject> 00020 00021 00022 #include <list> 00023 #include <string> 00024 00025 00026 class QT4_DialogBox; 00027 00028 00029 #define QT4_DIALOG_WIDGET_REAL 0 00030 #define QT4_DIALOG_WIDGET_CONTENT 1 00031 #define QT4_DIALOG_WIDGET_LAYOUT 2 00032 00033 00034 00035 class QT4_GuiDialog: public CppDialog { 00036 public: 00037 QT4_GuiDialog(QT4_Gui *gui, GWEN_DIALOG *dlg); 00038 virtual ~QT4_GuiDialog(); 00039 00040 static QT4_GuiDialog *getDialog(GWEN_DIALOG *dlg); 00041 00042 bool setup(QWidget *parentWindow); 00043 00044 int execute(); 00045 00046 int openDialog(); 00047 int closeDialog(); 00048 int runDialog(bool untilEnd); 00049 00050 QT4_DialogBox *getMainWindow() { return _mainWidget;}; 00051 00052 protected: 00053 QT4_Gui *_gui; 00054 int _widgetCount; 00055 QT4_DialogBox *_mainWidget; 00056 00057 int setupTree(GWEN_WIDGET *w); 00058 00059 virtual int setIntProperty(GWEN_WIDGET *w, 00060 GWEN_DIALOG_PROPERTY prop, 00061 int index, 00062 int value, 00063 int doSignal); 00064 00065 virtual int getIntProperty(GWEN_WIDGET *w, 00066 GWEN_DIALOG_PROPERTY prop, 00067 int index, 00068 int defaultValue); 00069 00070 virtual int setCharProperty(GWEN_WIDGET *w, 00071 GWEN_DIALOG_PROPERTY prop, 00072 int index, 00073 const char *value, 00074 int doSignal); 00075 00076 virtual const char *getCharProperty(GWEN_WIDGET *w, 00077 GWEN_DIALOG_PROPERTY prop, 00078 int index, 00079 const char *defaultValue); 00080 00081 }; 00082 00083 00084 00085 00086 #endif /* FG_DIALOG_L_HPP */ 00087 00088