]> git.sesse.net Git - kdenlive/blobdiff - src/gentime.h
Const'ref
[kdenlive] / src / gentime.h
index 34f7bc59a2fc158bea78ab68a9303a2481928648..8b735b44ed290b0a3ab842e2359f8a05afb1f961 100644 (file)
@@ -18,6 +18,7 @@
 #ifndef GENTIME_H
 #define GENTIME_H
 
+#include <QString>
 #include <cmath>
 
 /**
@@ -52,16 +53,25 @@ public:
     * @param framesPerSecond Number of frames per second */
     GenTime & roundNearestFrame(double framesPerSecond);
 
+    QString toString() const;
+
 
     /*
      * Operators.
      */
+
+    /// Unary minus
+    GenTime operator -() {
+        return GenTime(-m_time);
+    }
     
+    /// Addition
     GenTime & operator+=(GenTime op) {
         m_time += op.m_time;
         return *this;
     }
 
+    /// Subtraction
     GenTime & operator-=(GenTime op) {
         m_time -= op.m_time;
         return *this;
@@ -112,7 +122,7 @@ public:
     }
 
 private:
-    /** Holds the time for this object. */
+    /** Holds the time in seconds for this object. */
     double m_time;
 
     /** A delta value that is used to get around floating point rounding issues. */