changeset 2:50d9f4e2a540

forgot a file.
author pyon@macmini
date Mon, 14 Sep 2015 19:25:51 +0900
parents e4aa0e7a07ad
children fd4361d2cbbd
files include/qdata.h
diffstat 1 files changed, 38 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/include/qdata.h	Mon Sep 14 19:25:51 2015 +0900
@@ -0,0 +1,38 @@
+// Filename: qdata.h
+// Last Change: 2015-09-13 Sun 09:28:00.
+//
+#ifndef __QDATA_H__
+#define __QDATA_H__
+
+class QlipData {
+    public:
+        int      id;    // key
+        wxString text;
+        bool     overwrite; 
+        int      max_active_time;
+        int      max_live_time;
+        int      active_time;
+        int      live_time;
+        wxString desc;
+
+        bool IsArrived() {
+            active_time++;
+            if ( max_active_time == active_time ) {
+                active_time = 0;
+                return true;
+            } 
+            return false;
+        };
+        bool IsAlive() {
+            if ( live_time == 0 ) return false;
+            return true;
+        }
+        void Kill() {
+            live_time = 0;
+            active_time = 0;
+            text = wxEmptyString;
+        }
+};
+
+#endif //__QDATA_H__
+