diff options
author | Michael Brasser <michael.brasser@nokia.com> | 2009-09-28 01:28:28 (GMT) |
---|---|---|
committer | Michael Brasser <michael.brasser@nokia.com> | 2009-09-28 01:28:28 (GMT) |
commit | 553d7bdcdc67927a856b20e7717fb497e4cf7ac9 (patch) | |
tree | 5f98cc088fcd7b18226259c0c5941f209e01a9e6 /tools/qmlviewer/main.cpp | |
parent | 0fde77f5c8fd1705bc894d7983e47c46a2902bc1 (diff) | |
download | Qt-553d7bdcdc67927a856b20e7717fb497e4cf7ac9.zip Qt-553d7bdcdc67927a856b20e7717fb497e4cf7ac9.tar.gz Qt-553d7bdcdc67927a856b20e7717fb497e4cf7ac9.tar.bz2 |
Add -maximized option to qmlviewer.
Diffstat (limited to 'tools/qmlviewer/main.cpp')
-rw-r--r-- | tools/qmlviewer/main.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/tools/qmlviewer/main.cpp b/tools/qmlviewer/main.cpp index 98a5d3a..f82867f 100644 --- a/tools/qmlviewer/main.cpp +++ b/tools/qmlviewer/main.cpp @@ -26,6 +26,7 @@ void usage() qWarning(" options:"); qWarning(" -v, -version ............................. display version"); qWarning(" -frameless ............................... run with no window frame"); + qWarning(" -maximized................................ run maximized"); qWarning(" -fullscreen............................... run fullscreen"); qWarning(" -skin <qvfbskindir> ...................... run with a skin window frame"); qWarning(" \"list\" for a list of built-ins"); @@ -104,12 +105,15 @@ int main(int argc, char ** argv) QString translationFile; bool useGL = false; bool fullScreen = false; + bool maximized = false; for (int i = 1; i < argc; ++i) { bool lastArg = (i == argc - 1); QString arg = argv[i]; if (arg == "-frameless") { frameless = true; + } else if (arg == "-maximized") { + maximized = true; } else if (arg == "-fullscreen") { fullScreen = true; } else if (arg == "-skin") { @@ -243,11 +247,13 @@ int main(int argc, char ** argv) viewer.setRecordDither(dither); if (recordargs.count()) viewer.setRecordArgs(recordargs); + if (fullScreen && maximized) + qWarning() << "Both -fullscreen and -maximized specified. Using -fullscreen."; if (!fileName.isEmpty()) { viewer.openQml(fileName); - fullScreen ? viewer.showFullScreen() : viewer.show(); + fullScreen ? viewer.showFullScreen() : maximized ? viewer.showMaximized() : viewer.show(); } else { - fullScreen ? viewer.showFullScreen() : viewer.show(); + fullScreen ? viewer.showFullScreen() : maximized ? viewer.showMaximized() : viewer.show(); viewer.open(); } viewer.raise(); |