Need to store config when changing units, if not very bad things happen
[kdepim.git] / kaddressbook / viewconfigurefieldspage.h
blob27b421c6f11cd76a0e781bb64b63089782833e31
1 /*
2 This file is part of KAddressBook.
3 Copyright (c) 2002 Tobias Koenig <tokoe@kde.org>
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.
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.
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.
19 As a special exception, permission is given to link this program
20 with any edition of Qt, and distribute the resulting executable,
21 without including the source code for Qt in the source distribution.
24 #ifndef VIEWCONFIGUREFIELDSPAGE_H
25 #define VIEWCONFIGUREFIELDSPAGE_H
27 #include <qwidget.h>
29 #include <kabc/field.h>
30 #include <kabc/addressbook.h>
32 class KComboBox;
33 class QListBox;
34 class QListBoxItem;
35 class QPushButton;
36 class QToolButton;
38 class ViewConfigureFieldsPage : public QWidget
40 Q_OBJECT
42 public:
43 ViewConfigureFieldsPage( KABC::AddressBook *ab, QWidget *parent = 0,
44 const char *name = 0 );
46 void restoreSettings( KConfig* );
47 void saveSettings( KConfig* );
49 public slots:
50 void slotSelect();
51 void slotUnSelect();
52 void slotMoveUp();
53 void slotMoveDown();
55 void slotShowFields( int );
56 void slotButtonsEnabled();
58 private:
59 void initGUI();
61 KComboBox *mCategoryCombo;
62 QListBox *mSelectedBox;
63 QListBox *mUnSelectedBox;
64 QToolButton *mAddButton;
65 QToolButton *mRemoveButton;
66 QToolButton *mUpButton;
67 QToolButton *mDownButton;
69 KABC::AddressBook *mAddressBook;
72 #endif