diff options
author | Tomi Korpipää <tomi.korpipaa@digia.com> | 2013-05-30 12:13:15 +0300 |
---|---|---|
committer | Pasi Keränen <pasi.keranen@digia.com> | 2013-05-30 12:56:51 +0300 |
commit | 49e4968b880ae4d1ff414a730329002aef562058 (patch) | |
tree | 722d72e017a97d07bdc5dffa1421450e9e4a8d86 /src/datavis3d/engine/q3dmaps.h | |
parent | cf02fdc674c462fa037ee0625837032e2b573911 (diff) |
QML2 support added (draft)
Change-Id: I025750cf21352af1222c8941540be8b97960c8a3
Change-Id: I025750cf21352af1222c8941540be8b97960c8a3
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Mika Salmela <mika.salmela@digia.com>
Reviewed-by: Pasi Keränen <pasi.keranen@digia.com>
Diffstat (limited to 'src/datavis3d/engine/q3dmaps.h')
-rw-r--r-- | src/datavis3d/engine/q3dmaps.h | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/src/datavis3d/engine/q3dmaps.h b/src/datavis3d/engine/q3dmaps.h index 61373b7a..de59f27e 100644 --- a/src/datavis3d/engine/q3dmaps.h +++ b/src/datavis3d/engine/q3dmaps.h @@ -80,73 +80,73 @@ public: // Add data item. New data item is appended to old data. // ownership of data is transferred - bool addDataItem(QDataItem *dataItem); + Q_INVOKABLE bool addDataItem(QDataItem *dataItem); // Add data set. New data is appended to old data. // ownership of data is transferred - bool addData(const QVector<QDataItem*> &data); + Q_INVOKABLE bool addData(const QVector<QDataItem*> &data); // ownership of data is transferred - bool addData(const QDataRow &data); + Q_INVOKABLE bool addData(const QDataRow &data); // Add data set. Old data is deleted. // ownership of data is transferred - bool setData(const QVector<QDataItem*> &data); + Q_INVOKABLE bool setData(const QVector<QDataItem*> &data); // ownership of data is transferred - bool setData(QDataRow *data); + Q_INVOKABLE bool setData(QDataRow *data); // bar specifications; base thickness in x, y and z, enum to indicate which direction is increased with value // TODO: Start using thickness also in adjustment direction; use it as a relative value. // For example, in AdjustAll mode setting thickness to (0.1f, 1.0f, 0.5f) would apply value to // x at 10%, y at 100% and z at 50%. If a dimension is not included, given thickness states its absolute value. - void setBarSpecs(const QVector3D &thickness = QVector3D(1.0f, 1.0f, 1.0f), - AdjustmentDirection direction = AdjustHeight); + Q_INVOKABLE void setBarSpecs(const QVector3D &thickness = QVector3D(1.0f, 1.0f, 1.0f), + AdjustmentDirection direction = AdjustHeight); // bar type; bars (=cubes), pyramids, cones, cylinders, balls, etc. - void setBarType(BarStyle style, bool smooth = false); + Q_INVOKABLE void setBarType(BarStyle style, bool smooth = false); // override bar type with own mesh - void setMeshFileName(const QString &objFileName); + Q_INVOKABLE void setMeshFileName(const QString &objFileName); // Select preset camera placement - void setCameraPreset(CameraPreset preset); + Q_INVOKABLE void setCameraPreset(CameraPreset preset); // Set camera rotation if you don't want to use the presets (in horizontal (-180...180) and // vertical (0...90) angles and distance in percentage (10...500)) - void setCameraPosition(GLfloat horizontal, GLfloat vertical, GLint distance = 100); + Q_INVOKABLE void setCameraPosition(GLfloat horizontal, GLfloat vertical, GLint distance = 100); // Set theme (bar colors, shaders, window color, background colors, light intensity and text colors are affected) - void setTheme(ColorTheme theme); + Q_INVOKABLE void setTheme(ColorTheme theme); // 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 - void setBarColor(QColor baseColor, QColor heightColor, bool uniform = true); + Q_INVOKABLE void setBarColor(QColor baseColor, QColor heightColor, bool uniform = true); // TODO: valon siirto / asetus // Change selection mode; single bar, bar and row, bar and column, or all - void setSelectionMode(SelectionMode mode); + Q_INVOKABLE void setSelectionMode(SelectionMode mode); // Set window title - void setWindowTitle(const QString &title); + Q_INVOKABLE void setWindowTitle(const QString &title); // Font size adjustment (should it be in enum (smallest, smaller, small, normal, large, larger, largest), or just GLfloat? - void setFontSize(GLfloat fontsize); + Q_INVOKABLE void setFontSize(GLfloat fontsize); // Set font - void setFont(const QFont &font); + Q_INVOKABLE void setFont(const QFont &font); // Label transparency adjustment - void setLabelTransparency(LabelTransparency transparency); + Q_INVOKABLE void setLabelTransparency(LabelTransparency transparency); // Enable or disable background grid - void setGridEnabled(bool enable); + Q_INVOKABLE void setGridEnabled(bool enable); // Set area specs - void setAreaSpecs(const QRect &areaRect, const QImage &image); + Q_INVOKABLE void setAreaSpecs(const QRect &areaRect, const QImage &image); // Set area image - void setImage(const QImage &image); + Q_INVOKABLE void setImage(const QImage &image); // Adjust shadow quality - void setShadowQuality(ShadowQuality quality); + Q_INVOKABLE void setShadowQuality(ShadowQuality quality); protected: #if defined(Q_OS_ANDROID) |