本文整理汇总了C++中PageItem_Table::bottomBorder方法的典型用法代码示例。如果您正苦于以下问题:C++ PageItem_Table::bottomBorder方法的具体用法?C++ PageItem_Table::bottomBorder怎么用?C++ PageItem_Table::bottomBorder使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PageItem_Table
的用法示例。
在下文中一共展示了PageItem_Table::bottomBorder方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: on_sideSelector_selectionChanged
void PropertiesPalette_Table::on_sideSelector_selectionChanged()
{
if (!m_item || !m_item->isTable())
return;
/*
* Figure out the selection state. Either
*
* 1) Some sides are selected and they all have the same border, or
* 2) Some sides are selected but they have different borders, or
* 3) No sides are selected.
*/
State borderState = Unset;
m_currentBorder = TableBorder();
TableSideSelector::Sides selectedSides = sideSelector->selection();
PageItem_Table* table = m_item->asTable();
if (selectedSides & TableSideSelector::Left)
{
if (borderState == Unset && !table->leftBorder().isNull())
{
m_currentBorder = table->leftBorder();
borderState = Set;
}
else if (m_currentBorder != table->leftBorder())
borderState = TriState;
}
if (selectedSides & TableSideSelector::Right)
{
if (borderState == Unset && !table->rightBorder().isNull())
{
m_currentBorder = table->rightBorder();
borderState = Set;
}
else if (m_currentBorder != table->rightBorder())
borderState = TriState;
}
if (selectedSides & TableSideSelector::Top)
{
if (borderState == Unset && !table->topBorder().isNull())
{
m_currentBorder = table->topBorder();
borderState = Set;
}
else if (m_currentBorder != table->topBorder())
borderState = TriState;
}
if (selectedSides & TableSideSelector::Bottom)
{
if (borderState == Unset && !table->bottomBorder().isNull())
{
m_currentBorder = table->bottomBorder();
borderState = Set;
}
else if (m_currentBorder != table->bottomBorder())
borderState = TriState;
}
if (borderState == Set)
{
/// Some sides selected and they have same border.
addBorderLineButton->setEnabled(true);
removeBorderLineButton->setEnabled(true);
borderLineList->setEnabled(true);
}
else if (borderState == TriState)
{
/// Some sides selected but they have different border.
m_currentBorder = TableBorder();
addBorderLineButton->setEnabled(true);
removeBorderLineButton->setEnabled(true);
borderLineList->setEnabled(true);
}
else
{
/// No sides selected.
m_currentBorder = TableBorder();
addBorderLineButton->setEnabled(false);
removeBorderLineButton->setEnabled(false);
borderLineList->setEnabled(false);
}
updateBorderLineList();
}