diff options
author | Keränen Pasi <pasi.keranen@digia.com> | 2013-09-27 09:05:53 +0300 |
---|---|---|
committer | Pasi Keränen <pasi.keranen@digia.com> | 2013-10-08 10:50:41 +0300 |
commit | 66e1b09592efe77f839a0878ec6165a02408ca6f (patch) | |
tree | 709736fc6693c014abc0467a7c1ac766c1c62c4f /src/datavisualization/engine/q3dscatter.cpp | |
parent | 0daa4359bdaba6372bc8235550892afdef003120 (diff) |
Added Camera QML API and Example
Change-Id: Ibc790ac6c720b6d22d68f662ff2f50e74a9abaae
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Diffstat (limited to 'src/datavisualization/engine/q3dscatter.cpp')
-rw-r--r-- | src/datavisualization/engine/q3dscatter.cpp | 37 |
1 files changed, 11 insertions, 26 deletions
diff --git a/src/datavisualization/engine/q3dscatter.cpp b/src/datavisualization/engine/q3dscatter.cpp index 55e353bf..a5053bf3 100644 --- a/src/datavisualization/engine/q3dscatter.cpp +++ b/src/datavisualization/engine/q3dscatter.cpp @@ -21,9 +21,9 @@ #include "scatter3dcontroller_p.h" #include "q3dvalueaxis.h" #include "qscatterdataproxy.h" +#include "q3dcamera.h" #include <QMouseEvent> - #include <QDebug> QT_DATAVISUALIZATION_BEGIN_NAMESPACE @@ -189,31 +189,6 @@ void Q3DScatter::setObjectType(QDataVis::MeshStyle style, bool smooth) } /*! - * \property Q3DScatter::cameraPreset - * - * The \a preset position of the camera. The position can be one of \c QDataVis::CameraPreset. - */ -void Q3DScatter::setCameraPreset(QDataVis::CameraPreset preset) -{ - d_ptr->m_shared->setCameraPreset(preset); -} - -QDataVis::CameraPreset Q3DScatter::cameraPreset() const -{ - return d_ptr->m_shared->cameraPreset(); -} - -/*! - * Move camera to a wanted position based on \a horizontal and \a vertical angles. Angles are limited - * to -180...180 in horizontal direction and -90...90 in vertical. \a distance is adjustable - * between 10 and 500, being \c 100 by default. - */ -void Q3DScatter::setCameraPosition(qreal horizontal, qreal vertical, int distance) -{ - d_ptr->m_shared->setCameraPosition(GLfloat(horizontal), GLfloat(vertical), GLint(distance)); -} - -/*! * Sets a predefined \a theme from \c QDataVis::Theme. It is preset to \c QDataVis::ThemeQt by * default. Theme affects bar colors, label colors, text color, background color, window color and * grid color. Lighting is also adjusted by themes. @@ -302,6 +277,16 @@ QFont Q3DScatter::font() const } /*! + * \property Q3DScatter::scene + * + * This property contains the read only Q3DScene that can be used to access e.g. camera object. + */ +Q3DScene *Q3DScatter::scene() const +{ + return d_ptr->m_shared->scene(); +} + +/*! * \property Q3DScatter::labelStyle * * Sets label \a style to one of \c QDataVis::LabelStyle. It is preset to |