summaryrefslogtreecommitdiffstats
path: root/src/datavisualization/data/abstractrenderitem.cpp
diff options
context:
space:
mode:
authorMiikka Heikkinen <miikka.heikkinen@digia.com>2014-02-24 14:03:14 +0200
committerMiikka Heikkinen <miikka.heikkinen@digia.com>2014-02-24 14:23:34 +0200
commit37493fac3422ce5cbe34748ca25757ca6302a583 (patch)
tree4bbffa04287106049fca1857225e0711fafe4730 /src/datavisualization/data/abstractrenderitem.cpp
parente07e480d744c6f091844350704b916a71811c6b9 (diff)
Move selection labels to renderer from render items
Creating a new label on demand is fast enough, so we don't need to store old labels. Storing labels unnecessarily leads to unchecked use of graphics memory. Optimized bar slices a bit by having separate class of render items for slice items. Change-Id: I5afdecfb3949393341b6c3eaefbc667c65da32e3 Reviewed-by: Tomi Korpipää <tomi.korpipaa@digia.com>
Diffstat (limited to 'src/datavisualization/data/abstractrenderitem.cpp')
-rw-r--r--src/datavisualization/data/abstractrenderitem.cpp23
1 files changed, 0 insertions, 23 deletions
diff --git a/src/datavisualization/data/abstractrenderitem.cpp b/src/datavisualization/data/abstractrenderitem.cpp
index e22a46d8..59ffab22 100644
--- a/src/datavisualization/data/abstractrenderitem.cpp
+++ b/src/datavisualization/data/abstractrenderitem.cpp
@@ -21,40 +21,17 @@
QT_BEGIN_NAMESPACE_DATAVISUALIZATION
AbstractRenderItem::AbstractRenderItem()
- : m_selectionLabelItem(0)
{
}
AbstractRenderItem::AbstractRenderItem(const AbstractRenderItem &other)
{
- m_selectionLabel = other.m_selectionLabel;
m_translation = other.m_translation;
m_rotation = other.m_rotation;
- m_selectionLabelItem = 0;
}
AbstractRenderItem::~AbstractRenderItem()
{
- delete m_selectionLabelItem;
-}
-
-LabelItem &AbstractRenderItem::selectionLabelItem()
-{
- if (!m_selectionLabelItem)
- m_selectionLabelItem = new LabelItem;
- return *m_selectionLabelItem;
-}
-
-void AbstractRenderItem::setSelectionLabel(const QString &label)
-{
- if (m_selectionLabelItem)
- m_selectionLabelItem->clear();
- m_selectionLabel = label;
-}
-
-QString &AbstractRenderItem::selectionLabel()
-{
- return m_selectionLabel;
}
QT_END_NAMESPACE_DATAVISUALIZATION