korganizer
koattendeeeditor.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef KOATTENDEEEDITOR_H
00022 #define KOATTENDEEEDITOR_H
00023
00024 #include <qwidget.h>
00025 #include <libkcal/attendee.h>
00026 #include <kabc/addressee.h>
00027
00028 class QBoxLayout;
00029 class QComboBox;
00030 class QCheckBox;
00031 class QLabel;
00032 class QPushButton;
00033 class QHBox;
00034 class QListViewItem;
00035
00036 namespace KPIM {
00037 class AddresseeLineEdit;
00038 }
00039
00040 namespace KCal {
00041 class Incidence;
00042 }
00043
00047 class KOAttendeeEditor : public QWidget
00048 {
00049 Q_OBJECT
00050 public:
00051 KOAttendeeEditor( QWidget *parent, const char *name = 0 );
00052
00053 virtual void insertAttendee( KCal::Attendee *attendee, bool fetchFB = true ) = 0;
00054 virtual void removeAttendee( KCal::Attendee *attendee ) = 0;
00055
00056 virtual void readEvent( KCal::Incidence *incidence );
00057 virtual void writeEvent( KCal::Incidence *incidence );
00058
00060 void cancelAttendeeEvent( KCal::Incidence *incidence );
00061
00062 public slots:
00063 void acceptForMe();
00064 void declineForMe();
00065
00066 signals:
00067 void updateAttendeeSummary( int count );
00068
00069 protected:
00070 void initOrganizerWidgets( QWidget *parent, QBoxLayout *layout );
00071 void initEditWidgets( QWidget *parent, QBoxLayout *layout );
00072
00078 void insertAttendeeFromAddressee( const KABC::Addressee &a, const KCal::Attendee* at=0 );
00079
00080 void fillOrganizerCombo();
00081 virtual QListViewItem* hasExampleAttendee() const = 0;
00082 bool isExampleAttendee( const KCal::Attendee* ) const;
00083 virtual KCal::Attendee* currentAttendee() const = 0;
00084 virtual void updateCurrentItem() = 0;
00085
00086 virtual void changeStatusForMe( KCal::Attendee::PartStat status ) = 0;
00087
00088 virtual bool eventFilter( QObject *, QEvent *);
00089
00090 protected slots:
00091 void addNewAttendee();
00092 void openAddressBook();
00093
00094 void setEnableAttendeeInput( bool enabled );
00095 void updateAttendeeInput();
00096 void clearAttendeeInput();
00097 void fillAttendeeInput( KCal::Attendee *a );
00098 void expandAttendee();
00099 void updateAttendee();
00100
00101 protected:
00102 KPIM::AddresseeLineEdit *mNameEdit;
00103 QString mUid;
00104 QComboBox* mRoleCombo;
00105 QCheckBox* mRsvpButton;
00106 QComboBox* mStatusCombo;
00107
00108 QHBox* mOrganizerHBox;
00109 QComboBox *mOrganizerCombo;
00110 QLabel *mOrganizerLabel;
00111
00112 QLabel* mDelegateLabel;
00113
00114 QPushButton* mAddButton;
00115 QPushButton* mRemoveButton;
00116 QPushButton* mAddressBookButton;
00117
00118 QPtrList<KCal::Attendee> mdelAttendees;
00119 QPtrList<KCal::Attendee> mnewAttendees;
00120
00121 private:
00122 KABC::Addressee::List expandDistList( const QString &text ) const;
00123 bool mDisableItemUpdate;
00124 };
00125
00126 #endif
|