diff data/model/ImageModel.h @ 1429:48e9f538e6e9

Untabify
author Chris Cannam
date Thu, 01 Mar 2018 18:02:22 +0000
parents 1517d4c60e88
children c01cbe41aeb5
line wrap: on
line diff
--- a/data/model/ImageModel.h	Thu Mar 01 14:43:40 2018 +0000
+++ b/data/model/ImageModel.h	Thu Mar 01 18:02:22 2018 +0000
@@ -47,9 +47,9 @@
                QString indent = "",
                QString extraAttributes = "") const
     {
-	stream <<
+        stream <<
             QString("%1<point frame=\"%2\" image=\"%3\" label=\"%4\" %5/>\n")
-	    .arg(indent).arg(frame)
+            .arg(indent).arg(frame)
             .arg(encodeEntities(image))
             .arg(encodeEntities(label))
             .arg(extraAttributes);
@@ -65,19 +65,19 @@
     }
 
     struct Comparator {
-	bool operator()(const ImagePoint &p1,
-			const ImagePoint &p2) const {
-	    if (p1.frame != p2.frame) return p1.frame < p2.frame;
+        bool operator()(const ImagePoint &p1,
+                        const ImagePoint &p2) const {
+            if (p1.frame != p2.frame) return p1.frame < p2.frame;
             if (p1.label != p2.label) return p1.label < p2.label;
-	    return p1.image < p2.image;
-	}
+            return p1.image < p2.image;
+        }
     };
     
     struct OrderComparator {
-	bool operator()(const ImagePoint &p1,
-			const ImagePoint &p2) const {
-	    return p1.frame < p2.frame;
-	}
+        bool operator()(const ImagePoint &p1,
+                        const ImagePoint &p2) const {
+            return p1.frame < p2.frame;
+        }
     };
 };
 
@@ -90,7 +90,7 @@
 
 public:
     ImageModel(sv_samplerate_t sampleRate, int resolution, bool notifyOnAdd = true) :
-	SparseModel<ImagePoint>(sampleRate, resolution, notifyOnAdd)
+        SparseModel<ImagePoint>(sampleRate, resolution, notifyOnAdd)
     { }
 
     QString getTypeName() const { return tr("Image"); }
@@ -100,10 +100,10 @@
                        QString extraAttributes = "") const
     {
         SparseModel<ImagePoint>::toXml
-	    (out, 
+            (out, 
              indent,
-	     QString("%1 subtype=\"image\"")
-	     .arg(extraAttributes));
+             QString("%1 subtype=\"image\"")
+             .arg(extraAttributes));
     }
 
     /**
@@ -116,25 +116,25 @@
                            const ImagePoint &point,
                            QString newImage,
                            QString newLabel) :
-	    m_model(model), m_oldPoint(point), m_newPoint(point) {
-	    m_newPoint.image = newImage;
+            m_model(model), m_oldPoint(point), m_newPoint(point) {
+            m_newPoint.image = newImage;
             m_newPoint.label = newLabel;
-	}
+        }
 
-	virtual QString getName() const { return tr("Edit Image"); }
+        virtual QString getName() const { return tr("Edit Image"); }
 
-	virtual void execute() { 
-	    m_model->deletePoint(m_oldPoint);
-	    m_model->addPoint(m_newPoint);
-	    std::swap(m_oldPoint, m_newPoint);
-	}
+        virtual void execute() { 
+            m_model->deletePoint(m_oldPoint);
+            m_model->addPoint(m_newPoint);
+            std::swap(m_oldPoint, m_newPoint);
+        }
 
-	virtual void unexecute() { execute(); }
+        virtual void unexecute() { execute(); }
 
     private:
-	ImageModel *m_model;
-	ImagePoint m_oldPoint;
-	ImagePoint m_newPoint;
+        ImageModel *m_model;
+        ImagePoint m_oldPoint;
+        ImagePoint m_newPoint;
     };
 
     /**