QGIS API Documentation 3.99.0-Master (2fe06baccd8)
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#define SIP_NO_FILE
23
24#include "ui_qgslayoutpicturewidgetbase.h"
25
26#include "qgis_gui.h"
27#include "qgslayoutitemwidget.h"
28
30
38class GUI_EXPORT QgsLayoutPictureWidget : public QgsLayoutItemBaseWidget, private Ui::QgsLayoutPictureWidgetBase
39{
40 Q_OBJECT
41
42 public:
45 void setMasterLayout( QgsMasterLayoutInterface *masterLayout ) override;
46
47 private slots:
48 void mPictureRotationSpinBox_valueChanged( double d );
49 void mRotationFromComposerMapCheckBox_stateChanged( int state );
50 void mapChanged( QgsLayoutItem *item );
51 void mResizeModeComboBox_currentIndexChanged( int index );
52 void mAnchorPointComboBox_currentIndexChanged( int index );
53
54 protected:
55 bool setNewItem( QgsLayoutItem *item ) override;
56
57 protected slots:
60
61 private slots:
63 void setGuiElementValues();
64
66 void setPicRotationSpinValue( double r );
67
68 void mFillColorButton_colorChanged( const QColor &color );
69 void mStrokeColorButton_colorChanged( const QColor &color );
70 void mStrokeWidthSpinBox_valueChanged( double d );
71 void mPictureRotationOffsetSpinBox_valueChanged( double d );
72 void mNorthTypeComboBox_currentIndexChanged( int index );
73
74 void sourceChanged( const QString &source );
75 void setSvgDynamicParameters( const QMap<QString, QgsProperty> &parameters );
76 void modeChanged( bool checked );
77
78 private:
79 QPointer<QgsLayoutItemPicture> mPicture;
80 QgsLayoutItemPropertiesWidget *mItemPropertiesWidget = nullptr;
81
82 void updateSvgParamGui( bool resetValues = true );
83};
84
85#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.