Mercurial > hg > svgui
comparison layer/TextLayer.h @ 905:b66fb15de477 cxx11
Working through the float/double and int/sv_frame_t fixes
author | Chris Cannam |
---|---|
date | Mon, 09 Mar 2015 14:35:21 +0000 |
parents | 1d526ba11a24 |
children | 94e4952a6774 |
comparison
equal
deleted
inserted
replaced
904:e0f08e108064 | 905:b66fb15de477 |
---|---|
34 | 34 |
35 virtual void paint(View *v, QPainter &paint, QRect rect) const; | 35 virtual void paint(View *v, QPainter &paint, QRect rect) const; |
36 | 36 |
37 virtual QString getFeatureDescription(View *v, QPoint &) const; | 37 virtual QString getFeatureDescription(View *v, QPoint &) const; |
38 | 38 |
39 virtual bool snapToFeatureFrame(View *v, int &frame, | 39 virtual bool snapToFeatureFrame(View *v, sv_frame_t &frame, |
40 int &resolution, | 40 int &resolution, |
41 SnapType snap) const; | 41 SnapType snap) const; |
42 | 42 |
43 virtual void drawStart(View *v, QMouseEvent *); | 43 virtual void drawStart(View *v, QMouseEvent *); |
44 virtual void drawDrag(View *v, QMouseEvent *); | 44 virtual void drawDrag(View *v, QMouseEvent *); |
50 | 50 |
51 virtual void editStart(View *v, QMouseEvent *); | 51 virtual void editStart(View *v, QMouseEvent *); |
52 virtual void editDrag(View *v, QMouseEvent *); | 52 virtual void editDrag(View *v, QMouseEvent *); |
53 virtual void editEnd(View *v, QMouseEvent *); | 53 virtual void editEnd(View *v, QMouseEvent *); |
54 | 54 |
55 virtual void moveSelection(Selection s, int newStartFrame); | 55 virtual void moveSelection(Selection s, sv_frame_t newStartFrame); |
56 virtual void resizeSelection(Selection s, Selection newSize); | 56 virtual void resizeSelection(Selection s, Selection newSize); |
57 virtual void deleteSelection(Selection s); | 57 virtual void deleteSelection(Selection s); |
58 | 58 |
59 virtual void copy(View *v, Selection s, Clipboard &to); | 59 virtual void copy(View *v, Selection s, Clipboard &to); |
60 virtual bool paste(View *v, const Clipboard &from, int frameOffset, | 60 virtual bool paste(View *v, const Clipboard &from, sv_frame_t frameOffset, |
61 bool interactive); | 61 bool interactive); |
62 | 62 |
63 virtual bool editOpen(View *, QMouseEvent *); // on double-click | 63 virtual bool editOpen(View *, QMouseEvent *); // on double-click |
64 | 64 |
65 virtual const Model *getModel() const { return m_model; } | 65 virtual const Model *getModel() const { return m_model; } |
78 | 78 |
79 virtual bool isLayerEditable() const { return true; } | 79 virtual bool isLayerEditable() const { return true; } |
80 | 80 |
81 virtual int getCompletion(View *) const { return m_model->getCompletion(); } | 81 virtual int getCompletion(View *) const { return m_model->getCompletion(); } |
82 | 82 |
83 virtual bool getValueExtents(float &min, float &max, | 83 virtual bool getValueExtents(double &min, double &max, |
84 bool &logarithmic, QString &unit) const; | 84 bool &logarithmic, QString &unit) const; |
85 | 85 |
86 virtual int getVerticalScaleWidth(View *, bool, QPainter &) const { return 0; } | 86 virtual int getVerticalScaleWidth(View *, bool, QPainter &) const { return 0; } |
87 | 87 |
88 virtual void toXml(QTextStream &stream, QString indent = "", | 88 virtual void toXml(QTextStream &stream, QString indent = "", |
89 QString extraAttributes = "") const; | 89 QString extraAttributes = "") const; |
90 | 90 |
91 void setProperties(const QXmlAttributes &attributes); | 91 void setProperties(const QXmlAttributes &attributes); |
92 | 92 |
93 protected: | 93 protected: |
94 int getYForHeight(View *v, float height) const; | 94 int getYForHeight(View *v, double height) const; |
95 float getHeightForY(View *v, int y) const; | 95 double getHeightForY(View *v, int y) const; |
96 | 96 |
97 virtual int getDefaultColourHint(bool dark, bool &impose); | 97 virtual int getDefaultColourHint(bool dark, bool &impose); |
98 | 98 |
99 TextModel::PointList getLocalPoints(View *v, int x, int y) const; | 99 TextModel::PointList getLocalPoints(View *v, int x, int y) const; |
100 | 100 |