diff options
author | Warwick Allison <warwick.allison@nokia.com> | 2009-07-28 05:58:48 (GMT) |
---|---|---|
committer | Warwick Allison <warwick.allison@nokia.com> | 2009-07-28 05:58:48 (GMT) |
commit | 3a4c4ecb16827419fcb133744a7e97ed860cc669 (patch) | |
tree | 46ef55b68c3e7e0eba1047bcac303bfa97be9b6a /tools/qmlviewer/qmlviewer.h | |
parent | e87124ba02669e1dbffb803441e1fc25b7e7d959 (diff) | |
download | Qt-3a4c4ecb16827419fcb133744a7e97ed860cc669.zip Qt-3a4c4ecb16827419fcb133744a7e97ed860cc669.tar.gz Qt-3a4c4ecb16827419fcb133744a7e97ed860cc669.tar.bz2 |
Produce frame-rate-perfect videos.
While recording video, ignore realtime rate and deliver perfect
per-frame animation.
Diffstat (limited to 'tools/qmlviewer/qmlviewer.h')
-rw-r--r-- | tools/qmlviewer/qmlviewer.h | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/tools/qmlviewer/qmlviewer.h b/tools/qmlviewer/qmlviewer.h index d671410..e7177eb 100644 --- a/tools/qmlviewer/qmlviewer.h +++ b/tools/qmlviewer/qmlviewer.h @@ -15,7 +15,7 @@ #define QMLVIEWER_H #include <QMenuBar> -#include <QBasicTimer> +#include <QmlTimer> #include <QTime> #include <QList> @@ -39,7 +39,7 @@ public: void setRecordArgs(const QStringList&); int recordPeriod() const { return record_period; } void setRecording(bool on); - bool isRecording() const { return recordTimer.isActive(); } + bool isRecording() const { return recordTimer.isRunning(); } void setAutoRecord(int from, int to); void setDeviceKeys(bool); void setNetworkCacheSize(int size); @@ -60,13 +60,15 @@ public slots: protected: virtual void keyPressEvent(QKeyEvent *); - virtual void timerEvent(QTimerEvent *); void createMenu(QMenuBar *menu, QMenu *flatmenu); private slots: void setScaleSkin(); void setScaleView(); + void autoStartRecording(); + void autoStopRecording(); + void recordFrame(); private: void setupProxy(); @@ -78,12 +80,12 @@ private: QFxView *canvas; QmlPalette *palette; QmlPalette *disabledPalette; - QBasicTimer recordTimer; + QmlTimer recordTimer; QImage frame; QList<QImage*> frames; QProcess* frame_stream; - QBasicTimer autoStartTimer; - QTime autoTimer; + QmlTimer autoStartTimer; + QmlTimer autoStopTimer; QString record_dither; QString record_file; QStringList record_args; |