00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef KADDRESSBOOKMAIN_H
00025 #define KADDRESSBOOKMAIN_H
00026
00027 #include <tqptrlist.h>
00028
00029 #include <kaction.h>
00030 #include <kapplication.h>
00031 #include <kmainwindow.h>
00032
00033 #include "kaddressbookiface.h"
00034
00035 class KABCore;
00036
00045 class KAddressBookMain : public KMainWindow, virtual public KAddressBookIface
00046 {
00047 Q_OBJECT
00048 TQ_OBJECT
00049
00050 public:
00051 KAddressBookMain( const TQString &file = TQString() );
00052 virtual ~KAddressBookMain();
00053
00054 public slots:
00055 virtual void addEmail( TQString addr );
00056 virtual void importVCard( const KURL& url );
00057 virtual void importVCardFromData( const TQString& vCard );
00058 #ifndef Q_MOC_RUN
00059 virtual ASYNC showContactEditor( TQString uid );
00060 #else // QT_MOC_RUN
00061 virtual void showContactEditor( TQString uid );
00062 #endif // QT_MOC_RUN
00063 virtual void newContact();
00064 virtual void newDistributionList();
00065 virtual TQString getNameByPhone( TQString phone );
00066 virtual void save();
00067 virtual void exit();
00068 virtual bool handleCommandLine();
00069 virtual void syncAllResources();
00070
00071 protected:
00072 void initActions();
00073
00078 void saveProperties( KConfig* );
00079
00085 void readProperties( KConfig* );
00086
00087 virtual bool queryClose();
00088
00089
00090 void loadProfile( const TQString& path );
00091
00092
00093 void saveToProfile( const TQString& path ) const;
00094
00095 private slots:
00096 void configureKeyBindings();
00097 void configureToolbars();
00098 void newToolbarConfig();
00099
00100 private:
00101 KABCore *mCore;
00102 };
00103
00104 #endif