diff options
author | Thiago Macieira <thiago.macieira@nokia.com> | 2010-07-15 13:14:37 (GMT) |
---|---|---|
committer | Thiago Macieira <thiago.macieira@nokia.com> | 2010-07-15 13:14:37 (GMT) |
commit | 8106f716043c22d71ff3dcdf9cd8a4db258fa81f (patch) | |
tree | fef8ef2bcc78da549037c94451058fde10268edd /tools/qml/qmlruntime.h | |
parent | a98bda4b42b068c9c3220ae2aded41a263387ac2 (diff) | |
parent | 03c01176ebf423085e56ceabcf8335ca5027a786 (diff) | |
download | Qt-8106f716043c22d71ff3dcdf9cd8a4db258fa81f.zip Qt-8106f716043c22d71ff3dcdf9cd8a4db258fa81f.tar.gz Qt-8106f716043c22d71ff3dcdf9cd8a4db258fa81f.tar.bz2 |
Merge remote branch 'origin/4.7' into qt-master-from-4.7
Conflicts:
src/gui/kernel/qapplication.h
Diffstat (limited to 'tools/qml/qmlruntime.h')
-rw-r--r-- | tools/qml/qmlruntime.h | 33 |
1 files changed, 15 insertions, 18 deletions
diff --git a/tools/qml/qmlruntime.h b/tools/qml/qmlruntime.h index 27bd217..68d3452 100644 --- a/tools/qml/qmlruntime.h +++ b/tools/qml/qmlruntime.h @@ -43,8 +43,7 @@ #define QDECLARATIVEVIEWER_H #include <QMainWindow> -#include <QMenuBar> -#include <private/qdeclarativetimer_p.h> +#include <QTimer> #include <QTime> #include <QList> @@ -62,17 +61,16 @@ class QNetworkReply; class QNetworkCookieJar; class NetworkAccessManagerFactory; class QTranslator; +class QActionGroup; +class QMenuBar; class QDeclarativeViewer -#if defined(Q_OS_SYMBIAN) : public QMainWindow -#else - : public QWidget -#endif { -Q_OBJECT + Q_OBJECT + public: - QDeclarativeViewer(QWidget *parent=0, Qt::WindowFlags flags=0); + QDeclarativeViewer(QWidget *parent = 0, Qt::WindowFlags flags = 0); ~QDeclarativeViewer(); static void registerTypes(); @@ -95,7 +93,7 @@ public: void setRecordFile(const QString&); void setRecordArgs(const QStringList&); void setRecording(bool on); - bool isRecording() const { return recordTimer.isRunning(); } + bool isRecording() const { return recordTimer.isActive(); } void setAutoRecord(int from, int to); void setDeviceKeys(bool); void setNetworkCacheSize(int size); @@ -103,11 +101,8 @@ public: void addPluginPath(const QString& plugin); void setUseGL(bool use); void setUseNativeFileBrowser(bool); - void updateSizeHints(); void setSizeToView(bool sizeToView); - QMenuBar *menuBar() const; - QDeclarativeView *view() const; LoggerWidget *warningsWidget() const; @@ -132,9 +127,11 @@ public slots: protected: virtual void keyPressEvent(QKeyEvent *); virtual bool event(QEvent *); - void createMenu(QMenuBar *menu, QMenu *flatmenu); + void createMenu(); private slots: + void appAboutToQuit(); + void autoStartRecording(); void autoStopRecording(); void recordFrame(); @@ -149,20 +146,21 @@ private slots: void warningsWidgetClosed(); private: + void updateSizeHints(bool initial = false); + QString getVideoFileName(); - int menuBarHeight() const; LoggerWidget *loggerWindow; QDeclarativeView *canvas; QSize initialSize; QString currentFileOrUrl; - QDeclarativeTimer recordTimer; + QTimer recordTimer; QString frame_fmt; QImage frame; QList<QImage*> frames; QProcess* frame_stream; - QDeclarativeTimer autoStartTimer; - QDeclarativeTimer autoStopTimer; + QTimer autoStartTimer; + QTimer autoStopTimer; QString record_dither; QString record_file; QSize record_outsize; @@ -173,7 +171,6 @@ private: QAction *recordAction; QString currentSkin; bool scaleSkin; - mutable QMenuBar *mb; RecordingDialog *recdlg; void senseImageMagick(); |