kabc
addresseedialog.h
00001 /* 00002 This file is part of libkabc. 00003 Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> 00004 00005 This library is free software; you can redistribute it and/or 00006 modify it under the terms of the GNU Library General Public 00007 License as published by the Free Software Foundation; either 00008 version 2 of the License, or (at your option) any later version. 00009 00010 This library is distributed in the hope that it will be useful, 00011 but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 Library General Public License for more details. 00014 00015 You should have received a copy of the GNU Library General Public License 00016 along with this library; see the file COPYING.LIB. If not, write to 00017 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00018 Boston, MA 02110-1301, USA. 00019 */ 00020 00021 #ifndef KABC_ADDRESSEEDIALOG_H 00022 #define KABC_ADDRESSEEDIALOG_H 00023 00024 #include "kabc_export.h" 00025 #ifndef KDEPIM_NO_KRESOURCES 00026 #include "addressbook.h" 00027 #else 00028 #include "addressee.h" 00029 #endif 00030 00031 #include <kdialog.h> 00032 #include <klineedit.h> 00033 00034 #include <QtCore/QHash> 00035 #include <QtCore/QString> 00036 #include <QtGui/QTreeWidgetItem> 00037 00038 namespace KABC { 00039 00043 class KABC_EXPORT AddresseeItem : public QTreeWidgetItem 00044 { 00045 public: 00046 00050 enum Columns { 00051 Name = 0, 00052 Email = 1 00053 }; 00054 00061 AddresseeItem( QTreeWidget *parent, const Addressee &addressee ); 00062 00066 ~AddresseeItem(); 00067 00071 Addressee addressee() const; 00072 00076 virtual QString key( int column, bool ascending ) const; 00077 00078 private: 00079 class Private; 00080 Private *const d; 00081 00082 Q_DISABLE_COPY( AddresseeItem ) 00083 }; 00084 00098 class KABC_EXPORT_DEPRECATED AddresseeDialog : public KDialog 00099 { 00100 Q_OBJECT 00101 00102 public: 00109 explicit AddresseeDialog( QWidget *parent = 0, bool multiple = false ); 00110 00114 virtual ~AddresseeDialog(); 00115 00121 Addressee addressee() const; 00122 00126 Addressee::List addressees() const; 00127 00137 static Addressee getAddressee( QWidget *parent ); 00138 00148 static Addressee::List getAddressees( QWidget *parent ); 00149 00150 private: 00151 class Private; 00152 Private *const d; 00153 00154 Q_PRIVATE_SLOT( d, void addressBookChanged() ) 00155 Q_PRIVATE_SLOT( d, void selectItem( const QString & ) ) 00156 Q_PRIVATE_SLOT( d, void updateEdit() ) 00157 Q_PRIVATE_SLOT( d, void addSelected( QTreeWidgetItem * ) ) 00158 Q_PRIVATE_SLOT( d, void removeSelected() ) 00159 }; 00160 00161 } 00162 #endif
This file is part of the KDE documentation.
Documentation copyright © 1996-2012 The KDE developers.
Generated on Mon Aug 27 2012 22:10:23 by doxygen 1.7.5 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2012 The KDE developers.
Generated on Mon Aug 27 2012 22:10:23 by doxygen 1.7.5 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.