479 QScrollArea *area =
new QScrollArea;
480 QWidget *topic =
new QWidget;
481 QGridLayout *layout =
new QGridLayout(topic);
482 QDomElement child = elem.firstChildElement();
484 while (!child.isNull())
486 QString setting = child.attribute(
SA(
"setting"));
491 if (type==
SA(
"bool"))
496 child.attribute(
SA(
"id")),
497 child.attribute(
SA(
"defval"))==
SA(
"1"),
501 child.attribute(
SA(
"id")),
507 else if (type==
SA(
"string"))
511 if (format==
SA(
"dir"))
515 else if (format==
SA(
"file"))
519 else if (format==
SA(
"image"))
530 child.attribute(
SA(
"id")),
531 child.attribute(
SA(
"defval")),
534 child.attribute(
SA(
"abspath"))
537 child.attribute(
SA(
"id")),
543 else if (type==
SA(
"enum"))
547 child.attribute(
SA(
"id")),
548 child.attribute(
SA(
"defval")),
552 QDomElement enumVal = child.firstChildElement();
553 while (!enumVal.isNull())
555 if (enumVal.tagName()==
SA(
"value"))
557 enumList->
addValue(enumVal.attribute(
SA(
"name")));
559 enumVal = enumVal.nextSiblingElement();
563 m_options.insert(child.attribute(
SA(
"id")),enumList);
567 else if (type==
SA(
"int"))
572 child.attribute(
SA(
"id")),
573 child.attribute(
SA(
"defval")).toInt(),
574 child.attribute(
SA(
"minval")).toInt(),
575 child.attribute(
SA(
"maxval")).toInt(),
579 child.attribute(
SA(
"id")),
585 else if (type==
SA(
"list"))
588 QString format = child.attribute(
SA(
"format"));
589 if (format==
SA(
"dir"))
593 else if (format==
SA(
"file"))
597 else if (format==
SA(
"filedir"))
606 QDomElement listVal = child.firstChildElement();
607 while (!listVal.isNull())
609 if (listVal.tagName()==
SA(
"value"))
611 sl.
append(listVal.attribute(
SA(
"name")));
613 listVal = listVal.nextSiblingElement();
618 child.attribute(
SA(
"id")),
624 child.attribute(
SA(
"id")),
630 else if (type==
SA(
"obsolete"))
636 printf(
"Unsupported type %s\n",qPrintable(child.attribute(
SA(
"type"))));
639 child = child.nextSiblingElement();
643 child = elem.firstChildElement();
644 while (!child.isNull())
646 QString setting = child.attribute(
SA(
"setting"));
647 QString dependsOn = child.attribute(
SA(
"depends"));
655 printf(
"%s has depends=%s that is not valid\n",
656 qPrintable(
id),qPrintable(dependsOn));
659 Q_ASSERT(parentOption);
660 Q_ASSERT(thisOption);
661 if (parentOption && thisOption)
669 child = child.nextSiblingElement();
673 QHashIterator<QString,Input*> i(
m_options);
679 i.value()->updateDependencies();
683 layout->setRowStretch(row,1);
684 layout->setColumnStretch(1,2);
685 layout->setSpacing(5);
686 topic->setLayout(layout);
687 area->setWidget(topic);
688 area->setWidgetResizable(
true);
Iterator append(const T &x)
QHash< QString, Input * > m_options
static bool format(QChar::Decomposition tag, QString &str, int index, int len)
The QString class provides an abstraction of Unicode text and the classic C null-terminated char arra...
def connect(nxgraph, k1, k2, p1=0, p2=0, kwds)
static QString getDocsForNode(const QDomElement &child)