gwenhywfar  5.10.1
qt5_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  (C) 2016 by Christian David
5  email : martin@libchipcard.de
6  christian-david@web.de
7 
8  ***************************************************************************
9  * Please see toplevel file COPYING for license details *
10  ***************************************************************************/
11 
12 #ifndef QT5_DIALOG_HPP
13 #define QT5_DIALOG_HPP
14 
15 #include <list>
16 #include <string>
17 
18 #include <QObject>
19 
20 #include <gwen-gui-cpp/cppdialog.hpp>
21 #include "qt5_gui.hpp"
22 
23 #include <gwenhywfar/dialog_be.h>
24 #include <gwenhywfar/widget_be.h>
25 
26 class QT5_DialogBox;
27 
28 #define QT5_DIALOG_WIDGET_REAL 0
29 #define QT5_DIALOG_WIDGET_CONTENT 1
30 #define QT5_DIALOG_WIDGET_LAYOUT 2
31 
32 
34 public:
35  QT5_GuiDialog(QT5_Gui *gui, GWEN_DIALOG *dlg);
36  virtual ~QT5_GuiDialog();
37 
38  static QT5_GuiDialog *getDialog(GWEN_DIALOG *dlg);
39 
40  bool setup(QWidget *parentWindow);
41 
42  int execute();
43 
44  int openDialog();
45  int closeDialog();
46  int runDialog(bool untilEnd);
47 
48  QT5_DialogBox *getMainWindow() { return _mainWidget;};
49 
50 protected:
51  QT5_Gui *_gui;
54 
55  int setupTree(GWEN_WIDGET *w);
56 
57  virtual int setIntProperty(GWEN_WIDGET *w,
59  int index,
60  int value,
61  int doSignal);
62 
63  virtual int getIntProperty(GWEN_WIDGET *w,
65  int index,
66  int defaultValue);
67 
68  virtual int setCharProperty(GWEN_WIDGET *w,
70  int index,
71  const char *value,
72  int doSignal);
73 
74  virtual const char *getCharProperty(GWEN_WIDGET *w,
76  int index,
77  const char *defaultValue);
78 
79 };
80 
81 #endif
virtual int setIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, int value, int doSignal)
Definition: cppdialog.cpp:168
GWEN_DIALOG_PROPERTY
Definition: dialog.h:260
A C++ binding for the C module GWEN_DIALOG.
Definition: cppdialog.hpp:32
struct GWEN_DIALOG GWEN_DIALOG
Definition: dialog.h:54
QT5_DialogBox * _mainWidget
#define QT5GUI_API
Definition: qt5_gui.hpp:24
struct GWEN_WIDGET GWEN_WIDGET
Definition: widget_be.h:34
virtual int getIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, int defaultValue)
Definition: cppdialog.cpp:181
QT5_DialogBox * getMainWindow()
virtual const char * getCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, const char *defaultValue)
Definition: cppdialog.cpp:206
virtual int setCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, const char *value, int doSignal)
Definition: cppdialog.cpp:193
static CPPGUI_API CppDialog * getDialog(GWEN_DIALOG *dlg)
Definition: cppdialog.cpp:146