core.h
1 // -*- Mode: C++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
22 #ifndef KOMPOSER_CORE_H
23 #define KOMPOSER_CORE_H
24 
25 #include "komposerIface.h"
26 
27 #include <tdemainwindow.h>
28 #include <tqptrlist.h>
29 
30 namespace KSettings {
31  class Dialog;
32 }
33 class TQWidgetStack;
34 
35 namespace Komposer
36 {
37 
38  class Editor;
39  class Plugin;
40  class PluginManager;
41 
45  class Core : public TDEMainWindow, virtual public KomposerIface
46  {
47  Q_OBJECT
48 
49  public:
50  Core( TQWidget *parentWidget = 0, const char *name = 0 );
51  virtual ~Core();
52 
53  public slots:
54  virtual void send( int how );
55  virtual void addAttachment( const KURL &url, const TQString &comment );
56  virtual void setBody( const TQString &body );
57  virtual void addAttachment( const TQString &name,
58  const TQCString &cte,
59  const TQByteArray &data,
60  const TQCString &type,
61  const TQCString &subType,
62  const TQCString &paramAttr,
63  const TQString &paramValue,
64  const TQCString &contDisp );
65 
66 
67 
68  protected slots:
69  //void slotActivePartChanged( KParts::Part *part );
70  void slotPluginLoaded( Plugin* );
71  void slotAllPluginsLoaded();
72  void slotPreferences();
73  void slotQuit();
74  void slotClose();
75 
76  void slotSendNow();
77  void slotSendLater();
78  void slotSaveDraft();
79  void slotInsertFile();
80  void slotAddrBook();
81  void slotNewComposer();
82  void slotAttachFile();
83 
84  protected:
85  virtual void initWidgets();
86  void initCore();
87  void initConnections();
88  void loadSettings();
89  void saveSettings();
90  void createActions();
91 
92  void addEditor( Komposer::Editor *editor );
93  void addPlugin( Komposer::Plugin *plugin );
94 
95  private:
96  TQWidgetStack *m_stack;
97  Editor *m_currentEditor;
98  PluginManager *m_pluginManager;
99 
100  KSettings::Dialog *m_dlg;
101 
102  class Private;
103  Private *d;
104 };
105 
106 }
107 
108 #endif
core.h
Definition: core.h:30
This class provides the interface to the Komposer core for the editor.
Definition: core.h:45
DCOP interface for mail composer window.
Definition: komposerIface.h:36
attachment.h
Definition: attachment.h:29