-
Notifications
You must be signed in to change notification settings - Fork 0
/
parametermanager.cpp
74 lines (66 loc) · 1.94 KB
/
parametermanager.cpp
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#include <QDebug>
#include "parametermanager.h"
parameterManager::parameterManager(QStringList params)
{
location=ads::RightDockWidgetArea;
// remove the first element ( program .. )
params.removeAt(0);
for (int n = 0; n< params.length();n++) {
if ( params[n].toLower() =="-h" || params[n].toLower() == "--help")
{
helpRequest = true;
return;
}
shell = true;
if ( params[n] =="-right") { location=ads::RightDockWidgetArea; }
if ( params[n] =="-left") { location= ads::LeftDockWidgetArea;}
if ( params[n] =="-top") { location= ads::TopDockWidgetArea; }
if ( params[n] =="-bottom") { location= ads::BottomDockWidgetArea; }
if ( params[n] =="-tab") { createintab = true; }
if ( params[n] =="man") {
if (params.length() >n +1)
{
nameMan = params [n+1];
man = true;
shell = false;
edit = false;
}
}
if ( params[n] =="edit") {
if (params.length() >n +1)
{
nameFileToEdit = params[n+1];
edit = true;
man = false;
shell = false;
}
}
// Name of tab terminal
if ( params[n] =="name") {
if (params.length() >n +1)
{
nameDock = params[n+1];
qDebug() << " NAME " << nameDock;
shell = true;
man = false;
//DockerRegistry.self();
}
}
}
}
bool parameterManager::isHelpRequest()
{
return helpRequest;
}
void parameterManager::showHelp()
{
qInfo() << " name ";
qInfo() << " man ";
qInfo() << " edit : ";
qInfo() << " OPTIONS ";
qInfo() << "\t\t-tab\tcreate in tab";
qInfo() << "\t\t-righti\tcreate on right";
qInfo() << "\t\t-left\t create on left";
qInfo() << "\t\t-top\t create on top";
qInfo() << "\t\t-bottom\t create on bottom";
}