-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.h
52 lines (41 loc) · 835 Bytes
/
main.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
50
51
52
#ifndef MAIN_H
#define MAIN_H
#include <ma.h>
#include <MAUtil/String.h>
#include <MAUtil/Moblet.h>
#include <NativeUI/Widgets.h>
#include "manager.h"
class ZeitkitTimer : public MAUtil::Moblet
{
public:
static const char* host;
Manager::Worklog mWorklog;
Manager::Client mClient;
Manager::Login mLogin;
Manager::Webview mWebview;
ZeitkitTimer()
{
Manager::main = this;
if (mLogin.controller->isAuthenticated())
mClient.controller->actionClients();
else
mLogin.view->show();
}
virtual ~ZeitkitTimer()
{
}
void ZeitkitTimer::closeEvent() GCCATTRIB(noreturn)
{
mLogin.free();
mClient.free();
mWorklog.free();
mWebview.free();
close();
}
void ZeitkitTimer::keyPressEvent(int keyCode, int nativeCode)
{
if (MAK_BACK == keyCode)
closeEvent();
}
};
#endif