16 #ifndef QGSCOMPOSERHTML_H 17 #define QGSCOMPOSERHTML_H 74 void setUrl(
const QUrl& url );
94 void setHtml(
const QString& html );
123 void setEvaluateExpressions(
bool evaluateExpressions );
138 void setUseSmartBreaks(
bool useSmartBreaks );
152 void setMaxBreakDistance(
double maxBreakDistance );
175 void setUserStylesheet(
const QString& stylesheet );
192 void setUserStylesheetEnabled(
const bool stylesheetEnabled );
224 void refreshExpressionContext();
229 void frameLoaded(
bool ok =
true );
241 double mHtmlUnitsToMM;
243 bool mEvaluateExpressions;
244 bool mUseSmartBreaks;
245 double mMaxBreakDistance;
252 bool mEnableUserStylesheet;
259 double htmlUnitsToMM();
262 void renderCachedImage();
271 double maxFrameWidth()
const;
274 #endif // QGSCOMPOSERHTML_H virtual void recalculateFrameSizes()
Recalculates the portion of the multiframe item which is shown in each of it's component frames...
QString userStylesheet() const
Returns the user stylesheet CSS rules used while rendering the HTML content.
virtual double findNearbyPageBreak(double yPos)
Finds the optimal position to break a frame at.
virtual void refreshDataDefinedProperty(const DataDefinedProperty property=AllProperties, const QgsExpressionContext *context=nullptr)
Refreshes a data defined property for the item by reevaluating the property's value and redrawing the...
virtual QString displayName() const
Get multiframe display name.
virtual QSizeF totalSize() const =0
Returns the total size of the multiframe's content.
The feature class encapsulates a single feature including its id, geometry and a list of field/values...
double maxBreakDistance() const
Returns the maximum distance allowed when calculating where to place page breaks in the html...
DataDefinedProperty
Data defined properties for different item types.
ContentMode contentMode() const
Returns the source mode for item's HTML content.
virtual void addFrame(QgsComposerFrame *frame, bool recalcFrameSizes=true)=0
Adds a frame to the multiframe.
HTTP network content fetcher.
const QUrl & url() const
Returns the URL of the content displayed in the item if the item is using the QgsComposerHtml::Url mo...
bool useSmartBreaks() const
Returns whether html item is using smart breaks.
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
Abstract base class for composer items with the ability to distribute the content to several frames (...
bool evaluateExpressions() const
Returns whether html item will evaluate QGIS expressions prior to rendering the HTML content...
QString html() const
Returns the HTML source displayed in the item if the item is using the QgsComposerHtml::ManualHtml mo...
Graphics scene for map printing.
Frame item for a composer multiframe item.
void setContentMode(ContentMode mode)
Sets the source mode for item's HTML content.
General purpose distance and area calculator.
virtual bool writeXML(QDomElement &elem, QDomDocument &doc, bool ignoreFrames=false) const =0
Stores state information about multiframe in DOM element.
bool userStylesheetEnabled() const
Returns whether user stylesheets are enabled for the HTML content.
virtual Q_DECL_DEPRECATED void render(QPainter *p, const QRectF &renderExtent)
Renders a portion of the multiframe's content into a painter.
virtual bool readXML(const QDomElement &itemElem, const QDomDocument &doc, bool ignoreFrames=false)=0
Reads multiframe state information from a DOM element.
Represents a vector layer which manages a vector based data sets.
ContentMode
Source modes for the HTML content to render in the item.
QWebPage subclass which redirects JavaScript errors and console output to the QGIS message log...