kaddressbook

stylepage.h
1/*
2 This file is part of KAddressBook.
3 Copyright (c) 2002 Anders Lund <anders.lund@lund.tdcadsl.dk>
4 Tobias Koenig <tokoe@kde.org>
5
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19
20 As a special exception, permission is given to link this program
21 with any edition of TQt, and distribute the resulting executable,
22 without including the source code for TQt in the source distribution.
23*/
24
25#ifndef STYLEPAGE_H
26#define STYLEPAGE_H
27
28#include <tqwidget.h>
29
30#include <tdeabc/addressbook.h>
31#include <tdeabc/field.h>
32
33class TQLabel;
34class TQPixmap;
35class TQRadioButton;
36class KComboBox;
37
38class StylePage : public TQWidget
39{
40 TQ_OBJECT
41
42
43 public:
44 StylePage( TDEABC::AddressBook *ab, TQWidget* parent = 0, const char* name = 0 );
45 ~StylePage();
46
51 void setPreview( const TQPixmap &pixmap );
52
56 void addStyleName( const TQString &name );
57
61 void clearStyleNames();
62
66 void setSortField( TDEABC::Field *field );
67
71 TDEABC::Field* sortField();
72
76 void setSortAscending( bool value = true );
77
81 bool sortAscending();
82
83 signals:
88 void styleChanged( int index );
89
90 private:
91 void initGUI();
92 void initFieldCombo();
93
94 KComboBox *mFieldCombo;
95 KComboBox *mSortTypeCombo;
96 KComboBox *mStyleCombo;
97 TQLabel *mPreview;
98
99 TDEABC::AddressBook *mAddressBook;
100 TDEABC::Field::List mFields;
101};
102
103#endif // STYLEPAGE_H