0
0
mirror of https://github.com/fralx/LimeReport.git synced 2025-10-01 03:29:49 +03:00

QTextDocument is created as needed

This commit is contained in:
Arin Alexander
2016-12-13 00:07:50 +03:00
parent 46c830212f
commit eeea8c2643
2 changed files with 135 additions and 144 deletions

View File

@@ -153,30 +153,35 @@ public:
// IPageInit interface
void pageObjectHasBeenLoaded();
typedef QSharedPointer<QTextDocument> TextPtr;
protected:
void updateLayout();
bool isNeedExpandContent() const;
QString replaceBR(QString text);
QString replaceReturns(QString text);
int fakeMarginSize();
int fakeMarginSize() const;
QString getTextPart(int height, int skipHeight);
void restoreLinksEvent();
private:
void initText();
void setTextFont(const QFont &value);
void adaptFontSize();
void initTextSizes();
void setTextFont(TextPtr text, const QFont &value);
void adaptFontSize(TextPtr text);
QString formatDateTime(const QDateTime &value);
QString formatNumber(const double value);
QString formatFieldValue();
TextPtr textDocument();
private:
QString m_strText;
//QTextLayout m_layout;
QTextDocument* m_text;
//QTextDocument* m_text;
Qt::Alignment m_alignment;
bool m_autoHeight;
AutoWidth m_autoWidth;
QSizeF m_textSize;
qreal m_firstLineSize;
AngleType m_angle;
int m_foregroundOpacity;
bool m_underlines;