summaryrefslogtreecommitdiffstats
path: root/src/datavisualization/engine/drawer.cpp
diff options
context:
space:
mode:
authorTomi Korpipää <tomi.korpipaa@digia.com>2013-11-22 07:56:04 +0200
committerTomi Korpipää <tomi.korpipaa@digia.com>2013-11-22 08:30:09 +0200
commit3ce4ae10e54e9c5d73826f4d6f8c5e442ac2d525 (patch)
tree6ae0bb7c1ff8720f6340453b39d481ffcf526127 /src/datavisualization/engine/drawer.cpp
parentd12f993ca802ff02091d6a5141d2847641bc65a8 (diff)
User-modifiable themes, part 1
Task-number: QTRD-2120 + old functionality remade - new functionality to be added + fixed a compilation error in qbarseries for mingw Change-Id: I710c97b5d4023861be8e8cc5cc61c05bb4644964 Signed-off-by: Tomi Korpipää <tomi.korpipaa@digia.com>
Diffstat (limited to 'src/datavisualization/engine/drawer.cpp')
-rw-r--r--src/datavisualization/engine/drawer.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/datavisualization/engine/drawer.cpp b/src/datavisualization/engine/drawer.cpp
index 93336e96..dc149c4d 100644
--- a/src/datavisualization/engine/drawer.cpp
+++ b/src/datavisualization/engine/drawer.cpp
@@ -44,7 +44,7 @@ QT_DATAVISUALIZATION_BEGIN_NAMESPACE
// Vertex array buffer for point
const GLfloat point_data[] = {0.0f, 0.0f, 0.0f};
-Drawer::Drawer(const Theme &theme, const QFont &font, QDataVis::LabelStyle style)
+Drawer::Drawer(Q3DTheme *theme, const QFont &font, QDataVis::LabelStyle style)
: m_theme(theme),
m_font(font),
m_style(style),
@@ -67,13 +67,13 @@ void Drawer::initializeOpenGL()
}
}
-void Drawer::setTheme(const Theme &theme)
+void Drawer::setTheme(Q3DTheme *theme)
{
m_theme = theme;
emit drawerChanged();
}
-Theme Drawer::theme() const
+Q3DTheme *Drawer::theme() const
{
return m_theme;
}
@@ -358,10 +358,10 @@ void Drawer::generateLabelItem(LabelItem &item, const QString &text, int widestL
// Print label into a QImage using QPainter
QImage label = Utils::printTextToImage(m_font,
text,
- m_theme.m_textBackgroundColor,
- m_theme.m_textColor,
+ m_theme->textBackgroundColor(),
+ m_theme->textColor(),
m_style,
- m_theme.m_labelBorders,
+ m_theme->isLabelBorderEnabled(),
widestLabel);
// Set label size