00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef _CLIPBOARD_H_
00017 #define _CLIPBOARD_H_
00018
00019 #include <QString>
00020 #include <vector>
00021
00022 class Clipboard
00023 {
00024 public:
00025 class Point
00026 {
00027 public:
00028 Point(long frame, QString label);
00029 Point(long frame, float value, QString label);
00030 Point(long frame, float value, size_t duration, QString label);
00031 Point(long frame, float value, size_t duration, float level, QString label);
00032 Point(const Point &point);
00033 Point &operator=(const Point &point);
00034
00035 bool haveFrame() const;
00036 long getFrame() const;
00037
00038 bool haveValue() const;
00039 float getValue() const;
00040
00041 bool haveDuration() const;
00042 size_t getDuration() const;
00043
00044 bool haveLabel() const;
00045 QString getLabel() const;
00046
00047 bool haveLevel() const;
00048 float getLevel() const;
00049
00050 bool haveReferenceFrame() const;
00051 bool referenceFrameDiffers() const;
00052
00053 long getReferenceFrame() const;
00054 void setReferenceFrame(long);
00055
00056 private:
00057 bool m_haveFrame;
00058 long m_frame;
00059 bool m_haveValue;
00060 float m_value;
00061 bool m_haveDuration;
00062 size_t m_duration;
00063 bool m_haveLabel;
00064 QString m_label;
00065 bool m_haveLevel;
00066 float m_level;
00067 bool m_haveReferenceFrame;
00068 long m_referenceFrame;
00069 };
00070
00071 Clipboard();
00072 ~Clipboard();
00073
00074 typedef std::vector<Point> PointList;
00075
00076 void clear();
00077 bool empty() const;
00078 const PointList &getPoints() const;
00079 void setPoints(const PointList &points);
00080 void addPoint(const Point &point);
00081
00082 bool haveReferenceFrames() const;
00083 bool referenceFramesDiffer() const;
00084
00085 protected:
00086 PointList m_points;
00087 };
00088
00089 #endif