korganizer Library API Documentation

koeditordetails.h

00001 /*
00002     This file is part of KOrganizer.
00003     Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org>
00004 
00005     This program is free software; you can redistribute it and/or modify
00006     it under the terms of the GNU General Public License as published by
00007     the Free Software Foundation; either version 2 of the License, or
00008     (at your option) any later version.
00009 
00010     This program is distributed in the hope that it will be useful,
00011     but WITHOUT ANY WARRANTY; without even the implied warranty of
00012     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00013     GNU General Public License for more details.
00014 
00015     You should have received a copy of the GNU General Public License
00016     along with this program; if not, write to the Free Software
00017     Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00018 
00019     As a special exception, permission is given to link this program
00020     with any edition of Qt, and distribute the resulting executable,
00021     without including the source code for Qt in the source distribution.
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<KCal::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     void insertAttendee( Attendee*, bool goodEmailAddress );
00114 
00115   private:
00116     bool mDisableItemUpdate;
00117 
00118     KPIM::AddresseeLineEdit *mNameEdit;
00119     QLineEdit *mUidEdit;
00120     KListView *mListView;
00121     QComboBox* mRoleCombo;
00122     QCheckBox* mRsvpButton;
00123     QComboBox* mStatusCombo;
00124     QHBox* mOrganizerHBox;
00125     QComboBox *mOrganizerCombo; // either we organize it (combo shown)
00126     QLabel *mOrganizerLabel; // or someone else does (just a label is shown)
00127 
00128     QPushButton* mAddButton;
00129     QPushButton* mRemoveButton;
00130     QPushButton* mAddressBookButton;
00131 
00132     QPtrList<Attendee> mdelAttendees;
00133 
00134     KOEditorFreeBusy *mFreeBusy;
00135 };
00136 
00137 #endif
KDE Logo
This file is part of the documentation for korganizer Library Version 3.3.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Mar 23 22:45:24 2005 by doxygen 1.3.9.1 written by Dimitri van Heesch, © 1997-2003