git-svn-id: svn://db.shs.com.ru/libs@339 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
@@ -19,6 +19,7 @@ bool QPIConnection::loadFromCMFile(const QString & file) {
|
|||||||
|
|
||||||
|
|
||||||
void QPIConnection::piDataRec(const PIString & from, const PIByteArray & data) {
|
void QPIConnection::piDataRec(const PIString & from, const PIByteArray & data) {
|
||||||
|
//piCout << from << PICoutManipulators::Hex << data;
|
||||||
QMetaObject::invokeMethod(this, "qDataReceivedEvent", Qt::QueuedConnection,
|
QMetaObject::invokeMethod(this, "qDataReceivedEvent", Qt::QueuedConnection,
|
||||||
Q_ARG(QString, PI2QString(from)), Q_ARG(QByteArray, PI2QByteArray(data)));
|
Q_ARG(QString, PI2QString(from)), Q_ARG(QByteArray, PI2QByteArray(data)));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -266,6 +266,7 @@ QByteArray BlockItem::save() const {
|
|||||||
ChunkStream cs;
|
ChunkStream cs;
|
||||||
QMap<QString, QList<BlockItem::Property> > pp;
|
QMap<QString, QList<BlockItem::Property> > pp;
|
||||||
foreach (BlockItemPin * p, pins()) {
|
foreach (BlockItemPin * p, pins()) {
|
||||||
|
//qDebug() << "save pin" << p->text() << "->" << p->properties().size();
|
||||||
pp[p->text()] = p->properties();
|
pp[p->text()] = p->properties();
|
||||||
}
|
}
|
||||||
cs << cs.chunk(1, pos()) << cs.chunk(2, rotation()) << cs.chunk(3, props) << cs.chunk(5, pp) << cs.chunk(6, size());
|
cs << cs.chunk(1, pos()) << cs.chunk(2, rotation()) << cs.chunk(3, props) << cs.chunk(5, pp) << cs.chunk(6, size());
|
||||||
@@ -286,9 +287,12 @@ void BlockItem::load(const QByteArray & data) {
|
|||||||
case 3: cs.get(props); break;
|
case 3: cs.get(props); break;
|
||||||
case 5:
|
case 5:
|
||||||
cs.get(_p);
|
cs.get(_p);
|
||||||
foreach (BlockItemPin * p, pins())
|
//qDebug() << "load pins" << _p.size();
|
||||||
|
foreach (BlockItemPin * p, pins()) {
|
||||||
|
//qDebug() << "load pin" << p->text() << "->" << _p.contains(p->text());
|
||||||
if (_p.contains(p->text()))
|
if (_p.contains(p->text()))
|
||||||
p->properties() = _p[p->text()];
|
p->properties() = _p[p->text()];
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 6: setSize(cs.getData<QSizeF>()); break;
|
case 6: setSize(cs.getData<QSizeF>()); break;
|
||||||
case 10: setData(2000, cs.getData<QVariant>()); break;
|
case 10: setData(2000, cs.getData<QVariant>()); break;
|
||||||
|
|||||||
Reference in New Issue
Block a user