comparison base/Selection.h @ 928:6a94bb528e9d warnfix_no_size_t

Remove size_t's, fix compiler warnings
author Chris Cannam
date Tue, 17 Jun 2014 13:52:07 +0100
parents 70a232b1f12a
children d03b3d956358
comparison
equal deleted inserted replaced
917:49618f39ff09 928:6a94bb528e9d
23 23
24 class Selection 24 class Selection
25 { 25 {
26 public: 26 public:
27 Selection(); 27 Selection();
28 Selection(size_t startFrame, size_t endFrame); 28 Selection(int startFrame, int endFrame);
29 Selection(const Selection &); 29 Selection(const Selection &);
30 Selection &operator=(const Selection &); 30 Selection &operator=(const Selection &);
31 virtual ~Selection(); 31 virtual ~Selection();
32 32
33 bool isEmpty() const; 33 bool isEmpty() const;
34 size_t getStartFrame() const; 34 int getStartFrame() const;
35 size_t getEndFrame() const; 35 int getEndFrame() const;
36 bool contains(size_t frame) const; 36 bool contains(int frame) const;
37 37
38 bool operator<(const Selection &) const; 38 bool operator<(const Selection &) const;
39 bool operator==(const Selection &) const; 39 bool operator==(const Selection &) const;
40 40
41 protected: 41 protected:
42 size_t m_startFrame; 42 int m_startFrame;
43 size_t m_endFrame; 43 int m_endFrame;
44 }; 44 };
45 45
46 class MultiSelection : public XmlExportable 46 class MultiSelection : public XmlExportable
47 { 47 {
48 public: 48 public:
55 void setSelection(const Selection &selection); 55 void setSelection(const Selection &selection);
56 void addSelection(const Selection &selection); 56 void addSelection(const Selection &selection);
57 void removeSelection(const Selection &selection); 57 void removeSelection(const Selection &selection);
58 void clearSelections(); 58 void clearSelections();
59 59
60 void getExtents(size_t &startFrame, size_t &endFrame) const; 60 void getExtents(int &startFrame, int &endFrame) const;
61 61
62 /** 62 /**
63 * Return the selection that contains a given frame. 63 * Return the selection that contains a given frame.
64 * If defaultToFollowing is true, and if the frame is not in a 64 * If defaultToFollowing is true, and if the frame is not in a
65 * selected area, return the next selection after the given frame. 65 * selected area, return the next selection after the given frame.
66 * Return the empty selection if no appropriate selection is found. 66 * Return the empty selection if no appropriate selection is found.
67 */ 67 */
68 Selection getContainingSelection(size_t frame, bool defaultToFollowing) const; 68 Selection getContainingSelection(int frame, bool defaultToFollowing) const;
69 69
70 virtual void toXml(QTextStream &stream, QString indent = "", 70 virtual void toXml(QTextStream &stream, QString indent = "",
71 QString extraAttributes = "") const; 71 QString extraAttributes = "") const;
72 72
73 protected: 73 protected: