summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2009-04-30 04:58:56 (GMT)
committerMichael Brasser <michael.brasser@nokia.com>2009-04-30 04:58:56 (GMT)
commit72afedd7fad133b390cc63fd04e3cf0cee757e2e (patch)
treed1312ea6a560299d0014869f36b39cba86428699 /tools
parent28936246e547234f727a923d2542d92f766fb2e0 (diff)
downloadQt-72afedd7fad133b390cc63fd04e3cf0cee757e2e.zip
Qt-72afedd7fad133b390cc63fd04e3cf0cee757e2e.tar.gz
Qt-72afedd7fad133b390cc63fd04e3cf0cee757e2e.tar.bz2
Rename duiviewer to qmlviewer.
Diffstat (limited to 'tools')
-rw-r--r--tools/qmlviewer/main.cpp (renamed from tools/duiviewer/main.cpp)8
-rw-r--r--tools/qmlviewer/qmlviewer.cpp (renamed from tools/duiviewer/qfxviewer.cpp)33
-rw-r--r--tools/qmlviewer/qmlviewer.h (renamed from tools/duiviewer/qfxviewer.h)10
-rw-r--r--tools/qmlviewer/qmlviewer.pro (renamed from tools/duiviewer/duiviewer.pro)4
-rw-r--r--tools/tools.pro2
5 files changed, 28 insertions, 29 deletions
diff --git a/tools/duiviewer/main.cpp b/tools/qmlviewer/main.cpp
index cb4ba05..c5676ab 100644
--- a/tools/duiviewer/main.cpp
+++ b/tools/qmlviewer/main.cpp
@@ -12,7 +12,7 @@
****************************************************************************/
#include "qml.h"
-#include "qfxviewer.h"
+#include "qmlviewer.h"
#include <QWidget>
#include <QDir>
#include "qfxtestengine.h"
@@ -21,7 +21,7 @@
void usage()
{
- qWarning("Usage: duiviewer [options] <filename>");
+ qWarning("Usage: qmlviewer [options] <filename>");
qWarning(" ");
qWarning(" options:");
qWarning(" -v, -version ............................. display version");
@@ -116,9 +116,9 @@ int main(int argc, char ** argv)
if (fileName.isEmpty())
usage();
- QFxViewer viewer(testMode, testDir, 0, frameless ? Qt::FramelessWindowHint : Qt::Widget);
+ QmlViewer viewer(testMode, testDir, 0, frameless ? Qt::FramelessWindowHint : Qt::Widget);
viewer.setCacheEnabled(cache);
- viewer.openXml(fileName);
+ viewer.openQml(fileName);
if (period>0)
viewer.setRecordPeriod(period);
if (autorecord_to)
diff --git a/tools/duiviewer/qfxviewer.cpp b/tools/qmlviewer/qmlviewer.cpp
index b15a8bf..87bebfa 100644
--- a/tools/duiviewer/qfxviewer.cpp
+++ b/tools/qmlviewer/qmlviewer.cpp
@@ -14,7 +14,7 @@
#include <qfxview.h>
#include "qmlbindablevalue.h"
-#include "qfxviewer.h"
+#include "qmlviewer.h"
#include <QtDeclarative/qmlcontext.h>
#include <QtDeclarative/qmlengine.h>
#include "qml.h"
@@ -34,7 +34,7 @@
#include <QProcess>
#include <QMenu>
-QFxViewer::QFxViewer(QFxTestEngine::TestMode testMode, const QString &testDir, QWidget *parent, Qt::WindowFlags flags)
+QmlViewer::QmlViewer(QFxTestEngine::TestMode testMode, const QString &testDir, QWidget *parent, Qt::WindowFlags flags)
: QWidget(parent, flags)
{
testEngine = 0;
@@ -58,12 +58,12 @@ QFxViewer::QFxViewer(QFxTestEngine::TestMode testMode, const QString &testDir, Q
resize(width, height);
}
-void QFxViewer::reload()
+void QmlViewer::reload()
{
- openXml(currentFileName);
+ openQml(currentFileName);
}
-void QFxViewer::openXml(const QString& fileName)
+void QmlViewer::openQml(const QString& fileName)
{
setWindowTitle(tr("%1 - Qt Declarative UI Viewer").arg(fileName));
@@ -180,7 +180,7 @@ void PreviewDeviceSkin::populateContextMenu(QMenu *menu)
}
-void QFxViewer::setSkin(const QString& skinDirectory)
+void QmlViewer::setSkin(const QString& skinDirectory)
{
DeviceSkinParameters parameters;
QString err;
@@ -199,7 +199,7 @@ void QFxViewer::setSkin(const QString& skinDirectory)
}
}
-void QFxViewer::setAutoRecord(int from, int to)
+void QmlViewer::setAutoRecord(int from, int to)
{
record_autotime = to-from;
if (from) {
@@ -210,12 +210,12 @@ void QFxViewer::setAutoRecord(int from, int to)
}
}
-void QFxViewer::setRecordPeriod(int ms)
+void QmlViewer::setRecordPeriod(int ms)
{
record_period = ms;
}
-void QFxViewer::sceneResized(QSize size)
+void QmlViewer::sceneResized(QSize size)
{
if (size.width() > 0 && size.height() > 0) {
canvas->setFixedSize(size.width(), size.height());
@@ -226,13 +226,13 @@ void QFxViewer::sceneResized(QSize size)
}
}
-void QFxViewer::resizeEvent(QResizeEvent *)
+void QmlViewer::resizeEvent(QResizeEvent *)
{
if (!skin)
canvas->setFixedSize(width(),height());
}
-void QFxViewer::keyPressEvent(QKeyEvent *event)
+void QmlViewer::keyPressEvent(QKeyEvent *event)
{
if (event->key() == Qt::Key_0 && devicemode)
exit(0);
@@ -250,7 +250,6 @@ void QFxViewer::keyPressEvent(QKeyEvent *event)
} else if (event->key() == Qt::Key_F2 || (event->key() == Qt::Key_2 && devicemode)) {
setRecording(!recordTimer.isActive());
} else if (event->key() == Qt::Key_F3 || (event->key() == Qt::Key_3 && devicemode)) {
- setRecording(!recordTimer.isActive());
canvas->asImage().save("snapshot.png");
qDebug() << "Wrote snapshot.png";
} else if (event->key() == Qt::Key_F4 || (event->key() == Qt::Key_4 && devicemode)) {
@@ -274,7 +273,7 @@ void QFxViewer::keyPressEvent(QKeyEvent *event)
QWidget::keyPressEvent(event);
}
-void QFxViewer::setRecording(bool on)
+void QmlViewer::setRecording(bool on)
{
if (on == recordTimer.isActive())
return;
@@ -328,7 +327,7 @@ void QFxViewer::setRecording(bool on)
qDebug() << "Recording: " << (recordTimer.isActive()?"ON":"OFF");
}
-void QFxViewer::timerEvent(QTimerEvent *event)
+void QmlViewer::timerEvent(QTimerEvent *event)
{
if (event->timerId() == recordTimer.timerId()) {
frames.append(new QImage(canvas->asImage()));
@@ -343,12 +342,12 @@ void QFxViewer::timerEvent(QTimerEvent *event)
}
}
-void QFxViewer::setDeviceKeys(bool on)
+void QmlViewer::setDeviceKeys(bool on)
{
devicemode = on;
}
-void QFxViewer::setCacheEnabled(bool on)
+void QmlViewer::setCacheEnabled(bool on)
{
QNetworkAccessManager * nam = canvas->engine()->networkAccessManager();
if (on == !!nam->cache())
@@ -364,4 +363,4 @@ void QFxViewer::setCacheEnabled(bool on)
}
}
-#include "qfxviewer.moc"
+#include "qmlviewer.moc"
diff --git a/tools/duiviewer/qfxviewer.h b/tools/qmlviewer/qmlviewer.h
index 7a190c5..0fa879d 100644
--- a/tools/duiviewer/qfxviewer.h
+++ b/tools/qmlviewer/qmlviewer.h
@@ -11,8 +11,8 @@
**
****************************************************************************/
-#ifndef QFXVIEWER_H
-#define QFXVIEWER_H
+#ifndef QMLVIEWER_H
+#define QMLVIEWER_H
#include <QWidget>
#include <QBasicTimer>
@@ -25,11 +25,11 @@ class QFxView;
class PreviewDeviceSkin;
class QFxTestEngine;
-class QFxViewer : public QWidget
+class QmlViewer : public QWidget
{
Q_OBJECT
public:
- QFxViewer(QFxTestEngine::TestMode = QFxTestEngine::NoTest, const QString &testDir = QString(), QWidget *parent=0, Qt::WindowFlags flags=0);
+ QmlViewer(QFxTestEngine::TestMode = QFxTestEngine::NoTest, const QString &testDir = QString(), QWidget *parent=0, Qt::WindowFlags flags=0);
void setRecordDither(const QString& s) { record_dither = s; }
void setRecordPeriod(int ms);
@@ -43,7 +43,7 @@ public:
public slots:
void sceneResized(QSize size);
- void openXml(const QString& fileName);
+ void openQml(const QString& fileName);
void reload();
protected:
diff --git a/tools/duiviewer/duiviewer.pro b/tools/qmlviewer/qmlviewer.pro
index eae313e..08d2d2b 100644
--- a/tools/duiviewer/duiviewer.pro
+++ b/tools/qmlviewer/qmlviewer.pro
@@ -1,8 +1,8 @@
DESTDIR = ../../bin
QT += declarative script network sql
# Input
-HEADERS += qfxviewer.h
-SOURCES += main.cpp qfxviewer.cpp
+HEADERS += qmlviewer.h
+SOURCES += main.cpp qmlviewer.cpp
include($$QT_SOURCE_TREE/tools/shared/deviceskin/deviceskin.pri)
diff --git a/tools/tools.pro b/tools/tools.pro
index 12da18c..2c83580 100644
--- a/tools/tools.pro
+++ b/tools/tools.pro
@@ -24,7 +24,7 @@ mac {
SUBDIRS += kmap2qmap
-contains(QT_CONFIG, declarative):SUBDIRS += duiviewer qmlconv
+contains(QT_CONFIG, declarative):SUBDIRS += qmlviewer qmlconv
contains(QT_CONFIG, dbus):SUBDIRS += qdbus
!wince*:contains(QT_CONFIG, xmlpatterns): SUBDIRS += xmlpatterns
embedded: SUBDIRS += makeqpf