1 /* 2 3 Pencil2D - Traditional Animation Software 4 Copyright (C) 2005-2007 Patrick Corrieri & Pascal Naidon 5 Copyright (C) 2012-2020 Matthew Chiawen Chang 6 7 This program is free software; you can redistribute it and/or 8 modify it under the terms of the GNU General Public License 9 as published by the Free Software Foundation; version 2 of the License. 10 11 This program is distributed in the hope that it will be useful, 12 but WITHOUT ANY WARRANTY; without even the implied warranty of 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 GNU General Public License for more details. 15 16 */ 17 18 #ifndef COMMANDLINEPARSER_H 19 #define COMMANDLINEPARSER_H 20 21 #include <QCommandLineParser> 22 23 class CommandLineParser : QObject 24 { 25 Q_OBJECT 26 27 public: 28 explicit CommandLineParser(); 29 30 void process(QStringList arguments); 31 inputPath()32 QString inputPath() const { return mInputPath; } outputPaths()33 QStringList outputPaths() const { return mOutputPaths; } camera()34 QString camera() const { return mCamera; } width()35 int width() const { return mWidth; } height()36 int height() const { return mHeight; } startFrame()37 int startFrame() const { return mStartFrame; } endFrame()38 int endFrame() const { return mEndFrame; } transparency()39 bool transparency() const { return mTransparency; } 40 41 private: 42 QCommandLineParser mParser; 43 44 QString mInputPath; 45 QStringList mOutputPaths; 46 QString mCamera; 47 int mWidth = -1; 48 int mHeight = -1; 49 int mStartFrame = 1; 50 int mEndFrame = -1; 51 bool mTransparency = false; 52 }; 53 54 #endif // COMMANDLINEPARSER_H 55