QGIS API Documentation  3.26.3-Buenos Aires (65e4edfdad)
qgslayoutpolylinewidget.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgslayoutpolylinewidget.h
3  begin : March 2016
4  copyright : (C) 2016 Paul Blottiere, Oslandia
5  email : paul dot blottiere at oslandia dot com
6  ***************************************************************************/
7 
8 /***************************************************************************
9  * *
10  * This program is free software; you can redistribute it and/or modify *
11  * it under the terms of the GNU General Public License as published by *
12  * the Free Software Foundation; either version 2 of the License, or *
13  * (at your option) any later version. *
14  * *
15  ***************************************************************************/
16 
17 #ifndef QGSLAYOUTPOLYLINEWIDGET_H
18 #define QGSLAYOUTPOLYLINEWIDGET_H
19 
20 // We don't want to expose this in the public API
21 #define SIP_NO_FILE
22 
23 #include "qgis_gui.h"
24 #include "ui_qgslayoutpolylinewidgetbase.h"
25 #include "qgslayoutitemwidget.h"
26 #include "qgslayoutitempolyline.h"
27 
35 class GUI_EXPORT QgsLayoutPolylineWidget: public QgsLayoutItemBaseWidget, private Ui::QgsLayoutPolylineWidgetBase
36 {
37  Q_OBJECT
38  public:
40  explicit QgsLayoutPolylineWidget( QgsLayoutItemPolyline *polyline );
41  void setMasterLayout( QgsMasterLayoutInterface *masterLayout ) override;
42 
43  protected:
44 
45  bool setNewItem( QgsLayoutItem *item ) override;
46 
47  private:
48  QPointer< QgsLayoutItemPolyline > mPolyline;
49  QgsLayoutItemPropertiesWidget *mItemPropertiesWidget = nullptr;
50 
51  void enableStartSvgInputElements( bool enable );
52  void enableEndSvgInputElements( bool enable );
53 
54  private slots:
55 
57  void setGuiElementValues();
58 
59  void symbolChanged();
60  void arrowStrokeWidthChanged( double d );
61  void arrowHeadWidthChanged( double d );
62  void arrowHeadFillColorChanged( const QColor &newColor );
63  void arrowHeadStrokeColorChanged( const QColor &newColor );
64  void startArrowHeadToggled( bool toggled );
65  void endArrowHeadToggled( bool toggled );
66  void startNoMarkerToggled( bool toggled );
67  void endNoMarkerToggled( bool toggled );
68  void startSvgMarkerToggled( bool toggled );
69  void endSvgMarkerToggled( bool toggled );
70  void mStartMarkerLineEdit_textChanged( const QString &text );
71  void mEndMarkerLineEdit_textChanged( const QString &text );
72  void mStartMarkerToolButton_clicked();
73  void mEndMarkerToolButton_clicked();
74 };
75 
76 #endif // QGSLAYOUTPOLYLINEWIDGET_H
QgsLayoutItemPolyline
Layout item for node based polyline shapes.
Definition: qgslayoutitempolyline.h:33
QgsLayoutItemPropertiesWidget
A widget for controlling the common properties of layout items (e.g. position and size,...
Definition: qgslayoutitemwidget.h:217
qgslayoutitemwidget.h
QgsLayoutPolylineWidget
Input widget for QgsLayoutItemPolyline.
Definition: qgslayoutpolylinewidget.h:35
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
qgslayoutitempolyline.h
QgsMasterLayoutInterface
Interface for master layout type objects, such as print layouts and reports.
Definition: qgsmasterlayoutinterface.h:42