QGIS API Documentation 3.99.0-Master (7d2ca374f2d)
Loading...
Searching...
No Matches
qgslayoutpicturewidget.h
Go to the documentation of this file.
1/***************************************************************************
2 qgslayoutpicturewidget.h
3 --------------------------
4 begin : October 2017
5 copyright : (C) 2017 by Nyall Dawson
6 email : nyall dot dawson at gmail dot com
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 QGSLAYOUTPICTUREWIDGET_H
19#define QGSLAYOUTPICTUREWIDGET_H
20
21// We don't want to expose this in the public API
22
23#include "ui_qgslayoutpicturewidgetbase.h"
24
25#include "qgis_gui.h"
26#include "qgslayoutitemwidget.h"
27
28#define SIP_NO_FILE
29
31
39class GUI_EXPORT QgsLayoutPictureWidget : public QgsLayoutItemBaseWidget, private Ui::QgsLayoutPictureWidgetBase
40{
41 Q_OBJECT
42
43 public:
46 void setMasterLayout( QgsMasterLayoutInterface *masterLayout ) override;
47
48 private slots:
49 void mPictureRotationSpinBox_valueChanged( double d );
50 void mRotationFromComposerMapCheckBox_stateChanged( int state );
51 void mapChanged( QgsLayoutItem *item );
52 void mResizeModeComboBox_currentIndexChanged( int index );
53 void mAnchorPointComboBox_currentIndexChanged( int index );
54
55 protected:
56 bool setNewItem( QgsLayoutItem *item ) override;
57
58 protected slots:
61
62 private slots:
64 void setGuiElementValues();
65
67 void setPicRotationSpinValue( double r );
68
69 void mFillColorButton_colorChanged( const QColor &color );
70 void mStrokeColorButton_colorChanged( const QColor &color );
71 void mStrokeWidthSpinBox_valueChanged( double d );
72 void mPictureRotationOffsetSpinBox_valueChanged( double d );
73 void mNorthTypeComboBox_currentIndexChanged( int index );
74
75 void sourceChanged( const QString &source );
76 void setSvgDynamicParameters( const QMap<QString, QgsProperty> &parameters );
77 void modeChanged( bool checked );
78
79 private:
80 QPointer<QgsLayoutItemPicture> mPicture;
81 QgsLayoutItemPropertiesWidget *mItemPropertiesWidget = nullptr;
82
83 void updateSvgParamGui( bool resetValues = true );
84};
85
86#endif // QGSLAYOUTPICTUREWIDGET_H
virtual bool setNewItem(QgsLayoutItem *item)
Attempts to update the widget to show the properties for the specified item.
virtual void setMasterLayout(QgsMasterLayoutInterface *masterLayout)
Sets the master layout associated with the item.
QgsLayoutItemBaseWidget(QWidget *parent SIP_TRANSFERTHIS, QgsLayoutObject *layoutObject)
Constructor for QgsLayoutItemBaseWidget, linked with the specified layoutObject.
A layout item subclass that displays SVG files or raster format images (jpg, png, ....
A widget for controlling the common properties of layout items (e.g.
Base class for graphical items within a QgsLayout.
QgsLayoutPictureWidget(QgsLayoutItemPicture *picture)
constructor
void populateDataDefinedButtons()
Initializes data defined buttons to current atlas coverage layer.
Interface for master layout type objects, such as print layouts and reports.