KOEventPopupMenu::KOEventPopupMenu() : mCopyToCalendarMenu( 0 ), mMoveToCalendarMenu( 0 ) { mCalendar = 0; mCurrentIncidence = 0; mCurrentDate = QDate(); mHasAdditionalItems = false; addAction( KOGlobals::self()->smallIcon( "document-preview" ), i18n( "&Show" ), this, SLOT( popupShow() ) ); mEditOnlyItems.append( addAction( KOGlobals::self()->smallIcon( "document-edit" ), i18n( "&Edit..." ), this, SLOT( popupEdit() ) ) ); #ifndef KORG_NOPRINTER mEditOnlyItems.append( addSeparator() ); addAction( KOGlobals::self()->smallIcon( "document-print" ), i18n( "&Print..." ), this, SLOT( print() ) ); QAction *preview = addAction( KOGlobals::self()->smallIcon( "document-print-preview" ), i18n( "Print Previe&w..." ), this, SLOT( printPreview() ) ); preview->setEnabled( !KMimeTypeTrader::self()->query("application/pdf", "KParts/ReadOnlyPart").isEmpty() ); #endif //------------------------------------------------------------------------ mEditOnlyItems.append( addSeparator() ); mEditOnlyItems.append( addAction( KOGlobals::self()->smallIcon( "edit-cut" ), i18nc( "cut this event", "C&ut" ), this, SLOT(popupCut()) ) ); mEditOnlyItems.append( addAction( KOGlobals::self()->smallIcon( "edit-copy" ), i18nc( "copy this event", "&Copy" ), this, SLOT(popupCopy()) ) ); // paste is always possible mEditOnlyItems.append( addAction( KOGlobals::self()->smallIcon( "edit-paste" ), i18n( "&Paste" ), this, SLOT(popupPaste()) ) ); mEditOnlyItems.append( addAction( KOGlobals::self()->smallIcon( "edit-delete" ), i18nc( "delete this incidence", "&Delete" ), this, SLOT(popupDelete()) ) ); //------------------------------------------------------------------------ mEditOnlyItems.append( addSeparator() ); mTodoOnlyItems.append( addAction( KOGlobals::self()->smallIcon( "task-complete" ), i18n( "Togg&le To-do Completed" ), this, SLOT(toggleTodoCompleted()) ) ); mToggleReminder = addAction( QIcon( KOGlobals::self()->smallIcon( "appointment-reminder" ) ), i18n( "&Toggle Reminder" ), this, SLOT(toggleAlarm())); mEditOnlyItems.append( mToggleReminder ); //------------------------------------------------------------------------ mRecurrenceItems.append( addSeparator() ); mDissociateOccurrences = addAction( i18n( "&Dissociate From Recurrence..." ), this, SLOT(dissociateOccurrences()) ); mRecurrenceItems.append( mDissociateOccurrences ); addSeparator(); addAction( KOGlobals::self()->smallIcon( "mail-forward" ), i18n( "Send as iCalendar..." ), this, SLOT(forward()) ); }
KOEventPopupMenu::KOEventPopupMenu() { mCurrentIncidence = 0; mCurrentDate = QDate(); mHasAdditionalItems = false; insertItem(i18n("&Show"), this, SLOT(popupShow())); mEditOnlyItems.append( insertItem(i18n("&Edit..."), this, SLOT(popupEdit()))); #ifndef KORG_NOPRINTER insertItem(KOGlobals::self()->smallIcon("printer1"), i18n("&Print..."), this, SLOT(print())); #endif //------------------------------------------------------------------------ mEditOnlyItems.append(insertSeparator()); mEditOnlyItems.append( insertItem(KOGlobals::self()->smallIcon("editcut"), i18n("&Cut"), this, SLOT(popupCut()))); mEditOnlyItems.append( insertItem(KOGlobals::self()->smallIcon("editcopy"), i18n("&Copy"), this, SLOT(popupCopy()))); // paste is always possible insertItem(KOGlobals::self()->smallIcon("editpaste"), i18n("&Paste"), this, SLOT(popupPaste())); mEditOnlyItems.append( insertItem(KOGlobals::self()->smallIcon("editdelete"), i18n("&Delete"), this, SLOT(popupDelete()))); //------------------------------------------------------------------------ mEditOnlyItems.append(insertSeparator()); mEditOnlyItems.append( insertItem(KOGlobals::self()->smallIcon("bell"), i18n("&Toggle Reminder"), this, SLOT(popupAlarm()))); //------------------------------------------------------------------------ mRecurrenceItems.append(insertSeparator()); mRecurrenceItems.append( insertItem(i18n("&Dissociate This Occurrence"), this, SLOT(dissociateOccurrence()))); mRecurrenceItems.append( insertItem(i18n("&Dissociate Future Occurrences"), this, SLOT(dissociateFutureOccurrence()))); insertSeparator(); insertItem(KOGlobals::self()->smallIcon("mail_forward"), i18n("Send as iCalendar..."), this, SLOT(forward())); }
Private(URLObject *parent) : QObject(parent) { urlObject = parent; QString tr; tr = qApp->translate("URLLabel", "Open"); act_xmpp = new IconAction(tr, "psi/jabber", tr, 0, this); connectXmppAction(act_xmpp, ""); tr = qApp->translate("URLLabel", "Open mail composer"); act_mailto = new IconAction(tr, "psi/email", tr, 0, this); connect(act_mailto, SIGNAL(triggered()), SLOT(popupAction())); tr = qApp->translate("URLLabel", "Open web browser"); act_browser = new IconAction(tr, "psi/www", tr, 0, this); connect(act_browser, SIGNAL(triggered()), SLOT(popupAction())); tr = qApp->translate("URLLabel", "Add to Roster"); act_add_to_roster = new IconAction(tr, "psi/addContact", tr, 0, this); connectXmppAction(act_add_to_roster, "roster"); tr = qApp->translate("URLLabel", "Send message to"); act_send_message = new IconAction(tr, "psi/message", tr, 0, this); connectXmppAction(act_send_message, "message"); tr = qApp->translate("URLLabel", "Chat with"); act_chat = new IconAction(tr, "psi/chat", tr, 0, this); connectXmppAction(act_chat, "message;type=chat"); tr = qApp->translate("URLLabel", "Join groupchat"); act_join_groupchat = new IconAction(tr, "psi/groupChat", tr, 0, this); connectXmppAction(act_join_groupchat, "join"); tr = qApp->translate("URLLabel", "Copy location"); act_copy = new IconAction(tr, tr, 0, this); connect(act_copy, SIGNAL(triggered()), SLOT(popupCopy())); tr = qApp->translate("URLLabel", "User Info"); act_info = new IconAction(tr, "psi/vCard", tr, 0, this); connectXmppAction(act_info, "vcard"); connect(&xmppActionMapper, SIGNAL(mapped(const QString&)), SLOT(xmppAction(const QString&))); }