[vlc-commits] qt: add scale method on VLCTick
Abel Tesfaye
git at videolan.org
Thu Jun 13 13:11:16 CEST 2019
vlc | branch: master | Abel Tesfaye <Abeltesfaye45 at gmail.com> | Fri May 31 14:00:52 2019 +0300| [ac89539e3d35d5c79b39e03ea0a0bef49a4cd58f] | committer: Thomas Guillem
qt: add scale method on VLCTick
Signed-off-by: Thomas Guillem <thomas at gllm.fr>
Signed-off-by: Pierre Lamot <pierre at videolabs.io>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ac89539e3d35d5c79b39e03ea0a0bef49a4cd58f
---
modules/gui/qt/util/vlctick.cpp | 5 +++++
modules/gui/qt/util/vlctick.hpp | 1 +
2 files changed, 6 insertions(+)
diff --git a/modules/gui/qt/util/vlctick.cpp b/modules/gui/qt/util/vlctick.cpp
index bd0074da54..6cbf6f553a 100644
--- a/modules/gui/qt/util/vlctick.cpp
+++ b/modules/gui/qt/util/vlctick.cpp
@@ -49,3 +49,8 @@ QString VLCTick::toString() const
.arg(min, 2, 10, QChar('0'))
.arg(sec, 2, 10, QChar('0'));
}
+
+VLCTick VLCTick::scale(float scalar) const
+{
+ return VLCTick(m_ticks*scalar);
+}
\ No newline at end of file
diff --git a/modules/gui/qt/util/vlctick.hpp b/modules/gui/qt/util/vlctick.hpp
index 19ea5d1db5..e6f8f2b2aa 100644
--- a/modules/gui/qt/util/vlctick.hpp
+++ b/modules/gui/qt/util/vlctick.hpp
@@ -39,6 +39,7 @@ public:
* @return time as HH:MM:SS
*/
Q_INVOKABLE QString toString() const;
+ Q_INVOKABLE VLCTick scale(float) const;
private:
vlc_tick_t m_ticks;
More information about the vlc-commits
mailing list