QtMainWindow.h
Go to the documentation of this file.
00001 // ****************************************************************************
00002 // Filename:  QtMainWindow.h
00003 // Author:    Florian Hecht
00004 // Date:      2008
00005 // ****************************************************************************
00006 
00007 
00008 #ifndef _QT_MAIN_WINDOW_H_
00009 #define _QT_MAIN_WINDOW_H_
00010 
00011 
00012 // ****************************************************************************
00013 // Includes
00014 // ****************************************************************************
00015 
00016 #include "Interfaces/MainWindowInterface.h"
00017 #include <qwidget.h>
00018 #include <vector>
00019 
00020 
00021 // ****************************************************************************
00022 // Forward declarations
00023 // ****************************************************************************
00024 
00025 class CQtMainWindowWidget;
00026 
00027 
00028 
00029 // ****************************************************************************
00030 // CQtMainWindow
00031 // ****************************************************************************
00032 
00033 class CQtMainWindow : public QWidget, public CMainWindowInterface
00034 {
00035 public:
00036         CQtMainWindow(int x, int y, int width, int height, const char *title);
00037         CQtMainWindow(int x, int y, int width, int height, QWidget *pParent);
00038         ~CQtMainWindow();
00039 
00040         // create widgets
00041         WIDGET_HANDLE AddImage(int x, int y, int width, int height, WIDGET_HANDLE parent = 0);
00042         WIDGET_HANDLE AddButton(int x, int y, int width, int height, const char *text, WIDGET_HANDLE parent = 0);
00043         WIDGET_HANDLE AddLabel(int x, int y, int width, int height, const char *text, WIDGET_HANDLE parent = 0);
00044         WIDGET_HANDLE AddCheckBox(int x, int y, int width, int height, const char *text, bool checked, WIDGET_HANDLE parent = 0);
00045         WIDGET_HANDLE AddTextEdit(int x, int y, int width, int height, const char *text, WIDGET_HANDLE parent = 0);
00046         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);
00047         WIDGET_HANDLE AddComboBox(int x, int y, int width, int height, int num_entries, const char **entries, int current_entry, WIDGET_HANDLE parent = 0);
00048         WIDGET_HANDLE AddGLWidget(int x, int y, int width, int height, WIDGET_HANDLE parent = 0);
00049 
00050         // access to widget attributes
00051         bool GetText(WIDGET_HANDLE widget, char *text, int len);
00052         bool SetText(WIDGET_HANDLE widget, const char *text);
00053 
00054         bool SetImage(WIDGET_HANDLE widget, const CByteImage *pImage);
00055 
00056         bool GetValue(WIDGET_HANDLE widget, int &value);
00057         bool SetValue(WIDGET_HANDLE widget, int value);
00058         
00059         bool SwapBuffersGLWidget(WIDGET_HANDLE widget);
00060         bool MakeCurrentGLWidget(WIDGET_HANDLE widget);
00061 
00062         // window control
00063         void Show(WIDGET_HANDLE widget = 0);
00064         void Hide(WIDGET_HANDLE widget = 0);
00065         
00066         int GetModifierKeyState();
00067 
00068         void SetEventCallback(CMainWindowEventInterface *callback) {m_event_callback = callback;}
00069         
00070         
00071         CMainWindowEventInterface *GetEventCallback() { return m_event_callback; }
00072 
00073 protected:
00074         void closeEvent(QCloseEvent *e);
00075 
00076 private:
00077 
00078         CMainWindowEventInterface *m_event_callback;
00079 
00080         std::vector<CQtMainWindowWidget*> m_widgets;
00081 
00082         static int m_ref_count;
00083 };
00084 
00085 
00086 
00087 #endif /* _QT_MAIN_WINDOW_H_ */


asr_ivt
Author(s): Allgeyer Tobias, Hutmacher Robin, Kleinert Daniel, Meißner Pascal, Scholz Jonas, Stöckle Patrick
autogenerated on Thu Jun 6 2019 21:46:58