Newer
Older
/*
* PeTrack - Software for tracking pedestrians movement in videos
* Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
* Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
* Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#ifndef ANALYSEPLOT_H
#define ANALYSEPLOT_H
#include <QPen>
#include <qwt_plot.h>
#include <qwt_plot_zoomer.h>
#include <qwt_plot_item.h>
#include "helper.h"
#include "tracker.h"
#include "trackerReal.h"
class Control;
//-----------------------------------------------------------------
class TrackerRealPlotItem: public QwtPlotItem
{
public:
TrackerRealPlotItem();
void draw(QPainter* p, const QwtScaleMap& mapX, const QwtScaleMap& mapY, const QRectF& re) const;
void setPen(const QPen &pen);
void setTrackerReal(TrackerReal* trackerReal);
private:
TrackerReal *mTrackerReal;
QPen mPen;
};
//-----------------------------------------------------------------------------------------
class AnalysePlot: public QwtPlot
{
Q_OBJECT
public:
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
QPoint getPos(const QColor &col) const;
inline void setControlWidget(Control *control)
{
mControlWidget = control;
}
inline Control * getControlWidget() const
{
return mControlWidget;
}
inline void setActFrame(int f)
{
mActFrame = f;
}
inline int getActFrame() const
{
return mActFrame;
}
void setTrackerReal(TrackerReal* TR);
void setScale();
inline double symbolSize() const
{
return mSymbolSize;
}
inline void setSymbolSize(double s)
{
mSymbolSize = s;
}
QwtPlotZoomer * getZoomer()
{
return mZoomer;
}
inline double xMax() const
{
return mXMax;
}
inline double yMax() const
{
return mYMax;
}
private:
double mSymbolSize;
double mXMin, mXMax, mYMin, mYMax;
Control *mControlWidget;
TrackerReal *mTrackerReal;
TrackerRealPlotItem *mTrackerRealItem;
QwtPlotZoomer *mZoomer;
int mActFrame;
};
#endif