本文整理汇总了C++中KoListLevelProperties::marginIncrease方法的典型用法代码示例。如果您正苦于以下问题:C++ KoListLevelProperties::marginIncrease方法的具体用法?C++ KoListLevelProperties::marginIncrease怎么用?C++ KoListLevelProperties::marginIncrease使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KoListLevelProperties
的用法示例。
在下文中一共展示了KoListLevelProperties::marginIncrease方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: redo
void ChangeListLevelCommand::redo()
{
if (!m_first) {
KoTextCommandBase::redo();
UndoRedoFinalizer finalizer(this);
for (int i = 0; i < m_blocks.size(); ++i) {
m_lists.value(i)->updateStoredList(m_blocks.at(i));
QTextBlock currentBlock(m_blocks.at(i));
KoTextBlockData userData(currentBlock);
userData.setCounterWidth(-1.0);
}
}
else {
for (int i = 0; i < m_blocks.size() && m_lists.value(i); ++i) {
if (!m_lists.value(i)->style()->hasLevelProperties(m_levels.value(i))) {
KoListLevelProperties llp = m_lists.value(i)->style()->levelProperties(m_levels.value(i));
KoListLevelProperties parentLlp = m_lists.value(i)->style()->levelProperties(m_levels.value(i)-1);
if (llp.alignmentMode() == false) {
//old list mode, see KoListLevelProperties::alignmentMode() documentation
llp.setIndent((m_levels.value(i)-1) * 20); //TODO make this configurable
} else {
llp.setTabStopPosition(parentLlp.tabStopPosition() + parentLlp.marginIncrease());
llp.setMargin(parentLlp.margin() + parentLlp.marginIncrease());
llp.setTextIndent(parentLlp.textIndent());
}
llp.setDisplayLevel(llp.displayLevel() + m_coefficient);
llp.setLevel(m_levels.value(i));
m_lists.value(i)->style()->setLevelProperties(llp);
}
m_lists.value(i)->add(m_blocks.at(i), m_levels.value(i));
}
}
m_first = false;
}