new PIP
This commit is contained in:
@@ -37,7 +37,7 @@ public:
|
||||
bool loadFromCMFile(const QString & file);
|
||||
|
||||
protected:
|
||||
void propertyChanged(const PIString & ) {setObjectName(PI2QString(name()));}
|
||||
void propertyChanged(const char *) {setObjectName(PI2QString(name()));}
|
||||
EVENT_HANDLER2(void, piDataRec, const PIString &, from, const PIByteArray &, data);
|
||||
EVENT_HANDLER2(void, piPacketRec, const PIString &, from, const PIByteArray &, data);
|
||||
|
||||
|
||||
@@ -59,14 +59,11 @@ void IODeviceEditDialog::setOptions(int o) {
|
||||
|
||||
void IODeviceEditDialog::on_comboType_currentIndexChanged(int index) {
|
||||
PIString prefix = Q2PIString(ui->comboType->currentText());
|
||||
PIVector<const PIObject * > rd(PICollection::groupElements("__PIIODevices__"));
|
||||
piForeachC (PIObject * d, rd) {
|
||||
const PIIODevice * dev = ((const PIIODevice * )d);
|
||||
if (prefix != dev->fullPathPrefix())
|
||||
continue;
|
||||
ps = PI2QPropertyStorage(dev->constructVariant().get());
|
||||
auto * d = PIIODevice::createFromFullPath(prefix + "://");
|
||||
if (d) {
|
||||
ps = PI2QPropertyStorage(d->constructVariant().get());
|
||||
ui->widgetProperties->setStorage(&ps);
|
||||
return;
|
||||
delete d;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user