QGIS API Documentation  3.26.3-Buenos Aires (65e4edfdad)
qgslayoutshapewidget.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgslayoutshapewidget.h
3  ------------------------
4  begin : November 2009
5  copyright : (C) 2009 by Marco Hugentobler
6  email : [email protected]
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
18 #ifndef QGSLAYOUTSHAPEWIDGET_H
19 #define QGSLAYOUTSHAPEWIDGET_H
20 
21 // We don't want to expose this in the public API
22 #define SIP_NO_FILE
23 
24 #include "qgis_gui.h"
25 #include "ui_qgslayoutshapewidgetbase.h"
26 #include "qgslayoutitemwidget.h"
27 #include "qgslayoutitemshape.h"
28 
36 class GUI_EXPORT QgsLayoutShapeWidget: public QgsLayoutItemBaseWidget, private Ui::QgsLayoutShapeWidgetBase
37 {
38  Q_OBJECT
39  public:
41  explicit QgsLayoutShapeWidget( QgsLayoutItemShape *shape );
42  void setMasterLayout( QgsMasterLayoutInterface *masterLayout ) override;
43 
44  protected:
45 
46  bool setNewItem( QgsLayoutItem *item ) override;
47 
48 
49  private:
50  QPointer< QgsLayoutItemShape > mShape;
51  QgsLayoutItemPropertiesWidget *mItemPropertiesWidget = nullptr;
52 
54  void blockAllSignals( bool block );
55 
56  private slots:
57  void mShapeComboBox_currentIndexChanged( const QString &text );
58  void mCornerRadiusSpinBox_valueChanged( double val );
59  void radiusUnitsChanged();
60  void symbolChanged();
61 
63  void setGuiElementValues();
64 
66  void toggleRadiusSpin( QgsLayoutItemShape::Shape shape );
67 };
68 
69 #endif // QGSLAYOUTSHAPEWIDGET_H
QgsLayoutItemShape
Layout item for basic filled shapes (e.g. rectangles, ellipses).
Definition: qgslayoutitemshape.h:31
QgsLayoutItemPropertiesWidget
A widget for controlling the common properties of layout items (e.g. position and size,...
Definition: qgslayoutitemwidget.h:217
qgslayoutitemwidget.h
QgsLayoutShapeWidget
A widget for configuring layout shape items.
Definition: qgslayoutshapewidget.h:36
QgsLayoutItem
Base class for graphical items within a QgsLayout.
Definition: qgslayoutitem.h:112
QgsLayoutItemBaseWidget
A base class for property widgets for layout items. All layout item widgets should inherit from this ...
Definition: qgslayoutitemwidget.h:122
QgsLayoutItemBaseWidget::setNewItem
virtual bool setNewItem(QgsLayoutItem *item)
Attempts to update the widget to show the properties for the specified item.
Definition: qgslayoutitemwidget.cpp:261
QgsLayoutItemBaseWidget::setMasterLayout
virtual void setMasterLayout(QgsMasterLayoutInterface *masterLayout)
Sets the master layout associated with the item.
Definition: qgslayoutitemwidget.cpp:241
qgslayoutitemshape.h
QgsLayoutItemShape::Shape
Shape
Shape type.
Definition: qgslayoutitemshape.h:38
QgsMasterLayoutInterface
Interface for master layout type objects, such as print layouts and reports.
Definition: qgsmasterlayoutinterface.h:42