summaryrefslogtreecommitdiffstats
path: root/tools/qml/qmlruntime.h
diff options
context:
space:
mode:
Diffstat (limited to 'tools/qml/qmlruntime.h')
-rw-r--r--tools/qml/qmlruntime.h33
1 files changed, 15 insertions, 18 deletions
diff --git a/tools/qml/qmlruntime.h b/tools/qml/qmlruntime.h
index 27bd217..e70e69f 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();
@@ -148,21 +145,22 @@ private slots:
void warningsWidgetOpened();
void warningsWidgetClosed();
+ void updateSizeHints();
+
private:
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();