kaddressbook

advancedcustomfields.h
1 /*
2  This file is part of KAddressbook.
3 
4  Copyright (c) 2004 Tobias Koenig <tokoe@kde.org>
5  Copyright (c) 2004 Cornelius Schumacher <schumacher@kde.org>
6 
7  This program is free software; you can redistribute it and/or modify
8  it under the terms of the GNU General Public License as published by
9  the Free Software Foundation; either version 2 of the License, or
10  (at your option) any later version.
11 
12  This program is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with this program; if not, write to the Free Software
19  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 
21  As a special exception, permission is given to link this program
22  with any edition of TQt, and distribute the resulting executable,
23  without including the source code for TQt in the source distribution.
24 */
25 
26 #ifndef ADVANCEDCUSTOMFIELDS_H
27 #define ADVANCEDCUSTOMFIELDS_H
28 
29 #include <tdelocale.h>
30 
31 #include <tqmap.h>
32 #include <tqpair.h>
33 #include <tqstringlist.h>
34 
35 #include <libtdepim/designerfields.h>
36 
37 #include "contacteditorwidget.h"
38 
39 class AdvancedCustomFields : public KAB::ContactEditorWidget
40 {
41  TQ_OBJECT
42 
43 
44  public:
45  AdvancedCustomFields( const TQString &uiFile, TDEABC::AddressBook *ab,
46  TQWidget *parent, const char *name = 0 );
47 
48  void loadContact( TDEABC::Addressee *addr );
49  void storeContact( TDEABC::Addressee *addr );
50  void setReadOnly( bool readOnly );
51 
52  TQString pageIdentifier() const;
53  TQString pageTitle() const;
54 
55  private:
56  void initGUI( const TQString& );
57 
58  KPIM::DesignerFields *mFields;
59 };
60 
61 #endif