Mercurial > octave-nkf
diff libgui/graphics/Canvas.h @ 19905:815db217f6f4
provide autoscale option for Qt plotting (bug #44307)
* Canvas.h, Canvas.cc (Canvas::autoAxes): New pure virtual function.
(Canvas::canvasAutoAxes): New function.
(autoscale_axes): New static function.
(Canvas::canvasMouseDoubleClickEvent, Canvas::canvasMousePressEvent):
Use it.
* Figure.h, Figure.cc (Figure::createFigureToolBarAndMenuBar):
Add autoscale button to window.
(Figure::autoAxes): New function.
* GLCanvas.h, GLCanvas.cc (GLCanvas::autoAxes): New function.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Fri, 27 Feb 2015 11:24:12 -0500 |
parents | 35bca657d74d |
children | f0e61a67ad9f |
line wrap: on
line diff
--- a/libgui/graphics/Canvas.h Thu Feb 26 18:57:58 2015 -0600 +++ b/libgui/graphics/Canvas.h Fri Feb 27 11:24:12 2015 -0500 @@ -67,6 +67,7 @@ virtual void toggleAxes (const graphics_handle& handle) = 0; virtual void toggleGrid (const graphics_handle& handle) = 0; + virtual void autoAxes (const graphics_handle& handle) = 0; protected: virtual void draw (const graphics_handle& handle) = 0; @@ -85,6 +86,7 @@ void canvasToggleAxes (const graphics_handle& handle); void canvasToggleGrid (const graphics_handle& handle); + void canvasAutoAxes (const graphics_handle& handle); void canvasPaintEvent (void); void canvasMouseDoubleClickEvent (QMouseEvent* event); void canvasMouseMoveEvent (QMouseEvent* event);