本文整理汇总了C++中KBookmark::getText方法的典型用法代码示例。如果您正苦于以下问题:C++ KBookmark::getText方法的具体用法?C++ KBookmark::getText怎么用?C++ KBookmark::getText使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KBookmark
的用法示例。
在下文中一共展示了KBookmark::getText方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: fillBookmarkMenu
void KHelpMain::fillBookmarkMenu(KBookmark *parent, QPopupMenu *menu, int &id)
{
KBookmark *bm;
for ( bm = parent->getChildren().first(); bm != NULL;
bm = parent->getChildren().next() )
{
if ( bm->getType() == KBookmark::URL )
{
menu->insertItem( bm->getText(), id );
id++;
}
else
{
QPopupMenu *subMenu = new QPopupMenu;
menu->insertItem( bm->getText(), subMenu );
fillBookmarkMenu( bm, subMenu, id );
}
}
}
示例2: writeFolder
// write the contents of a folder (recursive)
//
void KBookmarkManager::writeFolder( QTextStream &stream, KBookmark *parent )
{
KBookmark *bm;
for ( bm = parent->getChildren().first(); bm != NULL;
bm = parent->getChildren().next() )
{
if ( bm->getType() == KBookmark::URL )
{
stream << "<DT><A HREF=\"" << bm->getURL() << "\">"
<< bm->getText() << "</A>" << endl;
}
else
{
stream << "<DT><H3>" << bm->getText() << "</H3>" << endl;
stream << "<DL><P>" << endl;
writeFolder( stream, bm );
stream << "</DL><P>" << endl;
}
}
}