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