jenkinsmain
Last change
on this file since 9c6539c was
6b6f1ba,
checked in by Vadim Troshchinskiy Shmelev <vtroshchinskiy@…>, 16 months ago
|
Fix build, missing file in cmake
|
-
Property mode set to
100644
|
File size:
861 bytes
|
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 | private: |
---|
39 | OGCommandLineOptions() { |
---|
40 | |
---|
41 | } |
---|
42 | |
---|
43 | QString _url; |
---|
44 | NewTabBehavior _newTabBehavior{ReplacePage}; |
---|
45 | }; |
---|
Note: See
TracBrowser
for help on using the repository browser.