##// END OF EJS Templates
Fix mingw build errors...
Miikka Heikkinen -
r2552:f2e3b33e0938
parent child
Show More
@@ -220,7 +220,8 void PolarChartAxisAngular::updateGeometry()
220 // Title, centered above the chart
220 // Title, centered above the chart
221 QString titleText = axis()->titleText();
221 QString titleText = axis()->titleText();
222 if (!titleText.isEmpty() && axis()->isTitleVisible()) {
222 if (!titleText.isEmpty() && axis()->isTitleVisible()) {
223 title->setHtml(ChartPresenter::truncatedText(axis()->titleFont(), titleText, qreal(0.0), axisGeometry().width(), Qt::Horizontal, QRectF()));
223 QRectF dummyRect;
224 title->setHtml(ChartPresenter::truncatedText(axis()->titleFont(), titleText, qreal(0.0), axisGeometry().width(), Qt::Horizontal, dummyRect));
224
225
225 QRectF titleBoundingRect = title->boundingRect();
226 QRectF titleBoundingRect = title->boundingRect();
226 QPointF titleCenter = center - titleBoundingRect.center();
227 QPointF titleCenter = center - titleBoundingRect.center();
@@ -203,7 +203,8 void PolarChartAxisRadial::updateGeometry()
203 // Title, along the 0 axis
203 // Title, along the 0 axis
204 QString titleText = axis()->titleText();
204 QString titleText = axis()->titleText();
205 if (!titleText.isEmpty() && axis()->isTitleVisible()) {
205 if (!titleText.isEmpty() && axis()->isTitleVisible()) {
206 title->setHtml(ChartPresenter::truncatedText(axis()->titleFont(), titleText, qreal(0.0), radius, Qt::Horizontal, QRectF()));
206 QRectF dummyRect;
207 title->setHtml(ChartPresenter::truncatedText(axis()->titleFont(), titleText, qreal(0.0), radius, Qt::Horizontal, dummyRect));
207
208
208 QRectF titleBoundingRect = title->boundingRect();
209 QRectF titleBoundingRect = title->boundingRect();
209 QPointF titleCenter = titleBoundingRect.center();
210 QPointF titleCenter = titleBoundingRect.center();
@@ -49,7 +49,8 QString ChartTitle::text() const
49
49
50 void ChartTitle::setGeometry(const QRectF &rect)
50 void ChartTitle::setGeometry(const QRectF &rect)
51 {
51 {
52 QGraphicsTextItem::setHtml(ChartPresenter::truncatedText(font(), m_text, qreal(0.0), rect.width(), Qt::Horizontal, QRectF()));
52 QRectF dummyRect;
53 QGraphicsTextItem::setHtml(ChartPresenter::truncatedText(font(), m_text, qreal(0.0), rect.width(), Qt::Horizontal, dummyRect));
53 setPos(rect.topLeft());
54 setPos(rect.topLeft());
54 }
55 }
55
56
@@ -8,6 +8,7 greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
8
8
9 TARGET = polarcharttest
9 TARGET = polarcharttest
10 TEMPLATE = app
10 TEMPLATE = app
11 INCLUDEPATH += .
11
12
12
13
13 SOURCES += main.cpp \
14 SOURCES += main.cpp \
General Comments 0
You need to be logged in to leave comments. Login now