kaddressbook
addresseeeditorwidget.h
Go to the documentation of this file.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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 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 <QtCore/QHash> 00028 #include <kabc/addressee.h> 00029 #include <kdialog.h> 00030 00031 #include "addresseeeditorbase.h" 00032 #include "contacteditorwidgetmanager.h" 00033 #include "extensionwidget.h" 00034 #include "ui_addresseditgeneraltab.h" 00035 #include "ui_addresseditdetailstab.h" 00036 00037 class QTabWidget; 00038 class QTextEdit; 00039 00040 class KLineEdit; 00041 class KSqueezedTextLabel; 00042 00043 class AddressEditWidget; 00044 class EmailEditWidget; 00045 class IMEditWidget; 00046 class PhoneEditWidget; 00047 class SecrecyWidget; 00048 00049 00050 namespace KPIM { 00051 class AddresseeLineEdit; 00052 class CategorySelectDialog; 00053 class CategoryEditDialog; 00054 class KDateEdit; 00055 } 00056 00057 namespace KABC { class AddressBook; } 00058 00059 class AddresseeEditorWidget : public AddresseeEditorBase 00060 { 00061 Q_OBJECT 00062 00063 public: 00064 AddresseeEditorWidget( QWidget *parent ); 00065 ~AddresseeEditorWidget(); 00066 00067 void setAddressee( const KABC::Addressee& ); 00068 const KABC::Addressee &addressee(); 00069 00070 void load(); 00071 void save(); 00072 00073 bool dirty(); 00074 00075 void setInitialFocus(); 00076 00077 bool readyToClose(); 00078 00079 protected Q_SLOTS: 00080 void textChanged( const QString& ); 00081 void pageChanged( QWidget *wdg ); 00082 00088 void emitModified(); 00089 00090 void dateChanged( const QDate& ); 00091 void invalidDate(); 00092 void nameTextChanged( const QString& ); 00093 void organizationTextChanged( const QString& ); 00094 void nameBoxChanged(); 00095 void nameButtonClicked(); 00096 void selectCategories(); 00097 00101 void categoriesSelected( const QStringList& ); 00102 00106 void editCategories(); 00107 00108 private: 00109 void initGUI(); 00110 void setupTab1(); 00111 void setupTab2(); 00112 void setupAdditionalTabs(); 00113 void setupCustomFieldsTabs(); 00114 00115 void setReadOnly( bool ); 00116 00117 KABC::Addressee mAddressee; 00118 int mFormattedNameType; 00119 bool mDirty; 00120 bool mBlockSignals; 00121 bool mReadOnly; 00122 00123 // GUI 00124 KPIM::CategorySelectDialog *mCategorySelectDialog; 00125 KPIM::CategoryEditDialog *mCategoryEditDialog; 00126 QTabWidget *mTabWidget; 00127 00128 // Tab1 00129 Ui::tab1 tab1; 00130 IMEditWidget *mIMWidget; 00131 KSqueezedTextLabel *mNameLabel; 00132 00133 // Tab2 00134 Ui::tab2 tab2; 00135 00136 QHash<QString, ContactEditorTabPage*> mTabPages; 00137 }; 00138 00139 #endif
KDE 4.2 API Reference