valentina/container/vcontainer.h

56 lines
2.4 KiB
C
Raw Normal View History

2013-07-13 12:51:31 +02:00
#ifndef VCONTAINER_H
#define VCONTAINER_H
#include <QMap>
2013-07-17 13:38:11 +02:00
#include <QTableWidget>
2013-07-13 12:51:31 +02:00
#include "vpointf.h"
2013-07-17 13:38:11 +02:00
#include "vstandarttablecell.h"
#include "vincrementtablerow.h"
2013-07-13 12:51:31 +02:00
class VContainer
{
public:
2013-07-17 13:38:11 +02:00
VContainer();
VPointF GetPoint(qint64 id) const;
VStandartTableCell GetStandartTableCell(const QString& name) const;
VIncrementTableRow GetIncrementTableRow(const QString& name) const;
2013-07-25 14:00:51 +02:00
qreal GetLine(const QString &name) const;
2013-07-17 13:38:11 +02:00
qint64 getId();
qint64 AddPoint(const VPointF& point);
void AddStandartTableCell(const QString& name, const VStandartTableCell& cell);
void AddIncrementTableRow(const QString& name, const VIncrementTableRow &cell);
2013-07-25 14:00:51 +02:00
void AddLine(const QString &name, const qreal &value);
2013-07-17 13:38:11 +02:00
void UpdatePoint(qint64 id, const VPointF& point);
void UpdateStandartTableCell(const QString& name, const VStandartTableCell& cell);
void UpdateIncrementTableRow(const QString& name, const VIncrementTableRow& cell);
qreal GetValueStandartTableCell(const QString& name) const;
qreal GetValueIncrementTableRow(const QString& name) const;
void Clear();
void ClearIncrementTable();
2013-07-25 14:00:51 +02:00
void ClearLengthLines();
2013-07-17 13:38:11 +02:00
void SetSize(qint32 size);
void SetGrowth(qint32 growth);
qint32 size() const;
qint32 growth() const;
qreal FindVar(const QString& name, bool *ok)const;
bool IncrementTableContains(const QString& name);
qint64 getNextId();
void RemoveIncrementTableRow(const QString& name);
2013-07-25 14:00:51 +02:00
const QMap<qint64, VPointF> *DataPoints() const;
const QMap<QString, qint32> *DataBase() const;
const QMap<QString, VStandartTableCell> *DataStandartTable() const;
const QMap<QString, VIncrementTableRow> *DataIncrementTable() const;
const QMap<QString, qreal> * DataLengthLines() const;
2013-07-13 12:51:31 +02:00
private:
2013-07-17 13:38:11 +02:00
qint64 _id;
QMap<QString, qint32> base;
2013-07-13 12:51:31 +02:00
QMap<qint64, VPointF> points;
2013-07-17 13:38:11 +02:00
QMap<QString, VStandartTableCell> standartTable;
QMap<QString, VIncrementTableRow> incrementTable;
2013-07-25 14:00:51 +02:00
QMap<QString, qreal> lengthLines;
2013-07-13 12:51:31 +02:00
};
#endif // VCONTAINER_H