本文整理汇总了C++中KPushButton::setGuiItem方法的典型用法代码示例。如果您正苦于以下问题:C++ KPushButton::setGuiItem方法的具体用法?C++ KPushButton::setGuiItem怎么用?C++ KPushButton::setGuiItem使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KPushButton
的用法示例。
在下文中一共展示了KPushButton::setGuiItem方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: QWidget
CKeyReferenceWidget::CKeyReferenceWidget( CSwordBibleModuleInfo *mod, CSwordVerseKey *key, QWidget *parent, const char *name) : QWidget(parent,name) {
updatelock = false;
m_module = mod;
setFocusPolicy(QWidget::WheelFocus);
// Erase button
KGuiItem erase_picture;
erase_picture.setIconName("locationbar_erase");
KPushButton *clearRef = new KPushButton(this);
clearRef->setGuiItem(erase_picture);
connect(clearRef, SIGNAL(clicked( ) ), SLOT(slotClearRef( )));
m_bookScroller = new CScrollerWidgetSet(this);
m_textbox = new CKeyReferenceLineEdit( this );
setKey(key); // The order of these two functions is important.
setModule();
m_chapterScroller = new CScrollerWidgetSet(this);
m_verseScroller = new CScrollerWidgetSet(this);
m_mainLayout = new QHBoxLayout( this );
m_mainLayout->addWidget(clearRef);
m_mainLayout->addWidget(m_bookScroller);
m_mainLayout->addWidget(m_textbox);
m_mainLayout->addWidget(m_chapterScroller);
m_mainLayout->addWidget(m_verseScroller);
setTabOrder(m_textbox, 0);
m_bookScroller->setToolTips(
CResMgr::displaywindows::bibleWindow::nextBook::tooltip,
CResMgr::displaywindows::general::scrollButton::tooltip,
CResMgr::displaywindows::bibleWindow::previousBook::tooltip
);
m_chapterScroller->setToolTips(
CResMgr::displaywindows::bibleWindow::nextChapter::tooltip,
CResMgr::displaywindows::general::scrollButton::tooltip,
CResMgr::displaywindows::bibleWindow::previousChapter::tooltip
);
m_verseScroller->setToolTips(
CResMgr::displaywindows::bibleWindow::nextVerse::tooltip,
CResMgr::displaywindows::general::scrollButton::tooltip,
CResMgr::displaywindows::bibleWindow::previousVerse::tooltip
);
// signals and slots connections
connect(m_bookScroller, SIGNAL(change(int)), SLOT(slotBookChange(int)));
connect(m_bookScroller, SIGNAL(scroller_pressed()), SLOT(slotUpdateLock()));
connect(m_bookScroller, SIGNAL(scroller_released()), SLOT(slotUpdateUnlock()));
connect(m_textbox, SIGNAL(returnPressed()), SLOT(slotReturnPressed()));
connect(m_chapterScroller, SIGNAL(change(int)), SLOT(slotChapterChange(int)));
connect(m_chapterScroller, SIGNAL(scroller_pressed()), SLOT(slotUpdateLock()));
connect(m_chapterScroller, SIGNAL(scroller_released()), SLOT(slotUpdateUnlock()));
connect(m_verseScroller, SIGNAL(change(int)), SLOT(slotVerseChange(int)));
connect(m_verseScroller, SIGNAL(scroller_pressed()), SLOT(slotUpdateLock()));
connect(m_verseScroller, SIGNAL(scroller_released()), SLOT(slotUpdateUnlock()));
}