50 |
long mainThreadInterface; |
long mainThreadInterface; |
51 |
String theme; |
String theme; |
52 |
private boolean running; |
private boolean running; |
53 |
|
private boolean doublebuffer; |
54 |
|
|
55 |
public MainQtThread( String theme ) |
public MainQtThread( String theme, boolean doublebuffer ) |
56 |
{ |
{ |
57 |
this.theme = theme; |
this.theme = theme; |
58 |
|
this.doublebuffer = doublebuffer; |
59 |
running = false; |
running = false; |
60 |
} |
} |
61 |
|
|
67 |
/** |
/** |
68 |
* Creates the QApplication |
* Creates the QApplication |
69 |
*/ |
*/ |
70 |
public native long init(String theme); |
public native long init(String theme, boolean doublebuffer); |
71 |
|
|
72 |
/** |
/** |
73 |
* Runs the QApplication (doesn't return.) |
* Runs the QApplication (doesn't return.) |
76 |
|
|
77 |
public void run() |
public void run() |
78 |
{ |
{ |
79 |
QApplicationPointer = init(theme); |
QApplicationPointer = init(theme, doublebuffer); |
80 |
running = true; |
running = true; |
81 |
exec(QApplicationPointer); |
exec(QApplicationPointer); |
82 |
} |
} |