kontact

korganizerplugin.h

00001 /*
00002     This file is part of KDE Kontact.
00003 
00004     Copyright (c) 2001 Matthias Hoelzer-Kluepfel <mhk@kde.org>
00005 
00006     This program is free software; you can redistribute it and/or modify
00007     it under the terms of the GNU General Public License as published by
00008     the Free Software Foundation; either version 2 of the License, or
00009     (at your option) any later version.
00010 
00011     This program is distributed in the hope that it will be useful,
00012     but WITHOUT ANY WARRANTY; without even the implied warranty of
00013     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00014     GNU General Public License for more details.
00015 
00016     You should have received a copy of the GNU General Public License
00017     along with this program; if not, write to the Free Software
00018     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00019 
00020     As a special exception, permission is given to link this program
00021     with any edition of TQt, and distribute the resulting executable,
00022     without including the source code for TQt in the source distribution.
00023 */
00024 
00025 #ifndef KORGANIZER_PLUGIN_H
00026 #define KORGANIZER_PLUGIN_H
00027 
00028 #include <tdelocale.h>
00029 #include <tdeparts/part.h>
00030 
00031 #include "kcalendariface_stub.h"
00032 #include "korganizeriface_stub.h"
00033 #include "plugin.h"
00034 #include "uniqueapphandler.h"
00035 
00036 class KOrganizerPlugin : public Kontact::Plugin
00037 {
00038   Q_OBJECT
00039 
00040   public:
00041     KOrganizerPlugin( Kontact::Core *core, const char *name, const TQStringList& );
00042     virtual ~KOrganizerPlugin();
00043 
00044     virtual bool createDCOPInterface( const TQString& serviceType );
00045     virtual bool isRunningStandalone();
00046     int weight() const { return 400; }
00047 
00048     virtual bool queryClose() const;
00049 
00050     bool canDecodeDrag( TQMimeSource * );
00051     void processDropEvent( TQDropEvent * );
00052 
00053     virtual Kontact::Summary *createSummaryWidget( TQWidget *parent );
00054 
00055     virtual TQString tipFile() const;
00056     virtual TQStringList invisibleToolbarActions() const;
00057 
00058     void select();
00059 
00060     KCalendarIface_stub *interface();
00061 
00062 
00063     void loadProfile( const TQString& path );
00064     void saveToProfile( const TQString& path ) const;
00065 
00066   protected:
00067     KParts::ReadOnlyPart *createPart();
00068 
00069   private slots:
00070     void slotNewEvent();
00071     void slotSyncEvents();
00072 
00073   private:
00074     KCalendarIface_stub *mIface;
00075     Kontact::UniqueAppWatcher *mUniqueAppWatcher;
00076 };
00077 
00078 #endif