本文整理汇总了C++中KnobGuiPtr::isLabelBold方法的典型用法代码示例。如果您正苦于以下问题:C++ KnobGuiPtr::isLabelBold方法的具体用法?C++ KnobGuiPtr::isLabelBold怎么用?C++ KnobGuiPtr::isLabelBold使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KnobGuiPtr
的用法示例。
在下文中一共展示了KnobGuiPtr::isLabelBold方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: KnobGuiPtr
//.........这里部分代码省略.........
warningLabel->setVisible(false);
QFontMetrics fm(label->font(), 0);
int pixSize = fm.height();
QPixmap stdErrorPix;
stdErrorPix = getStandardIcon(QMessageBox::Critical, pixSize, label);
warningLabel->setPixmap(stdErrorPix);
bool pixmapSet = false;
if ( !labelIconFilePath.empty() ) {
QPixmap pix;
if (labelIconFilePath == "dialog-warning") {
pix = getStandardIcon(QMessageBox::Warning, pixSize, label);
} else if (labelIconFilePath == "dialog-question") {
pix = getStandardIcon(QMessageBox::Question, pixSize, label);
} else if (labelIconFilePath == "dialog-error") {
pix = stdErrorPix;
} else if (labelIconFilePath == "dialog-information") {
pix = getStandardIcon(QMessageBox::Information, pixSize, label);
} else {
pix.load( QString::fromUtf8( labelIconFilePath.c_str() ) );
if (pix.width() != pixSize) {
pix = pix.scaled(pixSize, pixSize, Qt::IgnoreAspectRatio, Qt::SmoothTransformation);
}
}
if ( !pix.isNull() ) {
pixmapSet = true;
label->setPixmap(pix);
}
}
if (!pixmapSet) {
QString labelStr( QString::fromUtf8( descriptionLabel.c_str() ) );
/*labelStr += ":";*/
if ( ret->isLabelBold() ) {
label->setBold(true);
}
label->setText_overload(labelStr );
}
QObject::connect( label, SIGNAL(clicked(bool)), ret.get(), SIGNAL(labelClicked(bool)) );
if (makeNewLine) {
labelLayout->addWidget(warningLabel);
labelLayout->addWidget(label);
}
}
/*
* Find out in which layout the knob should be: either in the layout of the page or in the layout of
* the nearest parent group tab in the hierarchy
*/
boost::shared_ptr<KnobGroup> closestParentGroupTab;
KnobPtr parentTmp = parentKnob;
assert(parentKnobTmp);
while (!closestParentGroupTab) {
boost::shared_ptr<KnobGroup> parentGroup = boost::dynamic_pointer_cast<KnobGroup>(parentTmp);
if ( parentGroup && parentGroup->isTab() ) {
closestParentGroupTab = parentGroup;
}
parentTmp = parentTmp->getParentKnob();
if (!parentTmp) {
break;
}
}
if (closestParentGroupTab) {