本文整理汇总了C++中NamedList::append方法的典型用法代码示例。如果您正苦于以下问题:C++ NamedList::append方法的具体用法?C++ NamedList::append怎么用?C++ NamedList::append使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NamedList
的用法示例。
在下文中一共展示了NamedList::append方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: QDomElement
QDomElement Sp2Pw::getWindowXml( VtlWidget * parent )
{
Figures * fig = dynamic_cast<Figures*>(parent);
if (!fig ) {
qWarning () << "BAD WIDGET TYPE!!!!";
return QDomElement();
}
FakeApplicationWindow app;
FakeSimpleMdiWindow * mdi = new FakeSimpleMdiWindow(&app, "PopupMdiWindow");
if (buttonType() == LeftButton )
mdi->addParam ("popup", "lb");
else if (buttonType() == RightButton )
mdi->addParam ("popup", "rb");
int x = 0, y = 0;
calculatePwPos (fig, 300, 75, x, y);
mdi->setWindowTitle (fig->toolTip());
mdi->setGeometry (QRect(x, y, 300, 155));
FakeTable * t = new FakeTable (mdi, "VtlTable");
t->setGeometry (QRect(0, 0, 305, 155));
t->setNumRows (2);
t->setNumCols (1);
t->setLeftMargin (100);
t->setTopMargin (0);
NamedList l ("ROWS");
{
NamedMap m("ROWS");
m["h"] = 75;
m["l"] = "Завдання";
l.append ( QVariant::fromValue ( m ));
}
{
NamedMap m("ROWS");
m["h"] = 75;
m["l"] = "Завдання 2";
l.append ( QVariant::fromValue ( m ));
}
t->setRows (l);
NamedList c ("COLS");
{
NamedMap m("COLS");
m["w"] = 200;
m["l"] = "";
c.append ( QVariant::fromValue( m ) );
}
t->setCols (c);
FakeCell * cell = new FakeCell (0, 0);
t->setItem(0, 0, cell);
cell->setCellType (FakeCell::SPINBOX_CELL);
cell->setFont (QFont("Tahoma", 26));
cell->setNumDigits ( fig->getFloatDigits() );
cell->setMinInc ( fig->getFloatDigits() );
FakeCell * cell1 = new FakeCell (1, 0);
t->setItem(1, 0, cell1);
cell1->setCellType (FakeCell::SPINBOX_CELL);
cell1->setFont (QFont("Tahoma", 26));
cell1->setNumDigits ( fig->getFloatDigits() );
cell1->setMinInc ( fig->getFloatDigits() );
XmlObjectSaverBase<VtlWrapper> saver;
saver.save (mdi->selfWrapper());
return saver.document().firstChild().toElement();
}