本文整理汇总了C++中DomProperty::elementBool方法的典型用法代码示例。如果您正苦于以下问题:C++ DomProperty::elementBool方法的具体用法?C++ DomProperty::elementBool怎么用?C++ DomProperty::elementBool使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DomProperty
的用法示例。
在下文中一共展示了DomProperty::elementBool方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: acceptWidget
void DatabaseInfo::acceptWidget(DomWidget *node)
{
QHash<QString, DomProperty*> properties = propertyMap(node->elementProperty());
DomProperty *frameworkCode = properties.value(QLatin1String("frameworkCode"), 0);
if (frameworkCode && toBool(frameworkCode->elementBool()) == false)
return;
DomProperty *db = properties.value(QLatin1String("database"), 0);
if (db && db->elementStringList()) {
QStringList info = db->elementStringList()->elementString();
QString connection = info.size() > 0 ? info.at(0) : QString();
if (connection.isEmpty())
return;
m_connections.append(connection);
QString table = info.size() > 1 ? info.at(1) : QString();
if (table.isEmpty())
return;
m_cursors[connection].append(table);
QString field = info.size() > 2 ? info.at(2) : QString();
if (field.isEmpty())
return;
m_fields[connection].append(field);
}
TreeWalker::acceptWidget(node);
}
示例2: icon
bool Q3ListViewExtraInfo::loadWidgetExtraInfo(DomWidget *ui_widget)
{
Q3ListView *listView = qobject_cast<Q3ListView*>(widget());
Q_ASSERT(listView != 0);
Q3Header *header = listView->header();
QList<DomColumn*> columns = ui_widget->elementColumn();
for (int i=0; i<columns.size(); ++i) {
DomColumn *column = columns.at(i);
QHash<QString, DomProperty*> properties = propertyMap(column->elementProperty());
DomProperty *text = properties.value(QLatin1String("text"));
DomProperty *pixmap = properties.value(QLatin1String("pixmap"));
DomProperty *clickable = properties.value(QLatin1String("clickable"));
DomProperty *resizable = properties.value(QLatin1String("resizable"));
QString txt = text->elementString()->text();
if (pixmap != 0) {
DomResourcePixmap *pix = pixmap->elementPixmap();
QIcon icon(core()->iconCache()->resolveQrcPath(pix->text(), pix->attributeResource(), workingDirectory()));
listView->addColumn(icon, txt);
} else {
listView->addColumn(txt);
}
if (clickable != 0) {
header->setClickEnabled(clickable->elementBool() == QLatin1String("true"), header->count() - 1);
}
if (resizable != 0) {
header->setResizeEnabled(resizable->elementBool() == QLatin1String("true"), header->count() - 1);
}
}
if (ui_widget->elementItem().size()) {
initializeQ3ListViewItems(ui_widget->elementItem());
}
return true;
}