bool KivioBaseTargetStencil::loadProperties( const QDomElement &e ) { QDomNode node; QDomElement nodeE; QString nodeName; node = e.firstChild(); while( !node.isNull() ) { nodeName = node.nodeName(); nodeE = node.toElement(); if( nodeName == "KivioFillStyle" ) { m_pFillStyle->loadXML( node.toElement() ); } else if( nodeName == "KivioLineStyle" ) { m_pLineStyle->loadXML( node.toElement() ); } else if( nodeName == "KivioTextStyle" ) { m_pTextStyle->loadXML( node.toElement() ); } else if( nodeName == "KivioTargetList" ) { loadTargets( node.toElement() ); } else if( nodeName == "CustomData" ) { loadCustom( node.toElement() ); } else if( nodeName == "Geometry" ) { m_x = XmlReadFloat( nodeE, "x", 0.0f ); m_y = XmlReadFloat( nodeE, "y", 0.0f ); m_w = XmlReadFloat( nodeE, "w", 72.0f ); m_h = XmlReadFloat( nodeE, "h", 72.0f ); } node = node.nextSibling(); } return true; }
void MeshEditor::initFields(QVBoxLayout *layout) { customButton = new QPushButton("Custom", this); customButton->setFixedHeight(22); planeButton = new QPushButton("Plane", this); planeButton->setFixedHeight(22); perpPlaneButton = new QPushButton("Perpendicular Planes", this); perpPlaneButton->setFixedHeight(22); layout->addWidget(customButton); layout->addWidget(planeButton); layout->addWidget(perpPlaneButton); connect(customButton, SIGNAL(clicked()), this, SLOT(loadCustom())); connect(planeButton, SIGNAL(clicked()), this, SLOT(loadPlane())); connect(perpPlaneButton, SIGNAL(clicked()), this, SLOT(loadPerpPlane())); }