1 /*******************************************************************************
2 **
3 ** Photivo
4 **
5 ** Copyright (C) 2011 Bernd Schoeler <brjohn@brother-john.net>
6 **
7 ** This file is part of Photivo.
8 **
9 ** Photivo is free software: you can redistribute it and/or modify
10 ** it under the terms of the GNU General Public License version 3
11 ** as published by the Free Software Foundation.
12 **
13 ** Photivo is distributed in the hope that it will be useful,
14 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
15 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 ** GNU General Public License for more details.
17 **
18 ** You should have received a copy of the GNU General Public License
19 ** along with Photivo.  If not, see <http://www.gnu.org/licenses/>.
20 **
21 *******************************************************************************/
22 /*!
23   \brief Command line parser for Photivo
24 */
25 
26 #ifndef PTPARSECLI_H
27 #define PTPARSECLI_H
28 
29 #include <QString>
30 
31 /*! Enum listing the actions that can be invoked from command line. */
32 enum ptCliMode {
33   cliNoAction        = -1,
34   cliLoadImage       = 0,
35   cliLoadAndDelImage = 1,
36   cliProcessJob      = 2,
37   cliShowHelp        = 3
38 };
39 
40 /*! Struct for the results of cli parse. */
41 struct ptCliCommands {
42   ptCliMode Mode;
43   QString Filename;
44   QString PtsFilename;
45   QString Sidecar;
46   bool NewInstance;
47   bool NoOpenFileMgr;
48 };
49 
50 /*! Parses the command line and returns invoked action and files to open. */
51 ptCliCommands ParseCli(int argc, char *argv[]);
52 
53 #endif // PTPARSECLI_H
54