comparison layer/Layer.h @ 359:020c485aa7e0

* More work on aligning copy/paste between layers. It's a surprisingly complicated business.
author Chris Cannam
date Wed, 06 Feb 2008 12:49:49 +0000
parents 2f83b6e3b8ca
children d58701996fae
comparison
equal deleted inserted replaced
358:8b69f36c74be 359:020c485aa7e0
191 191
192 virtual void moveSelection(Selection, size_t /* newStartFrame */) { } 192 virtual void moveSelection(Selection, size_t /* newStartFrame */) { }
193 virtual void resizeSelection(Selection, Selection /* newSize */) { } 193 virtual void resizeSelection(Selection, Selection /* newSize */) { }
194 virtual void deleteSelection(Selection) { } 194 virtual void deleteSelection(Selection) { }
195 195
196 virtual void copy(Selection, Clipboard & /* to */) { } 196 virtual void copy(View *, Selection, Clipboard & /* to */) { }
197 197
198 /** 198 /**
199 * Paste from the given clipboard onto the layer at the given 199 * Paste from the given clipboard onto the layer at the given
200 * frame offset. If interactive is true, the layer may ask the 200 * frame offset. If interactive is true, the layer may ask the
201 * user about paste options through a dialog if desired, and may 201 * user about paste options through a dialog if desired, and may
202 * return false if the user cancelled the paste operation. This 202 * return false if the user cancelled the paste operation. This
203 * function should return true if a paste actually occurred. 203 * function should return true if a paste actually occurred.
204 */ 204 */
205 virtual bool paste(const Clipboard & /* from */, 205 virtual bool paste(View *,
206 const Clipboard & /* from */,
206 int /* frameOffset */, 207 int /* frameOffset */,
207 bool /* interactive */) { return false; } 208 bool /* interactive */) { return false; }
208 209
209 // Text mode: 210 // Text mode:
210 // 211 //
463 void verticalZoomChanged(); 464 void verticalZoomChanged();
464 465
465 protected: 466 protected:
466 void connectSignals(const Model *); 467 void connectSignals(const Model *);
467 468
469 virtual size_t alignToReference(View *v, size_t frame) const;
470 virtual size_t alignFromReference(View *v, size_t frame) const;
471
468 struct MeasureRect { 472 struct MeasureRect {
469 473
470 mutable QRect pixrect; 474 mutable QRect pixrect;
471 bool haveFrames; 475 bool haveFrames;
472 long startFrame; // only valid if haveFrames 476 long startFrame; // only valid if haveFrames