summaryrefslogtreecommitdiffstats
path: root/src/datavis3d
diff options
context:
space:
mode:
authorTomi Korpipää <tomi.korpipaa@digia.com>2013-05-03 09:28:20 +0300
committerTomi Korpipää <tomi.korpipaa@digia.com>2013-05-03 09:28:41 +0300
commit2fe78bbc9eca244c76f8ba5165fa443b35edbcc1 (patch)
tree624d06a608397b9c5afbaf38dfe406e7c40582ee /src/datavis3d
parent6fbf6d25121118141e9954e5bbc2f01933f1a548 (diff)
Q3DMaps: Label updating after changes done
Change-Id: I74b2408c3772e2983a921d7fab8ceab38d91e993 Reviewed-by: Tomi Korpipää <tomi.korpipaa@digia.com>
Diffstat (limited to 'src/datavis3d')
-rw-r--r--src/datavis3d/engine/drawer.cpp3
-rw-r--r--src/datavis3d/engine/q3dmaps.cpp6
-rw-r--r--src/datavis3d/engine/q3dwindow.cpp2
-rw-r--r--src/datavis3d/utils/meshloader.cpp2
-rw-r--r--src/datavis3d/utils/objecthelper.cpp2
-rw-r--r--src/datavis3d/utils/vertexindexer.cpp4
6 files changed, 11 insertions, 8 deletions
diff --git a/src/datavis3d/engine/drawer.cpp b/src/datavis3d/engine/drawer.cpp
index d4e69752..8e041741 100644
--- a/src/datavis3d/engine/drawer.cpp
+++ b/src/datavis3d/engine/drawer.cpp
@@ -220,8 +220,7 @@ void Drawer::drawLabel(const QDataItem &item, const LabelItem &label,
* qFabs(sin(rotation.y() * m_pi / 180.0f));
break;
}
- default:
- {
+ default: {
break;
}
}
diff --git a/src/datavis3d/engine/q3dmaps.cpp b/src/datavis3d/engine/q3dmaps.cpp
index 3370c6f8..57ed0913 100644
--- a/src/datavis3d/engine/q3dmaps.cpp
+++ b/src/datavis3d/engine/q3dmaps.cpp
@@ -958,6 +958,7 @@ void Q3DMaps::setTheme(ColorTheme theme)
d_ptr->initShaders(QStringLiteral(":/shaders/vertex"),
QStringLiteral(":/shaders/fragment"));
}
+ d_ptr->m_updateLabels = true;
}
void Q3DMaps::setBarColor(QColor baseColor, QColor heightColor, bool uniform)
@@ -994,18 +995,21 @@ void Q3DMaps::setFontSize(float fontsize)
{
d_ptr->m_font.setPointSizeF(fontsize);
d_ptr->m_drawer->setFont(d_ptr->m_font);
+ d_ptr->m_updateLabels = true;
}
void Q3DMaps::setFont(const QFont &font)
{
d_ptr->m_font = font;
d_ptr->m_drawer->setFont(font);
+ d_ptr->m_updateLabels = true;
}
void Q3DMaps::setLabelTransparency(LabelTransparency transparency)
{
d_ptr->m_labelTransparency = transparency;
d_ptr->m_drawer->setTransparency(transparency);
+ d_ptr->m_updateLabels = true;
}
void Q3DMaps::setGridEnabled(bool enable)
@@ -1172,7 +1176,7 @@ Q3DMapsPrivate::Q3DMapsPrivate(Q3DMaps *q)
m_areaSize(QSizeF(1.0f, 1.0f)),
m_bgrTexture(0),
m_selectionTexture(0),
- m_updateLabels(false),
+ m_updateLabels(true),
m_gridEnabled(true)
{
//m_data->d_ptr->setDrawer(m_drawer);
diff --git a/src/datavis3d/engine/q3dwindow.cpp b/src/datavis3d/engine/q3dwindow.cpp
index 0043b8cc..a172e7b6 100644
--- a/src/datavis3d/engine/q3dwindow.cpp
+++ b/src/datavis3d/engine/q3dwindow.cpp
@@ -84,7 +84,7 @@ void Q3DWindow::initialize()
{
qDebug() << "OpenGL version" << format().majorVersion() << format().minorVersion();
qDebug() << "OpenGL renderer" << format().renderableType();
- qDebug() << "OpenGL swapBehavior" << format().swapBehavior();
+ //qDebug() << "OpenGL swapBehavior" << format().swapBehavior();
setAnimating(true);
}
diff --git a/src/datavis3d/utils/meshloader.cpp b/src/datavis3d/utils/meshloader.cpp
index 6e5a9c2a..0e818a92 100644
--- a/src/datavis3d/utils/meshloader.cpp
+++ b/src/datavis3d/utils/meshloader.cpp
@@ -58,7 +58,7 @@ bool MeshLoader::loadOBJ(const QString &path,
QVector<QVector2D> &out_uvs,
QVector<QVector3D> &out_normals)
{
- qDebug() << "Loading OBJ file" << path;
+ //qDebug() << "Loading OBJ file" << path;
QVector<unsigned int> vertexIndices, uvIndices, normalIndices;
QVector<QVector3D> temp_vertices;
diff --git a/src/datavis3d/utils/objecthelper.cpp b/src/datavis3d/utils/objecthelper.cpp
index a86994e9..6659a187 100644
--- a/src/datavis3d/utils/objecthelper.cpp
+++ b/src/datavis3d/utils/objecthelper.cpp
@@ -88,7 +88,7 @@ void ObjectHelper::load()
if (!loadOk)
qFatal("loading failed");
- qDebug() << "vertex count" << vertices.size();;
+ //qDebug() << "vertex count" << vertices.size();;
// Index vertices
QVector<unsigned short> indices;
diff --git a/src/datavis3d/utils/vertexindexer.cpp b/src/datavis3d/utils/vertexindexer.cpp
index 432e3895..7e5a863f 100644
--- a/src/datavis3d/utils/vertexindexer.cpp
+++ b/src/datavis3d/utils/vertexindexer.cpp
@@ -130,7 +130,7 @@ void VertexIndexer::indexVBO(const QVector<QVector3D> &in_vertices,
VertexToOutIndex[packed] = newindex;
}
}
- qDebug() << "unique vertices" << unique_vertices;
+ //qDebug() << "unique vertices" << unique_vertices;
}
void VertexIndexer::indexVBO_TBN(const QVector<QVector3D> &in_vertices,
@@ -170,7 +170,7 @@ void VertexIndexer::indexVBO_TBN(const QVector<QVector3D> &in_vertices,
out_indices.append((unsigned short)out_vertices.size() - 1);
}
}
- qDebug() << "unique vertices" << unique_vertices;
+ //qDebug() << "unique vertices" << unique_vertices;
}
QTCOMMERCIALDATAVIS3D_END_NAMESPACE