QGIS API Documentation 3.41.0-Master (cea29feecf2)
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#define SIP_NO_FILE
20
21#include "qgis_gui.h"
22#include "ui_qgslayouthtmlwidgetbase.h"
23#include "qgslayoutitemwidget.h"
24
26class QgsLayoutFrame;
29
37class GUI_EXPORT QgsLayoutHtmlWidget : public QgsLayoutItemBaseWidget, private Ui::QgsLayoutHtmlWidgetBase
38{
39 Q_OBJECT
40 public:
44 void setMasterLayout( QgsMasterLayoutInterface *masterLayout ) override;
45
46 protected:
47 bool setNewItem( QgsLayoutItem *item ) override;
48
49 private slots:
50 void mUrlLineEdit_editingFinished();
51 void mFileToolButton_clicked();
52 void mResizeModeComboBox_currentIndexChanged( int index );
53 void mEvaluateExpressionsCheckbox_toggled( bool checked );
54 void mUseSmartBreaksCheckBox_toggled( bool checked );
55 void mMaxDistanceSpinBox_valueChanged( double val );
56 void htmlEditorChanged();
57 void stylesheetEditorChanged();
58 void mUserStylesheetCheckBox_toggled( bool checked );
59 void mRadioManualSource_clicked( bool checked );
60 void mRadioUrlSource_clicked( bool checked );
61 void mInsertExpressionButton_clicked();
62
63 void mReloadPushButton_clicked();
64 void mAddFramePushButton_clicked();
65 void mEmptyFrameCheckBox_toggled( bool checked );
66 void mHideEmptyBgCheckBox_toggled( bool checked );
67
69 void setGuiElementValues();
70
71 protected slots:
73 void populateDataDefinedButtons();
74
75 private:
76 void blockSignals( bool block );
77
78 QPointer<QgsLayoutItemHtml> mHtml;
79 QPointer<QgsLayoutFrame> mFrame;
80 QgsLayoutItemPropertiesWidget *mItemPropertiesWidget = nullptr;
81
82 QgsCodeEditorHTML *mHtmlEditor = nullptr;
83 QgsCodeEditorCSS *mStylesheetEditor = nullptr;
84};
85
86#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.
A widget for configuring layout html items.
QgsLayoutHtmlWidget()=delete
A base class for property widgets for layout items.
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.
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.