diff 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
line wrap: on
line diff
--- a/libgui/graphics/Figure.h	Fri Oct 12 10:11:24 2018 +0200
+++ b/libgui/graphics/Figure.h	Sun Oct 07 21:02:07 2018 +0200
@@ -106,8 +106,8 @@
     void showFigureToolBar (bool visible);
     void addCustomToolBar (QToolBar *bar, bool visible);
     void showCustomToolBar (QToolBar *bar, bool visible);
-
     void updateFigureToolBarAndMenuBar (void);
+    void set_geometry (QRect r);
 
     static void updateBoundingBoxHelper (void*);
 
@@ -141,6 +141,7 @@
     QRect m_outerRect;
     MouseModeActionGroup *m_mouseModeGroup;
     int m_previousHeight;
+    bool m_resizable;
   };
 
 }