summaryrefslogtreecommitdiffabout
path: root/kaddressbook/addresseeeditorwidget.h
authorzautrix <zautrix>2004-06-26 19:01:18 (UTC)
committer zautrix <zautrix>2004-06-26 19:01:18 (UTC)
commitb9aad1f15dc600e4dbe4c62d3fcced6363188ba3 (patch) (unidiff)
tree2c3d4004fb21c72cba65793859f9bcd8ffd3a49c /kaddressbook/addresseeeditorwidget.h
downloadkdepimpi-b9aad1f15dc600e4dbe4c62d3fcced6363188ba3.zip
kdepimpi-b9aad1f15dc600e4dbe4c62d3fcced6363188ba3.tar.gz
kdepimpi-b9aad1f15dc600e4dbe4c62d3fcced6363188ba3.tar.bz2
Initial revision
Diffstat (limited to 'kaddressbook/addresseeeditorwidget.h') (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/addresseeeditorwidget.h184
1 files changed, 184 insertions, 0 deletions
diff --git a/kaddressbook/addresseeeditorwidget.h b/kaddressbook/addresseeeditorwidget.h
new file mode 100644
index 0000000..b9d9e25
--- a/dev/null
+++ b/kaddressbook/addresseeeditorwidget.h
@@ -0,0 +1,184 @@
1/*
2 This file is part of KAddressBook.
3 Copyright (c) 2002 Mike Pilone <mpilone@slac.com>
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 ADDRESSEEEDITORWIDGET_H
25#define ADDRESSEEEDITORWIDGET_H
26
27#include <qdatetime.h>
28
29#include <kabc/addressee.h>
30#include <kdialogbase.h>
31#include <kjanuswidget.h>
32
33#include "extensionwidget.h"
34
35class AddresseeConfig;
36class QCheckBox;
37class QSpinBox;
38class QTabWidget;
39
40#ifndef KAB_EMBEDDED
41class QTextEdit;
42#else //KAB_EMBEDDED
43class QMultiLineEdit;
44#endif //KAB_EMBEDDED
45
46class KComboBox;
47class KDateEdit;
48class KLineEdit;
49class KSqueezedTextLabel;
50
51class AddressEditWidget;
52class EmailEditWidget;
53class GeoWidget;
54class ImageWidget;
55class KABCore;
56class KeyWidget;
57class PhoneEditWidget;
58class SecrecyWidget;
59class SoundWidget;
60
61namespace KPIM
62{
63 class CategorySelectDialog;
64 class CategoryEditDialog;
65}
66
67namespace KABC { class AddressBook; }
68
69class AddresseeEditorWidget : public ExtensionWidget
70{
71 Q_OBJECT
72
73 public:
74 AddresseeEditorWidget( KABCore *core, bool isExtension,
75 QWidget *parent, const char *name = 0 );
76 ~AddresseeEditorWidget();
77
78 void setAddressee( const KABC::Addressee& );
79 const KABC::Addressee &addressee();
80
81 void contactsSelectionChanged();
82
83 void load();
84 void save();
85
86 bool dirty();
87
88 QString title() const;
89 QString identifier() const;
90
91 protected slots:
92 void textChanged( const QString& );
93 void pageChanged( QWidget *wdg );
94
95 /**
96 Emits the modified signal and sets the dirty flag. Any slot
97 that modifies data should use this method instead of calling emit
98 modified() directly.
99 */
100 void emitModified();
101
102 void dateChanged( QDate );
103 void invalidDate();
104 void nameTextChanged( const QString& );
105 void nameBoxChanged();
106 void nameButtonClicked();
107 void categoryButtonClicked();
108
109 /**
110 Called whenever the categories change in the categories dialog.
111 */
112 void categoriesSelected( const QStringList& );
113
114 /**
115 Edits which categories are available in the CategorySelectDialog.
116 */
117 void editCategories();
118
119 private:
120 AddresseeConfig * mAConfig;
121 void initGUI();
122 void setupTab1();
123 void setupTab1_1();
124 void setupTab2();
125 void setupTab2_1();
126 void setupTab3();
127 void setupTab3_1();
128
129 KABC::Addressee mAddressee;
130 int mFormattedNameType;
131 bool mDirty;
132 bool mIsExtension;
133 bool mBlockSignals;
134
135 // GUI
136 KPIM::CategorySelectDialog *mCategoryDialog;
137 KPIM::CategoryEditDialog *mCategoryEditDialog;
138 QTabWidget *mTabWidget;
139
140 // Tab1 and Tab1_1
141 KLineEdit *mNameEdit;
142 KLineEdit *mRoleEdit;
143 KLineEdit *mOrgEdit;
144
145 KSqueezedTextLabel *mFormattedNameLabel;
146 AddressEditWidget *mAddressEditWidget;
147 EmailEditWidget *mEmailWidget;
148 PhoneEditWidget *mPhoneEditWidget;
149 KLineEdit *mURLEdit;
150 KLineEdit *mIMAddressEdit;
151 KLineEdit *mCategoryEdit;
152 SecrecyWidget *mSecrecyWidget;
153 KSqueezedTextLabel *mNameLabel;
154
155 // Tab2 and Tab2_2
156 KLineEdit *mDepartmentEdit;
157 KLineEdit *mOfficeEdit;
158 KLineEdit *mProfessionEdit;
159 KLineEdit *mManagerEdit;
160 KLineEdit *mAssistantEdit;
161 KLineEdit *mNicknameEdit;
162 KLineEdit *mSpouseEdit;
163 KDateEdit *mBirthdayPicker;
164 KDateEdit *mAnniversaryPicker;
165#ifndef KAB_EMBEDDED
166 QTextEdit *mNoteEdit;
167#else //KAB_EMBEDDED
168 QMultiLineEdit *mNoteEdit;
169#endif //KAB_EMBEDDED
170
171 QSpinBox *mTimeZoneSpin;
172 QSpinBox *mGeoLat;
173 QSpinBox *mGeoLon;
174
175 // Tab3
176 GeoWidget *mGeoWidget;
177 ImageWidget *mImageWidget;
178#ifndef KAB_EMBEDDED
179 SoundWidget *mSoundWidget;
180#endif //KAB_EMBEDDED
181 KeyWidget *mKeyWidget;
182};
183
184#endif