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 namespace KABC {
00049 class Addressee;
00050 }
00051 
00052 typedef CustomListViewItem<Attendee *> AttendeeListItem;
00053 
00054 
00060 class KOAttendeeListView : public KListView
00061 {
00062 Q_OBJECT
00063 public:
00064   KOAttendeeListView (QWidget *parent=0, const char *name=0);
00065   virtual ~KOAttendeeListView();
00066   virtual void addAttendee( const QString& newAttendee );
00067 public slots:
00068   virtual void contentsDragEnterEvent( QDragEnterEvent *e );
00069   virtual void dragEnterEvent( QDragEnterEvent *e );
00070   virtual void contentsDropEvent( QDropEvent *e );
00071   virtual void dropEvent( QDropEvent *e );
00072   virtual void contentsDragMoveEvent(QDragMoveEvent *e);
00073 signals:
00074   void dropped(Attendee*);
00075 };
00076 
00077 
00078 class KOEditorDetails : public QWidget
00079 {
00080     Q_OBJECT
00081   public:
00082     KOEditorDetails (int spacing = 8,QWidget* parent = 0, const char* name = 0);
00083     virtual ~KOEditorDetails();
00084 
00086     void setDefaults();
00088     void readEvent(Incidence *);
00090     void writeEvent(Incidence *);
00091 
00093     void cancelAttendeeEvent(Incidence *);
00095     bool validateInput();
00096 
00098     void setFreeBusyWidget( KOEditorFreeBusy * );
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 
00124     void insertAttendeeFromAddressee( const KABC::Addressee& , const Attendee* at=0 );
00125 
00126   private:
00127     bool mDisableItemUpdate;
00128 
00129     KPIM::AddresseeLineEdit *mNameEdit;
00130     QLineEdit *mUidEdit;
00131     KListView *mListView;
00132     QComboBox* mRoleCombo;
00133     QCheckBox* mRsvpButton;
00134     QComboBox* mStatusCombo;
00135     QHBox* mOrganizerHBox;
00136     QComboBox *mOrganizerCombo; // either we organize it (combo shown)
00137     QLabel *mOrganizerLabel; // or someone else does (just a label is shown)
00138 
00139     QPushButton* mAddButton;
00140     QPushButton* mRemoveButton;
00141     QPushButton* mAddressBookButton;
00142 
00143     QPtrList<Attendee> mdelAttendees;
00144 
00145     KOEditorFreeBusy *mFreeBusy;
00146 };
00147 
00148 #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 Thu Aug 23 18:22:13 2007 by doxygen 1.4.2 written by Dimitri van Heesch, © 1997-2003