27 #include <KontactInterface/Core>
30 #include <KActionCollection>
31 #include <KCmdLineArgs>
33 #include <KLocalizedString>
38 : KontactInterface::Plugin( core, core, "kjots" ), m_interface( 0 )
40 setComponentData( KontactPluginFactory::componentData() );
44 i18nc(
"@action:inmenu",
"New KJots Page" ),
this );
45 actionCollection()->addAction(
QLatin1String(
"new_kjots_page"), action );
46 action->setShortcut(
QKeySequence( Qt::CTRL + Qt::SHIFT + Qt::Key_P ) );
48 i18nc(
"@info:status",
"Create a new jots page" ) );
50 i18nc(
"@info:whatsthis",
51 "You will be presented with a dialog where you can create a new jots page." ) );
52 connect( action, SIGNAL(triggered(
bool)), SLOT(newPage()) );
53 insertNewAction( action );
55 action =
new KAction( KIcon(
QLatin1String(
"address-book-new") ),
56 i18nc(
"@action:inmenu",
"New KJots Book" ),
this );
57 actionCollection()->addAction(
QLatin1String(
"new_kjots_book"), action );
58 action->setShortcut(
QKeySequence( Qt::CTRL + Qt::SHIFT + Qt::Key_B ) );
60 i18nc(
"@info:status",
"Create a new jots book" ) );
62 i18nc(
"@info:whatsthis",
63 "You will be presented with a dialog where you can create a new jots book." ) );
64 connect( action, SIGNAL(triggered(
bool)), SLOT(newBook()) );
65 insertNewAction( action );
67 mUniqueAppWatcher =
new KontactInterface::UniqueAppWatcher(
68 new KontactInterface::UniqueAppHandlerFactory<KJotsUniqueAppHandler>(),
this );
89 KParts::ReadOnlyPart *part = loadPart();
109 void KJotsPlugin::newPage()
111 core()->selectPlugin(
this );
115 void KJotsPlugin::newBook()
117 core()->selectPlugin(
this );
132 KCmdLineArgs::addCmdLineOptions( KCmdLineOptions() );
138 (void)plugin()->part();
140 org::kde::KJotsWidget kjots(
143 return KontactInterface::UniqueAppHandler::newInstance();
OrgKdeKJotsWidgetInterface * interface()
QDBusConnection sessionBus()
virtual int newInstance()
QStringList invisibleToolbarActions() const
KontactInterface::UniqueAppWatcher * mUniqueAppWatcher
virtual void loadCommandLineOptions()
KParts::ReadOnlyPart * createPart()
OrgKdeKJotsWidgetInterface * m_interface
bool isRunningStandalone() const
virtual bool queryClose() const