00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef SNAPLIST_H
00023 #define SNAPLIST_H
00024
00025 #include <QList>
00026
00027 #include "defines.h"
00028
00029 class Sheet;
00030
00031 class SnapList
00032 {
00033
00034 public:
00035 SnapList(Sheet* sheet);
00036 ~SnapList() {};
00037
00038 TimeRef get_snap_value(const TimeRef& location);
00039 bool is_snap_value(const TimeRef& location);
00040 qint64 get_snap_diff(const TimeRef& location);
00041 TimeRef next_snap_pos(const TimeRef& location);
00042 TimeRef prev_snap_pos(const TimeRef& location);
00043
00044 TimeRef calculate_snap_diff(TimeRef leftlocation, TimeRef rightlocation);
00045
00046 void set_range(const TimeRef& start, const TimeRef& end, int scalefactor);
00047 void mark_dirty();
00048 bool was_dirty();
00049
00050 private:
00051 Sheet* m_sheet;
00052 QList<TimeRef> m_xposList;
00053 QList<TimeRef> m_xposLut;
00054 QList<bool> m_xposBool;
00055 bool m_isDirty;
00056 bool m_wasDirty;
00057 TimeRef m_rangeStart;
00058 TimeRef m_rangeEnd;
00059 qint64 m_scalefactor;
00060
00061 void update_snaplist();
00062 };
00063
00064 #endif
00065
00066