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 );
205 bool writeXML( QDomElement& elem, QDomDocument & doc,
bool ignoreFrames =
false )
const;
206 bool readXML(
const QDomElement& itemElem,
const QDomDocument& doc,
bool ignoreFrames =
false );
221 void refreshExpressionContext();
226 void frameLoaded(
bool ok =
true );
229 ContentMode mContentMode;
233 QString mFetchedHtml;
234 QString mLastFetchedUrl;
235 QString mActualFetchedUrl;
238 double mHtmlUnitsToMM;
239 QImage* mRenderedPage;
240 bool mEvaluateExpressions;
241 bool mUseSmartBreaks;
242 double mMaxBreakDistance;
248 QString mUserStylesheet;
249 bool mEnableUserStylesheet;
253 double htmlUnitsToMM();
256 void renderCachedImage();
259 QString fetchHtml( QUrl url );
265 double maxFrameWidth()
const;
268 #endif // QGSCOMPOSERHTML_H