diff options
author | Tomi Korpipää <tomi.korpipaa@digia.com> | 2013-06-05 08:40:04 +0300 |
---|---|---|
committer | Tomi Korpipää <tomi.korpipaa@digia.com> | 2013-06-05 11:48:31 +0300 |
commit | 8cd166fe789fa2aa3a40442a31df015f645d32b8 (patch) | |
tree | 2ed5dec20637819b6d4343fdd931d6796fda63a2 /src/datavis3d/engine/q3dmaps.h | |
parent | 7a26f7c9a04d7f465f5964d39bf7ab5a80d0ea4c (diff) |
Changed some invokables to properties in Q3DMaps
Made DeclarativeMaps wrapper class for enum properties.
Change-Id: I857747abe853592c634d5a4d828b2e35407e743d
Change-Id: I857747abe853592c634d5a4d828b2e35407e743d
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Diffstat (limited to 'src/datavis3d/engine/q3dmaps.h')
-rw-r--r-- | src/datavis3d/engine/q3dmaps.h | 44 |
1 files changed, 27 insertions, 17 deletions
diff --git a/src/datavis3d/engine/q3dmaps.h b/src/datavis3d/engine/q3dmaps.h index de59f27e..d9880d3a 100644 --- a/src/datavis3d/engine/q3dmaps.h +++ b/src/datavis3d/engine/q3dmaps.h @@ -46,6 +46,8 @@ #include "QtDataVis3D/qdatavis3namespace.h" #include "q3dwindow.h" +#include <QFont> + class QOpenGLShaderProgram; class QImage; class QRect; @@ -61,6 +63,10 @@ class LabelItem; class QTENTERPRISE_DATAVIS3D_EXPORT Q3DMaps : public Q3DWindow { Q_OBJECT + Q_PROPERTY(QString windowTitle READ windowTitle WRITE setWindowTitle) + Q_PROPERTY(QFont font READ font WRITE setFont) + Q_PROPERTY(float fontSize READ fontSize WRITE setFontSize) + public: enum AdjustmentDirection { AdjustHeight = 0, // map value to y @@ -120,33 +126,37 @@ public: // Set color if you don't want to use themes. Set uniform to false if you want the (height) color to change from bottom to top Q_INVOKABLE void setBarColor(QColor baseColor, QColor heightColor, bool uniform = true); - // TODO: valon siirto / asetus + // Set area specs + Q_INVOKABLE void setAreaSpecs(const QRect &areaRect, const QImage &image); + + // Set area image + Q_INVOKABLE void setImage(const QImage &image); + + // TODO: light placement API + // Change selection mode; single bar, bar and row, bar and column, or all - Q_INVOKABLE void setSelectionMode(SelectionMode mode); + void setSelectionMode(SelectionMode mode); + SelectionMode selectionMode(); // Set window title - Q_INVOKABLE void setWindowTitle(const QString &title); + void setWindowTitle(const QString &title); + QString windowTitle(); - // Font size adjustment (should it be in enum (smallest, smaller, small, normal, large, larger, largest), or just GLfloat? - Q_INVOKABLE void setFontSize(GLfloat fontsize); + // Font size adjustment + void setFontSize(float fontsize); + float fontSize(); // Set font - Q_INVOKABLE void setFont(const QFont &font); + void setFont(const QFont &font); + QFont font(); // Label transparency adjustment - Q_INVOKABLE void setLabelTransparency(LabelTransparency transparency); - - // Enable or disable background grid - Q_INVOKABLE void setGridEnabled(bool enable); - - // Set area specs - Q_INVOKABLE void setAreaSpecs(const QRect &areaRect, const QImage &image); - - // Set area image - Q_INVOKABLE void setImage(const QImage &image); + void setLabelTransparency(LabelTransparency transparency); + LabelTransparency labelTransparency(); // Adjust shadow quality - Q_INVOKABLE void setShadowQuality(ShadowQuality quality); + void setShadowQuality(ShadowQuality quality); + ShadowQuality shadowQuality(); protected: #if defined(Q_OS_ANDROID) |