shutdown-environment
Last change
on this file was
dcd2e6a,
checked in by Vadim Troshchinskiy Shmelev <vtroshchinskiy@…>, 6 weeks ago
|
Shutdown desktop environment on exit, initial implementation
|
-
Property mode set to
100644
|
File size:
1.3 KB
|
Line | |
---|
1 | |
---|
2 | |
---|
3 | #pragma once |
---|
4 | |
---|
5 | #include <QCommandLineParser> |
---|
6 | |
---|
7 | class OGCommandLineOptions { |
---|
8 | public: |
---|
9 | |
---|
10 | enum NewTabBehavior { |
---|
11 | /** |
---|
12 | * Ignore attempt to open new tab |
---|
13 | */ |
---|
14 | Ignore, |
---|
15 | |
---|
16 | /** |
---|
17 | * Replace current page, ignore "new tab" directive. |
---|
18 | */ |
---|
19 | ReplacePage, |
---|
20 | |
---|
21 | /** |
---|
22 | * Open a new tab. |
---|
23 | */ |
---|
24 | NewTab |
---|
25 | }; |
---|
26 | |
---|
27 | static OGCommandLineOptions &getInstance() { |
---|
28 | static OGCommandLineOptions instance; |
---|
29 | return instance; |
---|
30 | } |
---|
31 | |
---|
32 | QString getUrl() const { return _url; } |
---|
33 | void setUrl(const QString& url) { _url = url; } |
---|
34 | |
---|
35 | NewTabBehavior getNewTabBehavior() const { return _newTabBehavior; } |
---|
36 | void setNewTabBehavior(NewTabBehavior nt) { _newTabBehavior = nt; } |
---|
37 | |
---|
38 | bool getIgnoreSslErrors() const { return _ignoreSslErrors; } |
---|
39 | void setIgnoreSslErrors(bool value) { _ignoreSslErrors = value; } |
---|
40 | |
---|
41 | bool getTerminateEnvironmentOnShutdown() const { return _terminateEnvironmentOnShutdown; } |
---|
42 | void setTerminateEnvironmentOnShutdown(bool value) { _terminateEnvironmentOnShutdown = value; } |
---|
43 | |
---|
44 | |
---|
45 | |
---|
46 | private: |
---|
47 | OGCommandLineOptions() { |
---|
48 | |
---|
49 | } |
---|
50 | |
---|
51 | QString _url; |
---|
52 | NewTabBehavior _newTabBehavior{ReplacePage}; |
---|
53 | |
---|
54 | bool _ignoreSslErrors = false; |
---|
55 | bool _terminateEnvironmentOnShutdown = false; |
---|
56 | }; |
---|
Note: See
TracBrowser
for help on using the repository browser.