kontact

core.h

00001 /*
00002    This file is part of KDE Kontact.
00003 
00004    Copyright (c) 2001 Matthias Hoelzer-Kluepfel <mhk@kde.org>
00005    Copyright (c) 2002-2003 Daniel Molkentin <molkentin@kde.org>
00006 
00007    This library is free software; you can redistribute it and/or
00008    modify it under the terms of the GNU Library General Public
00009    License as published by the Free Software Foundation; either
00010    version 2 of the License, or (at your option) any later version.
00011 
00012    This library is distributed in the hope that it will be useful,
00013    but WITHOUT ANY WARRANTY; without even the implied warranty of
00014    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015    Library General Public License for more details.
00016 
00017    You should have received a copy of the GNU Library General Public License
00018    along with this library; see the file COPYING.LIB.  If not, write to
00019    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00020    Boston, MA 02110-1301, USA.
00021 
00022 */
00023 #ifndef KONTACT_CORE_H
00024 #define KONTACT_CORE_H
00025 
00026 #include <qdatetime.h>
00027 #include <kdepimmacros.h>
00028 #include <kparts/mainwindow.h>
00029 #include <kparts/part.h>
00030 
00031 class KAction;
00032 
00033 namespace Kontact
00034 {
00035 
00036 class Plugin;
00037 
00041 class KDE_EXPORT Core : public KParts::MainWindow
00042 {
00043   Q_OBJECT
00044   public:
00045     virtual ~Core();
00046 
00051     virtual void selectPlugin( Kontact::Plugin *plugin ) = 0;
00052 
00057     virtual void selectPlugin( const QString &plugin ) = 0;
00058 
00062     virtual QValueList<Kontact::Plugin*> pluginList() const = 0;
00063 
00067     KParts::ReadOnlyPart *createPart( const char *libname );
00068 
00073     virtual void partLoaded( Plugin* plugin, KParts::ReadOnlyPart * part ) = 0;
00074 
00075   signals:
00079     void dayChanged( const QDate& );
00080 
00081   protected:
00082     Core( QWidget *parentWidget = 0, const char *name = 0 );
00083 
00084     QString lastErrorMessage() const;
00085 
00086   private slots:
00087     void slotPartDestroyed( QObject * );
00088     void checkNewDay();
00089 
00090   private:
00091     QMap<QCString,KParts::ReadOnlyPart *> mParts;
00092     QDate mLastDate;
00093 
00094     class Private;
00095     Private *d;
00096 };
00097 
00098 }
00099 
00100 #endif
00101 
00102 // vim: sw=2 sts=2 et tw=80
KDE Home | KDE Accessibility Home | Description of Access Keys