9#include <QHashIterator>
11#include <QRandomGenerator>
12#include <QSqlDatabase>
20#include <QUndoCommand>
27 const QStringList columns;
31 explicit Data(
const QString &dataPath);
33 Data &operator=(
const Data &T) =
delete;
39 const QString connectionName;
40 bool setPath(
const QString &dataPath);
41 QHash<QString, double>
getData(
int imageIndex,
int id)
const;
42 QList<QHash<QString, double>>
getData(
int imageIndex)
const;
43 QList<QHash<QString, double>>
getData(
int imageIndexStart,
int imageIndexStop,
int id)
const;
44 QHash<QString, QList<double>>
getDataId(
int id)
const;
45 QList<int>
getId(
int imageIndex)
const;
46 QList<int>
getId(
int imageIndexFirst,
int imageIndexLast)
const;
48 void swapData(
int firstObject,
int secondObject,
int from);
49 void deleteData(
int objectId,
int from,
int to);
50 void insertData(
int objectId,
int from,
int to);
51 void save(
bool force =
true,
int eachActions = 30);
58class SwapData :
public QUndoCommand {
60 SwapData(
int firstObject,
int secondObject,
int from,
Data *data);
71class DeleteData :
public QUndoCommand {
73 DeleteData(
int object,
int from,
int to,
Data *data);
This class allows to load tracking data produced by the Tracking class.
Definition data.h:24
void insertData(int objectId, int from, int to)
Insert the tracking data for one object from a selected index to the end.
Definition data.cpp:299
bool setPath(const QString &dataPath)
Set the path to a tracking data file.
Definition data.cpp:55
void clear()
Clear data.
Definition data.cpp:36
void swapData(int firstObject, int secondObject, int from)
In the tracking data, swaps two objects from a selected index to the end.
Definition data.cpp:260
QList< int > getId(int imageIndex) const
Get the ids of all the objects in the frame.
Definition data.cpp:200
QHash< QString, QList< double > > getDataId(int id) const
Get the tracking data for the selected id.
Definition data.cpp:177
QHash< QString, double > getData(int imageIndex, int id) const
Get the tracking data at the selected image number for one selected object.
Definition data.cpp:105
QString dir
Definition data.h:38
int getObjectInformation(int objectId) const
Get the object's information.
Definition data.cpp:241
void deleteData(int objectId, int from, int to)
Delete the tracking data of one object from a selected index to the end.
Definition data.cpp:277
void save(bool force=true, int eachActions=30)
Save the data in the tracking result file.
Definition data.cpp:320
Data()
Construct the data object from a tracking result file.
Definition data.cpp:95