diff options
author | Christian Ulrich <christian@rechenwerk.net> | 2016-02-19 22:10:37 +0100 |
---|---|---|
committer | Christian Ulrich <christian@rechenwerk.net> | 2016-02-19 22:10:37 +0100 |
commit | 0567a594dd93158b404fd8b8bd37a58eddf023fc (patch) | |
tree | b65420217cd2d11b684de19e9f0ec3a5b6d33445 /trunk/include/SecushareQtView.hpp | |
download | redthread-0567a594dd93158b404fd8b8bd37a58eddf023fc.tar.gz redthread-0567a594dd93158b404fd8b8bd37a58eddf023fc.zip |
initial commit
Diffstat (limited to 'trunk/include/SecushareQtView.hpp')
-rw-r--r-- | trunk/include/SecushareQtView.hpp | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/trunk/include/SecushareQtView.hpp b/trunk/include/SecushareQtView.hpp new file mode 100644 index 0000000..d5c118d --- /dev/null +++ b/trunk/include/SecushareQtView.hpp | |||
@@ -0,0 +1,56 @@ | |||
1 | // SecushareQtView.hpp | ||
2 | // | ||
3 | // author: lurchi | ||
4 | // date: 2016-02-01 | ||
5 | |||
6 | #ifndef REDTHREAD_SECUSHARE_VIEW__H | ||
7 | #define REDTHREAD_SECUSHARE_VIEW__H | ||
8 | |||
9 | #include "AbstractSecushareView.hpp" | ||
10 | #include "QtUserConfigModel.hpp" | ||
11 | #include "NotifyPipe.hpp" | ||
12 | #include <QApplication> | ||
13 | #include <QSocketNotifier> | ||
14 | #include <vector> | ||
15 | #include <iostream> | ||
16 | |||
17 | namespace redthread | ||
18 | { | ||
19 | class SecushareQtView : public QObject, public AbstractSecushareView | ||
20 | { | ||
21 | Q_OBJECT | ||
22 | |||
23 | public: | ||
24 | /////// | ||
25 | SecushareQtView(int argc, char** argv); | ||
26 | ~SecushareQtView() override; | ||
27 | |||
28 | int run() override; | ||
29 | |||
30 | std::shared_ptr<AbstractUserConfigModel> getUserConfigModel() const override | ||
31 | {return mUserConfigModel;} | ||
32 | |||
33 | signals: | ||
34 | //////// | ||
35 | void shutdownRequest(); | ||
36 | void addEgoRequest(const std::string& name); | ||
37 | void addFriendRequst(const IdentityId& nymId); | ||
38 | void sendMessageRequest(const PlaceId& placeId, const std::string& message); | ||
39 | |||
40 | private: | ||
41 | //////// | ||
42 | int mArgc; | ||
43 | char** mArgv; | ||
44 | std::shared_ptr<QtUserConfigModel> mUserConfigModel; | ||
45 | |||
46 | static Util::NotifyPipe shutdownPipe; | ||
47 | QSocketNotifier *sigNotifier; | ||
48 | |||
49 | void catchUnixSignals( | ||
50 | const std::vector<int>& quitSignals, | ||
51 | const std::vector<int>& ignoreSignals = {} | ||
52 | ); | ||
53 | }; | ||
54 | } | ||
55 | |||
56 | #endif | ||