41 #if defined (Q_OS_WIN32)
42 :
QGLWidget (QGLFormat (QGL::SampleBuffers | QGL::IndirectRendering),
48 setFocusPolicy (Qt::ClickFocus);
65 r.set_viewport (width (), height ());
97 s.set_viewport (width (), height ());
98 return s.
select (ax, pt.x (), height () - pt.y ());
107 glVertex2d (p1.x (), p1.y ());
108 glVertex2d (p2.x (), p1.y ());
109 glVertex2d (p2.x (), p2.y ());
110 glVertex2d (p1.x (), p2.y ());
111 glVertex2d (p1.x (), p1.y ());
119 glMatrixMode (GL_MODELVIEW);
122 glMatrixMode (GL_PROJECTION);
124 glOrtho (0, width (), height (), 0, 1, -1);
126 glPushAttrib (GL_DEPTH_BUFFER_BIT | GL_CURRENT_BIT);
127 glDisable (GL_DEPTH_TEST);
129 glBegin (GL_POLYGON);
130 glColor4f (0.45, 0.62, 0.81, 0.1);
134 glBegin (GL_LINE_STRIP);
136 glColor4f (0.45, 0.62, 0.81, 0.9);
184 QGLWidget::keyPressEvent (xevent);
191 QGLWidget::keyReleaseEvent (xevent);
void autoAxes(const graphics_handle &handle)
void mouseDoubleClickEvent(QMouseEvent *event)
graphics_object selectFromAxes(const graphics_object &ax, const QPoint &pt)
GLCanvas(QWidget *parent, const graphics_handle &handle)
void wheelEvent(QWheelEvent *event)
void mouseMoveEvent(QMouseEvent *event)
void canvasToggleGrid(const graphics_handle &handle)
void canvasMouseDoubleClickEvent(QMouseEvent *event)
void draw(const graphics_handle &handle)
void keyReleaseEvent(QKeyEvent *event)
void toggleAxes(const graphics_handle &handle)
void canvasToggleAxes(const graphics_handle &handle)
void glDrawZoomBox(const QPoint &p1, const QPoint &p2)
void canvasMousePressEvent(QMouseEvent *event)
void canvasWheelEvent(QWheelEvent *event)
bool canvasKeyPressEvent(QKeyEvent *event)
void canvasMouseMoveEvent(QMouseEvent *event)
void canvasAutoAxes(const graphics_handle &handle)
void canvasPaintEvent(void)
void canvasMouseReleaseEvent(QMouseEvent *event)
bool canvasKeyReleaseEvent(QKeyEvent *event)
void toggleGrid(const graphics_handle &handle)
void mousePressEvent(QMouseEvent *event)
void drawZoomBox(const QPoint &p1, const QPoint &p2)
static graphics_object get_object(double val)
void mouseReleaseEvent(QMouseEvent *event)
void keyPressEvent(QKeyEvent *event)
graphics_object select(const graphics_object &ax, int x, int y, int flags=0)