kaddressbook Library API Documentation

addresseeeditorwidget.h

00001 #ifndef ADDRESSEEEDITORWIDGET_H
00002 #define ADDRESSEEEDITORWIDGET_H
00003 
00004 /*                                                                      
00005     This file is part of KAddressBook.                                  
00006     Copyright (c) 2002 Mike Pilone <mpilone@slac.com>                   
00007                                                                         
00008     This program is free software; you can redistribute it and/or modify
00009     it under the terms of the GNU General Public License as published by
00010     the Free Software Foundation; either version 2 of the License, or   
00011     (at your option) any later version.                                 
00012                                                                         
00013     This program is distributed in the hope that it will be useful,     
00014     but WITHOUT ANY WARRANTY; without even the implied warranty of      
00015     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the        
00016     GNU General Public License for more details.                        
00017                                                                         
00018     You should have received a copy of the GNU General Public License   
00019     along with this program; if not, write to the Free Software         
00020     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.           
00021                                                                         
00022     As a special exception, permission is given to link this program    
00023     with any edition of Qt, and distribute the resulting executable,    
00024     without including the source code for Qt in the source distribution.
00025 */                                                                      
00026 
00027 #include <qwidget.h>
00028 #include <qdatetime.h>
00029 
00030 #include <kdialogbase.h>
00031 #include <kjanuswidget.h>
00032 #include <kabc/addressee.h>
00033 
00034 class QCheckBox;
00035 class QTabWidget;
00036 class QTextEdit;
00037 class QSpinBox;
00038 
00039 class KLineEdit;
00040 class KComboBox;
00041 class KDateEdit;
00042 class KSqueezedTextLabel;
00043 
00044 class EmailEditWidget;
00045 class AddressEditWidget;
00046 class PhoneEditWidget;
00047 
00048 namespace KPIM
00049 {
00050   class CategorySelectDialog;
00051   class CategoryEditDialog;
00052 }
00053 
00054 namespace KABC { class AddressBook; }
00055 
00056 class AddresseeEditorWidget : public QWidget
00057 {
00058   Q_OBJECT
00059   
00060   public:
00061     AddresseeEditorWidget( QWidget *parent, const char *name = 0 );
00062     ~AddresseeEditorWidget();  
00063 
00064     void setAddressee(const KABC::Addressee &a);
00065     const KABC::Addressee &addressee();
00066   
00067     void load();
00068     void save();
00069     
00070     bool dirty();
00071     
00072   signals:
00073     void modified();
00074   
00075   protected slots:
00076     void textChanged(const QString &);
00077     void pageChanged(QWidget *wdg);
00078     
00083     void emitModified();
00084     void dateChanged(QDate);
00085     void invalidDate();
00086     void nameTextChanged(const QString &);
00087     void nameBoxChanged();
00088     void nameButtonClicked();
00089     void categoryButtonClicked();
00090     void formattedNameChanged(const QString &);
00091     
00094     void categoriesSelected(const QStringList &);
00095     
00098     void editCategories();
00099     
00100   private:
00101     void initGUI();
00102     void setupTab1();
00103     void setupTab2();
00104     void setupTab3();
00105     
00106     KABC::Addressee mAddressee;
00107     bool mDirty;
00108     
00109     // GUI
00110     KPIM::CategorySelectDialog *mCategoryDialog;
00111     KPIM::CategoryEditDialog *mCategoryEditDialog;
00112     QTabWidget *mTabWidget;
00113     
00114     // Tab1
00115     KLineEdit *mNameEdit;
00116     KLineEdit *mRoleEdit;
00117     KLineEdit *mOrgEdit;
00118     KComboBox *mFormattedNameBox;
00119     EmailEditWidget *mEmailWidget;
00120     AddressEditWidget *mAddressEditWidget;
00121     PhoneEditWidget *mPhoneEditWidget;
00122     KLineEdit *mURLEdit;
00123     KLineEdit *mIMAddressEdit;
00124     KLineEdit *mCategoryEdit;
00125     KSqueezedTextLabel *mNameLabel;
00126     
00127     // Tab2
00128     KLineEdit *mDepartmentEdit;
00129     KLineEdit *mOfficeEdit;
00130     KLineEdit *mProfessionEdit;
00131     KLineEdit *mManagerEdit;
00132     KLineEdit *mAssistantEdit;
00133     KLineEdit *mNicknameEdit;
00134     KLineEdit *mSpouseEdit;
00135     KDateEdit *mBirthdayPicker;
00136     KDateEdit *mAnniversaryPicker;
00137     QTextEdit *mNoteEdit;
00138     QSpinBox *mTimeZoneSpin;
00139     QSpinBox *mGeoLat;
00140     QSpinBox *mGeoLon;
00141 };
00142 
00143 #endif
KDE Logo
This file is part of the documentation for kdelibs Version 3.1.5.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Sun Feb 15 11:40:36 2004 by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2001