FastTrack 6.1.0
Tracks multiples objects dealing with occlusion and identities.
annotation.h
1#ifndef ANNOTATION_H
2#define ANNOTATION_H
3
4#include <QDebug>
5#include <QDir>
6#include <QFile>
7#include <QMap>
8#include <QMapIterator>
9#include <QMessageBox>
10#include <QString>
11#include <QTextStream>
12#include <QUndoCommand>
13#include <QWidget>
14
15class Annotation : public QWidget {
16 Q_OBJECT
17
18 private:
19 QFile *annotationFile;
20 QMap<int, QString> *annotations;
21 void writeToFile();
22 QList<int> findIndexes;
23 int findIndex;
24
25 public slots:
26 void clear();
27 void write(int index, const QString &text);
28 void read(int index);
29 void find(const QString &expression);
30 int next();
31 int prev();
32
33 signals:
38 void annotationText(const QString &text);
39
40 public:
41 Annotation();
42 Annotation(const QString &annotationFile);
43 Annotation(const Annotation &T) = delete;
44 Annotation &operator=(const Annotation &T) = delete;
46 bool setPath(const QString &annotationFile);
47};
48
49#endif
This class allows to load tracking annotation file.
Definition: annotation.h:15
void clear()
Clear the object.
Definition: annotation.cpp:36
void writeToFile()
Writes all the annotation to a file.
Definition: annotation.cpp:92
void write(int index, const QString &text)
Adds an annotation to the annotation QMap.
Definition: annotation.cpp:111
int next()
Returns the next element of the findIndexes list of annotations that contains the expression to find.
Definition: annotation.cpp:144
void find(const QString &expression)
Finds the index of all the annotation with expression inside their text.
Definition: annotation.cpp:129
void read(int index)
Reads an annotation from the annotation QMap.
Definition: annotation.cpp:120
void annotationText(const QString &text)
Emitted when a new annotation is read.
bool setPath(const QString &annotationFile)
Set the path for the annotation.
Definition: annotation.cpp:50
int prev()
Returns the previous element of the findIndexes list of annotations that contains the expression to f...
Definition: annotation.cpp:160
Annotation()
Constructs the annotation object from a file path.
Definition: annotation.cpp:84