Mercurial > octave-nkf
diff libgui/graphics/Figure.h @ 20305:062422f2e399
Show axes coordinates in Qt figures (bug #44959)
* Canvas.h: new private bool member m_updtaCurrentPoint, to decide wether update the figure "currentpoint" property
* Canvas.h (Canvas::enableCurrentPointUpdates): new method to set m_updtaCurrentPoint
* Canvas.cc (Canvas::canvasMousePressEvent): move the code for axes/object selection in a dedicated method and call this method (select_object) instead.
* Canvas.cc (Canvas::select_object): new method for axes/object selection.
* Canvas.cc (Canvas::canvasMouseMoveEvent): update the parent figure status bar with the hovered axes coordinates
* Figure.h: declare new method updateStatusBar
* Figure.h: declare new private QStatusBar member m_statusBar. Include QStatusBar.h
* Figure.cc (Figure::Figure): unconditionally enable mouse traching
* Figure.cc (Figure::Figure): add status below of the canvas
* Figure.cc (Figure::update): take status bar into account when updating the figure position
* Figure.cc (Figure::update): remove some of the leftover debug comments
* Figure.cc: define new method updateStatusBar
author | Pantxo Diribarne <pantxo.diribarne@gmail.com> |
---|---|
date | Sat, 13 Jun 2015 13:27:01 +0200 |
parents | 27c0285828f8 |
children | 46edfbd31ad7 |
line wrap: on
line diff
--- a/libgui/graphics/Figure.h Sat Jun 20 16:00:50 2015 -0700 +++ b/libgui/graphics/Figure.h Sat Jun 13 13:27:01 2015 +0200 @@ -24,6 +24,7 @@ #define __QtHandles_Figure__ 1 #include <QRect> +#include <QStatusBar> #include "GenericEventNotify.h" #include "MenuContainer.h" @@ -78,6 +79,7 @@ Container* innerContainer (void); QWidget* menu (void); + void updateStatusBar (ColumnVector pt); bool eventNotifyBefore (QObject* watched, QEvent* event); void eventNotifyAfter (QObject* watched, QEvent* event); @@ -132,6 +134,7 @@ bool m_blockUpdates; QToolBar* m_figureToolBar; MenuBar* m_menuBar; + QStatusBar* m_statusBar; QRect m_innerRect; QRect m_outerRect; MouseModeActionGroup* m_mouseModeGroup;