本文整理汇总了C++中KAction::disconnect方法的典型用法代码示例。如果您正苦于以下问题:C++ KAction::disconnect方法的具体用法?C++ KAction::disconnect怎么用?C++ KAction::disconnect使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KAction
的用法示例。
在下文中一共展示了KAction::disconnect方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: redirectDeleteAndTrashActions
void KuickShow::redirectDeleteAndTrashActions(KActionCollection *coll)
{
KAction *action = coll->action("delete");
if (action)
{
action->disconnect(fileWidget);
connect(action, SIGNAL(activated()), this, SLOT(slotDeleteCurrentImage()));
}
action = coll->action("trash");
if (action)
{
action->disconnect(fileWidget);
connect(action, SIGNAL(activated()), this, SLOT(slotTrashCurrentImage()));
}
}
示例2: KSystemTray
amaroK::TrayIcon::TrayIcon( QWidget *playerWidget )
: KSystemTray( playerWidget )
, EngineObserver( EngineController::instance() )
, trackLength( 0 )
, mergeLevel( -1 )
, overlay( 0 )
, blinkTimerID( 0 )
, overlayVisible( false )
{
KActionCollection* const ac = amaroK::actionCollection();
setAcceptDrops( true );
ac->action( "prev" )->plug( contextMenu() );
ac->action( "play_pause" )->plug( contextMenu() );
ac->action( "stop" )->plug( contextMenu() );
ac->action( "next" )->plug( contextMenu() );
//seems to be necessary
KAction *quit = actionCollection()->action( "file_quit" );
quit->disconnect();
connect( quit, SIGNAL(activated()), kapp, SLOT(quit()) );
baseIcon = KSystemTray::loadIcon( "amarok" );
playOverlay = amaroK::loadOverlay( "play" );
pauseOverlay = amaroK::loadOverlay( "pause" );
overlayVisible = false;
//paintIcon();
setPixmap( baseIcon );
}