Example #1
0
void KOEventPopupMenu::forward()
{
    KOrg::MainWindow *w = ActionManager::findInstance(KURL());
    if(!w || !mCurrentIncidence)
        return;
    KActionCollection *ac = w->getActionCollection();
    KAction *action = ac->action("schedule_forward");
    action->activate();
}
void KOEventPopupMenu::forward()
{
  KOrg::MainWindow *w = ActionManager::findInstance( KUrl() );
  if ( !w || !mCurrentIncidence ) {
    return;
  }

  KActionCollection *ac = w->getActionCollection();
  QAction *action = ac->action( "schedule_forward" );
  if ( action ) {
    action->trigger();
  } else {
    kError() << "What happened to the schedule_forward action?";
  }
}
void KOViewManager::goMenu( bool enable )
{
    KOrg::MainWindow *w = ActionManager::findInstance( KUrl() );
    if ( w ) {
        KActionCollection *ac = w->getActionCollection();
        if ( ac ) {
            QAction *action;
            action = ac->action( "go_today" );
            if ( action ) {
                action->setEnabled( enable );
            }
            action = ac->action( "go_previous" );
            if ( action ) {
                action->setEnabled( enable );
            }
            action = ac->action( "go_next" );
            if ( action ) {
                action->setEnabled( enable );
            }
        }
    }
}