QtMainWindow.h
Go to the documentation of this file.
1 // ****************************************************************************
2 // Filename: QtMainWindow.h
3 // Author: Florian Hecht
4 // Date: 2008
5 // ****************************************************************************
6 
7 
8 #ifndef _QT_MAIN_WINDOW_H_
9 #define _QT_MAIN_WINDOW_H_
10 
11 
12 // ****************************************************************************
13 // Includes
14 // ****************************************************************************
15 
17 #include <qwidget.h>
18 #include <vector>
19 
20 
21 // ****************************************************************************
22 // Forward declarations
23 // ****************************************************************************
24 
26 
27 
28 
29 // ****************************************************************************
30 // CQtMainWindow
31 // ****************************************************************************
32 
33 class CQtMainWindow : public QWidget, public CMainWindowInterface
34 {
35 public:
36  CQtMainWindow(int x, int y, int width, int height, const char *title);
37  CQtMainWindow(int x, int y, int width, int height, QWidget *pParent);
39 
40  // create widgets
41  WIDGET_HANDLE AddImage(int x, int y, int width, int height, WIDGET_HANDLE parent = 0);
42  WIDGET_HANDLE AddButton(int x, int y, int width, int height, const char *text, WIDGET_HANDLE parent = 0);
43  WIDGET_HANDLE AddLabel(int x, int y, int width, int height, const char *text, WIDGET_HANDLE parent = 0);
44  WIDGET_HANDLE AddCheckBox(int x, int y, int width, int height, const char *text, bool checked, WIDGET_HANDLE parent = 0);
45  WIDGET_HANDLE AddTextEdit(int x, int y, int width, int height, const char *text, WIDGET_HANDLE parent = 0);
46  WIDGET_HANDLE AddSlider(int x, int y, int width, int height, int min_value, int max_value, int step, int value, WIDGET_HANDLE parent = 0);
47  WIDGET_HANDLE AddComboBox(int x, int y, int width, int height, int num_entries, const char **entries, int current_entry, WIDGET_HANDLE parent = 0);
48  WIDGET_HANDLE AddGLWidget(int x, int y, int width, int height, WIDGET_HANDLE parent = 0);
49 
50  // access to widget attributes
51  bool GetText(WIDGET_HANDLE widget, char *text, int len);
52  bool SetText(WIDGET_HANDLE widget, const char *text);
53 
54  bool SetImage(WIDGET_HANDLE widget, const CByteImage *pImage);
55 
56  bool GetValue(WIDGET_HANDLE widget, int &value);
57  bool SetValue(WIDGET_HANDLE widget, int value);
58 
61 
62  // window control
63  void Show(WIDGET_HANDLE widget = 0);
64  void Hide(WIDGET_HANDLE widget = 0);
65 
66  int GetModifierKeyState();
67 
69 
70 
72 
73 protected:
74  void closeEvent(QCloseEvent *e);
75 
76 private:
77 
79 
80  std::vector<CQtMainWindowWidget*> m_widgets;
81 
82  static int m_ref_count;
83 };
84 
85 
86 
87 #endif /* _QT_MAIN_WINDOW_H_ */
void Show(WIDGET_HANDLE widget=0)
WIDGET_HANDLE AddCheckBox(int x, int y, int width, int height, const char *text, bool checked, WIDGET_HANDLE parent=0)
static int m_ref_count
Definition: QtMainWindow.h:82
CMainWindowEventInterface * m_event_callback
Definition: QtMainWindow.h:78
WIDGET_HANDLE AddTextEdit(int x, int y, int width, int height, const char *text, WIDGET_HANDLE parent=0)
WIDGET_HANDLE AddButton(int x, int y, int width, int height, const char *text, WIDGET_HANDLE parent=0)
bool SwapBuffersGLWidget(WIDGET_HANDLE widget)
void Hide(WIDGET_HANDLE widget=0)
CMainWindowEventInterface * GetEventCallback()
Definition: QtMainWindow.h:71
Data structure for the representation of 8-bit grayscale images and 24-bit RGB (or HSV) color images ...
Definition: ByteImage.h:80
CQtMainWindow(int x, int y, int width, int height, const char *title)
GLenum GLsizei len
Definition: glext.h:3940
WIDGET_HANDLE AddSlider(int x, int y, int width, int height, int min_value, int max_value, int step, int value, WIDGET_HANDLE parent=0)
bool SetImage(WIDGET_HANDLE widget, const CByteImage *pImage)
WIDGET_HANDLE AddLabel(int x, int y, int width, int height, const char *text, WIDGET_HANDLE parent=0)
std::vector< CQtMainWindowWidget * > m_widgets
Definition: QtMainWindow.h:80
WIDGET_HANDLE AddImage(int x, int y, int width, int height, WIDGET_HANDLE parent=0)
GLenum GLint x
Definition: glext.h:3125
int GetModifierKeyState()
void * WIDGET_HANDLE
GLsizei const GLfloat * value
Definition: glext.h:3538
bool SetValue(WIDGET_HANDLE widget, int value)
Interface for the creation of GUIs with the GUI toolkit of the IVT.
GLenum GLsizei width
Definition: glext.h:3122
void SetEventCallback(CMainWindowEventInterface *callback)
Definition: QtMainWindow.h:68
GLenum GLsizei GLsizei height
Definition: glext.h:3132
bool GetText(WIDGET_HANDLE widget, char *text, int len)
GLenum GLint GLint y
Definition: glext.h:3125
void closeEvent(QCloseEvent *e)
WIDGET_HANDLE AddComboBox(int x, int y, int width, int height, int num_entries, const char **entries, int current_entry, WIDGET_HANDLE parent=0)
bool SetText(WIDGET_HANDLE widget, const char *text)
bool MakeCurrentGLWidget(WIDGET_HANDLE widget)
bool GetValue(WIDGET_HANDLE widget, int &value)
Interface for the event mechanism of GUIs using the GUI toolkit of the IVT.
static void callback(IplImage *pIplImage)
WIDGET_HANDLE AddGLWidget(int x, int y, int width, int height, WIDGET_HANDLE parent=0)


asr_ivt
Author(s): Allgeyer Tobias, Hutmacher Robin, Kleinert Daniel, Meißner Pascal, Scholz Jonas, Stöckle Patrick
autogenerated on Mon Dec 2 2019 03:47:28