16 #ifndef QGSCOMPOSERHTML_H
17 #define QGSCOMPOSERHTML_H
74 void setUrl(
const QUrl& url );
82 const QUrl&
url()
const {
return mUrl; }
94 void setHtml(
const QString html );
103 QString
html()
const {
return mHtml; }
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 );
204 void render( QPainter* p,
const QRectF& renderExtent,
const int frameIndex )
override;
205 bool writeXML( QDomElement& elem, QDomDocument & doc,
bool ignoreFrames =
false )
const override;
206 bool readXML(
const QDomElement& itemElem,
const QDomDocument& doc,
bool ignoreFrames =
false )
override;
219 void loadHtml(
const bool useCache =
false );
223 void refreshExpressionContext();
228 void frameLoaded(
bool ok =
true );
231 ContentMode mContentMode;
235 QString mFetchedHtml;
236 QString mLastFetchedUrl;
237 QString mActualFetchedUrl;
240 double mHtmlUnitsToMM;
241 QImage* mRenderedPage;
242 bool mEvaluateExpressions;
243 bool mUseSmartBreaks;
244 double mMaxBreakDistance;
250 QString mUserStylesheet;
251 bool mEnableUserStylesheet;
255 double htmlUnitsToMM();
258 void renderCachedImage();
261 QString fetchHtml( QUrl url );
267 double maxFrameWidth()
const;
270 #endif // QGSCOMPOSERHTML_H