本文整理汇总了C++中KPopupMenu::popup方法的典型用法代码示例。如果您正苦于以下问题:C++ KPopupMenu::popup方法的具体用法?C++ KPopupMenu::popup怎么用?C++ KPopupMenu::popup使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KPopupMenu
的用法示例。
在下文中一共展示了KPopupMenu::popup方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: showContextMenu
void MDWEnum::showContextMenu()
{
if( m_mixerwidget == NULL )
return;
KPopupMenu *menu = m_mixerwidget->getPopup();
QPoint pos = QCursor::pos();
menu->popup( pos );
}
示例2: slotRightClick
void HistoryDialog::slotRightClick(const QString &url, const QPoint &point)
{
KPopupMenu *chatWindowPopup = 0L;
chatWindowPopup = new KPopupMenu();
if ( !url.isEmpty() )
{
mURL = url;
mCopyURLAct->plug( chatWindowPopup );
chatWindowPopup->insertSeparator();
}
mCopyAct->setEnabled( mHtmlPart->hasSelection() );
mCopyAct->plug( chatWindowPopup );
connect( chatWindowPopup, SIGNAL( aboutToHide() ), chatWindowPopup, SLOT( deleteLater() ) );
chatWindowPopup->popup(point);
}
示例3: showPopupMenu
/**
* Shows the popupmenu at a given point.
*/
void SelectTool::showPopupMenu( const QPoint &pos )
{
KPopupMenu* menu = 0;
if(view()->activePage()->selectedStencils()->count() < 1) {
menu = static_cast<KPopupMenu*>(view()->factory()->container("PagePopup", view()));
} else {
menu = static_cast<KPopupMenu*>(view()->factory()->container("StencilPopup", view()));
m_arrowHeadAction->setEnabled(view()->activePage()->checkForStencilTypeInSelection(kstConnector));
if(view()->activePage()->checkForTextBoxesInSelection()) {
m_textEditAction->setEnabled(true);
} else {
m_textEditAction->setEnabled(false);
}
}
if(menu) {
m_lastPoint = view()->canvasWidget()->mapFromScreen(pos);
menu->popup(pos);
} else {
kdDebug(43000) << "What no popup! *ARGH*!" << endl;
}
}