diff options
-rw-r--r-- | tools/printslides/README.txt | 2 | ||||
-rw-r--r-- | tools/printslides/TODO.txt | 2 | ||||
-rw-r--r-- | tools/printslides/main.cpp | 10 |
3 files changed, 11 insertions, 3 deletions
diff --git a/tools/printslides/README.txt b/tools/printslides/README.txt index c2c6324..f302c50 100644 --- a/tools/printslides/README.txt +++ b/tools/printslides/README.txt @@ -13,4 +13,4 @@ Instructions: Example: printslides ../../examples/tutorial/SlideDeck.qml -Creates a "Slides.pdf" file in your current directory. +Creates a "slides.pdf" file in your current directory. diff --git a/tools/printslides/TODO.txt b/tools/printslides/TODO.txt deleted file mode 100644 index 2b2aa2e..0000000 --- a/tools/printslides/TODO.txt +++ /dev/null @@ -1,2 +0,0 @@ -Add page numbers and headers/footers? - diff --git a/tools/printslides/main.cpp b/tools/printslides/main.cpp index bdd9d5a..21f59f0 100644 --- a/tools/printslides/main.cpp +++ b/tools/printslides/main.cpp @@ -30,6 +30,16 @@ int main (int argc, char* argv[]) { app.setApplicationVersion("0.2"); app.setApplicationDisplayName("QML Presentation Slide Printer"); SlideView mainView; + argc = app.arguments().length(); + if ((argc != 2) || app.arguments()[1].endsWith("?")) { + QString progName = app.applicationName(); + QString message = QString().arg(progName); + qFatal("%s usage: \n\t %s path/to/presentation.qml\n" + "Displays and prints each slides to slides.pdf\n", + progName.toLocal8Bit().constData(), + progName.toLocal8Bit().constData()); + return 2; + } mainView.setSource(app.arguments()[1]); mainView.show(); return app.exec(); |