field.h
/*
This file is part of libkabc.
Copyright (c) 2002 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_FIELD_H
#define KABC_FIELD_H
#include <qstring.h>
#include <qvaluelist.h>
#include "addressee.h"
class KConfig;
namespace KABC {
class KABC_EXPORT Field
{
class FieldImpl;
friend class FieldImpl;
public:
typedef QValueList<Field *> List;
enum FieldCategory
{
All = 0x0,
Frequent = 0x01,
Address = 0x02,
Email = 0x04,
Personal = 0x08,
Organization = 0x10,
CustomCategory = 0x20
};
virtual QString label();
virtual int category();
static QString categoryLabel( int category );
virtual QString value( const KABC::Addressee & );
virtual bool setValue( KABC::Addressee &, const QString & );
QString sortKey( const KABC::Addressee & );
virtual bool isCustom();
virtual bool equals( Field *field );
static Field::List allFields();
static Field::List defaultFields();
static Field *createCustomField( const QString &label, int category,
const QString &key, const QString &app );
static void deleteFields();
static void saveFields( KConfig *cfg, const QString &identifier,
const Field::List &fields );
static void saveFields( const QString &identifier,
const Field::List &fields );
static Field::List restoreFields( KConfig *cfg, const QString &identifier );
static Field::List restoreFields( const QString &identifier );
protected:
static void createField( int id, int category = 0 );
static void createDefaultField( int id, int category = 0 );
private:
Field( FieldImpl * );
virtual ~Field();
FieldImpl *mImpl;
static Field::List mAllFields;
static Field::List mDefaultFields;
static Field::List mCustomFields;
};
}
#endif
KStdAccel::label
QString label(StdAccel id)
KABC::Addressee
address book entry
Definition: addressee.src.h:74
KConfig

KDE Home | KDE Accessibility Home | Description of Access Keys