kaddressbook Library API Documentation

addresseeeditorwidget.h

00001 /* 00002 This file is part of KAddressBook. 00003 Copyright (c) 2002 Mike Pilone <mpilone@slac.com> 00004 00005 This program is free software; you can redistribute it and/or modify 00006 it under the terms of the GNU General Public License as published by 00007 the Free Software Foundation; either version 2 of the License, or 00008 (at your option) any later version. 00009 00010 This program 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 00013 GNU General Public License for more details. 00014 00015 You should have received a copy of the GNU General Public License 00016 along with this program; if not, write to the Free Software 00017 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00018 00019 As a special exception, permission is given to link this program 00020 with any edition of Qt, and distribute the resulting executable, 00021 without including the source code for Qt in the source distribution. 00022 */ 00023 00024 #ifndef ADDRESSEEEDITORWIDGET_H 00025 #define ADDRESSEEEDITORWIDGET_H 00026 00027 #include <qdatetime.h> 00028 00029 #include <kabc/addressee.h> 00030 #include <kdialogbase.h> 00031 #include <kjanuswidget.h> 00032 00033 #include "extensionwidget.h" 00034 00035 class QCheckBox; 00036 class QSpinBox; 00037 class QTabWidget; 00038 class QTextEdit; 00039 00040 class KComboBox; 00041 class KDateEdit; 00042 class KLineEdit; 00043 class KSqueezedTextLabel; 00044 00045 class AddressEditWidget; 00046 class EmailEditWidget; 00047 class GeoWidget; 00048 class ImageWidget; 00049 class KeyWidget; 00050 class PhoneEditWidget; 00051 class SecrecyWidget; 00052 class SoundWidget; 00053 00054 namespace KAB { 00055 class Core; 00056 } 00057 00058 namespace KPIM { 00059 class CategorySelectDialog; 00060 class CategoryEditDialog; 00061 } 00062 00063 namespace KABC { class AddressBook; } 00064 00065 class AddresseeEditorWidget : public KAB::ExtensionWidget 00066 { 00067 Q_OBJECT 00068 00069 public: 00070 AddresseeEditorWidget( KAB::Core *core, bool isExtension, 00071 QWidget *parent, const char *name = 0 ); 00072 ~AddresseeEditorWidget(); 00073 00074 void setAddressee( const KABC::Addressee& ); 00075 const KABC::Addressee &addressee(); 00076 00077 void contactsSelectionChanged(); 00078 00079 void load(); 00080 void save(); 00081 00082 bool dirty(); 00083 00084 QString title() const; 00085 QString identifier() const; 00086 00087 protected slots: 00088 void textChanged( const QString& ); 00089 void pageChanged( QWidget *wdg ); 00090 00096 void emitModified(); 00097 00098 void dateChanged( QDate ); 00099 void invalidDate(); 00100 void nameTextChanged( const QString& ); 00101 void nameBoxChanged(); 00102 void nameButtonClicked(); 00103 void categoryButtonClicked(); 00104 00108 void categoriesSelected( const QStringList& ); 00109 00113 void editCategories(); 00114 00115 private: 00116 void initGUI(); 00117 void setupTab1(); 00118 void setupTab2(); 00119 void setupTab3(); 00120 00121 void setReadOnly( bool ); 00122 00123 KABC::Addressee mAddressee; 00124 int mFormattedNameType; 00125 bool mDirty; 00126 bool mIsExtension; 00127 bool mBlockSignals; 00128 bool mReadOnly; 00129 00130 // GUI 00131 KPIM::CategorySelectDialog *mCategoryDialog; 00132 KPIM::CategoryEditDialog *mCategoryEditDialog; 00133 QTabWidget *mTabWidget; 00134 00135 // Tab1 00136 KLineEdit *mNameEdit; 00137 KLineEdit *mRoleEdit; 00138 KLineEdit *mOrgEdit; 00139 KSqueezedTextLabel *mFormattedNameLabel; 00140 AddressEditWidget *mAddressEditWidget; 00141 EmailEditWidget *mEmailWidget; 00142 PhoneEditWidget *mPhoneEditWidget; 00143 KLineEdit *mURLEdit; 00144 KLineEdit *mIMAddressEdit; 00145 QPushButton *mCategoryButton; 00146 KLineEdit *mCategoryEdit; 00147 SecrecyWidget *mSecrecyWidget; 00148 KSqueezedTextLabel *mNameLabel; 00149 00150 // Tab2 00151 KLineEdit *mDepartmentEdit; 00152 KLineEdit *mOfficeEdit; 00153 KLineEdit *mProfessionEdit; 00154 KLineEdit *mManagerEdit; 00155 KLineEdit *mAssistantEdit; 00156 KLineEdit *mNicknameEdit; 00157 KLineEdit *mSpouseEdit; 00158 KDateEdit *mBirthdayPicker; 00159 KDateEdit *mAnniversaryPicker; 00160 QTextEdit *mNoteEdit; 00161 QSpinBox *mTimeZoneSpin; 00162 QSpinBox *mGeoLat; 00163 QSpinBox *mGeoLon; 00164 00165 // Tab3 00166 GeoWidget *mGeoWidget; 00167 ImageWidget *mPhotoWidget; 00168 ImageWidget *mLogoWidget; 00169 SoundWidget *mSoundWidget; 00170 KeyWidget *mKeyWidget; 00171 }; 00172 00173 #endif
KDE Logo
This file is part of the documentation for kaddressbook Library Version 3.2.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Jul 28 23:58:07 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003