00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
#ifndef _KOEDITORDETAILS_H
00024
#define _KOEDITORDETAILS_H
00025
00026
#include <klistview.h>
00027
#include "customlistviewitem.h"
00028
00029
class QPushButton;
00030
class QCheckBox;
00031
class QLineEdit;
00032
class QLabel;
00033
class QComboBox;
00034
class QHBox;
00035
class KDateEdit;
00036
class KOEditorFreeBusy;
00037
00038
namespace KCal {
00039
class Attendee;
00040
class Incidence;
00041 }
00042
using namespace KCal;
00043
00044
namespace KPIM {
00045
class AddresseeLineEdit;
00046 }
00047
00048
typedef CustomListViewItem<Attendee *> AttendeeListItem;
00049
00050
00056 class KOAttendeeListView :
public KListView
00057 {
00058 Q_OBJECT
00059
public:
00060
KOAttendeeListView (
QWidget *parent=0,
const char *name=0);
00061
virtual ~KOAttendeeListView();
00062
virtual void addAttendee(
const QString& newAttendee );
00063
public slots:
00064
virtual void contentsDragEnterEvent(
QDragEnterEvent *e );
00065
virtual void dragEnterEvent(
QDragEnterEvent *e );
00066
virtual void contentsDropEvent(
QDropEvent *e );
00067
virtual void dropEvent(
QDropEvent *e );
00068
virtual void contentsDragMoveEvent(
QDragMoveEvent *e);
00069 signals:
00070
void dropped(Attendee*);
00071 };
00072
00073
00074
class KOEditorDetails :
public QWidget
00075 {
00076 Q_OBJECT
00077
public:
00078 KOEditorDetails (
int spacing = 8,
QWidget* parent = 0,
const char* name = 0);
00079
virtual ~KOEditorDetails();
00080
00082
void setDefaults();
00084
void readEvent(Incidence *);
00086
void writeEvent(Incidence *);
00087
00089
void cancelAttendeeEvent(Incidence *);
00091
bool validateInput();
00092
00094
void setFreeBusyWidget( KOEditorFreeBusy * );
00095
00096
public slots:
00097
void insertAttendee(Attendee *);
00098
00099
protected slots:
00100
void addNewAttendee();
00101
void removeAttendee();
00102
void openAddressBook();
00103
void updateAttendeeInput();
00104
void clearAttendeeInput();
00105
void fillAttendeeInput(AttendeeListItem *);
00106
void updateAttendeeItem();
00107
void setEnableAttendeeInput(
bool);
00108
00109
protected:
00110
virtual bool eventFilter(
QObject *,
QEvent *);
00111
void fillOrganizerCombo();
00112
00113
private:
00114
bool mDisableItemUpdate;
00115
00116 KPIM::AddresseeLineEdit *mNameEdit;
00117
QLineEdit *mUidEdit;
00118 KListView *mListView;
00119
QComboBox* mRoleCombo;
00120
QCheckBox* mRsvpButton;
00121
QComboBox* mStatusCombo;
00122
QHBox* mOrganizerHBox;
00123
QComboBox *mOrganizerCombo;
00124
QLabel *mOrganizerLabel;
00125
00126
QPushButton* mAddButton;
00127
QPushButton* mRemoveButton;
00128
QPushButton* mAddressBookButton;
00129
00130
QPtrList<Attendee> mdelAttendees;
00131
00132 KOEditorFreeBusy *mFreeBusy;
00133 };
00134
00135
#endif