summaryrefslogtreecommitdiffstats
path: root/korganizer/koattendeeeditor.h
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commit460c52653ab0dcca6f19a4f492ed2c5e4e963ab0 (patch)
tree67208f7c145782a7e90b123b982ca78d88cc2c87 /korganizer/koattendeeeditor.h
downloadtdepim-460c52653ab0dcca6f19a4f492ed2c5e4e963ab0.tar.gz
tdepim-460c52653ab0dcca6f19a4f492ed2c5e4e963ab0.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'korganizer/koattendeeeditor.h')
-rw-r--r--korganizer/koattendeeeditor.h124
1 files changed, 124 insertions, 0 deletions
diff --git a/korganizer/koattendeeeditor.h b/korganizer/koattendeeeditor.h
new file mode 100644
index 000000000..d7eb8cbdc
--- /dev/null
+++ b/korganizer/koattendeeeditor.h
@@ -0,0 +1,124 @@
+/*
+ Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org>
+ Copyright (C) 2003-2004 Reinhold Kainhofer <reinhold@kainhofer.com>
+ Copyright (c) 2007 Volker Krause <vkrause@kde.org>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+*/
+
+#ifndef KOATTENDEEEDITOR_H
+#define KOATTENDEEEDITOR_H
+
+#include <qwidget.h>
+#include <libkcal/attendee.h>
+
+class QBoxLayout;
+class QComboBox;
+class QCheckBox;
+class QLabel;
+class QPushButton;
+class QHBox;
+
+namespace KPIM {
+ class AddresseeLineEdit;
+}
+
+namespace KABC {
+ class Addressee;
+}
+
+namespace KCal {
+ class Incidence;
+}
+
+/**
+ Common base class for attendee editor and free busy view.
+*/
+class KOAttendeeEditor : public QWidget
+{
+ Q_OBJECT
+ public:
+ KOAttendeeEditor( QWidget *parent, const char *name = 0 );
+
+ virtual void insertAttendee( KCal::Attendee* attendee, bool fetchFB = true ) = 0;
+
+ virtual void readEvent( KCal::Incidence *incidence );
+ virtual void writeEvent( KCal::Incidence *incidence );
+
+ /** return a clone of the event with attendees to be canceld*/
+ void cancelAttendeeEvent( KCal::Incidence *incidence );
+
+ public slots:
+ void acceptForMe();
+ void declineForMe();
+
+ signals:
+ void updateAttendeeSummary( int count );
+
+ protected:
+ void initOrganizerWidgets( QWidget *parent, QBoxLayout *layout );
+ void initEditWidgets( QWidget *parent, QBoxLayout *layout );
+
+ /** Reads values from a KABC::Addressee and inserts a new Attendee
+ * item into the listview with those items. Used when adding attendees
+ * from the addressbook and expanding distribution lists.
+ * The optional Attendee parameter can be used to pass in default values
+ * to be used by the new Attendee. */
+ void insertAttendeeFromAddressee( const KABC::Addressee &a, const KCal::Attendee* at=0 );
+
+ void fillOrganizerCombo();
+
+ virtual KCal::Attendee* currentAttendee() const = 0;
+ virtual void updateCurrentItem() = 0;
+
+ virtual void changeStatusForMe( KCal::Attendee::PartStat status ) = 0;
+
+ virtual bool eventFilter( QObject *, QEvent *);
+
+ protected slots:
+ void addNewAttendee();
+ void openAddressBook();
+
+ void setEnableAttendeeInput( bool enabled );
+ void updateAttendeeInput();
+ void clearAttendeeInput();
+ void fillAttendeeInput( KCal::Attendee *a );
+ void updateAttendee();
+
+ protected:
+ KPIM::AddresseeLineEdit *mNameEdit;
+ QString mUid;
+ QComboBox* mRoleCombo;
+ QCheckBox* mRsvpButton;
+ QComboBox* mStatusCombo;
+
+ QHBox* mOrganizerHBox;
+ QComboBox *mOrganizerCombo; // either we organize it (combo shown)
+ QLabel *mOrganizerLabel; // or someone else does (just a label is shown)
+
+ QLabel* mDelegateLabel;
+
+ QPushButton* mAddButton;
+ QPushButton* mRemoveButton;
+ QPushButton* mAddressBookButton;
+
+ QPtrList<KCal::Attendee> mdelAttendees;
+ QPtrList<KCal::Attendee> mnewAttendees;
+
+ private:
+ bool mDisableItemUpdate;
+};
+
+#endif