QGIS API Documentation 3.99.0-Master (7d2ca374f2d)
Loading...
Searching...
No Matches
qgslayouthtmlwidget.h
Go to the documentation of this file.
1/***************************************************************************
2 qgslayouthtmlwidget.h
3 ---------------------
4 begin : November 2017
5 copyright : (C) 2017 by Nyall Dawson
6 email : nyall dot dawson at gmail dot com
7 ***************************************************************************
8 * *
9 * This program is free software; you can redistribute it and/or modify *
10 * it under the terms of the GNU General Public License as published by *
11 * the Free Software Foundation; either version 2 of the License, or *
12 * (at your option) any later version. *
13 * *
14 ***************************************************************************/
15#ifndef QGSLAYOUTHTMLWIDGET_H
16#define QGSLAYOUTHTMLWIDGET_H
17
18// We don't want to expose this in the public API
19
20#include "ui_qgslayouthtmlwidgetbase.h"
21
22#include "qgis_gui.h"
23#include "qgslayoutitemwidget.h"
24
25#define SIP_NO_FILE
26
28class QgsLayoutFrame;
31
39class GUI_EXPORT QgsLayoutHtmlWidget : public QgsLayoutItemBaseWidget, private Ui::QgsLayoutHtmlWidgetBase
40{
41 Q_OBJECT
42 public:
46 void setMasterLayout( QgsMasterLayoutInterface *masterLayout ) override;
47
48 protected:
49 bool setNewItem( QgsLayoutItem *item ) override;
50
51 private slots:
52 void mUrlLineEdit_editingFinished();
53 void mFileToolButton_clicked();
54 void mResizeModeComboBox_currentIndexChanged( int index );
55 void mEvaluateExpressionsCheckbox_toggled( bool checked );
56 void mUseSmartBreaksCheckBox_toggled( bool checked );
57 void mMaxDistanceSpinBox_valueChanged( double val );
58 void htmlEditorChanged();
59 void stylesheetEditorChanged();
60 void mUserStylesheetCheckBox_toggled( bool checked );
61 void mRadioManualSource_clicked( bool checked );
62 void mRadioUrlSource_clicked( bool checked );
63 void mInsertExpressionButton_clicked();
64
65 void mReloadPushButton_clicked();
66 void mAddFramePushButton_clicked();
67 void mEmptyFrameCheckBox_toggled( bool checked );
68 void mHideEmptyBgCheckBox_toggled( bool checked );
69
71 void setGuiElementValues();
72
73 protected slots:
76
77 private:
78 void blockSignals( bool block );
79
80 QPointer<QgsLayoutItemHtml> mHtml;
81 QPointer<QgsLayoutFrame> mFrame;
82 QgsLayoutItemPropertiesWidget *mItemPropertiesWidget = nullptr;
83
84 QgsCodeEditorHTML *mHtmlEditor = nullptr;
85 QgsCodeEditorCSS *mStylesheetEditor = nullptr;
86};
87
88#endif // QGSLAYOUTHTMLWIDGET_H
A CSS editor based on QScintilla2.
A HTML editor based on QScintilla2.
Base class for frame items, which form a layout multiframe item.
void populateDataDefinedButtons()
Initializes data defined buttons to current atlas coverage layer.
QgsLayoutHtmlWidget()=delete
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 multiframe subclass for HTML content.
A widget for controlling the common properties of layout items (e.g.
Base class for graphical items within a QgsLayout.
Interface for master layout type objects, such as print layouts and reports.