valentina/container/vcontainer.h

48 lines
2.0 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;
qint64 getId();
qint64 AddPoint(const VPointF& point);
void AddStandartTableCell(const QString& name, const VStandartTableCell& cell);
void AddIncrementTableRow(const QString& name, const VIncrementTableRow &cell);
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();
void SetSize(qint32 size);
void SetGrowth(qint32 growth);
qint32 size() const;
qint32 growth() const;
qreal FindVar(const QString& name, bool *ok)const;
void FillStandartTable(QTableWidget *table) const;
void FillIncrementTable(QTableWidget *table) const;
bool IncrementTableContains(const QString& name);
qint64 getNextId();
void RemoveIncrementTableRow(const QString& name);
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-13 12:51:31 +02:00
};
#endif // VCONTAINER_H