00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef INSTIGATE_TOOLKIT_QT_GRAPHICS_VIEW
00011 #define INSTIGATE_TOOLKIT_QT_GRAPHICS_VIEW
00012
00023
00024 #include "window.hpp"
00025
00026
00027
00028
00029 #include <map>
00030
00031
00032 namespace instigate {
00033 namespace toolkit {
00034 class qt_graphics_view;
00035 }
00036 }
00037
00039 class instigate::toolkit::qt_graphics_view : public QGraphicsView
00040 {
00041 private:
00042 typedef std::map<std::string, window::callback*> callbaks;
00043 callbaks m_callbacks;
00044 std::string m_name;
00045 toolkit::window* m_window;
00046 public:
00047 void set_callback(const std::string& s, window::callback* c) throw();
00048
00049 void notify(const std::string& s, QEvent*) throw();
00050
00051 void set_key_state(QMouseEvent* e) throw();
00052
00053 void mousePressEvent(QMouseEvent* e) throw();
00054
00055 void mouseReleaseEvent(QMouseEvent* e) throw();
00056
00057 void mouseMoveEvent(QMouseEvent* e) throw();
00058
00059 void mouseDoubleClickEvent(QMouseEvent* e) throw();
00060
00061 qt_graphics_view(const std::string& n, toolkit::window* w,
00062 QGraphicsScene* s, QWidget* p = 0) throw();
00063 };
00064
00065
00066
00067
00068 #endif // INSTIGATE_TOOLKIT_QT_GRAPHICS_VIEW