diff 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
line wrap: on
line diff
--- a/layer/Layer.h	Thu Nov 29 10:43:54 2007 +0000
+++ b/layer/Layer.h	Wed Feb 27 10:32:45 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(); }
 
@@ -193,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
@@ -202,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; }
 
@@ -465,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;
@@ -540,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;