#ifndef _LayerAction_h
#define _LayerAction_h
#include <QObject>
#include <QPointF>
#include <QList>
#include <QRectF>
#include "XmlWriter.h"
#include "aContour.h"
//class LayerDepth;
class XmlWriter;
class aContour;
class LayerAction: public QObject
{
Q_OBJECT
// the member variables
private:
QList<bool> a_LabelList; // the flag of whether the point is manually labelled or compute generated
QList<double> a_DepthList; // the depth, as a variable of frame index
QString a_LayerName;
QList<bool> a_IsGlobalLabelList;
QList<bool> a_IsLocalLabelList;
QList<bool> a_IsTrackedList;
QList<bool> a_IsDepthLabeledList;
int a_NumFrames; // the total number of frames, accessed by numFrames();
int a_StartFrame;
int a_EndFrame; // the start and end frame index, range [0, numFrames()-1]. accessed by startFrame() and endFrame();
int a_CreatedFrame; // the index of the frame where the object is created;
QList<aContour> a_contour;
static int selectedPointIndex;
static QPointF a_OrgCursorPoint;
public:
// construction, desctrution, copy, and clear
LayerAction(void);
LayerAction(const LayerAction& layerAction);
~LayerAction(void);
LayerAction& operator=(const LayerAction& layerAction);
void copyData(const LayerAction& layerAction);
inline void a_setLayerName(const QString& name){a_LayerName=name;};
//void create(int numFrames,int frameIndex,const QPointF& point,int layer_index);
void a_setStartFrame(int startFrame){a_StartFrame=startFrame;};
void a_create(int numFrames){a_NumFrames=numFrames;};
//inline void a_setStartFrame(int startFrame){a_StartFrame=startFrame;};
inline void a_setEndFrame(int endFrame){a_EndFrame=endFrame;};
inline void a_setCreatedFrame(int createdFrame){a_CreatedFrame=createdFrame;};
inline void a_setDepth(int frameIndex,double depth){a_DepthList[frameIndex]=depth;};
inline void a_setGlobalLabel(int frameIndex,bool label){a_IsGlobalLabelList[frameIndex]=label;};
inline void a_setLocalLabel(int frameIndex,bool label){a_IsLocalLabelList[frameIndex]=label;};
inline void a_setTracked(int frameIndex,bool label){a_IsTrackedList[frameIndex]=label;};
inline void a_setDepthLabel(int frameIndex,bool label){a_IsDepthLabeledList[frameIndex]=label;};
inline void a_setContour(int frameIndex,const aContour& acontour){a_contour[frameIndex]=acontour;};
};
#endif