~ubuntu-branches/ubuntu/oneiric/kdepim/oneiric-updates

« back to all changes in this revision

Viewing changes to korganizer/koeditordetails.h

  • Committer: Package Import Robot
  • Author(s): Philip Muškovac
  • Date: 2011-06-28 19:33:24 UTC
  • mfrom: (0.2.13) (0.1.13 sid)
  • Revision ID: package-import@ubuntu.com-20110628193324-8yvjs8sdv9rdoo6c
Tags: 4:4.7.0-0ubuntu1
* New upstream release
  - update install files
  - add missing kdepim-doc package to control file
  - Fix Vcs lines
  - kontact breaks/replaces korganizer << 4:4.6.80
  - tighten the dependency of kdepim-dev on libkdepim4 to fix lintian error

Show diffs side-by-side

added added

removed removed

Lines of Context:
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 along
17
 
  with this program; if not, write to the Free Software Foundation, Inc.,
18
 
  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 Qt, and distribute the resulting executable,
22
 
  without including the source code for Qt in the source distribution.
23
 
*/
24
 
#ifndef KOEDITORDETAILS_H
25
 
#define KOEDITORDETAILS_H
26
 
 
27
 
#include "customlistviewitem.h"
28
 
#include "koattendeeeditor.h"
29
 
 
30
 
#include <K3ListView>
31
 
 
32
 
namespace KCal {
33
 
  class Attendee;
34
 
  class Incidence;
35
 
}
36
 
using namespace KCal;
37
 
 
38
 
typedef CustomListViewItem<KCal::Attendee *> AttendeeListItem;
39
 
 
40
 
/** KOAttendeeListView is a child class of K3ListView  which supports
41
 
 *  dropping of attendees (e.g. from kaddressbook) onto it. If an attendeee
42
 
 *  was dropped, the signal dropped(Attendee*)  is emitted.
43
 
 */
44
 
class KOAttendeeListView : public K3ListView
45
 
{
46
 
  Q_OBJECT
47
 
  public:
48
 
    KOAttendeeListView( QWidget *parent=0 );
49
 
    virtual ~KOAttendeeListView();
50
 
    virtual void addAttendee( const QString &newAttendee );
51
 
 
52
 
#ifndef KORG_NODND
53
 
  public slots:
54
 
    virtual void contentsDragEnterEvent( QDragEnterEvent *e );
55
 
    virtual void dragEnterEvent( QDragEnterEvent *e );
56
 
    virtual void contentsDropEvent( QDropEvent *e );
57
 
    virtual void dropEvent( QDropEvent *e );
58
 
    virtual void contentsDragMoveEvent( QDragMoveEvent *e );
59
 
 
60
 
  signals:
61
 
    void dropped( Attendee * );
62
 
#endif
63
 
};
64
 
 
65
 
class KOEditorDetails : public KOAttendeeEditor
66
 
{
67
 
  Q_OBJECT
68
 
  public:
69
 
    explicit KOEditorDetails( int spacing = 8, QWidget *parent = 0 );
70
 
    virtual ~KOEditorDetails();
71
 
 
72
 
    /** Set widgets to default values */
73
 
    void setDefaults();
74
 
 
75
 
    /** Read incidence and setup widgets accordingly */
76
 
    void readIncidence( Incidence *incidence );
77
 
 
78
 
    /** Write settings to incidence */
79
 
    void fillIncidence( Incidence *incidence );
80
 
 
81
 
    /** Check if the input is valid. */
82
 
    bool validateInput();
83
 
 
84
 
    /** Returns whether at least one attendee was added */
85
 
    bool hasAttendees();
86
 
 
87
 
    void insertAttendee( Attendee *, bool goodEmailAddress=true );
88
 
 
89
 
  protected slots:
90
 
    void removeAttendee();
91
 
    void slotInsertAttendee( Attendee *a );
92
 
 
93
 
  protected:
94
 
    void changeStatusForMe( Attendee::PartStat status );
95
 
 
96
 
    KCal::Attendee *currentAttendee() const;
97
 
    /* reimpl */
98
 
    Q3ListViewItem *hasExampleAttendee() const;
99
 
    void updateCurrentItem();
100
 
 
101
 
  private:
102
 
    bool mDisableItemUpdate;
103
 
 
104
 
    K3ListView *mListView;
105
 
};
106
 
 
107
 
#endif