KJotsPlugin::KJotsPlugin( KontactInterface::Core *core, const QVariantList & ) : KontactInterface::Plugin( core, core, "kjots" ), m_interface( 0 ) { setComponentData( KontactPluginFactory::componentData() ); KAction *action = new KAction( KIcon( "document-new" ), i18nc( "@action:inmenu", "New KJots Page" ), this ); actionCollection()->addAction( "new_kjots_page", action ); action->setShortcut( QKeySequence( Qt::CTRL + Qt::SHIFT + Qt::Key_P ) ); action->setHelpText( i18nc( "@info:status", "Create a new jots page" ) ); action->setWhatsThis( i18nc( "@info:whatsthis", "You will be presented with a dialog where you can create a new jots page." ) ); connect( action, SIGNAL(triggered(bool)), SLOT( newPage()) ); insertNewAction( action ); action = new KAction( KIcon( "address-book-new" ), i18nc( "@action:inmenu", "New KJots Book" ), this ); actionCollection()->addAction( "new_kjots_book", action ); action->setShortcut( QKeySequence( Qt::CTRL + Qt::SHIFT + Qt::Key_B ) ); action->setHelpText( i18nc( "@info:status", "Create a new jots book" ) ); action->setWhatsThis( i18nc( "@info:whatsthis", "You will be presented with a dialog where you can create a new jots book." ) ); connect( action, SIGNAL(triggered(bool)), SLOT( newBook()) ); insertNewAction( action ); mUniqueAppWatcher = new KontactInterface::UniqueAppWatcher( new KontactInterface::UniqueAppHandlerFactory<KJotsUniqueAppHandler>(), this ); }
JournalPlugin::JournalPlugin(KontactInterface::Core *core, const QVariantList &) : KontactInterface::Plugin(core, core, "korganizer", "journal"), mIface(Q_NULLPTR) { setComponentName(QStringLiteral("korganizer"), QStringLiteral("korganizer")); KIconLoader::global()->addAppDir(QStringLiteral("korganizer")); QAction *action = new QAction(QIcon::fromTheme(QStringLiteral("journal-new")), i18nc("@action:inmenu", "New Journal..."), this); actionCollection()->addAction(QStringLiteral("new_journal"), action); actionCollection()->setDefaultShortcut(action, QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_J)); QString str = i18nc("@info:status", "Create a new journal"); action->setStatusTip(str); action->setToolTip(str); action->setWhatsThis( i18nc("@info:whatsthis", "You will be presented with a dialog where you can create " "a new journal entry.")); connect(action, &QAction::triggered, this, &JournalPlugin::slotNewJournal); insertNewAction(action); mUniqueAppWatcher = new KontactInterface::UniqueAppWatcher( new KontactInterface::UniqueAppHandlerFactory<KOrganizerUniqueAppHandler>(), this); }
TodoPlugin::TodoPlugin( KontactInterface::Core *core, const QVariantList & ) : KontactInterface::Plugin( core, core, "korganizer", "todo" ), mIface( 0 ) { setComponentData( KontactPluginFactory::componentData() ); KIconLoader::global()->addAppDir( "korganizer" ); KIconLoader::global()->addAppDir( "kdepim" ); KAction *action = new KAction( KIcon( "task-new" ), i18nc( "@action:inmenu", "New To-do..." ), this ); actionCollection()->addAction( "new_todo", action ); action->setShortcut( QKeySequence( Qt::CTRL + Qt::SHIFT + Qt::Key_T ) ); action->setHelpText( i18nc( "@info:status", "Create a new to-do" ) ); action->setWhatsThis( i18nc( "@info:whatsthis", "You will be presented with a dialog where you can create a new to-do item." ) ); connect( action, SIGNAL(triggered(bool)), SLOT(slotNewTodo()) ); insertNewAction( action ); KAction *syncAction = new KAction( KIcon( "view-refresh" ), i18nc( "@action:inmenu", "Sync To-do List" ), this ); syncAction->setHelpText( i18nc( "@info:status", "Synchronize groupware to-do list" ) ); syncAction->setWhatsThis( i18nc( "@info:whatsthis", "Choose this option to synchronize your groupware to-do list." ) ); connect( syncAction, SIGNAL(triggered(bool)), SLOT(slotSyncTodos()) ); insertSyncAction( syncAction ); mUniqueAppWatcher = new KontactInterface::UniqueAppWatcher( new KontactInterface::UniqueAppHandlerFactory<KOrganizerUniqueAppHandler>(), this ); }
KarmPlugin::KarmPlugin(Kontact::Core *core, const char *, const QStringList &) : Kontact::Plugin(core, core, "KArm") { setInstance(KarmPluginFactory::instance()); (void)dcopClient(); insertNewAction(new KAction(i18n("New Task"), "karm", CTRL + SHIFT + Key_W, this, SLOT(newTask()), actionCollection(), "new_task")); }
TestPlugin::TestPlugin(Kontact::Core *_core, const char *name, const QStringList &) : Kontact::Plugin(_core, _core, name) { setInstance(TestPluginFactory::instance()); insertNewAction(new KAction("Test", 0, this, SLOT(slotTestMenu()), actionCollection(), "edit_test")); setXMLFile("kptestplugin.rc"); }
KNotesPlugin::KNotesPlugin( Kontact::Core *core, const char *, const QStringList & ) : Kontact::Plugin( core, core, "knotes" ), mAboutData( 0 ) { setInstance( KNotesPluginFactory::instance() ); insertNewAction( new KAction( i18n( "New Note..." ), "knotes", CTRL+SHIFT+Key_N, this, SLOT( slotNewNote() ), actionCollection(), "new_note" ) ); insertSyncAction( new KAction( i18n( "Synchronize Notes" ), "reload", 0, this, SLOT( slotSyncNotes() ), actionCollection(), "knotes_sync" ) ); }
CoisceimPlugin::CoisceimPlugin( KontactInterface::Core *core, const QVariantList & ) : KontactInterface::Plugin( core, core, "coisceim" ), m_interface( 0 ) { setComponentData( KontactPluginFactory::componentData() ); KAction *action = new KAction( KIcon( "byobu" ), i18nc( "@action:inmenu", "New Trip" ), this ); actionCollection()->addAction( "new_trip", action ); action->setHelpText( i18nc( "@info:status", "Create a new trip" ) ); connect( action, SIGNAL(triggered(bool)), SLOT(createTrip()) ); insertNewAction( action ); mUniqueAppWatcher = new KontactInterface::UniqueAppWatcher( new KontactInterface::UniqueAppHandlerFactory<CoisceimUniqueAppHandler>(), this ); }
JournalPlugin::JournalPlugin( Kontact::Core *core, const char *, const QStringList& ) : Kontact::Plugin( core, core, "korganizer" ), mIface( 0 ) { setInstance( JournalPluginFactory::instance() ); instance()->iconLoader()->addAppDir("kdepim"); insertNewAction( new KAction( i18n( "New Journal..." ), "newjournal", CTRL+SHIFT+Key_J, this, SLOT( slotNewJournal() ), actionCollection(), "new_journal" ) ); insertSyncAction( new KAction( i18n( "Synchronize Journal" ), "reload", 0, this, SLOT( slotSyncJournal() ), actionCollection(), "journal_sync" ) ); mUniqueAppWatcher = new Kontact::UniqueAppWatcher( new Kontact::UniqueAppHandlerFactory<KOrganizerUniqueAppHandler>(), this ); }
KOrganizerPlugin::KOrganizerPlugin( Kontact::Core *core, const char *, const QStringList& ) : Kontact::Plugin( core, core, "korganizer" ), mIface( 0 ) { setInstance( KOrganizerPluginFactory::instance() ); instance()->iconLoader()->addAppDir("kdepim"); insertNewAction( new KAction( i18n( "New Event..." ), "newappointment", CTRL+SHIFT+Key_E, this, SLOT( slotNewEvent() ), actionCollection(), "new_event" ) ); insertSyncAction( new KAction( i18n( "Synchronize Calendar" ), "reload", 0, this, SLOT( slotSyncEvents() ), actionCollection(), "korganizer_sync" ) ); mUniqueAppWatcher = new Kontact::UniqueAppWatcher( new Kontact::UniqueAppHandlerFactory<KOrganizerUniqueAppHandler>(), this ); }