Mercurial > hg > svgui
comparison layer/ImageLayer.h @ 1486:ac0a8addabcf
Merge from branch by-id
author | Chris Cannam |
---|---|
date | Wed, 17 Jul 2019 14:25:16 +0100 |
parents | 696e569ff21b |
children | e6362cf5ff1d |
comparison
equal
deleted
inserted
replaced
1468:de41a11cabc2 | 1486:ac0a8addabcf |
---|---|
41 void paint(LayerGeometryProvider *v, QPainter &paint, QRect rect) const override; | 41 void paint(LayerGeometryProvider *v, QPainter &paint, QRect rect) const override; |
42 | 42 |
43 QString getFeatureDescription(LayerGeometryProvider *v, QPoint &) const override; | 43 QString getFeatureDescription(LayerGeometryProvider *v, QPoint &) const override; |
44 | 44 |
45 bool snapToFeatureFrame(LayerGeometryProvider *v, sv_frame_t &frame, | 45 bool snapToFeatureFrame(LayerGeometryProvider *v, sv_frame_t &frame, |
46 int &resolution, | 46 int &resolution, |
47 SnapType snap) const override; | 47 SnapType snap) const override; |
48 | 48 |
49 void drawStart(LayerGeometryProvider *v, QMouseEvent *) override; | 49 void drawStart(LayerGeometryProvider *v, QMouseEvent *) override; |
50 void drawDrag(LayerGeometryProvider *v, QMouseEvent *) override; | 50 void drawDrag(LayerGeometryProvider *v, QMouseEvent *) override; |
51 void drawEnd(LayerGeometryProvider *v, QMouseEvent *) override; | 51 void drawEnd(LayerGeometryProvider *v, QMouseEvent *) override; |
52 | 52 |
62 bool paste(LayerGeometryProvider *v, const Clipboard &from, sv_frame_t frameOffset, | 62 bool paste(LayerGeometryProvider *v, const Clipboard &from, sv_frame_t frameOffset, |
63 bool interactive) override; | 63 bool interactive) override; |
64 | 64 |
65 bool editOpen(LayerGeometryProvider *, QMouseEvent *) override; // on double-click | 65 bool editOpen(LayerGeometryProvider *, QMouseEvent *) override; // on double-click |
66 | 66 |
67 const Model *getModel() const override { return m_model; } | 67 ModelId getModel() const override { return m_model; } |
68 void setModel(ImageModel *model); | 68 void setModel(ModelId model); // an ImageModel please |
69 | 69 |
70 PropertyList getProperties() const override; | 70 PropertyList getProperties() const override; |
71 QString getPropertyLabel(const PropertyName &) const override; | 71 QString getPropertyLabel(const PropertyName &) const override; |
72 PropertyType getPropertyType(const PropertyName &) const override; | 72 PropertyType getPropertyType(const PropertyName &) const override; |
73 int getPropertyRangeAndValue(const PropertyName &, | 73 int getPropertyRangeAndValue(const PropertyName &, |
74 int *min, int *max, int *deflt) const override; | 74 int *min, int *max, int *deflt) const override; |
75 QString getPropertyValueLabel(const PropertyName &, | 75 QString getPropertyValueLabel(const PropertyName &, |
76 int value) const override; | 76 int value) const override; |
77 void setProperty(const PropertyName &, int value) override; | 77 void setProperty(const PropertyName &, int value) override; |
78 | 78 |
79 ColourSignificance getLayerColourSignificance() const override { | 79 ColourSignificance getLayerColourSignificance() const override { |
80 return ColourAbsent; | 80 return ColourAbsent; |
81 } | 81 } |
82 | 82 |
83 bool isLayerScrollable(const LayerGeometryProvider *v) const override; | 83 bool isLayerScrollable(const LayerGeometryProvider *v) const override; |
84 | 84 |
85 bool isLayerEditable() const override { return true; } | 85 bool isLayerEditable() const override { return true; } |
86 | 86 |
87 int getCompletion(LayerGeometryProvider *) const override { return m_model->getCompletion(); } | 87 int getCompletion(LayerGeometryProvider *) const override; |
88 | 88 |
89 bool getValueExtents(double &min, double &max, | 89 bool getValueExtents(double &min, double &max, |
90 bool &logarithmic, QString &unit) const override; | 90 bool &logarithmic, QString &unit) const override; |
91 | 91 |
92 void toXml(QTextStream &stream, QString indent = "", | 92 void toXml(QTextStream &stream, QString indent = "", |
93 QString extraAttributes = "") const override; | 93 QString extraAttributes = "") const override; |
94 | 94 |
95 int getVerticalScaleWidth(LayerGeometryProvider *, bool, QPainter &) const override { return 0; } | 95 int getVerticalScaleWidth(LayerGeometryProvider *, bool, QPainter &) const override { return 0; } |
96 | 96 |
97 void setLayerDormant(const LayerGeometryProvider *v, bool dormant) override; | 97 void setLayerDormant(const LayerGeometryProvider *v, bool dormant) override; |
98 | 98 |
125 mutable FileSourceMap m_fileSources; | 125 mutable FileSourceMap m_fileSources; |
126 | 126 |
127 QString getLocalFilename(QString img) const; | 127 QString getLocalFilename(QString img) const; |
128 void checkAddSource(QString img) const; | 128 void checkAddSource(QString img) const; |
129 | 129 |
130 ImageModel *m_model; | 130 ModelId m_model; // an ImageModel |
131 bool m_editing; | 131 bool m_editing; |
132 QPoint m_editOrigin; | 132 QPoint m_editOrigin; |
133 Event m_originalPoint; | 133 Event m_originalPoint; |
134 Event m_editingPoint; | 134 Event m_editingPoint; |
135 ChangeEventsCommand *m_editingCommand; | 135 ChangeEventsCommand *m_editingCommand; |