korganizer

koeditordetails.h
1/*
2 This file is part of KOrganizer.
3 Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org>
4 Copyright (C) 2003-2004 Reinhold Kainhofer <reinhold@kainhofer.com>
5
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19
20 As a special exception, permission is given to link this program
21 with any edition of TQt, and distribute the resulting executable,
22 without including the source code for TQt in the source distribution.
23*/
24#ifndef _KOEDITORDETAILS_H
25#define _KOEDITORDETAILS_H
26
27#include <tdelistview.h>
28#include "customlistviewitem.h"
29#include "koattendeeeditor.h"
30
31#include <libkcal/attendee.h>
32
33class TQPushButton;
34class TQCheckBox;
35class TQLineEdit;
36class TQLabel;
37class TQComboBox;
38class TQHBox;
39class KDateEdit;
40class KOEditorFreeBusy;
41
42namespace KCal {
43class Attendee;
44class Incidence;
45}
46using namespace KCal;
47
48namespace KPIM {
49class AddresseeLineEdit;
50}
51
52typedef CustomListViewItem<KCal::Attendee *> AttendeeListItem;
53
54
60class KOAttendeeListView : public TDEListView
61{
62TQ_OBJECT
63
64public:
65 KOAttendeeListView (TQWidget *parent=0, const char *name=0);
66 virtual ~KOAttendeeListView();
67 virtual void addAttendee( const TQString& newAttendee );
68public slots:
69 virtual void contentsDragEnterEvent( TQDragEnterEvent *e );
70 virtual void dragEnterEvent( TQDragEnterEvent *e );
71 virtual void contentsDropEvent( TQDropEvent *e );
72 virtual void dropEvent( TQDropEvent *e );
73 virtual void contentsDragMoveEvent(TQDragMoveEvent *e);
74signals:
75 void dropped(Attendee*);
76};
77
78
79class KOEditorDetails : public KOAttendeeEditor
80{
81 TQ_OBJECT
82
83 public:
84 KOEditorDetails (int spacing = 8,TQWidget* parent = 0, const char* name = 0);
85 virtual ~KOEditorDetails();
86
88 void setDefaults();
90 void readEvent(Incidence *);
92 void writeEvent(Incidence *);
93
95 bool validateInput();
96
98 bool hasAttendees();
99
100 void insertAttendee( Attendee *a, bool goodEmailAddress = true );
101 void removeAttendee( Attendee *a );
102
103 protected slots:
104 void removeAttendee();
105 void slotInsertAttendee( Attendee *a );
106
107 protected:
108 void setSelected ( int index );
109 int selectedIndex();
110 void changeStatusForMe( Attendee::PartStat status );
111
112 KCal::Attendee* currentAttendee() const;
113 /* reimpl */
114 TQListViewItem* hasExampleAttendee() const;
115 void updateCurrentItem();
116
117 private:
118 bool mDisableItemUpdate;
119
120 TDEListView *mListView;
121// KOEditorFreeBusy *mFreeBusy;
122};
123
124#endif
Common base class for attendee editor and free busy view.
KOAttendeeListView is a child class of TDEListView which supports dropping of attendees (e....
virtual ~KOAttendeeListView()
KOAttendeeListView is a child class of TDEListView which supports dropping of attendees (e....