2
|
1 // Filename: qdata.h
|
|
2 // Last Change: 2015-09-13 Sun 09:28:00.
|
|
3 //
|
|
4 #ifndef __QDATA_H__
|
|
5 #define __QDATA_H__
|
|
6
|
|
7 class QlipData {
|
|
8 public:
|
|
9 int id; // key
|
|
10 wxString text;
|
|
11 bool overwrite;
|
|
12 int max_active_time;
|
|
13 int max_live_time;
|
|
14 int active_time;
|
|
15 int live_time;
|
|
16 wxString desc;
|
|
17
|
|
18 bool IsArrived() {
|
|
19 active_time++;
|
|
20 if ( max_active_time == active_time ) {
|
|
21 active_time = 0;
|
|
22 return true;
|
|
23 }
|
|
24 return false;
|
|
25 };
|
|
26 bool IsAlive() {
|
|
27 if ( live_time == 0 ) return false;
|
|
28 return true;
|
|
29 }
|
|
30 void Kill() {
|
|
31 live_time = 0;
|
|
32 active_time = 0;
|
|
33 text = wxEmptyString;
|
|
34 }
|
|
35 };
|
|
36
|
|
37 #endif //__QDATA_H__
|
|
38
|