summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorTapani Mikola <tapani.mikola@nokia.com>2009-08-12 14:45:31 (GMT)
committerWarwick Allison <warwick.allison@nokia.com>2009-08-13 05:24:10 (GMT)
commit8a183d6259f8a464587b69f5c6ad831364383610 (patch)
treeed82a47d4c5001d03b9c783b5361dd1a57a3baea /tools
parent7c171e8067c929a3f49cf9753e75e202744e7344 (diff)
downloadQt-8a183d6259f8a464587b69f5c6ad831364383610.zip
Qt-8a183d6259f8a464587b69f5c6ad831364383610.tar.gz
Qt-8a183d6259f8a464587b69f5c6ad831364383610.tar.bz2
-scaleview parameter to qmlviewer to be able to start directly to correct sized skin (like emulator).
Diffstat (limited to 'tools')
-rw-r--r--tools/qmlviewer/main.cpp6
-rw-r--r--tools/qmlviewer/qmlviewer.h4
2 files changed, 8 insertions, 2 deletions
diff --git a/tools/qmlviewer/main.cpp b/tools/qmlviewer/main.cpp
index b2593a5..73f5382 100644
--- a/tools/qmlviewer/main.cpp
+++ b/tools/qmlviewer/main.cpp
@@ -27,6 +27,7 @@ void usage()
qWarning(" -v, -version ............................. display version");
qWarning(" -frameless ............................... run with no window frame");
qWarning(" -skin <qvfbskindir> ...................... run with a skin window frame");
+ qWarning(" -scaleview ...................... run with a skin window frame");
qWarning(" -recordfile <output> ..................... set video recording file");
qWarning(" - ImageMagick 'convert' for GIF)");
qWarning(" - png file for raw frames");
@@ -64,6 +65,7 @@ int main(int argc, char ** argv)
app.setOrganizationDomain("nokia.com");
bool frameless = false;
+ bool scaleview = false;
QString fileName;
double fps = 0;
int autorecord_from = 0;
@@ -83,6 +85,8 @@ int main(int argc, char ** argv)
frameless = true;
} else if (arg == "-skin") {
skin = QString(argv[++i]);
+ } else if (arg == "-scaleview") {
+ scaleview = true;
} else if (arg == "-netcache") {
cache = QString(argv[++i]).toInt();
} else if (arg == "-recordrate") {
@@ -129,6 +133,8 @@ int main(int argc, char ** argv)
viewer.addLibraryPath(lib);
viewer.setNetworkCacheSize(cache);
viewer.setRecordFile(recordfile);
+ if (scaleview)
+ viewer.setScaleView();
if (fps>0)
viewer.setRecordRate(fps);
if (autorecord_to)
diff --git a/tools/qmlviewer/qmlviewer.h b/tools/qmlviewer/qmlviewer.h
index 5b875d7..319d0a5 100644
--- a/tools/qmlviewer/qmlviewer.h
+++ b/tools/qmlviewer/qmlviewer.h
@@ -58,6 +58,7 @@ public slots:
void setSkin(const QString& skinDirectory);
void showProxySettings ();
void proxySettingsChanged ();
+ void setScaleView();
protected:
virtual void keyPressEvent(QKeyEvent *);
@@ -65,13 +66,12 @@ protected:
void createMenu(QMenuBar *menu, QMenu *flatmenu);
private slots:
- void setScaleSkin();
- void setScaleView();
void autoStartRecording();
void autoStopRecording();
void recordFrame();
void chooseRecordingOptions();
void pickRecordingFile();
+ void setScaleSkin();
private:
void setupProxy();