korganizer
koeditordetails.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef _KOEDITORDETAILS_H
00025 #define _KOEDITORDETAILS_H
00026
00027 #include <klistview.h>
00028 #include "customlistviewitem.h"
00029 #include "koattendeeeditor.h"
00030
00031 #include <libkcal/attendee.h>
00032
00033 class QPushButton;
00034 class QCheckBox;
00035 class QLineEdit;
00036 class QLabel;
00037 class QComboBox;
00038 class QHBox;
00039 class KDateEdit;
00040 class KOEditorFreeBusy;
00041
00042 namespace KCal {
00043 class Attendee;
00044 class Incidence;
00045 }
00046 using namespace KCal;
00047
00048 namespace KPIM {
00049 class AddresseeLineEdit;
00050 }
00051
00052 typedef CustomListViewItem<KCal::Attendee *> AttendeeListItem;
00053
00054
00060 class KOAttendeeListView : public KListView
00061 {
00062 Q_OBJECT
00063 public:
00064 KOAttendeeListView (QWidget *parent=0, const char *name=0);
00065 virtual ~KOAttendeeListView();
00066 virtual void addAttendee( const QString& newAttendee );
00067 public slots:
00068 virtual void contentsDragEnterEvent( QDragEnterEvent *e );
00069 virtual void dragEnterEvent( QDragEnterEvent *e );
00070 virtual void contentsDropEvent( QDropEvent *e );
00071 virtual void dropEvent( QDropEvent *e );
00072 virtual void contentsDragMoveEvent(QDragMoveEvent *e);
00073 signals:
00074 void dropped(Attendee*);
00075 };
00076
00077
00078 class KOEditorDetails : public KOAttendeeEditor
00079 {
00080 Q_OBJECT
00081 public:
00082 KOEditorDetails (int spacing = 8,QWidget* parent = 0, const char* name = 0);
00083 virtual ~KOEditorDetails();
00084
00086 void setDefaults();
00088 void readEvent(Incidence *);
00090 void writeEvent(Incidence *);
00091
00093 bool validateInput();
00094
00096 bool hasAttendees();
00097
00098 void insertAttendee( Attendee *a, bool goodEmailAddress = true );
00099 void removeAttendee( Attendee *a );
00100
00101 protected slots:
00102 void removeAttendee();
00103 void slotInsertAttendee( Attendee *a );
00104
00105 protected:
00106 void setSelected ( int index );
00107 int selectedIndex();
00108 void changeStatusForMe( Attendee::PartStat status );
00109
00110 KCal::Attendee* currentAttendee() const;
00111
00112 QListViewItem* hasExampleAttendee() const;
00113 void updateCurrentItem();
00114
00115 private:
00116 bool mDisableItemUpdate;
00117
00118 KListView *mListView;
00119
00120 };
00121
00122 #endif
|