korganizerplugin.h
1 /*
2  This file is part of KDE Kontact.
3 
4  Copyright (c) 2001 Matthias Hoelzer-Kluepfel <mhk@kde.org>
5 
6  This program is free software; you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation; either version 2 of the License, or
9  (at your option) any later version.
10 
11  This program is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with this program; if not, write to the Free Software
18  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 
20  As a special exception, permission is given to link this program
21  with any edition of TQt, and distribute the resulting executable,
22  without including the source code for TQt in the source distribution.
23 */
24 
25 #ifndef KORGANIZER_PLUGIN_H
26 #define KORGANIZER_PLUGIN_H
27 
28 #include <klocale.h>
29 #include <kparts/part.h>
30 
31 #include "kcalendariface_stub.h"
32 #include "korganizeriface_stub.h"
33 #include "plugin.h"
34 #include "uniqueapphandler.h"
35 
36 class KOrganizerPlugin : public Kontact::Plugin
37 {
38  Q_OBJECT
39  TQ_OBJECT
40 
41  public:
42  KOrganizerPlugin( Kontact::Core *core, const char *name, const TQStringList& );
43  ~KOrganizerPlugin();
44 
45  virtual bool createDCOPInterface( const TQString& serviceType );
46  virtual bool isRunningStandalone();
47  int weight() const { return 400; }
48 
49  virtual bool queryClose() const;
50 
51  bool canDecodeDrag( TQMimeSource * );
52  void processDropEvent( TQDropEvent * );
53 
54  virtual Kontact::Summary *createSummaryWidget( TQWidget *parent );
55 
56  virtual TQString tipFile() const;
57  virtual TQStringList invisibleToolbarActions() const;
58 
59  void select();
60 
61  KCalendarIface_stub *interface();
62 
63 
64  void loadProfile( const TQString& path );
65  void saveToProfile( const TQString& path ) const;
66 
67  protected:
68  KParts::ReadOnlyPart *createPart();
69 
70  private slots:
71  void slotNewEvent();
72  void slotSyncEvents();
73 
74  private:
75  KCalendarIface_stub *mIface;
76  Kontact::UniqueAppWatcher *mUniqueAppWatcher;
77 };
78 
79 #endif