gwenhywfar  4.6.0beta
qt4_gui_dialog.hpp
Go to the documentation of this file.
1 /***************************************************************************
2  begin : Mon Feb 15 2010
3  copyright : (C) 2010 by Martin Preuss
4  email : martin@libchipcard.de
5 
6  ***************************************************************************
7  * Please see toplevel file COPYING for license details *
8  ***************************************************************************/
9 
10 #ifndef QT4_DIALOG_HPP
11 #define QT4_DIALOG_HPP
12 
13 #include <gwen-gui-cpp/cppdialog.hpp>
14 #include "qt4_gui.hpp"
15 
16 #include <gwenhywfar/dialog_be.h>
17 #include <gwenhywfar/widget_be.h>
18 
19 #include <QObject>
20 
21 
22 #include <list>
23 #include <string>
24 
25 
26 class QT4_DialogBox;
27 
28 
29 #define QT4_DIALOG_WIDGET_REAL 0
30 #define QT4_DIALOG_WIDGET_CONTENT 1
31 #define QT4_DIALOG_WIDGET_LAYOUT 2
32 
33 
34 
35 class QT4_GuiDialog: public CppDialog {
36 public:
37  QT4_GuiDialog(QT4_Gui *gui, GWEN_DIALOG *dlg);
38  virtual ~QT4_GuiDialog();
39 
40  static QT4_GuiDialog *getDialog(GWEN_DIALOG *dlg);
41 
42  bool setup(QWidget *parentWindow);
43 
44  int execute();
45 
46  int openDialog();
47  int closeDialog();
48  int runDialog(bool untilEnd);
49 
51 
52 protected:
53  QT4_Gui *_gui;
56 
57  int setupTree(GWEN_WIDGET *w);
58 
59  virtual int setIntProperty(GWEN_WIDGET *w,
61  int index,
62  int value,
63  int doSignal);
64 
65  virtual int getIntProperty(GWEN_WIDGET *w,
67  int index,
68  int defaultValue);
69 
70  virtual int setCharProperty(GWEN_WIDGET *w,
72  int index,
73  const char *value,
74  int doSignal);
75 
76  virtual const char *getCharProperty(GWEN_WIDGET *w,
78  int index,
79  const char *defaultValue);
80 
81 };
82 
83 
84 
85 
86 #endif /* FG_DIALOG_L_HPP */
87 
88