|
|
@ -121,7 +121,6 @@ void XMLUtils::writeXMLHeader( TQDomNode* root, const TQString & description, De
|
|
|
|
void XMLUtils::readDocumentItems( DocumentItemList* list, TQDomDocument* doc, TokenProvider* token, bool kbarcode18 )
|
|
|
|
void XMLUtils::readDocumentItems( DocumentItemList* list, TQDomDocument* doc, TokenProvider* token, bool kbarcode18 )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
TQDomNode n = doc->documentElement().firstChild();
|
|
|
|
TQDomNode n = doc->documentElement().firstChild();
|
|
|
|
list->setAutoDelete( false );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if( kbarcode18 )
|
|
|
|
if( kbarcode18 )
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -136,7 +135,7 @@ void XMLUtils::readDocumentItems( DocumentItemList* list, TQDomDocument* doc, To
|
|
|
|
bcode->updateBarcode();
|
|
|
|
bcode->updateBarcode();
|
|
|
|
bcode->setZ( e.attribute( "z", "0" ).toInt() );
|
|
|
|
bcode->setZ( e.attribute( "z", "0" ).toInt() );
|
|
|
|
|
|
|
|
|
|
|
|
list->append( bcode );
|
|
|
|
list->push_back( bcode );
|
|
|
|
} else if( e.tagName() == "textfield" ) {
|
|
|
|
} else if( e.tagName() == "textfield" ) {
|
|
|
|
TextItem* t = new TextItem();
|
|
|
|
TextItem* t = new TextItem();
|
|
|
|
t->setTokenProvider( token );
|
|
|
|
t->setTokenProvider( token );
|
|
|
@ -157,7 +156,7 @@ void XMLUtils::readDocumentItems( DocumentItemList* list, TQDomDocument* doc, To
|
|
|
|
n = n.nextSibling();
|
|
|
|
n = n.nextSibling();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
list->append( t );
|
|
|
|
list->push_back( t );
|
|
|
|
} else if( e.tagName() == "picture" ) {
|
|
|
|
} else if( e.tagName() == "picture" ) {
|
|
|
|
ImageItem* r = new ImageItem();
|
|
|
|
ImageItem* r = new ImageItem();
|
|
|
|
|
|
|
|
|
|
|
@ -169,7 +168,7 @@ void XMLUtils::readDocumentItems( DocumentItemList* list, TQDomDocument* doc, To
|
|
|
|
r->setPixmap( pix );
|
|
|
|
r->setPixmap( pix );
|
|
|
|
r->setRotation( e.attribute("rotation", "0.0" ).toDouble() );
|
|
|
|
r->setRotation( e.attribute("rotation", "0.0" ).toDouble() );
|
|
|
|
r->setZ( e.attribute( "z", "0" ).toInt() );
|
|
|
|
r->setZ( e.attribute( "z", "0" ).toInt() );
|
|
|
|
list->append( r );
|
|
|
|
list->push_back( r );
|
|
|
|
} else if( e.tagName() == "rect" ) {
|
|
|
|
} else if( e.tagName() == "rect" ) {
|
|
|
|
RectItem* r = new RectItem();
|
|
|
|
RectItem* r = new RectItem();
|
|
|
|
|
|
|
|
|
|
|
@ -181,7 +180,7 @@ void XMLUtils::readDocumentItems( DocumentItemList* list, TQDomDocument* doc, To
|
|
|
|
|
|
|
|
|
|
|
|
r->setPen( TQPen(readXMLColor( &e, "bordercolor", TQt::black ),e.attribute( "borderwidth", "1" ).toInt(),(TQt::PenStyle)e.attribute( "borderstyle", "1" ).toInt() ));
|
|
|
|
r->setPen( TQPen(readXMLColor( &e, "bordercolor", TQt::black ),e.attribute( "borderwidth", "1" ).toInt(),(TQt::PenStyle)e.attribute( "borderstyle", "1" ).toInt() ));
|
|
|
|
r->setColor( readXMLColor( &e, "color", TQt::black ) );
|
|
|
|
r->setColor( readXMLColor( &e, "color", TQt::black ) );
|
|
|
|
list->append( r );
|
|
|
|
list->push_back( r );
|
|
|
|
} else if( e.tagName() == "line" ) {
|
|
|
|
} else if( e.tagName() == "line" ) {
|
|
|
|
#warning "TODO: test legacy loading of lines"
|
|
|
|
#warning "TODO: test legacy loading of lines"
|
|
|
|
LineItem* cl = new LineItem();
|
|
|
|
LineItem* cl = new LineItem();
|
|
|
@ -192,7 +191,7 @@ void XMLUtils::readDocumentItems( DocumentItemList* list, TQDomDocument* doc, To
|
|
|
|
cl->setZ( e.attribute( "z", "0" ).toInt() );
|
|
|
|
cl->setZ( e.attribute( "z", "0" ).toInt() );
|
|
|
|
cl->setPen( TQPen( readXMLColor( &e, "color", TQt::black ),
|
|
|
|
cl->setPen( TQPen( readXMLColor( &e, "color", TQt::black ),
|
|
|
|
e.attribute( "width", "0" ).toInt(), (TQPen::PenStyle)e.attribute( "style", "0" ).toInt() ) );
|
|
|
|
e.attribute( "width", "0" ).toInt(), (TQPen::PenStyle)e.attribute( "style", "0" ).toInt() ) );
|
|
|
|
list->append( cl );
|
|
|
|
list->push_back( cl );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
n = n.nextSibling();
|
|
|
|
n = n.nextSibling();
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -205,7 +204,7 @@ void XMLUtils::readDocumentItems( DocumentItemList* list, TQDomDocument* doc, To
|
|
|
|
{
|
|
|
|
{
|
|
|
|
DocumentItem* item = NULL;
|
|
|
|
DocumentItem* item = NULL;
|
|
|
|
if( readXMLDocumentItem( &e, &item, token ) )
|
|
|
|
if( readXMLDocumentItem( &e, &item, token ) )
|
|
|
|
list->append( item );
|
|
|
|
list->push_back( item );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
n = n.nextSibling();
|
|
|
|
n = n.nextSibling();
|
|
|
|
}
|
|
|
|
}
|
|
|
|