diff data/model/ImageModel.h @ 1599:ce185d4dd408 bqaudiostream

Merge from default branch
author Chris Cannam
date Wed, 23 Jan 2019 14:43:43 +0000
parents ad5f892c0c4d
children a77a7e8c085c
line wrap: on
line diff
--- a/data/model/ImageModel.h	Wed Jan 23 10:31:40 2019 +0000
+++ b/data/model/ImageModel.h	Wed Jan 23 14:43:43 2019 +0000
@@ -13,8 +13,8 @@
     COPYING included with this distribution for more information.
 */
 
-#ifndef _IMAGE_MODEL_H_
-#define _IMAGE_MODEL_H_
+#ifndef SV_IMAGE_MODEL_H
+#define SV_IMAGE_MODEL_H
 
 #include "SparseModel.h"
 #include "base/XmlExportable.h"
@@ -45,7 +45,7 @@
     
     void toXml(QTextStream &stream,
                QString indent = "",
-               QString extraAttributes = "") const
+               QString extraAttributes = "") const override
     {
         stream <<
             QString("%1<point frame=\"%2\" image=\"%3\" label=\"%4\" %5/>\n")
@@ -93,11 +93,11 @@
         SparseModel<ImagePoint>(sampleRate, resolution, notifyOnAdd)
     { }
 
-    QString getTypeName() const { return tr("Image"); }
+    QString getTypeName() const override { return tr("Image"); }
 
-    virtual void toXml(QTextStream &out,
+    void toXml(QTextStream &out,
                        QString indent = "",
-                       QString extraAttributes = "") const
+                       QString extraAttributes = "") const override
     {
         SparseModel<ImagePoint>::toXml
             (out, 
@@ -121,15 +121,15 @@
             m_newPoint.label = newLabel;
         }
 
-        virtual QString getName() const { return tr("Edit Image"); }
+        QString getName() const override { return tr("Edit Image"); }
 
-        virtual void execute() { 
+        void execute() override { 
             m_model->deletePoint(m_oldPoint);
             m_model->addPoint(m_newPoint);
             std::swap(m_oldPoint, m_newPoint);
         }
 
-        virtual void unexecute() { execute(); }
+        void unexecute() override { execute(); }
 
     private:
         ImageModel *m_model;
@@ -141,12 +141,12 @@
      * TabularModel methods.  
      */
     
-    virtual int getColumnCount() const
+    int getColumnCount() const override
     {
         return 4;
     }
 
-    virtual QString getHeading(int column) const
+    QString getHeading(int column) const override
     {
         switch (column) {
         case 0: return tr("Time");
@@ -157,7 +157,7 @@
         }
     }
 
-    virtual QVariant getData(int row, int column, int role) const
+    QVariant getData(int row, int column, int role) const override
     {
         if (column < 2) {
             return SparseModel<ImagePoint>::getData
@@ -174,7 +174,7 @@
         }
     }
 
-    virtual Command *getSetDataCommand(int row, int column, const QVariant &value, int role)
+    Command *getSetDataCommand(int row, int column, const QVariant &value, int role) override
     {
         if (column < 2) {
             return SparseModel<ImagePoint>::getSetDataCommand
@@ -198,12 +198,12 @@
         return command->finish();
     }
 
-    virtual bool isColumnTimeValue(int column) const
+    bool isColumnTimeValue(int column) const override
     {
         return (column < 2); 
     }
 
-    virtual SortType getSortType(int column) const
+    SortType getSortType(int column) const override
     {
         if (column > 2) return SortAlphabetical;
         return SortNumeric;