Mercurial > hg > svgui
comparison layer/Layer.h @ 373:0895517bb2d1 1.2-stable
* merge from trunk (1.2 ended up being tracked from trunk, but we may want
this branch for fixes later)
author | Chris Cannam |
---|---|
date | Wed, 27 Feb 2008 10:32:45 +0000 |
parents | 2f83b6e3b8ca |
children |
comparison
equal
deleted
inserted
replaced
337:813170c57b13 | 373:0895517bb2d1 |
---|---|
90 } | 90 } |
91 | 91 |
92 virtual QString getPropertyContainerIconName() const; | 92 virtual QString getPropertyContainerIconName() const; |
93 | 93 |
94 virtual QString getPropertyContainerName() const { | 94 virtual QString getPropertyContainerName() const { |
95 return objectName(); | 95 if (m_presentationName != "") return m_presentationName; |
96 } | 96 else return objectName(); |
97 } | |
98 | |
99 virtual void setPresentationName(QString name); | |
97 | 100 |
98 virtual QString getLayerPresentationName() const; | 101 virtual QString getLayerPresentationName() const; |
99 virtual QPixmap getLayerPresentationPixmap(QSize) const { return QPixmap(); } | 102 virtual QPixmap getLayerPresentationPixmap(QSize) const { return QPixmap(); } |
100 | 103 |
101 virtual int getVerticalScaleWidth(View *, QPainter &) const { return 0; } | 104 virtual int getVerticalScaleWidth(View *, QPainter &) const { return 0; } |
191 | 194 |
192 virtual void moveSelection(Selection, size_t /* newStartFrame */) { } | 195 virtual void moveSelection(Selection, size_t /* newStartFrame */) { } |
193 virtual void resizeSelection(Selection, Selection /* newSize */) { } | 196 virtual void resizeSelection(Selection, Selection /* newSize */) { } |
194 virtual void deleteSelection(Selection) { } | 197 virtual void deleteSelection(Selection) { } |
195 | 198 |
196 virtual void copy(Selection, Clipboard & /* to */) { } | 199 virtual void copy(View *, Selection, Clipboard & /* to */) { } |
197 | 200 |
198 /** | 201 /** |
199 * Paste from the given clipboard onto the layer at the given | 202 * Paste from the given clipboard onto the layer at the given |
200 * frame offset. If interactive is true, the layer may ask the | 203 * frame offset. If interactive is true, the layer may ask the |
201 * user about paste options through a dialog if desired, and may | 204 * user about paste options through a dialog if desired, and may |
202 * return false if the user cancelled the paste operation. This | 205 * return false if the user cancelled the paste operation. This |
203 * function should return true if a paste actually occurred. | 206 * function should return true if a paste actually occurred. |
204 */ | 207 */ |
205 virtual bool paste(const Clipboard & /* from */, | 208 virtual bool paste(View *, |
209 const Clipboard & /* from */, | |
206 int /* frameOffset */, | 210 int /* frameOffset */, |
207 bool /* interactive */) { return false; } | 211 bool /* interactive */) { return false; } |
208 | 212 |
209 // Text mode: | 213 // Text mode: |
210 // | 214 // |
463 void verticalZoomChanged(); | 467 void verticalZoomChanged(); |
464 | 468 |
465 protected: | 469 protected: |
466 void connectSignals(const Model *); | 470 void connectSignals(const Model *); |
467 | 471 |
472 virtual size_t alignToReference(View *v, size_t frame) const; | |
473 virtual size_t alignFromReference(View *v, size_t frame) const; | |
474 bool clipboardHasDifferentAlignment(View *v, const Clipboard &clip) const; | |
475 | |
468 struct MeasureRect { | 476 struct MeasureRect { |
469 | 477 |
470 mutable QRect pixrect; | 478 mutable QRect pixrect; |
471 bool haveFrames; | 479 bool haveFrames; |
472 long startFrame; // only valid if haveFrames | 480 long startFrame; // only valid if haveFrames |
538 MeasureRectSet::const_iterator findFocusedMeasureRect(QPoint) const; | 546 MeasureRectSet::const_iterator findFocusedMeasureRect(QPoint) const; |
539 | 547 |
540 void paintMeasurementRect(View *v, QPainter &paint, | 548 void paintMeasurementRect(View *v, QPainter &paint, |
541 const MeasureRect &r, bool focus) const; | 549 const MeasureRect &r, bool focus) const; |
542 | 550 |
551 QString m_presentationName; | |
552 | |
543 private: | 553 private: |
544 mutable QMutex m_dormancyMutex; | 554 mutable QMutex m_dormancyMutex; |
545 mutable std::map<const void *, bool> m_dormancy; | 555 mutable std::map<const void *, bool> m_dormancy; |
546 }; | 556 }; |
547 | 557 |