Log In
New Account
  
Home My Page Project Cloud Code Snippets Project Openings Pierogi
Summary Forums Tracker Lists Tasks Docs News SCM Files
1 #include "pirdevicetypenames.h"
3 #include <QComboBox>
5 PIRDeviceTypeMgr::PIRDeviceTypeMgr()
6 {
7   devices[Any_Device] = "Any";
8   devices[TV_Device] = "TV";
9   devices[Sat_Device] = "Sat Receiver";
10   devices[VCR_Device] = "VCR";
11   devices[DVD_Device] = "DVD";
12   devices[Audio_Device] = "Audio";
13   devices[Computer_Device] = "Computer";
14   devices[Other_Device] = "Other";
15 }
17 const char *PIRDeviceTypeMgr::getDeviceString(
18   PIRDeviceTypeName n)
19 {
20   return devices[n];
21 }
23 void PIRDeviceTypeMgr::populateComboBox(
24   QComboBox *cb)
25 {
26   PIRDeviceStringCollection::const_iterator i = devices.begin();
27   while (i != devices.end())
28   {
29     cb->insertItem(i->first, QString(i->second));
30     ++i;
31   }
32 }

Terms of Use    Privacy Policy    Contribution Guidelines    Feedback

Powered By GForge Collaborative Development Environment