libkdepim Library API Documentation

addresseeview.h

00001 /* 00002 This file is part of libkdepim. 00003 00004 Copyright (c) 2003 Tobias Koenig <tokoe@kde.org> 00005 00006 This library is free software; you can redistribute it and/or 00007 modify it under the terms of the GNU Library General Public 00008 License as published by the Free Software Foundation; either 00009 version 2 of the License, or (at your option) any later version. 00010 00011 This library is distributed in the hope that it will be useful, 00012 but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 Library General Public License for more details. 00015 00016 You should have received a copy of the GNU Library General Public License 00017 along with this library; see the file COPYING.LIB. If not, write to 00018 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 00019 Boston, MA 02111-1307, USA. 00020 */ 00021 00022 #ifndef KPIM_ADDRESSEEVIEW_H 00023 #define KPIM_ADDRESSEEVIEW_H 00024 00025 #include <qcstring.h> 00026 00027 #include <kabc/addressee.h> 00028 #include <ktextbrowser.h> 00029 00030 namespace KIO { 00031 class Job; 00032 } 00033 class KToggleAction; 00034 00035 class QPopupMenu; 00036 00037 namespace KPIM { 00038 00039 class AddresseeView : public KTextBrowser 00040 { 00041 Q_OBJECT 00042 00043 public: 00050 AddresseeView( QWidget *parent = 0, const char *name = 0, 00051 KConfig *config = 0 ); 00052 00053 ~AddresseeView(); 00054 00060 void setAddressee( const KABC::Addressee& addr ); 00061 00065 KABC::Addressee addressee() const; 00066 00067 signals: 00068 void urlHighlighted( const QString &url ); 00069 void emailHighlighted( const QString &email ); 00070 void phoneNumberHighlighted( const QString &number ); 00071 void faxNumberHighlighted( const QString &number ); 00072 00073 void highlightedMessage( const QString &message ); 00074 00075 protected: 00076 virtual void urlClicked( const QString &url ); 00077 virtual void emailClicked( const QString &mail ); 00078 virtual void phoneNumberClicked( const QString &number ); 00079 virtual void faxNumberClicked( const QString &number ); 00080 00081 virtual QPopupMenu *createPopupMenu( const QPoint& ); 00082 00083 private slots: 00084 void slotMailClicked( const QString&, const QString& ); 00085 void slotUrlClicked( const QString& ); 00086 void slotHighlighted( const QString& ); 00087 void configChanged(); 00088 00089 void data( KIO::Job*, const QByteArray& ); 00090 void result( KIO::Job* ); 00091 00092 private: 00093 void load(); 00094 void save(); 00095 00096 void updateView(); 00097 00098 QString strippedNumber( const QString &number ); 00099 00100 KConfig *mConfig; 00101 bool mDefaultConfig; 00102 00103 QByteArray mImageData; 00104 KIO::Job *mImageJob; 00105 00106 KToggleAction *mActionShowBirthday; 00107 KToggleAction *mActionShowAddresses; 00108 KToggleAction *mActionShowEmails; 00109 KToggleAction *mActionShowPhones; 00110 KToggleAction *mActionShowURLs; 00111 00112 KABC::Addressee mAddressee; 00113 00114 class AddresseeViewPrivate; 00115 AddresseeViewPrivate *d; 00116 }; 00117 00118 } 00119 00120 #endif
KDE Logo
This file is part of the documentation for libkdepim Library Version 3.2.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Jul 28 23:57:46 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003