本文整理汇总了C++中KToolBar::setBarPos方法的典型用法代码示例。如果您正苦于以下问题:C++ KToolBar::setBarPos方法的具体用法?C++ KToolBar::setBarPos怎么用?C++ KToolBar::setBarPos使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KToolBar
的用法示例。
在下文中一共展示了KToolBar::setBarPos方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: createToolbar
void KHelpMain::createToolbar()
{
QPixmap pixmap;
QString pmpath;
KToolBar *tb = new KToolBar( this );
pixmap = kapp->getIconLoader()->loadIcon( "back.xpm" );
tb->insertButton(pixmap, 0, SIGNAL( clicked() ),
helpwin, SLOT( slotBack() ),
FALSE, klocale->translate("Previous Document"));
pixmap = kapp->getIconLoader()->loadIcon( "forward.xpm" );
tb->insertButton(pixmap, 1, SIGNAL( clicked() ),
helpwin, SLOT( slotForward() ),
FALSE, klocale->translate("Next Document"));
tb->insertSeparator();
pixmap = kapp->getIconLoader()->loadIcon( "prev.xpm" );
tb->insertButton(pixmap, 2, SIGNAL( clicked() ),
helpwin, SLOT( slotPrev() ),
FALSE, klocale->translate("Previous Node"));
pixmap = kapp->getIconLoader()->loadIcon( "next.xpm" );
tb->insertButton(pixmap, 3, SIGNAL( clicked() ),
helpwin, SLOT( slotNext() ),
FALSE, klocale->translate("Next Node"));
pixmap = kapp->getIconLoader()->loadIcon( "up.xpm" );
tb->insertButton(pixmap, 4, SIGNAL( clicked() ),
helpwin, SLOT( slotUp() ),
FALSE,klocale->translate( "Up one Node"));
pixmap = kapp->getIconLoader()->loadIcon( "top.xpm" );
tb->insertButton(pixmap, 5, SIGNAL( clicked() ),
helpwin, SLOT( slotTop() ),
FALSE, klocale->translate("Top Node"));
tb->insertSeparator();
pixmap = kapp->getIconLoader()->loadIcon( "contents.xpm" );
tb->insertButton(pixmap, 6, SIGNAL( clicked() ),
helpwin, SLOT( slotDir() ),
FALSE, klocale->translate("Help Contents"));
pixmap = kapp->getIconLoader()->loadIcon( "reload.xpm" );
tb->insertButton(pixmap, 7, SIGNAL( clicked() ),
helpwin, SLOT( slotReload() ),
TRUE, klocale->translate( "Reload current document" ) );
pixmap = kapp->getIconLoader()->loadIcon( "stop.xpm" );
tb->insertButton(pixmap, 8, SIGNAL( clicked() ),
helpwin, SLOT( slotStopProcessing() ),
FALSE, klocale->translate("Stop"));
tb->setBarPos( KToolBar::Top );
toolbar = tb;
}