• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdepim API Reference
  • KDE Home
  • Contact Us
 

korganizer

  • sources
  • kde-4.12
  • kdepim
  • korganizer
korganizerifaceimpl.cpp
Go to the documentation of this file.
1 /*
2  This file is part of KOrganizer.
3 
4  Copyright (c) 2004 Bo Thorsen <bo@sonofthor.dk>
5  Copyright (c) 2005 Rafal Rzepecki <divide@users.sourceforge.net>
6 
7  This program is free software; you can redistribute it and/or
8  modify it under the terms of the GNU Library General Public
9  License as published by the Free Software Foundation; either
10  version 2 of the License, or (at your option) any later version.
11 
12  This program is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  Library General Public License for more details.
16 
17  You should have received a copy of the GNU Library General Public License
18  along with this library; see the file COPYING.LIB. If not, write to
19  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20  Boston, MA 02110-1301, USA.
21 
22  In addition, as a special exception, the copyright holders give
23  permission to link the code of this program with any edition of
24  the Qt library by Trolltech AS, Norway (or with modified versions
25  of Qt that use the same license as Qt), and distribute linked
26  combinations including the two. You must obey the GNU General
27  Public License in all respects for all of the code used other than
28  Qt. If you modify this file, you may extend this exception to
29  your version of the file, but you are not obligated to do so. If
30  you do not wish to do so, delete this exception statement from
31  your version.
32 */
33 
34 #include "korganizerifaceimpl.h"
35 #include "actionmanager.h"
36 #include "korganizeradaptor.h"
37 
38 KOrganizerIfaceImpl::KOrganizerIfaceImpl( ActionManager *actionManager,
39  QObject *parent, const char *name )
40  : QObject( parent ), mActionManager( actionManager )
41 {
42  setObjectName( QLatin1String(name) );
43  new KorganizerAdaptor( this );
44  QDBusConnection::sessionBus().registerObject(
45  QLatin1String("/Korganizer"), this, QDBusConnection::ExportAdaptors );
46 }
47 
48 KOrganizerIfaceImpl::~KOrganizerIfaceImpl()
49 {
50 }
51 
52 bool KOrganizerIfaceImpl::openURL( const QString &url )
53 {
54  return mActionManager->openURL( url );
55 }
56 
57 bool KOrganizerIfaceImpl::mergeURL( const QString &url )
58 {
59  return mActionManager->mergeURL( url );
60 }
61 
62 bool KOrganizerIfaceImpl::saveURL()
63 {
64  return mActionManager->saveURL();
65 }
66 
67 bool KOrganizerIfaceImpl::saveAsURL( const QString &url )
68 {
69  return mActionManager->saveAsURL( url );
70 }
71 
72 QString KOrganizerIfaceImpl::getCurrentURLasString() const
73 {
74  return mActionManager->getCurrentURLasString();
75 }
76 
77 bool KOrganizerIfaceImpl::deleteIncidence( const QString &uid, bool force )
78 {
79  bool ok;
80  qint64 id = QVariant( uid ).toLongLong( &ok );
81  if ( !ok ) {
82  kWarning() << "Invalid uid" << uid;
83  return false;
84  }
85  return mActionManager->deleteIncidence( id, force );
86 }
87 
88 bool KOrganizerIfaceImpl::editIncidence( const QString &itemId )
89 {
90  bool ok;
91  qint64 id = QVariant( itemId ).toLongLong( &ok );
92  if ( !ok ) {
93  kWarning() << "Invalid item id = " << itemId;
94  return false;
95  }
96  return mActionManager->editIncidence( id );
97 }
98 
99 bool KOrganizerIfaceImpl::addIncidence( const QString &uid )
100 {
101  //bool ok;
102  //qint64 id = QVariant(uid).toLongLong(&ok);
103  //if(! ok) {
104  // kWarning() << "Invalid uid"<<uid;
105  // return false;
106  //}
107  return mActionManager->addIncidence( uid );
108 }
109 
110 bool KOrganizerIfaceImpl::showIncidence( const QString &uid )
111 {
112  bool ok;
113  qint64 id = QVariant( uid ).toLongLong( &ok );
114  if ( !ok ) {
115  kWarning() << "Invalid uid" << uid;
116  return false;
117  }
118  return mActionManager->showIncidence( id );
119 }
120 
121 bool KOrganizerIfaceImpl::showIncidenceContext( const QString &uid )
122 {
123  bool ok;
124  qint64 id = QVariant( uid ).toLongLong( &ok );
125  if ( !ok ) {
126  kWarning() << "Invalid uid" << uid;
127  return false;
128  }
129  return mActionManager->showIncidenceContext( id );
130 }
131 
132 bool KOrganizerIfaceImpl::handleCommandLine()
133 {
134  return mActionManager->handleCommandLine();
135 }
136 
137 #include "korganizerifaceimpl.moc"
ActionManager::editIncidence
bool editIncidence(Akonadi::Item::Id id)
Definition: actionmanager.cpp:1348
KOrganizerIfaceImpl::deleteIncidence
bool deleteIncidence(const QString &akonadiUrl)
Definition: korganizerifaceimpl.h:63
ActionManager::mergeURL
bool mergeURL(const QString &url)
Open calendar file from URL.
Definition: actionmanager.cpp:1333
KOrganizerIfaceImpl::showIncidence
bool showIncidence(const QString &akonadiUrl)
Show a HTML representation of the incidence (the "View.." dialog).
Definition: korganizerifaceimpl.cpp:110
KOrganizerIfaceImpl::addIncidence
bool addIncidence(const QString &iCal)
Add an incidence to the active calendar.
Definition: korganizerifaceimpl.cpp:99
KOrganizerIfaceImpl::openURL
bool openURL(const QString &url)
Definition: korganizerifaceimpl.cpp:52
actionmanager.h
ActionManager::openURL
bool openURL(const QString &url)
Open calendar file from URL.
Definition: actionmanager.cpp:1286
QObject
KOrganizerIfaceImpl::handleCommandLine
bool handleCommandLine()
Called by KOrganizerUniqueAppHandler in the kontact plugin Returns true if the command line was succe...
Definition: korganizerifaceimpl.cpp:132
KOrganizerIfaceImpl::saveAsURL
bool saveAsURL(const QString &url)
Definition: korganizerifaceimpl.cpp:67
KOrganizerIfaceImpl::editIncidence
bool editIncidence(const QString &akonadiUrl)
Definition: korganizerifaceimpl.cpp:88
ActionManager::showIncidence
bool showIncidence(Akonadi::Item::Id id)
Definition: actionmanager.cpp:1353
KOrganizerIfaceImpl::KOrganizerIfaceImpl
KOrganizerIfaceImpl(ActionManager *mActionManager, QObject *parent=0, const char *name=0)
Definition: korganizerifaceimpl.cpp:38
ActionManager::saveAsURL
bool saveAsURL(const KUrl &kurl)
Save calendar file to URL.
Definition: actionmanager.cpp:1097
KOrganizerIfaceImpl::showIncidenceContext
bool showIncidenceContext(const QString &akonadiUrl)
Show an incidence in context.
Definition: korganizerifaceimpl.cpp:121
korganizerifaceimpl.h
ActionManager
The ActionManager creates all the actions in KOrganizer.
Definition: actionmanager.h:66
ActionManager::deleteIncidence
virtual bool deleteIncidence(Akonadi::Item::Id id, bool force=false)
Delete the incidence with the given unique id from current calendar.
Definition: actionmanager.cpp:1398
ActionManager::showIncidenceContext
bool showIncidenceContext(Akonadi::Item::Id id)
Show an incidence in context.
Definition: actionmanager.cpp:1358
KOrganizerIfaceImpl::mergeURL
bool mergeURL(const QString &url)
Definition: korganizerifaceimpl.cpp:57
ActionManager::handleCommandLine
bool handleCommandLine()
Called by KOrganizerUniqueAppHandler in the kontact plugin Returns true if the command line was succe...
Definition: actionmanager.cpp:1363
KOrganizerIfaceImpl::saveURL
bool saveURL()
Definition: korganizerifaceimpl.cpp:62
KOrganizerIfaceImpl::getCurrentURLasString
QString getCurrentURLasString() const
Definition: korganizerifaceimpl.cpp:72
ActionManager::saveURL
bool saveURL()
Save calendar file to URL of current calendar.
Definition: actionmanager.cpp:960
ActionManager::getCurrentURLasString
QString getCurrentURLasString() const
Get current URL as QString.
Definition: actionmanager.cpp:1343
KOrganizerIfaceImpl::~KOrganizerIfaceImpl
~KOrganizerIfaceImpl()
Definition: korganizerifaceimpl.cpp:48
ActionManager::addIncidence
bool addIncidence(const QString &ical)
Add an incidence to the active calendar.
Definition: actionmanager.cpp:1403
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:56:19 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

korganizer

Skip menu "korganizer"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdepim API Reference

Skip menu "kdepim API Reference"
  • akonadi_next
  • akregator
  • blogilo
  • calendarsupport
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt2
  • kjots
  • kleopatra
  • kmail
  • knode
  • knotes
  • kontact
  • korgac
  • korganizer
  • ktimetracker
  • libkdepim
  • libkleo
  • libkpgp
  • mailcommon
  • messagelist
  • messageviewer

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal