213 lines
6.4 KiB
C++
213 lines
6.4 KiB
C++
/****************************************************************************
|
|
**
|
|
** Copyright (C) 2016 The Qt Company Ltd.
|
|
** Contact: https://www.qt.io/licensing/
|
|
**
|
|
** This file is part of the tools applications of the Qt Toolkit.
|
|
**
|
|
** $QT_BEGIN_LICENSE:LGPL$
|
|
** Commercial License Usage
|
|
** Licensees holding valid commercial Qt licenses may use this file in
|
|
** accordance with the commercial license agreement provided with the
|
|
** Software or, alternatively, in accordance with the terms contained in
|
|
** a written agreement between you and The Qt Company. For licensing terms
|
|
** and conditions see https://www.qt.io/terms-conditions. For further
|
|
** information use the contact form at https://www.qt.io/contact-us.
|
|
**
|
|
** GNU Lesser General Public License Usage
|
|
** Alternatively, this file may be used under the terms of the GNU Lesser
|
|
** General Public License version 3 as published by the Free Software
|
|
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
|
** packaging of this file. Please review the following information to
|
|
** ensure the GNU Lesser General Public License version 3 requirements
|
|
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
|
**
|
|
** GNU General Public License Usage
|
|
** Alternatively, this file may be used under the terms of the GNU
|
|
** General Public License version 2.0 or (at your option) the GNU General
|
|
** Public license version 3 or any later version approved by the KDE Free
|
|
** Qt Foundation. The licenses are as published by the Free Software
|
|
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
|
** included in the packaging of this file. Please review the following
|
|
** information to ensure the GNU General Public License requirements will
|
|
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
|
** https://www.gnu.org/licenses/gpl-3.0.html.
|
|
**
|
|
** $QT_END_LICENSE$
|
|
**
|
|
****************************************************************************/
|
|
|
|
#ifndef QTWORKSPACEATTRIBUTE_H
|
|
#define QTWORKSPACEATTRIBUTE_H
|
|
|
|
#include <QString>
|
|
#include <QColor>
|
|
#include <osg/Vec3>
|
|
|
|
class QWorkspaceAttribute {
|
|
public:
|
|
QWorkspaceAttribute() = default;
|
|
QWorkspaceAttribute(class WorkSpace* workspace);
|
|
QWorkspaceAttribute& operator=(const QWorkspaceAttribute& other);
|
|
~QWorkspaceAttribute() = default;
|
|
|
|
bool operator== (const QWorkspaceAttribute& other);
|
|
|
|
void SetName(const QString& name);
|
|
const QString GetName() const;
|
|
|
|
void SetDescription(const QString& desc);
|
|
const QString GetDescription() const;
|
|
|
|
void SetTimeStep(const QString& timestep);
|
|
const QString GetTimeStep() const;
|
|
|
|
private:
|
|
class WorkSpace* workspace_{ nullptr };
|
|
};
|
|
|
|
|
|
class QTransformAttribute {
|
|
public:
|
|
QTransformAttribute() = default;
|
|
QTransformAttribute(class Transform* entity);
|
|
QTransformAttribute& operator=(const QTransformAttribute& other);
|
|
~QTransformAttribute() = default;
|
|
|
|
bool operator== (const QTransformAttribute& other);
|
|
bool operator!= (const QTransformAttribute& other);
|
|
|
|
void SetLocation(const osg::Vec3& l);
|
|
const osg::Vec3 GetLocation() const;
|
|
|
|
void SetRotation(const osg::Vec3& r);
|
|
const osg::Vec3 GetRotation() const;
|
|
|
|
void SetScale(const osg::Vec3& s);
|
|
const osg::Vec3 GetScale() const;
|
|
|
|
private:
|
|
class Transform* object_{ nullptr };
|
|
};
|
|
|
|
class QEntityAttribute {
|
|
public:
|
|
QEntityAttribute() = default;
|
|
QEntityAttribute(class Entity* entity);
|
|
QEntityAttribute& operator=(const QEntityAttribute& other);
|
|
~QEntityAttribute() = default;
|
|
|
|
bool operator== (const QEntityAttribute& other);
|
|
|
|
void SetName(const QString& name);
|
|
const QString GetName() const;
|
|
|
|
QTransformAttribute GetTransform() const;
|
|
|
|
|
|
private:
|
|
class Entity* entity_{ nullptr };
|
|
QTransformAttribute* transform_{ nullptr };
|
|
};
|
|
|
|
class QMeshComponentAttribute {
|
|
public:
|
|
QMeshComponentAttribute() = default;
|
|
QMeshComponentAttribute(class MeshComponent* obj);
|
|
QMeshComponentAttribute& operator=(const QMeshComponentAttribute& other);
|
|
~QMeshComponentAttribute() = default;
|
|
|
|
bool operator== (const QMeshComponentAttribute& other);
|
|
|
|
void SetMesh(const QString& mesh);
|
|
QString GetMesh() const;
|
|
|
|
private:
|
|
class MeshComponent* object_{ nullptr };
|
|
};
|
|
|
|
class QPathComponentAttribute {
|
|
public:
|
|
QPathComponentAttribute() = default;
|
|
QPathComponentAttribute(class PathComponent* obj);
|
|
QPathComponentAttribute& operator=(const QPathComponentAttribute& other);
|
|
~QPathComponentAttribute() = default;
|
|
|
|
bool operator== (const QPathComponentAttribute& other);
|
|
|
|
void SetPath(const QString& path);
|
|
QString GetPath() const;
|
|
|
|
private:
|
|
class PathComponent* object_{ nullptr };
|
|
};
|
|
|
|
class QConeWaveComponentAttribute {
|
|
public:
|
|
QConeWaveComponentAttribute() = default;
|
|
QConeWaveComponentAttribute(class ConeWaveComponent* obj);
|
|
QConeWaveComponentAttribute& operator=(const QConeWaveComponentAttribute& other);
|
|
~QConeWaveComponentAttribute() = default;
|
|
|
|
bool operator== (const QConeWaveComponentAttribute& other);
|
|
|
|
void SetRadius(float r);
|
|
float GetRadius() const;
|
|
|
|
void SetColor1(const QColor& c);
|
|
QColor GetColor1() const;
|
|
void SetColor2(const QColor& c);
|
|
QColor GetColor2() const;
|
|
void SetColor3(const QColor& c);
|
|
QColor GetColor3() const;
|
|
|
|
void SetHeight(float h);
|
|
float GetHeight() const;
|
|
|
|
|
|
private:
|
|
class ConeWaveComponent* object_{ nullptr };
|
|
};
|
|
|
|
class QDashedLineComponentAttribute {
|
|
public:
|
|
QDashedLineComponentAttribute() = default;
|
|
QDashedLineComponentAttribute(class DashedLineComponent* obj);
|
|
QDashedLineComponentAttribute& operator=(const QDashedLineComponentAttribute& other);
|
|
~QDashedLineComponentAttribute() = default;
|
|
|
|
bool operator== (const QDashedLineComponentAttribute& other);
|
|
|
|
void SetStart(const QEntityAttribute& start);
|
|
const QEntityAttribute& GetStart() const;
|
|
void SetStart(const QString& uuid);
|
|
//QString GetStart() const;
|
|
|
|
void SetEnd(const QEntityAttribute& end);
|
|
const QEntityAttribute& GetEnd() const {
|
|
return endEntity_;
|
|
}
|
|
void SetEnd(const QString& uuid);
|
|
//QString GetEnd() const;
|
|
|
|
void SetRadius(float r);
|
|
float GetRadius() const;
|
|
|
|
void SetColor(const QColor& c);
|
|
QColor GetColor() const;
|
|
|
|
|
|
private:
|
|
class DashedLineComponent* object_{ nullptr };
|
|
QEntityAttribute startEntity_;
|
|
QEntityAttribute endEntity_;
|
|
mutable QString startUUid_;
|
|
mutable QString startName_;
|
|
mutable QString endUUid_;
|
|
mutable QString endName_;
|
|
};
|
|
|
|
//Q_DECLARE_SHARED(QModelAttbute)
|
|
|
|
#endif
|