Mercurial > hg > svgui
diff layer/Layer.h @ 374:64e84e5efb76 spectrogram-cache-rejig
* Merge from trunk
author | Chris Cannam |
---|---|
date | Wed, 27 Feb 2008 11:59:42 +0000 |
parents | 984c1975f1ff |
children |
line wrap: on
line diff
--- a/layer/Layer.h Mon Nov 19 15:50:37 2007 +0000 +++ b/layer/Layer.h Wed Feb 27 11:59:42 2008 +0000 @@ -92,9 +92,12 @@ virtual QString getPropertyContainerIconName() const; virtual QString getPropertyContainerName() const { - return objectName(); + if (m_presentationName != "") return m_presentationName; + else return objectName(); } + virtual void setPresentationName(QString name); + virtual QString getLayerPresentationName() const; virtual QPixmap getLayerPresentationPixmap(QSize) const { return QPixmap(); } @@ -151,7 +154,7 @@ return false; } - // Draw and edit modes: + // Draw, erase, and edit modes: // // Layer needs to get actual mouse events, I guess. Draw mode is // probably the easier. @@ -160,6 +163,10 @@ virtual void drawDrag(View *, QMouseEvent *) { } virtual void drawEnd(View *, QMouseEvent *) { } + virtual void eraseStart(View *, QMouseEvent *) { } + virtual void eraseDrag(View *, QMouseEvent *) { } + virtual void eraseEnd(View *, QMouseEvent *) { } + virtual void editStart(View *, QMouseEvent *) { } virtual void editDrag(View *, QMouseEvent *) { } virtual void editEnd(View *, QMouseEvent *) { } @@ -189,7 +196,7 @@ virtual void resizeSelection(Selection, Selection /* newSize */) { } virtual void deleteSelection(Selection) { } - virtual void copy(Selection, Clipboard & /* to */) { } + virtual void copy(View *, Selection, Clipboard & /* to */) { } /** * Paste from the given clipboard onto the layer at the given @@ -198,7 +205,8 @@ * return false if the user cancelled the paste operation. This * function should return true if a paste actually occurred. */ - virtual bool paste(const Clipboard & /* from */, + virtual bool paste(View *, + const Clipboard & /* from */, int /* frameOffset */, bool /* interactive */) { return false; } @@ -461,6 +469,10 @@ protected: void connectSignals(const Model *); + virtual size_t alignToReference(View *v, size_t frame) const; + virtual size_t alignFromReference(View *v, size_t frame) const; + bool clipboardHasDifferentAlignment(View *v, const Clipboard &clip) const; + struct MeasureRect { mutable QRect pixrect; @@ -536,6 +548,8 @@ void paintMeasurementRect(View *v, QPainter &paint, const MeasureRect &r, bool focus) const; + QString m_presentationName; + private: mutable QMutex m_dormancyMutex; mutable std::map<const void *, bool> m_dormancy;