summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTomi Korpipää <tomi.korpipaa@digia.com>2013-06-13 06:37:57 +0300
committerTomi Korpipää <tomi.korpipaa@digia.com>2013-06-13 08:12:58 +0300
commitd557920485f0cc1094908f72ce3fffcd55acd941 (patch)
tree98ec8adddf9440b398e6e9eb65c72b34966ee316 /src
parentadb9cd632b7aa57979c3fee8926a42c64ddc428a (diff)
Q3DBars: Removed obsolete constructor parameters
+ fixed a bug in resizing (resize after initialized -flag is set, or it won't work) + indentations Change-Id: Ib4ea83455f6cc1b89432b5254b0cfd7f30a6f03a Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Diffstat (limited to 'src')
-rw-r--r--src/datavis3d/engine/bars3dshared.cpp28
-rw-r--r--src/datavis3d/engine/q3dbars.cpp10
-rw-r--r--src/datavis3d/engine/q3dbars.h2
3 files changed, 17 insertions, 23 deletions
diff --git a/src/datavis3d/engine/bars3dshared.cpp b/src/datavis3d/engine/bars3dshared.cpp
index 9f4c3f11..8df8a368 100644
--- a/src/datavis3d/engine/bars3dshared.cpp
+++ b/src/datavis3d/engine/bars3dshared.cpp
@@ -219,9 +219,6 @@ void Bars3dRenderer::initializeOpenGL()
m_textureHelper = new TextureHelper();
m_drawer->initializeOpenGL();
- // Resize in case we've missed resize events
- resizeNotify();
-
// Initialize shaders
#if !defined(QT_OPENGL_ES_2)
if (m_shadowQuality > ShadowNone) {
@@ -311,6 +308,9 @@ void Bars3dRenderer::initializeOpenGL()
// Set initialized -flag
m_isInitialized = true;
+ // Resize in case we've missed resize events
+ resizeNotify();
+
// Load background mesh
loadBackgroundMesh();
}
@@ -935,7 +935,7 @@ void Bars3dRenderer::drawScene()
GLfloat lightStrength = m_theme->m_lightStrength;
if (m_selectionMode > ModeNone) {
Bars3dRenderer::SelectionType selectionType = isSelected(row, bar,
- selection);
+ selection);
switch (selectionType) {
case Bars3dRenderer::SelectionBar: {
barColor = Utils::vectorFromColor(m_theme->m_highlightBarColor);
@@ -1779,7 +1779,7 @@ void Bars3dRenderer::setMeshFileName(const QString &objFileName)
}
void Bars3dRenderer::setupSampleSpace(int samplesRow, int samplesColumn, const QString &labelRow,
- const QString &labelColumn, const QString &labelHeight)
+ const QString &labelColumn, const QString &labelHeight)
{
// Disable zoom mode if we're in it (causes crash if not, as zoom selection is deleted)
closeZoomMode();
@@ -1849,7 +1849,7 @@ void Bars3dRenderer::setTheme(ColorTheme theme)
}
void Bars3dRenderer::setBarColor(QColor baseColor, QColor heightColor, QColor depthColor,
- bool uniform)
+ bool uniform)
{
m_theme->m_baseColor = baseColor;
m_theme->m_heightColor = heightColor;
@@ -2033,7 +2033,7 @@ void Bars3dRenderer::setTickCount(GLint tickCount, GLfloat step, GLfloat minimum
}
void Bars3dRenderer::addDataRow(const QVector<float> &dataRow, const QString &labelRow,
- const QVector<QString> &labelsColumn)
+ const QVector<QString> &labelsColumn)
{
// Convert to QDataRow and add to QDataSet
QDataRow *row = new QDataRow(labelRow);
@@ -2048,7 +2048,7 @@ void Bars3dRenderer::addDataRow(const QVector<float> &dataRow, const QString &la
}
void Bars3dRenderer::addDataRow(const QVector<QDataItem*> &dataRow, const QString &labelRow,
- const QVector<QString> &labelsColumn)
+ const QVector<QString> &labelsColumn)
{
// Convert to QDataRow and add to QDataSet
QDataRow *row = new QDataRow(labelRow);
@@ -2076,8 +2076,8 @@ void Bars3dRenderer::addDataRow(QDataRow *dataRow)
}
void Bars3dRenderer::addDataSet(const QVector< QVector<float> > &data,
- const QVector<QString> &labelsRow,
- const QVector<QString> &labelsColumn)
+ const QVector<QString> &labelsRow,
+ const QVector<QString> &labelsColumn)
{
// Copy axis labels
QString xAxis;
@@ -2110,8 +2110,8 @@ void Bars3dRenderer::addDataSet(const QVector< QVector<float> > &data,
}
void Bars3dRenderer::addDataSet(const QVector< QVector<QDataItem*> > &data,
- const QVector<QString> &labelsRow,
- const QVector<QString> &labelsColumn)
+ const QVector<QString> &labelsRow,
+ const QVector<QString> &labelsColumn)
{
// Copy axis labels
QString xAxis;
@@ -2308,7 +2308,7 @@ void Bars3dRenderer::initDepthBuffer()
#endif
void Bars3dRenderer::initBackgroundShaders(const QString &vertexShader,
- const QString &fragmentShader)
+ const QString &fragmentShader)
{
if (m_backgroundShader)
delete m_backgroundShader;
@@ -2353,7 +2353,7 @@ void Bars3dRenderer::calculateHeightAdjustment(const QPair<GLfloat, GLfloat> &li
}
Bars3dRenderer::SelectionType Bars3dRenderer::isSelected(GLint row, GLint bar,
- const QVector3D &selection)
+ const QVector3D &selection)
{
//static QVector3D prevSel = selection; // TODO: For debugging
SelectionType isSelectedType = SelectionNone;
diff --git a/src/datavis3d/engine/q3dbars.cpp b/src/datavis3d/engine/q3dbars.cpp
index fe50d5fe..2d10859d 100644
--- a/src/datavis3d/engine/q3dbars.cpp
+++ b/src/datavis3d/engine/q3dbars.cpp
@@ -225,16 +225,10 @@ QTENTERPRISE_DATAVIS3D_BEGIN_NAMESPACE
*/
/*!
- * \a fbohandle Handle to QML2 scene graph's framebuffer object. Developers should not need to
- * ever use this directly. Not used when using C++ API.
- *
- * \a windowsize QML2 window size Developers should not need to ever use this directly. Not
- * used when using C++ API.
- *
* Constructs a new 3D bar window. Parameters are not used unless instantiating from Qt Quick 2.
*/
-Q3DBars::Q3DBars(GLuint fbohandle, const QSize &windowsize)
- : d_ptr(new Q3DBarsPrivate(this, geometry(), fbohandle))
+Q3DBars::Q3DBars()
+ : d_ptr(new Q3DBarsPrivate(this, geometry(), 0))
{
}
diff --git a/src/datavis3d/engine/q3dbars.h b/src/datavis3d/engine/q3dbars.h
index 03635e4d..c63bfb6e 100644
--- a/src/datavis3d/engine/q3dbars.h
+++ b/src/datavis3d/engine/q3dbars.h
@@ -66,7 +66,7 @@ class QTENTERPRISE_DATAVIS3D_EXPORT Q3DBars : public Q3DWindow
Q_PROPERTY(bool background READ backgroundEnabled WRITE setBackgroundEnabled)
public:
- explicit Q3DBars(GLuint fbohandle = 0, const QSize &windowsize = QSize());
+ explicit Q3DBars();
~Q3DBars();
// Add a row of data. Each new row is added to the front of the sample space, moving previous