kaddressbook

kaddressbookmain.h
1 /*
2  This file is part of KAddressbook.
3  Copyright (c) 1999 Don Sanders <dsanders@kde.org>
4 
5  This program is free software; you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation; either version 2 of the License, or
8  (at your option) any later version.
9 
10  This program is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License
16  along with this program; if not, write to the Free Software
17  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 
19  As a special exception, permission is given to link this program
20  with any edition of TQt, and distribute the resulting executable,
21  without including the source code for TQt in the source distribution.
22 */
23 
24 #ifndef KADDRESSBOOKMAIN_H
25 #define KADDRESSBOOKMAIN_H
26 
27 #include <tqptrlist.h>
28 
29 #include <tdeaction.h>
30 #include <tdeapplication.h>
31 #include <tdemainwindow.h>
32 
33 #include "kaddressbookiface.h"
34 
35 class KABCore;
36 
45 class KAddressBookMain : public TDEMainWindow, virtual public KAddressBookIface
46 {
47  TQ_OBJECT
48 
49 
50  public:
51  KAddressBookMain( const TQString &file = TQString() );
52  virtual ~KAddressBookMain();
53 
54  public slots:
55  virtual void addEmail( TQString addr );
56  virtual void importVCard( const KURL& url );
57  virtual void importVCardFromData( const TQString& vCard );
58 #ifndef Q_MOC_RUN
59  virtual ASYNC showContactEditor( TQString uid );
60 #else // QT_MOC_RUN
61  virtual void showContactEditor( TQString uid );
62 #endif // QT_MOC_RUN
63  virtual void newContact();
64  virtual void newDistributionList();
65  virtual TQString getNameByPhone( TQString phone );
66  virtual void save();
67  virtual void exit();
68  virtual bool handleCommandLine();
69  virtual void syncAllResources();
70 
71  protected:
72  void initActions();
73 
78  void saveProperties( TDEConfig* );
79 
85  void readProperties( TDEConfig* );
86 
87  virtual bool queryClose();
88 
89  //override
90  void loadProfile( const TQString& path );
91 
92  //override
93  void saveToProfile( const TQString& path ) const;
94 
95  private slots:
96  void configureKeyBindings();
97  void configureToolbars();
98  void newToolbarConfig();
99 
100  private:
101  KABCore *mCore;
102 };
103 
104 #endif
This class serves as the main window for KAddressBook.
void saveProperties(TDEConfig *)
This function is called when it is time for the app to save its properties for session management pur...
void readProperties(TDEConfig *)
This function is called when this app is restored.