2013-11-15 13:41:26 +01:00
|
|
|
/************************************************************************
|
2013-09-18 21:16:19 +02:00
|
|
|
**
|
2013-11-15 13:50:05 +01:00
|
|
|
** @file vcontainer.h
|
2014-04-30 07:38:52 +02:00
|
|
|
** @author Roman Telezhynskyi <dismine(at)gmail.com>
|
2013-11-15 13:50:05 +01:00
|
|
|
** @date November 15, 2013
|
2013-09-18 21:16:19 +02:00
|
|
|
**
|
2013-11-15 13:41:26 +01:00
|
|
|
** @brief
|
|
|
|
** @copyright
|
|
|
|
** This source code is part of the Valentine project, a pattern making
|
|
|
|
** program, whose allow create and modeling patterns of clothing.
|
|
|
|
** Copyright (C) 2013 Valentina project
|
|
|
|
** <https://bitbucket.org/dismine/valentina> All Rights Reserved.
|
2013-09-18 21:16:19 +02:00
|
|
|
**
|
2013-11-15 13:41:26 +01:00
|
|
|
** Valentina is free software: you can redistribute it and/or modify
|
2013-09-18 21:16:19 +02:00
|
|
|
** it under the terms of the GNU General Public License as published by
|
|
|
|
** the Free Software Foundation, either version 3 of the License, or
|
|
|
|
** (at your option) any later version.
|
|
|
|
**
|
2013-10-27 13:36:29 +01:00
|
|
|
** Valentina is distributed in the hope that it will be useful,
|
2013-09-18 21:16:19 +02:00
|
|
|
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
** GNU General Public License for more details.
|
|
|
|
**
|
|
|
|
** You should have received a copy of the GNU General Public License
|
|
|
|
** along with Valentina. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
**
|
2013-11-15 13:41:26 +01:00
|
|
|
*************************************************************************/
|
2013-09-18 21:16:19 +02:00
|
|
|
|
2013-07-13 12:51:31 +02:00
|
|
|
#ifndef VCONTAINER_H
|
|
|
|
#define VCONTAINER_H
|
|
|
|
|
2014-03-14 15:12:53 +01:00
|
|
|
#include "vmeasurement.h"
|
2014-03-19 19:27:11 +01:00
|
|
|
#include "vincrement.h"
|
2013-11-06 18:06:00 +01:00
|
|
|
#include "../geometry/vdetail.h"
|
2013-12-29 17:48:57 +01:00
|
|
|
#include "../geometry/vgobject.h"
|
2013-12-30 12:28:33 +01:00
|
|
|
#include "../exception/vexceptionbadid.h"
|
2014-06-17 11:50:11 +02:00
|
|
|
#include <QCoreApplication>
|
|
|
|
#include <QHash>
|
2013-07-13 12:51:31 +02:00
|
|
|
|
2013-08-05 10:37:56 +02:00
|
|
|
/**
|
2013-10-07 17:34:14 +02:00
|
|
|
* @brief The VContainer class container of all variables.
|
2013-08-05 10:37:56 +02:00
|
|
|
*/
|
2013-11-04 21:35:15 +01:00
|
|
|
class VContainer
|
|
|
|
{
|
2013-09-23 14:08:06 +02:00
|
|
|
Q_DECLARE_TR_FUNCTIONS(VContainer)
|
2013-07-13 12:51:31 +02:00
|
|
|
public:
|
2014-05-07 18:55:57 +02:00
|
|
|
VContainer();
|
|
|
|
VContainer &operator=(const VContainer &data);
|
|
|
|
VContainer(const VContainer &data);
|
|
|
|
~VContainer();
|
2013-12-31 09:08:14 +01:00
|
|
|
template <typename T>
|
2014-02-25 15:40:24 +01:00
|
|
|
void CopyGObject(const VContainer &data, const quint32 &id)
|
2013-12-31 09:08:14 +01:00
|
|
|
{
|
|
|
|
T *obj = new T(*data.GeometricObject<const T *>(id));
|
|
|
|
UpdateGObject(id, obj);
|
|
|
|
}
|
2014-05-21 10:51:16 +02:00
|
|
|
void setData(const VContainer &data);
|
2013-12-29 17:48:57 +01:00
|
|
|
template <typename T>
|
2014-03-02 19:32:54 +01:00
|
|
|
const T GeometricObject(const quint32 &id) const
|
2013-12-29 17:48:57 +01:00
|
|
|
{
|
2014-02-26 10:22:05 +01:00
|
|
|
VGObject *gObj = nullptr;
|
2013-12-30 12:28:33 +01:00
|
|
|
if (gObjects.contains(id))
|
|
|
|
{
|
|
|
|
gObj = gObjects.value(id);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
throw VExceptionBadId(tr("Can't find object"), id);
|
2014-03-02 19:32:54 +01:00
|
|
|
return nullptr;
|
2013-12-30 12:28:33 +01:00
|
|
|
}
|
2014-03-02 19:32:54 +01:00
|
|
|
|
|
|
|
try
|
|
|
|
{
|
|
|
|
T obj = dynamic_cast<T>(gObj);
|
2014-05-30 21:56:05 +02:00
|
|
|
SCASSERT(obj != nullptr);
|
2014-03-02 19:32:54 +01:00
|
|
|
return obj;
|
|
|
|
}
|
2014-03-06 16:35:24 +01:00
|
|
|
catch (const std::bad_alloc &)
|
2014-03-02 19:32:54 +01:00
|
|
|
{
|
|
|
|
throw VExceptionBadId(tr("Can't cast object"), id);
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
return nullptr;
|
2013-12-29 17:48:57 +01:00
|
|
|
}
|
|
|
|
|
2014-05-21 10:51:16 +02:00
|
|
|
const VGObject *GetGObject(quint32 id) const;
|
|
|
|
const VMeasurement GetMeasurement(const QString& name) const;
|
|
|
|
const VIncrement GetIncrement(const QString& name) const;
|
|
|
|
qreal GetLine(const QString &name) const;
|
|
|
|
qreal GetLengthArc(const QString &name) const;
|
|
|
|
qreal GetLengthSpline(const QString &name) const;
|
|
|
|
qreal GetLineAngle(const QString &name) const;
|
|
|
|
const VDetail GetDetail(quint32 id) const;
|
|
|
|
static quint32 getId(){return _id;}
|
|
|
|
quint32 AddGObject(VGObject *obj);
|
|
|
|
quint32 AddDetail(VDetail detail);
|
|
|
|
void AddMeasurement(const QString& name, const VMeasurement &m);
|
|
|
|
void AddIncrement(const QString& name, VIncrement incr);
|
|
|
|
void AddLengthLine(const QString &name, const qreal &value);
|
|
|
|
void AddLengthSpline(const QString &name, const qreal &value);
|
|
|
|
void AddLengthArc(const quint32 &id);
|
|
|
|
void AddLineAngle(const QString &name, const qreal &value);
|
|
|
|
void AddLine(const quint32 &firstPointId, const quint32 &secondPointId);
|
2014-01-27 16:48:11 +01:00
|
|
|
// cppcheck-suppress functionStatic
|
2014-05-21 10:51:16 +02:00
|
|
|
QString GetNameLine(const quint32 &firstPoint, const quint32 &secondPoint) const;
|
2014-01-27 16:48:11 +01:00
|
|
|
// cppcheck-suppress functionStatic
|
2014-05-21 10:51:16 +02:00
|
|
|
QString GetNameLineAngle(const quint32 &firstPoint, const quint32 &secondPoint) const;
|
|
|
|
void UpdateGObject(quint32 id, VGObject* obj);
|
|
|
|
void UpdateDetail(quint32 id, const VDetail &detail);
|
|
|
|
void UpdateMeasurement(const QString& name, VMeasurement m);
|
|
|
|
void UpdateIncrement(const QString& name, VIncrement incr);
|
|
|
|
qreal GetValueStandardTableRow(const QString& name) const;
|
|
|
|
qreal GetValueIncrementTableRow(const QString& name) const;
|
|
|
|
void Clear();
|
|
|
|
void ClearGObjects();
|
|
|
|
void ClearCalculationGObjects();
|
|
|
|
void ClearIncrementTable();
|
|
|
|
void ClearMeasurements();
|
|
|
|
void ClearLengthLines();
|
|
|
|
void ClearLengthSplines();
|
|
|
|
void ClearLengthArcs();
|
|
|
|
void ClearLineAngles();
|
|
|
|
void ClearDetails();
|
|
|
|
void SetSize(qreal size);
|
|
|
|
void SetSizeName(const QString &name);
|
|
|
|
void SetHeight(qreal height);
|
|
|
|
void SetHeightName(const QString &name);
|
|
|
|
qreal size() const;
|
|
|
|
QString SizeName()const;
|
|
|
|
qreal height() const;
|
|
|
|
QString HeightName()const;
|
|
|
|
bool IncrementTableContains(const QString& name);
|
|
|
|
static quint32 getNextId();
|
|
|
|
void RemoveIncrementTableRow(const QString& name);
|
|
|
|
static void UpdateId(quint32 newId);
|
|
|
|
const QHash<quint32, VGObject*> *DataGObjects() const;
|
2014-03-16 14:17:39 +01:00
|
|
|
const QHash<QString, VMeasurement> *DataMeasurements() const;
|
2014-05-21 10:51:16 +02:00
|
|
|
const QHash<QString, VIncrement> *DataIncrements() const;
|
|
|
|
const QHash<QString, qreal> *DataLengthLines() const;
|
|
|
|
const QHash<QString, qreal> *DataLengthSplines() const;
|
|
|
|
const QHash<QString, qreal> *DataLengthArcs() const;
|
|
|
|
const QHash<QString, qreal> *DataLineAngles() const;
|
|
|
|
const QHash<quint32, VDetail> *DataDetails() const;
|
2013-07-13 12:51:31 +02:00
|
|
|
private:
|
2013-11-18 17:37:17 +01:00
|
|
|
/**
|
2014-01-07 11:46:23 +01:00
|
|
|
* @brief _id current id. New object will have value +1. For empty class equal 0.
|
2013-11-18 17:37:17 +01:00
|
|
|
*/
|
2014-02-25 15:40:24 +01:00
|
|
|
static quint32 _id;
|
2014-03-11 21:19:13 +01:00
|
|
|
qreal _size;
|
|
|
|
QString sizeName;
|
|
|
|
qreal _height;
|
|
|
|
QString heightName;
|
2013-11-18 17:37:17 +01:00
|
|
|
/**
|
2013-12-29 17:48:57 +01:00
|
|
|
* @brief gObjects graphicals objects of pattern.
|
2013-11-18 17:37:17 +01:00
|
|
|
*/
|
2014-02-25 15:40:24 +01:00
|
|
|
QHash<quint32, VGObject*> gObjects;
|
2013-11-18 17:37:17 +01:00
|
|
|
/**
|
2014-03-16 14:17:39 +01:00
|
|
|
* @brief measurements container of measurements.
|
2013-11-18 17:37:17 +01:00
|
|
|
*/
|
2014-03-16 14:17:39 +01:00
|
|
|
QHash<QString, VMeasurement> measurements;
|
2013-11-18 17:37:17 +01:00
|
|
|
/**
|
2014-03-19 19:27:11 +01:00
|
|
|
* @brief increments
|
2013-11-18 17:37:17 +01:00
|
|
|
*/
|
2014-03-19 19:27:11 +01:00
|
|
|
QHash<QString, VIncrement> increments;
|
2013-11-18 17:37:17 +01:00
|
|
|
/**
|
|
|
|
* @brief lengthLines container of lines lengths
|
|
|
|
*/
|
2013-10-27 11:22:44 +01:00
|
|
|
QHash<QString, qreal> lengthLines;
|
2013-11-18 17:37:17 +01:00
|
|
|
/**
|
|
|
|
* @brief lineAngles container of angles of lines
|
|
|
|
*/
|
2013-10-27 11:22:44 +01:00
|
|
|
QHash<QString, qreal> lineAngles;
|
2013-11-18 17:37:17 +01:00
|
|
|
/**
|
|
|
|
* @brief lengthSplines container of splines length
|
|
|
|
*/
|
2013-10-27 11:22:44 +01:00
|
|
|
QHash<QString, qreal> lengthSplines;
|
2013-11-18 17:37:17 +01:00
|
|
|
/**
|
|
|
|
* @brief lengthArcs container of arcs length
|
|
|
|
*/
|
2013-10-27 11:22:44 +01:00
|
|
|
QHash<QString, qreal> lengthArcs;
|
2013-11-18 17:37:17 +01:00
|
|
|
/**
|
|
|
|
* @brief details container of details
|
|
|
|
*/
|
2014-02-25 15:40:24 +01:00
|
|
|
QHash<quint32, VDetail> details;
|
2014-05-21 10:51:16 +02:00
|
|
|
|
2013-11-18 17:37:17 +01:00
|
|
|
template <typename key, typename val>
|
2014-01-27 16:48:11 +01:00
|
|
|
// cppcheck-suppress functionStatic
|
2013-12-30 12:28:33 +01:00
|
|
|
const val GetObject(const QHash<key, val> &obj, key id) const;
|
2014-05-21 10:51:16 +02:00
|
|
|
|
2013-12-29 17:48:57 +01:00
|
|
|
template <typename key, typename val>
|
2014-01-27 16:48:11 +01:00
|
|
|
// cppcheck-suppress functionStatic
|
2013-12-29 17:48:57 +01:00
|
|
|
val GetVariable(const QHash<key, val> &obj, key id) const;
|
2014-05-21 10:51:16 +02:00
|
|
|
|
2013-11-18 17:37:17 +01:00
|
|
|
template <typename val>
|
2014-02-25 15:40:24 +01:00
|
|
|
void UpdateObject(QHash<quint32, val > &obj, const quint32 &id, val point);
|
2014-05-21 10:51:16 +02:00
|
|
|
|
2013-11-18 17:37:17 +01:00
|
|
|
template <typename key, typename val>
|
2014-02-25 15:40:24 +01:00
|
|
|
static quint32 AddObject(QHash<key, val> &obj, val value);
|
2013-07-13 12:51:31 +02:00
|
|
|
};
|
|
|
|
|
2014-05-21 10:51:16 +02:00
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
|
|
|
/**
|
|
|
|
* @brief AddMeasurement add new measurement
|
|
|
|
* @param name short measurement name
|
2014-06-01 12:18:55 +02:00
|
|
|
* @param m measurement
|
2014-05-21 10:51:16 +02:00
|
|
|
*/
|
2014-03-14 15:12:53 +01:00
|
|
|
inline void VContainer::AddMeasurement(const QString &name, const VMeasurement &m)
|
2014-02-26 09:18:59 +01:00
|
|
|
{
|
2014-03-16 14:17:39 +01:00
|
|
|
measurements[name] = m;
|
2014-02-26 09:18:59 +01:00
|
|
|
}
|
|
|
|
|
2014-05-21 10:51:16 +02:00
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
|
|
|
/**
|
|
|
|
* @brief UpdateMeasurement update measurement by name
|
|
|
|
* @param name short measurement name
|
|
|
|
* @param m measurement
|
|
|
|
*/
|
2014-03-14 15:12:53 +01:00
|
|
|
inline void VContainer::UpdateMeasurement(const QString &name, VMeasurement m)
|
2014-02-26 09:18:59 +01:00
|
|
|
{
|
2014-03-16 14:17:39 +01:00
|
|
|
measurements[name] = m;
|
2014-02-26 09:18:59 +01:00
|
|
|
}
|
|
|
|
|
2014-05-21 10:51:16 +02:00
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
|
|
|
/**
|
|
|
|
* @brief UpdateIncrement update increment table row by name
|
|
|
|
* @param name name of row
|
2014-06-01 12:18:55 +02:00
|
|
|
* @param incr increment
|
2014-05-21 10:51:16 +02:00
|
|
|
*/
|
2014-03-19 19:27:11 +01:00
|
|
|
inline void VContainer::UpdateIncrement(const QString &name, VIncrement incr)
|
2014-02-26 09:18:59 +01:00
|
|
|
{
|
2014-03-19 19:27:11 +01:00
|
|
|
increments[name] = incr;
|
2014-02-26 09:18:59 +01:00
|
|
|
}
|
|
|
|
|
2014-05-21 10:51:16 +02:00
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
|
|
|
/**
|
|
|
|
* @brief ClearIncrementTable clear increment table
|
|
|
|
*/
|
2014-02-26 09:18:59 +01:00
|
|
|
inline void VContainer::ClearIncrementTable()
|
|
|
|
{
|
2014-03-19 19:27:11 +01:00
|
|
|
increments.clear();
|
2014-02-26 09:18:59 +01:00
|
|
|
}
|
|
|
|
|
2014-05-21 10:51:16 +02:00
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
2014-03-28 14:11:46 +01:00
|
|
|
inline void VContainer::ClearMeasurements()
|
|
|
|
{
|
|
|
|
measurements.clear();
|
|
|
|
}
|
|
|
|
|
2014-05-21 10:51:16 +02:00
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
|
|
|
/**
|
|
|
|
* @brief ClearLengthLines clear length lines
|
|
|
|
*/
|
2014-02-26 09:18:59 +01:00
|
|
|
inline void VContainer::ClearLengthLines()
|
|
|
|
{
|
|
|
|
lengthLines.clear();
|
|
|
|
}
|
|
|
|
|
2014-05-21 10:51:16 +02:00
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
|
|
|
/**
|
|
|
|
* @brief ClearLengthSplines clear length splines
|
|
|
|
*/
|
2014-02-26 09:18:59 +01:00
|
|
|
inline void VContainer::ClearLengthSplines()
|
|
|
|
{
|
|
|
|
lengthSplines.clear();
|
|
|
|
}
|
|
|
|
|
2014-05-21 10:51:16 +02:00
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
|
|
|
/**
|
|
|
|
* @brief ClearLengthArcs clear length arcs
|
|
|
|
*/
|
2014-02-26 09:18:59 +01:00
|
|
|
inline void VContainer::ClearLengthArcs()
|
|
|
|
{
|
|
|
|
lengthArcs.clear();
|
|
|
|
}
|
|
|
|
|
2014-05-21 10:51:16 +02:00
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
|
|
|
/**
|
|
|
|
* @brief ClearLineAngles clear angles of lines
|
|
|
|
*/
|
2014-02-26 09:18:59 +01:00
|
|
|
inline void VContainer::ClearLineAngles()
|
|
|
|
{
|
|
|
|
lineAngles.clear();
|
|
|
|
}
|
|
|
|
|
2014-05-21 10:51:16 +02:00
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
2014-02-26 09:18:59 +01:00
|
|
|
inline void VContainer::ClearDetails()
|
|
|
|
{
|
|
|
|
details.clear();
|
|
|
|
}
|
|
|
|
|
2014-05-21 10:51:16 +02:00
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
|
|
|
/**
|
|
|
|
* @brief SetSize set value of size
|
|
|
|
* @param size value of size
|
|
|
|
*/
|
2014-03-11 21:19:13 +01:00
|
|
|
inline void VContainer::SetSize(qreal size)
|
|
|
|
{
|
|
|
|
_size = size;
|
|
|
|
}
|
|
|
|
|
2014-05-21 10:51:16 +02:00
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
2014-03-11 21:19:13 +01:00
|
|
|
inline void VContainer::SetSizeName(const QString &name)
|
2014-02-26 09:18:59 +01:00
|
|
|
{
|
2014-03-11 21:19:13 +01:00
|
|
|
sizeName = name;
|
2014-02-26 09:18:59 +01:00
|
|
|
}
|
|
|
|
|
2014-05-21 10:51:16 +02:00
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
|
|
|
/**
|
|
|
|
* @brief SetGrowth set value of growth
|
2014-06-01 12:18:55 +02:00
|
|
|
* @param height value of height
|
2014-05-21 10:51:16 +02:00
|
|
|
*/
|
2014-03-11 21:19:13 +01:00
|
|
|
inline void VContainer::SetHeight(qreal height)
|
2014-02-26 09:18:59 +01:00
|
|
|
{
|
2014-03-11 21:19:13 +01:00
|
|
|
_height = height;
|
2014-02-26 09:18:59 +01:00
|
|
|
}
|
|
|
|
|
2014-05-21 10:51:16 +02:00
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
2014-03-11 21:19:13 +01:00
|
|
|
inline void VContainer::SetHeightName(const QString &name)
|
2014-02-26 09:18:59 +01:00
|
|
|
{
|
2014-03-11 21:19:13 +01:00
|
|
|
heightName = name;
|
2014-02-26 09:18:59 +01:00
|
|
|
}
|
|
|
|
|
2014-05-21 10:51:16 +02:00
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
|
|
|
/**
|
|
|
|
* @brief size return size
|
|
|
|
* @return size in mm
|
|
|
|
*/
|
2014-03-11 21:19:13 +01:00
|
|
|
inline qreal VContainer::size() const
|
2014-02-26 09:18:59 +01:00
|
|
|
{
|
2014-03-11 21:19:13 +01:00
|
|
|
return _size;
|
|
|
|
}
|
|
|
|
|
2014-05-21 10:51:16 +02:00
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
2014-03-11 21:19:13 +01:00
|
|
|
inline QString VContainer::SizeName() const
|
|
|
|
{
|
|
|
|
return sizeName;
|
|
|
|
}
|
|
|
|
|
2014-05-21 10:51:16 +02:00
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
|
|
|
/**
|
|
|
|
* @brief height return height
|
|
|
|
* @return height in pattern units
|
|
|
|
*/
|
2014-03-11 21:19:13 +01:00
|
|
|
inline qreal VContainer::height() const
|
|
|
|
{
|
|
|
|
return _height;
|
|
|
|
}
|
|
|
|
|
2014-05-21 10:51:16 +02:00
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
2014-03-11 21:19:13 +01:00
|
|
|
inline QString VContainer::HeightName() const
|
|
|
|
{
|
|
|
|
return heightName;
|
2014-02-26 09:18:59 +01:00
|
|
|
}
|
|
|
|
|
2014-05-21 10:51:16 +02:00
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
|
|
|
/**
|
|
|
|
* @brief IncrementTableContains check if increment table contains name
|
|
|
|
* @param name name of row
|
|
|
|
* @return true if contains
|
|
|
|
*/
|
2014-02-26 09:18:59 +01:00
|
|
|
inline bool VContainer::IncrementTableContains(const QString &name)
|
|
|
|
{
|
2014-03-19 19:27:11 +01:00
|
|
|
return increments.contains(name);
|
2014-02-26 09:18:59 +01:00
|
|
|
}
|
|
|
|
|
2014-05-21 10:51:16 +02:00
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
|
|
|
/**
|
|
|
|
* @brief RemoveIncrementTableRow remove row by name from increment table
|
|
|
|
* @param name name of existing row
|
|
|
|
*/
|
2014-02-26 09:18:59 +01:00
|
|
|
inline void VContainer::RemoveIncrementTableRow(const QString &name)
|
|
|
|
{
|
2014-03-19 19:27:11 +01:00
|
|
|
increments.remove(name);
|
2014-02-26 09:18:59 +01:00
|
|
|
}
|
|
|
|
|
2014-05-21 10:51:16 +02:00
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
|
|
|
/**
|
|
|
|
* @brief data container with datagObjects return container of gObjects
|
|
|
|
* @return pointer on container of gObjects
|
|
|
|
*/
|
2014-02-26 09:18:59 +01:00
|
|
|
inline const QHash<quint32, VGObject *> *VContainer::DataGObjects() const
|
|
|
|
{
|
|
|
|
return &gObjects;
|
|
|
|
}
|
|
|
|
|
2014-05-21 10:51:16 +02:00
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
|
|
|
/**
|
|
|
|
* @brief DataMeasurements container with measurements.
|
|
|
|
* @return pointer to measurements.
|
|
|
|
*/
|
2014-03-16 14:17:39 +01:00
|
|
|
inline const QHash<QString, VMeasurement> *VContainer::DataMeasurements() const
|
2014-02-26 09:18:59 +01:00
|
|
|
{
|
2014-03-16 14:17:39 +01:00
|
|
|
return &measurements;
|
2014-02-26 09:18:59 +01:00
|
|
|
}
|
|
|
|
|
2014-05-21 10:51:16 +02:00
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
|
|
|
/**
|
|
|
|
* @brief data container with dataIncrements return container of increment table
|
|
|
|
* @return pointer on container of increment table
|
|
|
|
*/
|
2014-03-19 19:27:11 +01:00
|
|
|
inline const QHash<QString, VIncrement> *VContainer::DataIncrements() const
|
2014-02-26 09:18:59 +01:00
|
|
|
{
|
2014-03-19 19:27:11 +01:00
|
|
|
return &increments;
|
2014-02-26 09:18:59 +01:00
|
|
|
}
|
|
|
|
|
2014-05-21 10:51:16 +02:00
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
|
|
|
/**
|
|
|
|
* @brief data container with dataLengthLines return container of lines lengths
|
|
|
|
* @return pointer on container of lines lengths
|
|
|
|
*/
|
2014-02-26 09:18:59 +01:00
|
|
|
inline const QHash<QString, qreal> *VContainer::DataLengthLines() const
|
|
|
|
{
|
|
|
|
return &lengthLines;
|
|
|
|
}
|
|
|
|
|
2014-05-21 10:51:16 +02:00
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
|
|
|
/**
|
|
|
|
* @brief data container with dataLengthSplines return container of splines lengths
|
|
|
|
* @return pointer on container of splines lengths
|
|
|
|
*/
|
2014-02-26 09:18:59 +01:00
|
|
|
inline const QHash<QString, qreal> *VContainer::DataLengthSplines() const
|
|
|
|
{
|
|
|
|
return &lengthSplines;
|
|
|
|
}
|
|
|
|
|
2014-05-21 10:51:16 +02:00
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
|
|
|
/**
|
|
|
|
* @brief data container with dataLengthArcs return container of arcs length
|
|
|
|
* @return pointer on container of arcs length
|
|
|
|
*/
|
2014-02-26 09:18:59 +01:00
|
|
|
inline const QHash<QString, qreal> *VContainer::DataLengthArcs() const
|
|
|
|
{
|
|
|
|
return &lengthArcs;
|
|
|
|
}
|
|
|
|
|
2014-05-21 10:51:16 +02:00
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
|
|
|
/**
|
|
|
|
* @brief data container with dataLineAngles return container of angles of line
|
|
|
|
* @return pointer on container of angles of line
|
|
|
|
*/
|
2014-02-26 09:18:59 +01:00
|
|
|
inline const QHash<QString, qreal> *VContainer::DataLineAngles() const
|
|
|
|
{
|
|
|
|
return &lineAngles;
|
|
|
|
}
|
|
|
|
|
2014-05-21 10:51:16 +02:00
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
|
|
|
/**
|
|
|
|
* @brief data container with dataDetails return container of details
|
|
|
|
* @return pointer on container of details
|
|
|
|
*/
|
2014-02-26 09:18:59 +01:00
|
|
|
inline const QHash<quint32, VDetail> *VContainer::DataDetails() const
|
|
|
|
{
|
|
|
|
return &details;
|
|
|
|
}
|
|
|
|
|
2013-07-13 12:51:31 +02:00
|
|
|
#endif // VCONTAINER_H
|