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
00030 class QPushButton;
00031 class QCheckBox;
00032 class QLineEdit;
00033 class QLabel;
00034 class QComboBox;
00035 class QHBox;
00036 class KDateEdit;
00037 class KOEditorFreeBusy;
00038
00039 namespace KCal {
00040 class Attendee;
00041 class Incidence;
00042 }
00043 using namespace KCal;
00044
00045 namespace KPIM {
00046 class AddresseeLineEdit;
00047 }
00048
00049 typedef CustomListViewItem<KCal::Attendee *> AttendeeListItem;
00050
00051
00057 class KOAttendeeListView : public KListView
00058 {
00059 Q_OBJECT
00060 public:
00061 KOAttendeeListView (QWidget *parent=0, const char *name=0);
00062 virtual ~KOAttendeeListView();
00063 virtual void addAttendee( const QString& newAttendee );
00064 public slots:
00065 virtual void contentsDragEnterEvent( QDragEnterEvent *e );
00066 virtual void dragEnterEvent( QDragEnterEvent *e );
00067 virtual void contentsDropEvent( QDropEvent *e );
00068 virtual void dropEvent( QDropEvent *e );
00069 virtual void contentsDragMoveEvent(QDragMoveEvent *e);
00070 signals:
00071 void dropped(Attendee*);
00072 };
00073
00074
00075 class KOEditorDetails : public QWidget
00076 {
00077 Q_OBJECT
00078 public:
00079 KOEditorDetails (int spacing = 8,QWidget* parent = 0, const char* name = 0);
00080 virtual ~KOEditorDetails();
00081
00083 void setDefaults();
00085 void readEvent(Incidence *);
00087 void writeEvent(Incidence *);
00088
00090 void cancelAttendeeEvent(Incidence *);
00092 bool validateInput();
00093
00095 void setFreeBusyWidget( KOEditorFreeBusy * );
00096
00098 bool hasAttendees();
00099
00100 public slots:
00101 void insertAttendee(Attendee *);
00102
00103 protected slots:
00104 void addNewAttendee();
00105 void removeAttendee();
00106 void openAddressBook();
00107 void updateAttendeeInput();
00108 void clearAttendeeInput();
00109 void fillAttendeeInput(AttendeeListItem *);
00110 void updateAttendeeItem();
00111 void setEnableAttendeeInput(bool);
00112
00113 protected:
00114 virtual bool eventFilter( QObject *, QEvent *);
00115 void fillOrganizerCombo();
00116
00117 void insertAttendee( Attendee*, bool goodEmailAddress );
00118
00119 private:
00120 bool mDisableItemUpdate;
00121
00122 KPIM::AddresseeLineEdit *mNameEdit;
00123 QString mUid;
00124 KListView *mListView;
00125 QComboBox* mRoleCombo;
00126 QCheckBox* mRsvpButton;
00127 QComboBox* mStatusCombo;
00128 QHBox* mOrganizerHBox;
00129 QComboBox *mOrganizerCombo;
00130 QLabel *mOrganizerLabel;
00131
00132 QPushButton* mAddButton;
00133 QPushButton* mRemoveButton;
00134 QPushButton* mAddressBookButton;
00135
00136 QPtrList<Attendee> mdelAttendees;
00137
00138 KOEditorFreeBusy *mFreeBusy;
00139 };
00140
00141 #endif
|