00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef _WINDOW_H_
00021 #define _WINDOW_H_
00022
00025
00026 #include <boost\utility.hpp>
00027
00028 #include <QtCore\QVariant>
00029 #include <QtGui\QAction>
00030 #include <QtGui\QApplication>
00031 #include <QtGui\QButtonGroup>
00032 #include <QtGui\QFrame>
00033 #include <QtGui\QGroupBox>
00034 #include <QtGui\QHBoxLayout>
00035 #include <QtGui\QHeaderView>
00036 #include <QtGui\QLabel>
00037 #include <QtGui\QTabWidget>
00038 #include <QtGui\QWidget>
00039 #include <QtGui\QtEvents>
00040
00041 #include "ITab.h"
00042 #include "IWindowListener.h"
00043 #include "UserEventQueue.h"
00044 #include "MouseState.h"
00045
00046 namespace TestFrameWork
00047 {
00048
00049 class Window :
00050 public QWidget, boost::noncopyable
00051 {
00052 public:
00053 Window(const std::wstring windowTitle, ITabVector tabs, IWindowListener* listener,
00054 UserEventQueue& eventQueue);
00055
00056 ~Window(void);
00057
00058 HDC GetRenderCanvasContext(void) const;
00059
00060 size_t GetWidth(void) const;
00061
00062 size_t GetHeight(void) const;
00063
00064 protected:
00065 void closeEvent(QCloseEvent* event);
00066
00067 void mouseMoveEvent(QMouseEvent* event);
00068
00069 void wheelEvent(QWheelEvent* event);
00070
00071 private:
00072 ITabVector m_tabs;
00073
00074 IWindowListener* m_listener;
00075
00076 UserEventQueue& m_eventQueue;
00077
00078 HDC m_renderCanvasContext;
00079
00080 MouseState m_mouseState;
00081
00082 void CreateUI(const std::wstring& windowTitle);
00083
00084 void AddSettingsTabs(QTabWidget* tabWidget);
00085
00086 void UpdateMouseState(QMouseEvent* event);
00087
00088 void UpdateMouseState(QWheelEvent* event);
00089 };
00090
00091 typedef boost::shared_ptr<Window> WindowPtr;
00092 }
00093
00094 #endif