本文整理汇总了C++中QWebElement::removeClass方法的典型用法代码示例。如果您正苦于以下问题:C++ QWebElement::removeClass方法的具体用法?C++ QWebElement::removeClass怎么用?C++ QWebElement::removeClass使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QWebElement
的用法示例。
在下文中一共展示了QWebElement::removeClass方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: setNumBlocks
//.........这里部分代码省略.........
if (nNodeMode == NT_FULL)
{
tooltip += "\n"
+ tr("~%n block(s) remaining", "", nRemainingBlocks);
} else
{
char temp[128];
snprintf(temp, sizeof(temp), "~%%n %s remaining", nRemainingBlocks == 1 ? qPrintable(sBlockType) : qPrintable(sBlockTypeMulti));
tooltip += "\n"
+ tr(temp, "", nRemainingBlocks);
};
}
tooltip += (tooltip.isEmpty()? "" : "\n")
+ tr("Downloaded %1 of %2 %3 of transaction history (%4% done).").arg(count).arg(nTotalBlocks).arg(sBlockTypeMulti).arg(nPercentageDone, 0, 'f', 2);
}
else
{
tooltip = tr("Downloaded %1 blocks of transaction history.").arg(count);
}
// Override progressBarLabel text when we have warnings to display
if (!strStatusBarWarnings.isEmpty())
bridge->networkAlert(strStatusBarWarnings);
QDateTime lastBlockDate;
if (nNodeMode == NT_FULL)
lastBlockDate = clientModel->getLastBlockDate();
else
lastBlockDate = clientModel->getLastBlockThinDate();
int secs = lastBlockDate.secsTo(QDateTime::currentDateTime());
QString text;
// Represent time from last generated block in human readable text
if (secs <= 0)
{
// Fully up to date. Leave text empty.
} else
if (secs < 60)
{
text = tr("%n second(s) ago","",secs);
} else
if (secs < 60*60)
{
text = tr("%n minute(s) ago","",secs/60);
} else
if (secs < 24*60*60)
{
text = tr("%n hour(s) ago","",secs/(60*60));
} else
{
text = tr("%n day(s) ago","",secs/(60*60*24));
}
// Set icon state: spinning if catching up, tick otherwise
if (secs < 90*60 && count >= nTotalBlocks
&& nNodeState != NS_GET_FILTERED_BLOCKS)
{
tooltip = tr("Up to date") + "\n" + tooltip;
blocksIcon.removeClass("none");
syncingIcon.addClass("none");
QWebElementCollection outOfSyncElements = documentFrame->findAllElements(".outofsync");
foreach(QWebElement outOfSync, outOfSyncElements)
outOfSync.setStyleProperty("display", "none");
syncProgressBar.setAttribute("style", "display:none;");
}
else
{
tooltip = tr("Catching up...") + "\n" + tooltip;
blocksIcon.addClass("none");
syncingIcon.removeClass("none");
QWebElementCollection outOfSyncElements = documentFrame->findAllElements(".outofsync");
foreach(QWebElement outOfSync, outOfSyncElements)
outOfSync.setStyleProperty("display", "inline");
syncProgressBar.removeAttribute("style");
}
if (!text.isEmpty())
{
tooltip += "\n";
tooltip += tr("Last received %1 was generated %2.").arg(sBlockType).arg(text);
};
blocksIcon .setAttribute("title", tooltip);
syncingIcon .setAttribute("title", tooltip);
syncProgressBar.setAttribute("title", tooltip);
syncProgressBar.setAttribute("value", QString::number(count));
syncProgressBar.setAttribute("max", QString::number(nTotalBlocks));
}