addresseedialog.h
/*
This file is part of libkabc.
Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef KABC_ADDRESSEEDIALOG_H
#define KABC_ADDRESSEEDIALOG_H
#include <qdict.h>
#include <kdialogbase.h>
#include <klineedit.h>
#include <klistview.h>
#include "addressbook.h"
namespace KABC {
class KABC_EXPORT AddresseeItem : public QListViewItem
{
public:
enum columns { Name = 0, Email = 1 };
AddresseeItem( QListView *parent, const Addressee &addressee );
Addressee addressee() const { return mAddressee; }
virtual QString key( int column, bool ascending ) const;
private:
Addressee mAddressee;
};
class KABC_EXPORT AddresseeDialog : public KDialogBase
{
Q_OBJECT
public:
AddresseeDialog( QWidget *parent=0, bool multiple=false );
virtual ~AddresseeDialog();
Addressee addressee();
Addressee::List addressees();
static Addressee getAddressee( QWidget *parent );
static Addressee::List getAddressees( QWidget *parent );
private slots:
void selectItem( const QString & );
void updateEdit( QListViewItem *item );
void addSelected( QListViewItem *item );
void removeSelected();
protected slots:
void addressBookChanged();
private:
void loadAddressBook();
void addCompletionItem( const QString &str, QListViewItem *item );
bool mMultiple;
KListView *mAddresseeList;
KLineEdit *mAddresseeEdit;
KListView *mSelectedList;
AddressBook *mAddressBook;
QDict<QListViewItem> mItemDict;
QDict<QListViewItem> mSelectedDict;
class AddresseeDialogPrivate;
AddresseeDialogPrivate *d;
};
}
#endif
KABC::AddresseeItem
Special ListViewItem, that is used by the AddresseeDialog.
Definition: addresseedialog.h:37
KABC::AddresseeItem::columns
columns
Type of column.
Definition: addresseedialog.h:46
KDialogBase
KListView
KABC::AddresseeItem::addressee
Addressee addressee() const
Returns the addressee.
Definition: addresseedialog.h:59
KABC::Addressee
address book entry
Definition: addressee.src.h:74
KLineEdit
KABC::AddressBook
Address Book.
Definition: addressbook.h:43
KABC::AddresseeDialog
Dialog for selecting address book entries.
Definition: addresseedialog.h:83

KDE Home | KDE Accessibility Home | Description of Access Keys