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 "addresseeeditorbase.h" 00034 #include "contacteditorwidgetmanager.h" 00035 #include "extensionwidget.h" 00036 00037 class QCheckBox; 00038 class QSpinBox; 00039 class QTabWidget; 00040 class QTextEdit; 00041 00042 class KComboBox; 00043 class KDateEdit; 00044 class KLineEdit; 00045 class KSqueezedTextLabel; 00046 00047 class AddressEditWidget; 00048 class EmailEditWidget; 00049 class KeyWidget; 00050 class PhoneEditWidget; 00051 class SecrecyWidget; 00052 00053 namespace KAB { 00054 class Core; 00055 } 00056 00057 namespace KPIM { 00058 class AddresseeLineEdit; 00059 class CategorySelectDialog; 00060 class CategoryEditDialog; 00061 } 00062 00063 namespace KABC { class AddressBook; } 00064 00065 class AddresseeEditorWidget : public AddresseeEditorBase 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 load(); 00078 void save(); 00079 00080 bool dirty(); 00081 00082 QString title() const; 00083 QString identifier() const; 00084 00085 void setInitialFocus(); 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 organizationTextChanged( const QString& ); 00102 void nameBoxChanged(); 00103 void nameButtonClicked(); 00104 void categoryButtonClicked(); 00105 00109 void categoriesSelected( const QStringList& ); 00110 00114 void editCategories(); 00115 00116 private: 00117 void initGUI(); 00118 void setupTab1(); 00119 void setupTab2(); 00120 void setupAdditionalTabs(); 00121 void setupCustomFieldsTabs(); 00122 00123 void setReadOnly( bool ); 00124 00125 KABC::Addressee mAddressee; 00126 int mFormattedNameType; 00127 bool mDirty; 00128 bool mBlockSignals; 00129 bool mReadOnly; 00130 00131 // GUI 00132 KPIM::CategorySelectDialog *mCategoryDialog; 00133 KPIM::CategoryEditDialog *mCategoryEditDialog; 00134 QTabWidget *mTabWidget; 00135 00136 // Tab1 00137 KLineEdit *mNameEdit; 00138 KLineEdit *mRoleEdit; 00139 KLineEdit *mOrgEdit; 00140 KSqueezedTextLabel *mFormattedNameLabel; 00141 AddressEditWidget *mAddressEditWidget; 00142 EmailEditWidget *mEmailWidget; 00143 PhoneEditWidget *mPhoneEditWidget; 00144 KLineEdit *mURLEdit; 00145 KLineEdit *mIMAddressEdit; 00146 QPushButton *mCategoryButton; 00147 KLineEdit *mCategoryEdit; 00148 SecrecyWidget *mSecrecyWidget; 00149 KSqueezedTextLabel *mNameLabel; 00150 00151 // Tab2 00152 KLineEdit *mDepartmentEdit; 00153 KLineEdit *mOfficeEdit; 00154 KLineEdit *mProfessionEdit; 00155 KPIM::AddresseeLineEdit *mManagerEdit; 00156 KPIM::AddresseeLineEdit *mAssistantEdit; 00157 KLineEdit *mNicknameEdit; 00158 KPIM::AddresseeLineEdit *mSpouseEdit; 00159 KDateEdit *mBirthdayPicker; 00160 KDateEdit *mAnniversaryPicker; 00161 QTextEdit *mNoteEdit; 00162 00163 QDict<ContactEditorTabPage> mTabPages; 00164 }; 00165 00166 #endif
KDE Logo
This file is part of the documentation for kaddressbook Library Version 3.3.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Thu Oct 21 19:46:36 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003