comparison layer/TextLayer.h @ 1459:42c87368287c

Merge from branch single-point
author Chris Cannam
date Fri, 17 May 2019 10:02:52 +0100
parents e2b6a13a1f69
children 696e569ff21b
comparison
equal deleted inserted replaced
1441:8d5bf4ab98ef 1459:42c87368287c
94 int getYForHeight(LayerGeometryProvider *v, double height) const; 94 int getYForHeight(LayerGeometryProvider *v, double height) const;
95 double getHeightForY(LayerGeometryProvider *v, int y) const; 95 double getHeightForY(LayerGeometryProvider *v, int y) const;
96 96
97 int getDefaultColourHint(bool dark, bool &impose) override; 97 int getDefaultColourHint(bool dark, bool &impose) override;
98 98
99 TextModel::PointList getLocalPoints(LayerGeometryProvider *v, int x, int y) const; 99 EventVector getLocalPoints(LayerGeometryProvider *v, int x, int y) const;
100 100
101 bool getPointToDrag(LayerGeometryProvider *v, int x, int y, TextModel::Point &) const; 101 bool getPointToDrag(LayerGeometryProvider *v, int x, int y, Event &) const;
102 102
103 TextModel *m_model; 103 TextModel *m_model;
104 bool m_editing; 104 bool m_editing;
105 QPoint m_editOrigin; 105 QPoint m_editOrigin;
106 TextModel::Point m_originalPoint; 106 Event m_originalPoint;
107 TextModel::Point m_editingPoint; 107 Event m_editingPoint;
108 TextModel::EditCommand *m_editingCommand; 108 ChangeEventsCommand *m_editingCommand;
109 109
110 void finish(TextModel::EditCommand *command) { 110 void finish(ChangeEventsCommand *command) {
111 Command *c = command->finish(); 111 Command *c = command->finish();
112 if (c) CommandHistory::getInstance()->addCommand(c, false); 112 if (c) CommandHistory::getInstance()->addCommand(c, false);
113 } 113 }
114 }; 114 };
115 115