Mercurial > octave
comparison libgui/graphics/Figure.h @ 25929:ea5182364e5f
Implement "resize" property for Qt figures (bug #54774)
* Figure.h/cc (Figure::m_resizable): New data member.
(Figure::set_geometry): New private method that allows resizing a figure
even when its size has been fixed.
(Figure::update): Handle the "resize" property. Call QWidget::setSizePolicy
and QWidget::setFixedSize to (dis)allow figure resizing and set m_resizable.
(Figure::Figure, Figure::update, Figure::showFigureToolBar,
Figure::updateFigureHeight, Figure::addCustomToolBar,
Figure::showCustomToolBar): Make use of Figure::set_geometry rather that
directly calling QMainWindow::setGeometry.
* genpropdoc.m: Document the "resize" figure property.
author | Pantxo Diribarne <pantxo.diribarne@gmail.com> |
---|---|
date | Sun, 07 Oct 2018 21:02:07 +0200 |
parents | 6109f302cf43 |
children | 5b5122fea9e9 |
comparison
equal
deleted
inserted
replaced
25928:a533a7c4d2cc | 25929:ea5182364e5f |
---|---|
104 private: | 104 private: |
105 void createFigureToolBarAndMenuBar (void); | 105 void createFigureToolBarAndMenuBar (void); |
106 void showFigureToolBar (bool visible); | 106 void showFigureToolBar (bool visible); |
107 void addCustomToolBar (QToolBar *bar, bool visible); | 107 void addCustomToolBar (QToolBar *bar, bool visible); |
108 void showCustomToolBar (QToolBar *bar, bool visible); | 108 void showCustomToolBar (QToolBar *bar, bool visible); |
109 | |
110 void updateFigureToolBarAndMenuBar (void); | 109 void updateFigureToolBarAndMenuBar (void); |
110 void set_geometry (QRect r); | |
111 | 111 |
112 static void updateBoundingBoxHelper (void*); | 112 static void updateBoundingBoxHelper (void*); |
113 | 113 |
114 void close_figure_callback (void); | 114 void close_figure_callback (void); |
115 | 115 |
139 QStatusBar *m_statusBar; | 139 QStatusBar *m_statusBar; |
140 QRect m_innerRect; | 140 QRect m_innerRect; |
141 QRect m_outerRect; | 141 QRect m_outerRect; |
142 MouseModeActionGroup *m_mouseModeGroup; | 142 MouseModeActionGroup *m_mouseModeGroup; |
143 int m_previousHeight; | 143 int m_previousHeight; |
144 bool m_resizable; | |
144 }; | 145 }; |
145 | 146 |
146 } | 147 } |
147 | 148 |
148 #endif | 149 #endif |