/* DO WHAT THE FRAK YOU WANT TO PUBLIC LICENSE (WTFPL) Version 4, October 2012 Based on the wtfpl: http://sam.zoy.org/wtfpl/ Copyright (C) 2012 Alan Ezust Everyone is permitted to copy and distribute verbatim or modified copies of this license document, and changing it is allowed as long as the name is changed. DO WHAT THE FRAK YOU WANT TO PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. You just DO WHAT THE FRAK YOU WANT TO. 1. It is provided "as is" without any warranty whatsoever. */ #include #include "slideview.h" /** PrintSlides main program. A program to print qt-labs qml-presentation-system Presentations. @author ezust@ics.com */ int main (int argc, char* argv[]) { QGuiApplication app(argc, argv); app.setOrganizationDomain("com"); app.setOrganizationName("ics"); app.setApplicationName("printslides"); 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(); }