本文整理汇总了C++中SkinContext::hasNodeSelectBool方法的典型用法代码示例。如果您正苦于以下问题:C++ SkinContext::hasNodeSelectBool方法的具体用法?C++ SkinContext::hasNodeSelectBool怎么用?C++ SkinContext::hasNodeSelectBool使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SkinContext
的用法示例。
在下文中一共展示了SkinContext::hasNodeSelectBool方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: setup
void WVuMeter::setup(const QDomNode& node, const SkinContext& context) {
// Set pixmaps
bool bHorizontal = false;
(void)context.hasNodeSelectBool(node, "Horizontal", &bHorizontal);
// Set background pixmap if available
QDomElement backPathNode = context.selectElement(node, "PathBack");
if (!backPathNode.isNull()) {
// The implicit default in <1.12.0 was FIXED so we keep it for backwards
// compatibility.
setPixmapBackground(context.getPixmapSource(backPathNode),
context.selectScaleMode(backPathNode, Paintable::FIXED));
}
QDomElement vuNode = context.selectElement(node, "PathVu");
// The implicit default in <1.12.0 was FIXED so we keep it for backwards
// compatibility.
setPixmaps(context.getPixmapSource(vuNode), bHorizontal,
context.selectScaleMode(vuNode, Paintable::FIXED));
m_iPeakHoldSize = context.selectInt(node, "PeakHoldSize");
if (m_iPeakHoldSize < 0 || m_iPeakHoldSize > 100) {
m_iPeakHoldSize = DEFAULT_HOLDSIZE;
}
m_iPeakFallStep = context.selectInt(node, "PeakFallStep");
if (m_iPeakFallStep < 1 || m_iPeakFallStep > 1000) {
m_iPeakFallStep = DEFAULT_FALLSTEP;
}
m_iPeakHoldTime = context.selectInt(node, "PeakHoldTime");
if (m_iPeakHoldTime < 1 || m_iPeakHoldTime > 3000) {
m_iPeakHoldTime = DEFAULT_HOLDTIME;
}
m_iPeakFallTime = context.selectInt(node, "PeakFallTime");
if (m_iPeakFallTime < 1 || m_iPeakFallTime > 1000) {
m_iPeakFallTime = DEFAULT_FALLTIME;
}
}