korganizer
koeditorattachments.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef KOEDITORATTACHMENTS_H
00026 #define KOEDITORATTACHMENTS_H
00027
00028 #include <qwidget.h>
00029 #include <kurl.h>
00030
00031 namespace KCal {
00032 class Incidence;
00033 class Attachment;
00034 }
00035
00036 class QListViewItem;
00037 class KListView;
00038
00039 class KOEditorAttachments : public QWidget
00040 {
00041 Q_OBJECT
00042 public:
00043 KOEditorAttachments( int spacing = 8, QWidget *parent = 0,
00044 const char *name = 0 );
00045 ~KOEditorAttachments();
00046
00047 void addAttachment( const QString &uri,
00048 const QString &mimeType = QString::null );
00049 void addAttachment( KCal::Attachment *attachment );
00050
00052 void setDefaults();
00054 void readIncidence( KCal::Incidence * );
00056 void writeIncidence( KCal::Incidence * );
00057
00058 bool hasAttachments();
00059
00060 protected slots:
00061 void showAttachment( QListViewItem *item );
00062 void slotAdd();
00063 void slotEdit();
00064 void slotRemove();
00065 void slotShow();
00066 void dragEnterEvent( QDragEnterEvent *event );
00067 void dropEvent( QDropEvent *event );
00068 signals:
00069 void openURL( const KURL &url );
00070
00071 private:
00072 KListView *mAttachments;
00073 };
00074
00075 #endif
|