Mercurial > octave-nkf
comparison 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 |
comparison
equal
deleted
inserted
replaced
20302:ce8fda51d236 | 20305:062422f2e399 |
---|---|
22 | 22 |
23 #ifndef __QtHandles_Figure__ | 23 #ifndef __QtHandles_Figure__ |
24 #define __QtHandles_Figure__ 1 | 24 #define __QtHandles_Figure__ 1 |
25 | 25 |
26 #include <QRect> | 26 #include <QRect> |
27 #include <QStatusBar> | |
27 | 28 |
28 #include "GenericEventNotify.h" | 29 #include "GenericEventNotify.h" |
29 #include "MenuContainer.h" | 30 #include "MenuContainer.h" |
30 #include "Object.h" | 31 #include "Object.h" |
31 | 32 |
76 | 77 |
77 MouseMode mouseMode (void); | 78 MouseMode mouseMode (void); |
78 | 79 |
79 Container* innerContainer (void); | 80 Container* innerContainer (void); |
80 QWidget* menu (void); | 81 QWidget* menu (void); |
82 void updateStatusBar (ColumnVector pt); | |
81 | 83 |
82 bool eventNotifyBefore (QObject* watched, QEvent* event); | 84 bool eventNotifyBefore (QObject* watched, QEvent* event); |
83 void eventNotifyAfter (QObject* watched, QEvent* event); | 85 void eventNotifyAfter (QObject* watched, QEvent* event); |
84 | 86 |
85 protected: | 87 protected: |
130 private: | 132 private: |
131 Container* m_container; | 133 Container* m_container; |
132 bool m_blockUpdates; | 134 bool m_blockUpdates; |
133 QToolBar* m_figureToolBar; | 135 QToolBar* m_figureToolBar; |
134 MenuBar* m_menuBar; | 136 MenuBar* m_menuBar; |
137 QStatusBar* m_statusBar; | |
135 QRect m_innerRect; | 138 QRect m_innerRect; |
136 QRect m_outerRect; | 139 QRect m_outerRect; |
137 MouseModeActionGroup* m_mouseModeGroup; | 140 MouseModeActionGroup* m_mouseModeGroup; |
138 }; | 141 }; |
139 | 142 |