本文整理汇总了C++中Style::bottomBorderPen方法的典型用法代码示例。如果您正苦于以下问题:C++ Style::bottomBorderPen方法的具体用法?C++ Style::bottomBorderPen怎么用?C++ Style::bottomBorderPen使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Style
的用法示例。
在下文中一共展示了Style::bottomBorderPen方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: adjustRowHelper
double AdjustColumnRowManipulator::adjustRowHelper(const Cell& cell)
{
double long_max = 0.0;
const Style style = cell.effectiveStyle();
const QSizeF size = textSize(cell.displayText(), style);
if (size.height() > long_max)
long_max = size.height() + style.topBorderPen().width() + style.bottomBorderPen().width();
// add 1 because long_max is the height of the text
// but row has borders
if (long_max == 0.0)
return -1.0;
else
return long_max + 1.0;
}
示例2: mainProcessing
bool BorderColorCommand::mainProcessing()
{
if (!m_reverse) {
// change colors
Style style;
for (int i = 0; i < m_undoData.count(); ++i) {
style.clear();
style.insertSubStyle(m_undoData[i].second);
QPen pen;
if (m_undoData[i].second->type() == Style::LeftPen) {
pen = style.leftBorderPen();
pen.setColor(m_color);
style.setLeftBorderPen(pen);
}
if (m_undoData[i].second->type() == Style::RightPen) {
pen = style.rightBorderPen();
pen.setColor(m_color);
style.setRightBorderPen(pen);
}
if (m_undoData[i].second->type() == Style::TopPen) {
pen = style.topBorderPen();
pen.setColor(m_color);
style.setTopBorderPen(pen);
}
if (m_undoData[i].second->type() == Style::BottomPen) {
pen = style.bottomBorderPen();
pen.setColor(m_color);
style.setBottomBorderPen(pen);
}
if (m_undoData[i].second->type() == Style::FallDiagonalPen) {
pen = style.fallDiagonalPen();
pen.setColor(m_color);
style.setFallDiagonalPen(pen);
}
if (m_undoData[i].second->type() == Style::GoUpDiagonalPen) {
pen = style.goUpDiagonalPen();
pen.setColor(m_color);
style.setGoUpDiagonalPen(pen);
}
m_sheet->cellStorage()->setStyle(Region(m_undoData[i].first.toRect()), style);
}
} else { // m_reverse
for (int i = 0; i < m_undoData.count(); ++i) {
Style style;
style.insertSubStyle(m_undoData[i].second);
m_sheet->cellStorage()->setStyle(Region(m_undoData[i].first.toRect()), style);
}
}
return true;
}