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 <tqwidget.h>
00025 #include <libkcal/attendee.h>
00026 #include <tdeabc/addressee.h>
00027
00028 class TQBoxLayout;
00029 class TQComboBox;
00030 class TQCheckBox;
00031 class TQLabel;
00032 class TQPushButton;
00033 class TQHBox;
00034 class TQListViewItem;
00035
00036 namespace KPIM {
00037 class AddresseeLineEdit;
00038 }
00039
00040 namespace KCal {
00041 class Incidence;
00042 }
00043
00047 class KOAttendeeEditor : public TQWidget
00048 {
00049 Q_OBJECT
00050
00051 public:
00052 KOAttendeeEditor( TQWidget *parent, const char *name = 0 );
00053
00054 virtual void insertAttendee( KCal::Attendee *attendee, bool fetchFB = true ) = 0;
00055 virtual void removeAttendee( KCal::Attendee *attendee ) = 0;
00056
00057 virtual void readEvent( KCal::Incidence *incidence );
00058 virtual void writeEvent( KCal::Incidence *incidence );
00059
00061 void cancelAttendeeEvent( KCal::Incidence *incidence );
00062
00063 public slots:
00064 void acceptForMe();
00065 void declineForMe();
00066
00067 signals:
00068 void updateAttendeeSummary( int count );
00069
00070 protected:
00071 void initOrganizerWidgets( TQWidget *parent, TQBoxLayout *layout );
00072 void initEditWidgets( TQWidget *parent, TQBoxLayout *layout );
00073
00079 void insertAttendeeFromAddressee( const TDEABC::Addressee &a, const KCal::Attendee* at=0 );
00080
00081 void fillOrganizerCombo();
00082 virtual TQListViewItem* hasExampleAttendee() const = 0;
00083 bool isExampleAttendee( const KCal::Attendee* ) const;
00084 virtual KCal::Attendee* currentAttendee() const = 0;
00085 virtual void updateCurrentItem() = 0;
00086
00087 virtual void setSelected ( int index ) = 0;
00088 virtual int selectedIndex() = 0;
00089 virtual void changeStatusForMe( KCal::Attendee::PartStat status ) = 0;
00090
00091 virtual bool eventFilter( TQObject *, TQEvent *);
00092
00093 protected slots:
00094 void addNewAttendee();
00095 void openAddressBook();
00096
00097 void setEnableAttendeeInput( bool enabled );
00098 void updateAttendeeInput();
00099 void clearAttendeeInput();
00100 void fillAttendeeInput( KCal::Attendee *a );
00101 void expandAttendee();
00102 void updateAttendee();
00103
00104 protected:
00105 KPIM::AddresseeLineEdit *mNameEdit;
00106 TQString mUid;
00107 TQComboBox* mRoleCombo;
00108 TQCheckBox* mRsvpButton;
00109 TQComboBox* mStatusCombo;
00110
00111 TQHBox* mOrganizerHBox;
00112 TQComboBox *mOrganizerCombo;
00113 TQLabel *mOrganizerLabel;
00114
00115 TQLabel* mDelegateLabel;
00116
00117 TQPushButton* mAddButton;
00118 TQPushButton* mRemoveButton;
00119 TQPushButton* mAddressBookButton;
00120
00121 TQPtrList<KCal::Attendee> mdelAttendees;
00122 TQPtrList<KCal::Attendee> mnewAttendees;
00123
00124 private:
00125 TDEABC::Addressee::List expandDistList( const TQString &text ) const;
00126 bool mDisableItemUpdate;
00127 };
00128
00129 #endif
|