libkdepim

core.h

00001 // -*- Mode: C++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
00022 #ifndef KOMPOSER_CORE_H
00023 #define KOMPOSER_CORE_H
00024 
00025 #include "komposerIface.h"
00026 
00027 #include <kmainwindow.h>
00028 #include <qptrlist.h>
00029 
00030 namespace KSettings {
00031   class Dialog;
00032 }
00033 class QWidgetStack;
00034 
00035 namespace Komposer
00036 {
00037 
00038   class Editor;
00039   class Plugin;
00040   class PluginManager;
00041 
00045   class Core : public KMainWindow, virtual public KomposerIface
00046   {
00047     Q_OBJECT
00048   public:
00049     Core( QWidget *parentWidget = 0, const char *name = 0 );
00050     virtual ~Core();
00051 
00052   public slots:
00053     virtual void send( int how );
00054     virtual void addAttachment( const KURL &url, const QString &comment );
00055     virtual void setBody( const QString &body );
00056     virtual void addAttachment( const QString &name,
00057                                 const QCString &cte,
00058                                 const QByteArray &data,
00059                                 const QCString &type,
00060                                 const QCString &subType,
00061                                 const QCString &paramAttr,
00062                                 const QString &paramValue,
00063                                 const QCString &contDisp );
00064 
00065 
00066 
00067   protected slots:
00068     //void slotActivePartChanged( KParts::Part *part );
00069     void slotPluginLoaded( Plugin* );
00070     void slotAllPluginsLoaded();
00071     void slotPreferences();
00072     void slotQuit();
00073     void slotClose();
00074 
00075     void slotSendNow();
00076     void slotSendLater();
00077     void slotSaveDraft();
00078     void slotInsertFile();
00079     void slotAddrBook();
00080     void slotNewComposer();
00081     void slotAttachFile();
00082 
00083   protected:
00084     virtual void initWidgets();
00085     void initCore();
00086     void initConnections();
00087     void loadSettings();
00088     void saveSettings();
00089     void createActions();
00090 
00091     void addEditor( Komposer::Editor *editor );
00092     void addPlugin( Komposer::Plugin *plugin );
00093 
00094   private:
00095     QWidgetStack *m_stack;
00096     Editor *m_currentEditor;
00097     PluginManager *m_pluginManager;
00098 
00099     KSettings::Dialog *m_dlg;
00100 
00101     class Private;
00102     Private *d;
00103 };
00104 
00105 }
00106 
00107 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys