Add custom measurement in table.
--HG-- branch : feature
This commit is contained in:
parent
397f5b65bc
commit
b046aba66c
|
@ -340,6 +340,63 @@ void TMainWindow::ReadOnly(bool ro)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
void TMainWindow::AddCustom()
|
||||||
|
{
|
||||||
|
ui->tableWidget->setFocus(Qt::OtherFocusReason);
|
||||||
|
ui->tableWidget->blockSignals(true);
|
||||||
|
const qint32 currentRow = ui->tableWidget->rowCount();
|
||||||
|
ui->tableWidget->insertRow( currentRow );
|
||||||
|
|
||||||
|
qint32 num = 1;
|
||||||
|
QString name;
|
||||||
|
do
|
||||||
|
{
|
||||||
|
name = QString("@" + tr("M_%1")).arg(num);
|
||||||
|
num++;
|
||||||
|
} while (data->IsUnique(name) == false);
|
||||||
|
|
||||||
|
const int id = m->AddEmptyMeasurement(name);
|
||||||
|
|
||||||
|
VMeasurement *meash;
|
||||||
|
if (mType == MeasurementsType::Standard)
|
||||||
|
{
|
||||||
|
meash = new VMeasurement(name, 0, 0, 0);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
meash = new VMeasurement(data, id, name, 0, "0");
|
||||||
|
}
|
||||||
|
data->AddVariable(name, meash);
|
||||||
|
|
||||||
|
if (mType == MeasurementsType::Individual)
|
||||||
|
{
|
||||||
|
AddCell(name, currentRow, 0, id); // name
|
||||||
|
AddCell("0", currentRow, 2); // value
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
AddCell(name, currentRow, 0); // name
|
||||||
|
AddCell("0", currentRow, 1); // calculated value
|
||||||
|
AddCell("0", currentRow, 3); // base value
|
||||||
|
AddCell("0", currentRow, 4); // in sizes
|
||||||
|
AddCell("0", currentRow, 5); // in heights
|
||||||
|
}
|
||||||
|
|
||||||
|
//ui->toolButtonRemove->setEnabled(true);
|
||||||
|
ui->tableWidget->blockSignals(false);
|
||||||
|
|
||||||
|
ui->tableWidget->selectRow(currentRow);
|
||||||
|
|
||||||
|
MeasurementsWasSaved(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
void TMainWindow::AddKnown()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void TMainWindow::SetupMenu()
|
void TMainWindow::SetupMenu()
|
||||||
{
|
{
|
||||||
|
@ -361,6 +418,10 @@ void TMainWindow::SetupMenu()
|
||||||
connect(ui->actionQuit, &QAction::triggered, this, &TMainWindow::close);
|
connect(ui->actionQuit, &QAction::triggered, this, &TMainWindow::close);
|
||||||
ui->actionQuit->setShortcuts(QKeySequence::Quit);
|
ui->actionQuit->setShortcuts(QKeySequence::Quit);
|
||||||
|
|
||||||
|
// Measurements
|
||||||
|
connect(ui->actionAddCustom, &QAction::triggered, this, &TMainWindow::AddCustom);
|
||||||
|
connect(ui->actionAddKnown, &QAction::triggered, this, &TMainWindow::AddKnown);
|
||||||
|
|
||||||
// Window
|
// Window
|
||||||
connect(ui->menuWindow, &QMenu::aboutToShow, this, &TMainWindow::AboutToShowWindowMenu);
|
connect(ui->menuWindow, &QMenu::aboutToShow, this, &TMainWindow::AboutToShowWindowMenu);
|
||||||
AboutToShowWindowMenu();
|
AboutToShowWindowMenu();
|
||||||
|
@ -466,13 +527,14 @@ void TMainWindow::InitTable()
|
||||||
{
|
{
|
||||||
if (mType == MeasurementsType::Standard)
|
if (mType == MeasurementsType::Standard)
|
||||||
{
|
{
|
||||||
ui->tableWidget->setColumnHidden( 1, true );// value
|
ui->tableWidget->setColumnHidden( 2, true );// value
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ui->tableWidget->setColumnHidden( 2, true );// base value
|
ui->tableWidget->setColumnHidden( 1, true );// calculated value
|
||||||
ui->tableWidget->setColumnHidden( 3, true );// in sizes
|
ui->tableWidget->setColumnHidden( 3, true );// base value
|
||||||
ui->tableWidget->setColumnHidden( 4, true );// in heights
|
ui->tableWidget->setColumnHidden( 4, true );// in sizes
|
||||||
|
ui->tableWidget->setColumnHidden( 5, true );// in heights
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -543,3 +605,21 @@ bool TMainWindow::MaybeSave()
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
void TMainWindow::AddCell(const QString &text, int row, int column, int id)
|
||||||
|
{
|
||||||
|
QTableWidgetItem *item = new QTableWidgetItem(text);
|
||||||
|
item->setTextAlignment(Qt::AlignHCenter | Qt::AlignVCenter);
|
||||||
|
// set the item non-editable (view only), and non-selectable
|
||||||
|
Qt::ItemFlags flags = item->flags();
|
||||||
|
flags &= ~(Qt::ItemIsEditable); // reset/clear the flag
|
||||||
|
item->setFlags(flags);
|
||||||
|
|
||||||
|
if (mType == MeasurementsType::Individual && id >= 0)
|
||||||
|
{
|
||||||
|
item->setData(Qt::UserRole, id);
|
||||||
|
}
|
||||||
|
|
||||||
|
ui->tableWidget->setItem(row, column, item);
|
||||||
|
}
|
||||||
|
|
|
@ -68,6 +68,8 @@ private slots:
|
||||||
void SaveBirthDate(const QDate & date);
|
void SaveBirthDate(const QDate & date);
|
||||||
void SaveNotes();
|
void SaveNotes();
|
||||||
void ReadOnly(bool ro);
|
void ReadOnly(bool ro);
|
||||||
|
void AddCustom();
|
||||||
|
void AddKnown();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Q_DISABLE_COPY(TMainWindow)
|
Q_DISABLE_COPY(TMainWindow)
|
||||||
|
@ -87,6 +89,8 @@ private:
|
||||||
bool SaveMeasurements(const QString &fileName, QString &error);
|
bool SaveMeasurements(const QString &fileName, QString &error);
|
||||||
|
|
||||||
bool MaybeSave();
|
bool MaybeSave();
|
||||||
|
|
||||||
|
void AddCell(const QString &text, int row, int column, int id = -1);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // TMAINWINDOW_H
|
#endif // TMAINWINDOW_H
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
<string>Remove measurement</string>
|
<string>Remove measurement</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>1</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="tabMeasurements">
|
<widget class="QWidget" name="tabMeasurements">
|
||||||
<attribute name="icon">
|
<attribute name="icon">
|
||||||
|
@ -82,6 +82,9 @@
|
||||||
<property name="alternatingRowColors">
|
<property name="alternatingRowColors">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="selectionBehavior">
|
||||||
|
<enum>QAbstractItemView::SelectRows</enum>
|
||||||
|
</property>
|
||||||
<attribute name="horizontalHeaderStretchLastSection">
|
<attribute name="horizontalHeaderStretchLastSection">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</attribute>
|
</attribute>
|
||||||
|
@ -90,6 +93,11 @@
|
||||||
<string>Name</string>
|
<string>Name</string>
|
||||||
</property>
|
</property>
|
||||||
</column>
|
</column>
|
||||||
|
<column>
|
||||||
|
<property name="text">
|
||||||
|
<string>Calculated value</string>
|
||||||
|
</property>
|
||||||
|
</column>
|
||||||
<column>
|
<column>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Value</string>
|
<string>Value</string>
|
||||||
|
@ -606,7 +614,15 @@
|
||||||
<addaction name="actionAboutQt"/>
|
<addaction name="actionAboutQt"/>
|
||||||
<addaction name="actionAboutTape"/>
|
<addaction name="actionAboutTape"/>
|
||||||
</widget>
|
</widget>
|
||||||
|
<widget class="QMenu" name="menuMeasurements">
|
||||||
|
<property name="title">
|
||||||
|
<string>Measurements</string>
|
||||||
|
</property>
|
||||||
|
<addaction name="actionAddKnown"/>
|
||||||
|
<addaction name="actionAddCustom"/>
|
||||||
|
</widget>
|
||||||
<addaction name="menuFile"/>
|
<addaction name="menuFile"/>
|
||||||
|
<addaction name="menuMeasurements"/>
|
||||||
<addaction name="menuWindow"/>
|
<addaction name="menuWindow"/>
|
||||||
<addaction name="menuHelp"/>
|
<addaction name="menuHelp"/>
|
||||||
</widget>
|
</widget>
|
||||||
|
|
|
@ -70,7 +70,7 @@ void VIndividualMeasurements::ReadMeasurement(const QDomElement &domElement, con
|
||||||
{
|
{
|
||||||
qreal value = GetParametrDouble(domElement, AttrValue, "0.0");
|
qreal value = GetParametrDouble(domElement, AttrValue, "0.0");
|
||||||
value = UnitConvertor(value, MUnit(), qApp->patternUnit());
|
value = UnitConvertor(value, MUnit(), qApp->patternUnit());
|
||||||
data->AddVariable(tag, new VMeasurement(tag, value, qApp->TrVars()->GuiText(tag),
|
data->AddVariable(tag, new VMeasurement(data, 0, tag, value, qApp->TrVars()->GuiText(tag),
|
||||||
qApp->TrVars()->Description(tag), tag));
|
qApp->TrVars()->Description(tag), tag));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -116,8 +116,8 @@ void VStandardMeasurements::ReadMeasurement(const QDomElement &domElement, const
|
||||||
qWarning()<<"Standard table can't use inch unit.";
|
qWarning()<<"Standard table can't use inch unit.";
|
||||||
}
|
}
|
||||||
|
|
||||||
data->AddVariable(tag, new VMeasurement(tag, value, size_increase, height_increase, qApp->TrVars()->GuiText(tag),
|
data->AddVariable(tag, new VMeasurement(tag, value, size_increase, height_increase,
|
||||||
qApp->TrVars()->Description(tag), tag));
|
qApp->TrVars()->GuiText(tag), qApp->TrVars()->Description(tag), tag));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -44,8 +44,14 @@ const QString VMeasurements::TagBirthDate = QStringLiteral("birth-date");
|
||||||
const QString VMeasurements::TagSex = QStringLiteral("sex");
|
const QString VMeasurements::TagSex = QStringLiteral("sex");
|
||||||
const QString VMeasurements::TagEmail = QStringLiteral("email");
|
const QString VMeasurements::TagEmail = QStringLiteral("email");
|
||||||
const QString VMeasurements::TagReadOnly = QStringLiteral("read-only");
|
const QString VMeasurements::TagReadOnly = QStringLiteral("read-only");
|
||||||
|
const QString VMeasurements::TagMeasurement = QStringLiteral("m");
|
||||||
|
|
||||||
const QString VMeasurements::AttrBase = QStringLiteral("base");
|
const QString VMeasurements::AttrBase = QStringLiteral("base");
|
||||||
|
const QString VMeasurements::AttrValue = QStringLiteral("value");
|
||||||
|
const QString VMeasurements::AttrSizeIncrease = QStringLiteral("size_increase");
|
||||||
|
const QString VMeasurements::AttrHeightIncrease = QStringLiteral("height_increase");
|
||||||
|
const QString VMeasurements::AttrDescription = QStringLiteral("description");
|
||||||
|
const QString VMeasurements::AttrName = QStringLiteral("name");
|
||||||
|
|
||||||
const QString VMeasurements::SexMale = QStringLiteral("male");
|
const QString VMeasurements::SexMale = QStringLiteral("male");
|
||||||
const QString VMeasurements::SexFemale = QStringLiteral("female");
|
const QString VMeasurements::SexFemale = QStringLiteral("female");
|
||||||
|
@ -55,7 +61,8 @@ const QString VMeasurements::SexUnknown = QStringLiteral("unknown");
|
||||||
VMeasurements::VMeasurements(VContainer *data)
|
VMeasurements::VMeasurements(VContainer *data)
|
||||||
:VDomDocument(),
|
:VDomDocument(),
|
||||||
data(data),
|
data(data),
|
||||||
type(MeasurementsType::Unknown)
|
type(MeasurementsType::Unknown),
|
||||||
|
id(-1)
|
||||||
{
|
{
|
||||||
SCASSERT(data != nullptr)
|
SCASSERT(data != nullptr)
|
||||||
}
|
}
|
||||||
|
@ -64,7 +71,8 @@ VMeasurements::VMeasurements(VContainer *data)
|
||||||
VMeasurements::VMeasurements(Unit unit, VContainer *data)
|
VMeasurements::VMeasurements(Unit unit, VContainer *data)
|
||||||
:VDomDocument(),
|
:VDomDocument(),
|
||||||
data(data),
|
data(data),
|
||||||
type(MeasurementsType::Individual)
|
type(MeasurementsType::Individual),
|
||||||
|
id(-1)
|
||||||
{
|
{
|
||||||
SCASSERT(data != nullptr);
|
SCASSERT(data != nullptr);
|
||||||
|
|
||||||
|
@ -75,7 +83,8 @@ VMeasurements::VMeasurements(Unit unit, VContainer *data)
|
||||||
VMeasurements::VMeasurements(Unit unit, int baseSize, int baseHeight, VContainer *data)
|
VMeasurements::VMeasurements(Unit unit, int baseSize, int baseHeight, VContainer *data)
|
||||||
:VDomDocument(),
|
:VDomDocument(),
|
||||||
data(data),
|
data(data),
|
||||||
type(MeasurementsType::Standard)
|
type(MeasurementsType::Standard),
|
||||||
|
id(-1)
|
||||||
{
|
{
|
||||||
SCASSERT(data != nullptr);
|
SCASSERT(data != nullptr);
|
||||||
|
|
||||||
|
@ -87,6 +96,32 @@ VMeasurements::~VMeasurements()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
int VMeasurements::AddEmptyMeasurement(QString &name)
|
||||||
|
{
|
||||||
|
QDomElement element = createElement(TagMeasurement);
|
||||||
|
|
||||||
|
SetAttribute(element, AttrName, name);
|
||||||
|
SetAttribute(element, AttrValue, QString("0"));
|
||||||
|
|
||||||
|
if (type == MeasurementsType::Standard)
|
||||||
|
{
|
||||||
|
SetAttribute(element, AttrSizeIncrease, QString("0"));
|
||||||
|
SetAttribute(element, AttrHeightIncrease, QString("0"));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
++id;
|
||||||
|
SetAttribute(element, AttrId, id);
|
||||||
|
SetAttribute(element, AttrDescription, QString(""));
|
||||||
|
}
|
||||||
|
|
||||||
|
QDomNodeList list = elementsByTagName(TagBodyMeasurements);
|
||||||
|
list.at(0).appendChild(element);
|
||||||
|
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
MeasurementsType VMeasurements::Type() const
|
MeasurementsType VMeasurements::Type() const
|
||||||
{
|
{
|
||||||
|
|
|
@ -43,6 +43,8 @@ public:
|
||||||
VMeasurements(Unit unit, int baseSize, int baseHeight, VContainer *data);
|
VMeasurements(Unit unit, int baseSize, int baseHeight, VContainer *data);
|
||||||
virtual ~VMeasurements() Q_DECL_OVERRIDE;
|
virtual ~VMeasurements() Q_DECL_OVERRIDE;
|
||||||
|
|
||||||
|
int AddEmptyMeasurement(QString &name);
|
||||||
|
|
||||||
MeasurementsType Type() const;
|
MeasurementsType Type() const;
|
||||||
Unit MUnit() const;
|
Unit MUnit() const;
|
||||||
int BaseSize() const;
|
int BaseSize() const;
|
||||||
|
@ -83,8 +85,14 @@ public:
|
||||||
static const QString TagSex;
|
static const QString TagSex;
|
||||||
static const QString TagEmail;
|
static const QString TagEmail;
|
||||||
static const QString TagReadOnly;
|
static const QString TagReadOnly;
|
||||||
|
static const QString TagMeasurement;
|
||||||
|
|
||||||
static const QString AttrBase;
|
static const QString AttrBase;
|
||||||
|
static const QString AttrValue;
|
||||||
|
static const QString AttrSizeIncrease;
|
||||||
|
static const QString AttrHeightIncrease;
|
||||||
|
static const QString AttrDescription;
|
||||||
|
static const QString AttrName;
|
||||||
|
|
||||||
static const QString SexMale;
|
static const QString SexMale;
|
||||||
static const QString SexFemale;
|
static const QString SexFemale;
|
||||||
|
@ -99,6 +107,7 @@ private:
|
||||||
/** @brief data container with data. */
|
/** @brief data container with data. */
|
||||||
VContainer *data;
|
VContainer *data;
|
||||||
MeasurementsType type;
|
MeasurementsType type;
|
||||||
|
int id;
|
||||||
|
|
||||||
void CreateEmptyStandardFile(Unit unit, int baseSize, int baseHeight);
|
void CreateEmptyStandardFile(Unit unit, int baseSize, int baseHeight);
|
||||||
void CreateEmptyIndividualFile(Unit unit);
|
void CreateEmptyIndividualFile(Unit unit);
|
||||||
|
|
|
@ -29,16 +29,6 @@
|
||||||
#include "vmeasurement.h"
|
#include "vmeasurement.h"
|
||||||
#include "vmeasurement_p.h"
|
#include "vmeasurement_p.h"
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
|
||||||
/**
|
|
||||||
* @brief VMeasurement create empty measurement
|
|
||||||
*/
|
|
||||||
VMeasurement::VMeasurement()
|
|
||||||
:VVariable(), d(new VMeasurementData)
|
|
||||||
{
|
|
||||||
SetType(VarType::Measurement);
|
|
||||||
}
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
/**
|
/**
|
||||||
* @brief VMeasurement create measurement for standard table
|
* @brief VMeasurement create measurement for standard table
|
||||||
|
@ -50,7 +40,8 @@ VMeasurement::VMeasurement()
|
||||||
* @param description measurement full description
|
* @param description measurement full description
|
||||||
* @param tagName measurement's tag name in file
|
* @param tagName measurement's tag name in file
|
||||||
*/
|
*/
|
||||||
VMeasurement::VMeasurement(const QString &name, const qreal &base, const qreal &ksize, const qreal &kheight,
|
VMeasurement::VMeasurement(const QString &name, const qreal &base, const qreal &ksize,
|
||||||
|
const qreal &kheight,
|
||||||
const QString &gui_text, const QString &description, const QString &tagName)
|
const QString &gui_text, const QString &description, const QString &tagName)
|
||||||
:VVariable(name, base, ksize, kheight, description), d(new VMeasurementData(gui_text, tagName))
|
:VVariable(name, base, ksize, kheight, description), d(new VMeasurementData(gui_text, tagName))
|
||||||
{
|
{
|
||||||
|
@ -66,9 +57,10 @@ VMeasurement::VMeasurement(const QString &name, const qreal &base, const qreal &
|
||||||
* @param description measurement full description
|
* @param description measurement full description
|
||||||
* @param tagName measurement's tag name in file
|
* @param tagName measurement's tag name in file
|
||||||
*/
|
*/
|
||||||
VMeasurement::VMeasurement(const QString &name, const qreal &base, const QString &gui_text, const QString &description,
|
VMeasurement::VMeasurement(VContainer *data, quint32 id, const QString &name, const qreal &base,
|
||||||
|
const QString &formula, const QString &gui_text, const QString &description,
|
||||||
const QString &tagName)
|
const QString &tagName)
|
||||||
:VVariable(name, base, description), d(new VMeasurementData(gui_text, tagName))
|
:VVariable(name, base, description), d(new VMeasurementData(data, id, formula, gui_text, tagName))
|
||||||
{
|
{
|
||||||
SetType(VarType::Measurement);
|
SetType(VarType::Measurement);
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,6 +35,7 @@
|
||||||
#include <QStringList>
|
#include <QStringList>
|
||||||
|
|
||||||
class VMeasurementData;
|
class VMeasurementData;
|
||||||
|
class VContainer;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief The VMeasurement class keep data row of standard table
|
* @brief The VMeasurement class keep data row of standard table
|
||||||
|
@ -42,12 +43,12 @@ class VMeasurementData;
|
||||||
class VMeasurement :public VVariable
|
class VMeasurement :public VVariable
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
VMeasurement();
|
VMeasurement(const QString &name, const qreal &base, const qreal &ksize,
|
||||||
VMeasurement(const QString &name, const qreal &base, const qreal &ksize, const qreal &kheight,
|
const qreal &kheight, const QString &gui_text = QString(), const QString &description = QString(),
|
||||||
|
const QString &TagName = QString());
|
||||||
|
VMeasurement(VContainer *data, quint32 id, const QString &name, const qreal &base, const QString &formula,
|
||||||
const QString &gui_text = QString(), const QString &description = QString(),
|
const QString &gui_text = QString(), const QString &description = QString(),
|
||||||
const QString &TagName = QString());
|
const QString &TagName = QString());
|
||||||
VMeasurement(const QString &name, const qreal &base, const QString &gui_text = QString(),
|
|
||||||
const QString &description = QString(), const QString &TagName = QString());
|
|
||||||
VMeasurement(const VMeasurement &m);
|
VMeasurement(const VMeasurement &m);
|
||||||
VMeasurement &operator=(const VMeasurement &m);
|
VMeasurement &operator=(const VMeasurement &m);
|
||||||
virtual ~VMeasurement() Q_DECL_OVERRIDE;
|
virtual ~VMeasurement() Q_DECL_OVERRIDE;
|
||||||
|
|
|
@ -31,6 +31,8 @@
|
||||||
|
|
||||||
#include <QSharedData>
|
#include <QSharedData>
|
||||||
|
|
||||||
|
#include "vcontainer.h"
|
||||||
|
|
||||||
#ifdef Q_CC_GNU
|
#ifdef Q_CC_GNU
|
||||||
#pragma GCC diagnostic push
|
#pragma GCC diagnostic push
|
||||||
#pragma GCC diagnostic ignored "-Weffc++"
|
#pragma GCC diagnostic ignored "-Weffc++"
|
||||||
|
@ -40,24 +42,27 @@ class VMeasurementData : public QSharedData
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
VMeasurementData()
|
VMeasurementData(const QString &gui_text, const QString &tagName)
|
||||||
:gui_text(QString()), _tagName(QString())
|
:data(VContainer(nullptr, nullptr)), id(0), gui_text(gui_text), _tagName(tagName)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
VMeasurementData(const QString &gui_text, const QString &tagName)
|
VMeasurementData(VContainer *data, quint32 id, const QString &formula, const QString &gui_text,
|
||||||
:gui_text(gui_text), _tagName(tagName)
|
const QString &tagName)
|
||||||
|
:data(*data), id(id), formula(formula), gui_text(gui_text), _tagName(tagName)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
VMeasurementData(const VMeasurementData &m)
|
VMeasurementData(const VMeasurementData &m)
|
||||||
:QSharedData(m), gui_text(m.gui_text), _tagName(m._tagName)
|
:QSharedData(m), data(m.data), id(m.id), formula(m.formula), gui_text(m.gui_text), _tagName(m._tagName)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
virtual ~VMeasurementData();
|
virtual ~VMeasurementData();
|
||||||
|
|
||||||
/** @brief description description measurement */
|
/** @brief description description measurement */
|
||||||
QString gui_text;
|
VContainer data;
|
||||||
|
quint32 id;
|
||||||
QString _tagName;
|
QString formula;
|
||||||
|
QString gui_text;
|
||||||
|
QString _tagName;
|
||||||
};
|
};
|
||||||
|
|
||||||
VMeasurementData::~VMeasurementData()
|
VMeasurementData::~VMeasurementData()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user