summaryrefslogtreecommitdiffabout
path: root/kaddressbook/details/detailsviewcontainer.h
Unidiff
Diffstat (limited to 'kaddressbook/details/detailsviewcontainer.h') (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/details/detailsviewcontainer.h103
1 files changed, 103 insertions, 0 deletions
diff --git a/kaddressbook/details/detailsviewcontainer.h b/kaddressbook/details/detailsviewcontainer.h
new file mode 100644
index 0000000..b561d12
--- a/dev/null
+++ b/kaddressbook/details/detailsviewcontainer.h
@@ -0,0 +1,103 @@
1/*
2 This file is part of KAddressBook.
3 Copyright (c) 1996-2002 Mirko Boehm <mirko@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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18
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.
22*/
23
24#ifndef DETAILSVIEWCONTAINER_H
25#define DETAILSVIEWCONTAINER_H
26
27#include <qptrlist.h>
28
29#include "look_basic.h"
30
31class QComboBox;
32class QWidgetStack;
33
34class ViewContainer : public QWidget
35{
36 Q_OBJECT
37
38 public:
39 ViewContainer( QWidget *parent = 0, const char* name = 0 );
40
41 /**
42 Return the look currently selected. If there is none, it
43 returns zero. Do not use this pointer to store a reference
44 to a look, the user might select another one (e.g., create
45 a new object) at any time.
46 */
47 KABBasicLook *currentLook();
48 void refreshView();
49 /**
50 Return the contact currently displayed.
51 */
52 KABC::Addressee addressee();
53
54 public slots:
55 /**
56 Set the contact currently displayed.
57 */
58 void setAddressee( const KABC::Addressee& addressee );
59
60 /**
61 Set read-write state.
62 */
63 void setReadOnly( bool state );
64
65 signals:
66 /**
67 The contact has been changed.
68 */
69 void addresseeChanged();
70
71 /**
72 The user acticated the email address displayed. This may happen
73 by, for example, clicking on the displayed mailto-URL.
74 */
75 void sendEmail( const QString& );
76
77 /**
78 The user activated one of the displayed HTTP URLs. For example
79 by clicking on the displayed homepage address.
80 */
81 void browse( const QString& );
82
83 protected:
84 /**
85 A style has been selected. Overloaded from base class.
86 */
87 void slotStyleSelected( int );
88
89 /**
90 Register the available looks.
91 */
92 void registerLooks();
93
94 private:
95 KABC::Addressee mCurrentAddressee;
96 KABBasicLook *mCurrentLook;
97 QPtrList<KABLookFactory> mLookFactories;
98
99 QComboBox *mStyleCombo;
100 QWidgetStack *mDetailsStack;
101};
102
103#endif