-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBaseDlg.cpp
More file actions
53 lines (45 loc) · 827 Bytes
/
BaseDlg.cpp
File metadata and controls
53 lines (45 loc) · 827 Bytes
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
//
// C++ Implementation: BaseDlg
//
// Description:
//
//
// Author: root <root@andLinux>, (C) 2008
//
// Copyright: See COPYING file that comes with this distribution
//
//
#include "BaseDlg.h"
#include <ZApplication.h>
#include <ZSoftKey.h>
MyBaseDlg::MyBaseDlg()
:ZKbMainWidget( ZHeader::MAINDISPLAY_HEADER, NULL, "ZMainWidget", WType_Modal | WType_TopLevel )
{
myInLoop = false;
}
MyBaseDlg::~MyBaseDlg()
{
}
int MyBaseDlg::exec() {
setResult(0);
show();
myInLoop = TRUE;
qApp->enter_loop();
return result();
}
void MyBaseDlg::done( int r )
{
hide();
if (myInLoop) {
qApp->exit_loop();
}
setResult(r);
if ( qApp->mainWidget() == this )
qApp->quit();
}
void MyBaseDlg::accept() {
done(Accepted);
}
void MyBaseDlg::reject() {
done(Rejected);
}