本文整理汇总了C++中KWDocument::numColumns方法的典型用法代码示例。如果您正苦于以下问题:C++ KWDocument::numColumns方法的具体用法?C++ KWDocument::numColumns怎么用?C++ KWDocument::numColumns使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KWDocument
的用法示例。
在下文中一共展示了KWDocument::numColumns方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: setupTextFrames
void KWDocStructTextFrameSetItem::setupTextFrames()
{
// TODO: KWTextFrameSet::frame() method returns frames in screen order?
// Build a list of frame pointers.
QPtrList<KWFrame> framePtrs;
framePtrs.setAutoDelete(false);
for (uint j = 0; j < m_frameset->frameCount(); j++)
framePtrs.append(m_frameset->frame(j));
// Remove deleted frames from the listview.
KWDocStructTextFrameItem* item = dynamic_cast<KWDocStructTextFrameItem *>(firstChild());
KWDocStructTextFrameItem* delItem;
while (item) {
delItem = item;
item = dynamic_cast<KWDocStructTextFrameItem *>(item->nextSibling());
if (framePtrs.containsRef(delItem->frame()) == 0) delete delItem;
}
// Add new frames to the list or update existing ones.
KWDocument* dok = doc();
KWDocStructTextFrameItem* after = 0;
for (uint j = 0; j < framePtrs.count(); j++)
{
KWFrame* frame = framePtrs.at(j);
QString name;
if ( KListViewItem::parent()->firstChild() == this && dok->processingType() == KWDocument::WP )
{
if ( dok->numColumns() == 1 )
name=i18n( "Page %1" ).arg(QString::number(j + 1));
else
name=i18n( "Column %1" ).arg(QString::number(j + 1));
}
else
name=i18n( "Text Frame %1" ).arg(QString::number(j + 1));
KWDocStructTextFrameItem* child = findTextFrameItem(frame);
if (child)
child->setText(0, name);
else {
if (after)
child = new KWDocStructTextFrameItem(this, after, name, m_frameset, frame);
else
child = new KWDocStructTextFrameItem(this, name, m_frameset, frame);
}
child->setupTextParags();
after = child;
}
}