forked from alphaonex86/Ultracopier
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CliParser.h
49 lines (43 loc) · 1.69 KB
/
CliParser.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/** \file CliParser.h
\brief To group into one class, the CLI parsing
\author alpha_one_x86
\licence GPL3, see the file COPYING */
#ifndef CLIPARSER_H
#define CLIPARSER_H
#include <QObject>
#include <QMessageBox>
#include <QCoreApplication>
#include <QFile>
#include "Environment.h"
/** \brief class to parse all command line options */
class CliParser : public QObject
{
Q_OBJECT
public:
explicit CliParser(QObject *parent = 0);
public slots:
/** \brief method to parse the ultracopier arguments
\param ultracopierArguments the argument list
\param external true if the arguments come from other instance of ultracopier
*/
void cli(const QStringList &ultracopierArguments,const bool &external,const bool &onlyCheck);
signals:
/** new copy without destination have been pased by the CLI */
void newCopyWithoutDestination(QStringList sources) const;
/** new copy with destination have been pased by the CLI */
void newCopy(QStringList sources,QString destination) const;
/** new move without destination have been pased by the CLI */
void newMoveWithoutDestination(QStringList sources) const;
/** new move with destination have been pased by the CLI */
void newMove(QStringList sources,QString destination) const;
/** new transfer list pased by the CLI */
void newTransferList(QString engine,QString mode,QString file) const;
void tryLoadPlugin(const QString &file) const;
/// \brief Show the help option
void showOptions() const;
private:
/** \brief show the help
*\param incorrectArguments if the help is call because the arguments are wrong */
void showHelp(const bool &incorrectArguments=true);
};
#endif // CLIPARSER_H