New GUI, many changes
[pierogi] / pirkeysetmetadata.h
index 42e34c2..c70b040 100644 (file)
@@ -9,8 +9,9 @@
 #include <list>
 
 class QThread;
+class QObject;
 
-class PIRKeysetWidgetItem;
+class PIRSelectDeviceForm;
 class PIRProtocol;
 
 typedef std::map<PIRKeyName, const char *> KeyCollection;
@@ -32,7 +33,7 @@ public:
   PIRDeviceTypeName type;
 };
 
-typedef std::list<DeviceInfo> DeviceCollection;
+typedef std::list<DeviceInfo> PIRDeviceCollection;
 
 class PIRKeysetMetaData
 {
@@ -51,11 +52,15 @@ public:
 
   const char *getKeysetName() const;
 
-  void moveProtocolToThread(
+  virtual void populateProtocol(
+    QObject *guiObject) = 0;
+
+  void moveToThread(
     QThread *thread);
 
-  void populateDeviceTypes(
-    PIRKeysetWidgetItem *kwi) const;
+  void populateDevices(
+    unsigned int id,
+    PIRSelectDeviceForm *sdf) const;
 
 protected:
   void addControlledDevice(
@@ -121,6 +126,18 @@ protected:
     unsigned int commandData);
 */
 
+  void addKaseikyoKey(
+    const char *name,
+    PIRKeyName key,
+    unsigned int addressData,
+    unsigned int commandData);
+
+  void addDishKey(
+    const char *name,
+    PIRKeyName key,
+    unsigned int firstCommand,
+    unsigned int secondCommand);
+
   void setPreData(
     unsigned long data,
     unsigned int bits);
@@ -129,21 +146,20 @@ protected:
     unsigned long data,
     unsigned int bits);
 
+  void setKeysetName(
+    const char *name);
+
   KeyCollection keys;
 
-  DeviceCollection controlledDevices;
+  PIRDeviceCollection controlledDevices;
 
   PIRProtocol *threadableProtocol;
-
-  void setKeysetName(
-    const char *name);
+  unsigned int index;
 
 private:
   const char *keysetName;
   PIRMakeName make;
   PIRDeviceTypeCollection deviceTypes;
-
-  unsigned int id;
 };