本文整理汇总了C++中PropertyItem::addToolTip方法的典型用法代码示例。如果您正苦于以下问题:C++ PropertyItem::addToolTip方法的具体用法?C++ PropertyItem::addToolTip怎么用?C++ PropertyItem::addToolTip使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PropertyItem
的用法示例。
在下文中一共展示了PropertyItem::addToolTip方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: PropertyItem
/** Set the node to be edited */
void
PropertyEditor::setNode(TreeItem * listViewItem, GNode * node)
{
#ifdef DEBUGMSG
qDebug("PropertyEditor::setNode: Start\n");
#endif
if (toBeDeleted_) {
delete toBeDeleted_;
toBeDeleted_ = 0;
}
if (update_) {
toBeDeleted_ = selectedItem_;
if (toBeDeleted_) {
QListViewItem *parent = toBeDeleted_->QListViewItem::parent();
if (!parent)
this->takeItem(toBeDeleted_);
else
parent->takeItem(toBeDeleted_);
}
selectedItem_ = 0;
}
itemSelected(0);
node_ = node;
listViewItem_ = listViewItem;
selectedItem_ = 0;
clear();
if (!node_ || !listViewItem_)
return;
attribList_ = &(node->attribList());
QDictIterator < QString > it(*attribList_);
#ifdef DEBUGMSG
qDebug("PropertyEditor::setNode: Using default attriblist\n");
#endif
for (; it.current(); ++it) {
new PropertyItem(node_, this, it.currentKey(),
*(it.current()), true);
}
#ifdef DEBUGMSG
qDebug("Done\n");
#endif
{
QListViewItemIterator it(this);
for (; it.current(); ++it) {
PropertyItem *p = (PropertyItem *) (it.current());
p->addToolTip();
}
}
#if 0
PropertyItem *parent =
new PropertyItem(node_, this, "default Attribs", "", true);
parent->setSelectable(false);
parent->setOpen(true);
{
QStringList::Iterator it;
for (it = node_->predefinedAttribs().begin();
it != node_->predefinedAttribs().end(); ++it) {
#ifdef DEBUGMSG
qDebug("add Attribute %s\n", (const char *) (*it));
#endif
new PropertyItem(node_, parent, (*it), node_->attribute(*it));
}
}
parent = new PropertyItem(node_, this, "add Attributes", "", true);
{
QDictIterator < QString > it(*attribList_);
for (; it.current(); ++it) {
if (!node_->predefinedAttribs().contains(it.currentKey()))
new PropertyItem(node_, parent, it.currentKey(), *(it.current()));
}
}
#endif
}