summaryrefslogtreecommitdiffstats
path: root/src/datavis3d/engine/drawer_p.h
diff options
context:
space:
mode:
authorTomi Korpipää <tomi.korpipaa@digia.com>2013-04-30 09:30:46 +0300
committerTomi Korpipää <tomi.korpipaa@digia.com>2013-04-30 11:03:24 +0300
commitb94234c5d8463314f65e0beed5ad199b711f5b07 (patch)
tree296b8cff57cb558f404ac1e03655b943ad36249f /src/datavis3d/engine/drawer_p.h
parent0b2a88b0287f3d1764f643548c1bb35ecf4b1f51 (diff)
Refactoring to get ready for a second vis type
Moved enums to global header. Moved drawLabel to Drawer. Change-Id: Ifb103467254b4288dee1ef6f7bb0c2aa23868dab Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Diffstat (limited to 'src/datavis3d/engine/drawer_p.h')
-rw-r--r--src/datavis3d/engine/drawer_p.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/datavis3d/engine/drawer_p.h b/src/datavis3d/engine/drawer_p.h
index 947883e4..ae2ebc78 100644
--- a/src/datavis3d/engine/drawer_p.h
+++ b/src/datavis3d/engine/drawer_p.h
@@ -53,6 +53,7 @@
#define DRAWER_P_H
#include "QtDataVis3D/qdatavis3dglobal.h"
+#include "QtDataVis3D/qdatavis3namespace.h"
#include "q3dbars.h"
#include "theme_p.h"
#include "labelitem_p.h"
@@ -70,15 +71,23 @@ class Drawer : public QObject, protected QOpenGLFunctions
Q_OBJECT
public:
- explicit Drawer(const Theme &theme, const QFont &font, Q3DBars::LabelTransparency transparency);
+ explicit Drawer(const Theme &theme, const QFont &font, LabelTransparency transparency);
~Drawer();
void setTheme(const Theme &theme);
void setFont(const QFont &font);
- void setTransparency(Q3DBars::LabelTransparency transparency);
+ void setTransparency(LabelTransparency transparency);
void drawObject(ShaderHelper *shader, ObjectHelper *object, bool textured = false,
GLuint textureId = 0);
+ void drawLabel(const QDataItem &item, const LabelItem &label,
+ const QMatrix4x4 &viewmatrix, const QMatrix4x4 &projectionmatrix,
+ const QVector3D &positionComp, const QVector3D &rotation, GLfloat maxHeight,
+ SelectionMode mode, ShaderHelper *shader, ObjectHelper *object,
+ bool useDepth = false, bool rotateAlong = false,
+ LabelPosition position = LabelOver,
+ Qt::AlignmentFlag alignment = Qt::AlignCenter);
+
void generateLabelTexture(QDataItem *item);
void generateLabelItem(LabelItem *item, const QString &text);
@@ -88,7 +97,7 @@ Q_SIGNALS:
private:
Theme m_theme;
QFont m_font;
- Q3DBars::LabelTransparency m_transparency;
+ LabelTransparency m_transparency;
TextureHelper *m_textureHelper;
};