comparison layer/ImageLayer.h @ 1459:42c87368287c

Merge from branch single-point
author Chris Cannam
date Fri, 17 May 2019 10:02:52 +0100
parents 09d008b5c8f4
children 11a150e65ee1
comparison
equal deleted inserted replaced
1441:8d5bf4ab98ef 1459:42c87368287c
103 protected slots: 103 protected slots:
104 void checkAddSources(); 104 void checkAddSources();
105 void fileSourceReady(); 105 void fileSourceReady();
106 106
107 protected: 107 protected:
108 ImageModel::PointList getLocalPoints(LayerGeometryProvider *v, int x, int y) const; 108 EventVector getLocalPoints(LayerGeometryProvider *v, int x, int y) const;
109 109
110 bool getImageOriginalSize(QString name, QSize &size) const; 110 bool getImageOriginalSize(QString name, QSize &size) const;
111 QImage getImage(LayerGeometryProvider *v, QString name, QSize maxSize) const; 111 QImage getImage(LayerGeometryProvider *v, QString name, QSize maxSize) const;
112 112
113 void drawImage(LayerGeometryProvider *v, QPainter &paint, const ImageModel::Point &p, 113 void drawImage(LayerGeometryProvider *v, QPainter &paint, const Event &p,
114 int x, int nx) const; 114 int x, int nx) const;
115 115
116 //!!! how to reap no-longer-used images? 116 //!!! how to reap no-longer-used images?
117 117
118 typedef std::map<QString, QImage> ImageMap; 118 typedef std::map<QString, QImage> ImageMap;
128 void checkAddSource(QString img) const; 128 void checkAddSource(QString img) const;
129 129
130 ImageModel *m_model; 130 ImageModel *m_model;
131 bool m_editing; 131 bool m_editing;
132 QPoint m_editOrigin; 132 QPoint m_editOrigin;
133 ImageModel::Point m_originalPoint; 133 Event m_originalPoint;
134 ImageModel::Point m_editingPoint; 134 Event m_editingPoint;
135 ImageModel::EditCommand *m_editingCommand; 135 ChangeEventsCommand *m_editingCommand;
136 136
137 void finish(ImageModel::EditCommand *command) { 137 void finish(ChangeEventsCommand *command) {
138 Command *c = command->finish(); 138 Command *c = command->finish();
139 if (c) CommandHistory::getInstance()->addCommand(c, false); 139 if (c) CommandHistory::getInstance()->addCommand(c, false);
140 } 140 }
141 }; 141 };
142 142