Diffstat (limited to 'core/pim/addressbook/contacteditor.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/pim/addressbook/contacteditor.cpp | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/core/pim/addressbook/contacteditor.cpp b/core/pim/addressbook/contacteditor.cpp index 0b65a10..df97b85 100644 --- a/core/pim/addressbook/contacteditor.cpp +++ b/core/pim/addressbook/contacteditor.cpp | |||
@@ -44,12 +44,13 @@ | |||
44 | #include <qpopupmenu.h> | 44 | #include <qpopupmenu.h> |
45 | #include <qlistbox.h> | 45 | #include <qlistbox.h> |
46 | #include <qhbox.h> | 46 | #include <qhbox.h> |
47 | #include <qaction.h> | 47 | #include <qaction.h> |
48 | #include <qiconset.h> | 48 | #include <qiconset.h> |
49 | #include <qmessagebox.h> | 49 | #include <qmessagebox.h> |
50 | #include <qwhatsthis.h> | ||
50 | 51 | ||
51 | #include <assert.h> | 52 | #include <assert.h> |
52 | 53 | ||
53 | static inline bool containsAlphaNum( const QString &str ); | 54 | static inline bool containsAlphaNum( const QString &str ); |
54 | static inline bool constainsWhiteSpace( const QString &str ); | 55 | static inline bool constainsWhiteSpace( const QString &str ); |
55 | 56 | ||
@@ -62,14 +63,14 @@ void parseEmailFrom( const QString &txt, QString &strDefaultEmail, | |||
62 | void parseEmailTo( const QString &strDefaultEmail, | 63 | void parseEmailTo( const QString &strDefaultEmail, |
63 | const QString &strOtherEmail, QString &strBack ); | 64 | const QString &strOtherEmail, QString &strBack ); |
64 | 65 | ||
65 | ContactEditor::ContactEditor(const OContact &entry, | 66 | ContactEditor::ContactEditor(const OContact &entry, |
66 | QWidget *parent, | 67 | QWidget *parent, |
67 | const char *name, | 68 | const char *name, |
68 | WFlags fl ) | 69 | WFlags ) |
69 | : QDialog( parent, name, TRUE, fl ), | 70 | : QDialog( parent, name, TRUE, WStyle_ContextHelp ), |
70 | defaultEmailChooserPosition( -1 ), | 71 | defaultEmailChooserPosition( -1 ), |
71 | m_personalView ( false ), | 72 | m_personalView ( false ), |
72 | cmbDefaultEmail( 0 ), | 73 | cmbDefaultEmail( 0 ), |
73 | initializing ( false ) | 74 | initializing ( false ) |
74 | { | 75 | { |
75 | 76 | ||
@@ -145,68 +146,80 @@ void ContactEditor::init() { | |||
145 | svGeneral->addChild( container ); | 146 | svGeneral->addChild( container ); |
146 | 147 | ||
147 | QGridLayout *gl = new QGridLayout( container, 1, 1, 2, 4 ); | 148 | QGridLayout *gl = new QGridLayout( container, 1, 1, 2, 4 ); |
148 | gl->setResizeMode( QLayout::FreeResize ); | 149 | gl->setResizeMode( QLayout::FreeResize ); |
149 | 150 | ||
150 | btnFullName = new QPushButton( tr( "Full Name..." ), container ); | 151 | btnFullName = new QPushButton( tr( "Full Name..." ), container ); |
152 | QWhatsThis::add( btnFullName, tr( "Press to enter last- middle and firstname" ) ); | ||
151 | gl->addWidget( btnFullName, 0, 0 ); | 153 | gl->addWidget( btnFullName, 0, 0 ); |
152 | txtFullName = new QLineEdit( container ); | 154 | txtFullName = new QLineEdit( container ); |
155 | QWhatsThis::add( txtFullName, tr( "Enter fullname directly ! If you have a lastname with multiple words ( for instance \"de la Guerra\"), please write <lastname>,<firstnames> like this: \"de la Guerra, Carlos Pedro\"" ) ); | ||
153 | gl->addWidget( txtFullName, 0, 1 ); | 156 | gl->addWidget( txtFullName, 0, 1 ); |
154 | 157 | ||
155 | QLabel *l = new QLabel( tr( "Job Title" ), container ); | 158 | QLabel *l = new QLabel( tr( "Job Title" ), container ); |
159 | QWhatsThis::add( l, tr( "The jobtitle.." ) ); | ||
156 | gl->addWidget( l, 1, 0 ); | 160 | gl->addWidget( l, 1, 0 ); |
157 | txtJobTitle = new QLineEdit( container ); | 161 | txtJobTitle = new QLineEdit( container ); |
162 | QWhatsThis::add( txtJobTitle, tr( "The jobtitle.." ) ); | ||
158 | gl->addWidget( txtJobTitle, 1, 1 ); | 163 | gl->addWidget( txtJobTitle, 1, 1 ); |
159 | 164 | ||
160 | l = new QLabel( tr("Suffix"), container ); | 165 | l = new QLabel( tr("Suffix"), container ); |
166 | QWhatsThis::add( l, tr( "Something like \"jr.\".." ) ); | ||
161 | gl->addWidget( l, 2, 0 ); | 167 | gl->addWidget( l, 2, 0 ); |
162 | txtSuffix = new QLineEdit( container ); | 168 | txtSuffix = new QLineEdit( container ); |
169 | QWhatsThis::add( txtSuffix, tr( "Something like \"jr.\".." ) ); | ||
163 | gl->addWidget( txtSuffix, 2, 1 ); | 170 | gl->addWidget( txtSuffix, 2, 1 ); |
164 | 171 | ||
165 | l = new QLabel( tr( "Organization" ), container ); | 172 | l = new QLabel( tr( "Organization" ), container ); |
173 | QWhatsThis::add( l, tr( "The working place of the contact" ) ); | ||
166 | gl->addWidget( l, 3, 0 ); | 174 | gl->addWidget( l, 3, 0 ); |
167 | txtOrganization = new QLineEdit( container ); | 175 | txtOrganization = new QLineEdit( container ); |
176 | QWhatsThis::add( txtOrganization, tr( "The working place of the contact" ) ); | ||
168 | gl->addWidget( txtOrganization, 3, 1 ); | 177 | gl->addWidget( txtOrganization, 3, 1 ); |
169 | 178 | ||
170 | // Chooser 1 | 179 | // Chooser 1 |
171 | cmbChooserField1 = new QComboBox( FALSE, container ); | 180 | cmbChooserField1 = new QComboBox( FALSE, container ); |
181 | QWhatsThis::add( cmbChooserField1, tr( "Press to select attribute to change" ) ); | ||
172 | cmbChooserField1->setMaximumWidth( 90 ); | 182 | cmbChooserField1->setMaximumWidth( 90 ); |
173 | gl->addWidget( cmbChooserField1, 4, 0 ); | 183 | gl->addWidget( cmbChooserField1, 4, 0 ); |
174 | // Textfield for chooser 1. | 184 | // Textfield for chooser 1. |
175 | // Now use Widgetstack to contain the textfield and the default-email combo ! | 185 | // Now use Widgetstack to contain the textfield and the default-email combo ! |
176 | m_widgetStack1 = new QWidgetStack( container ); | 186 | m_widgetStack1 = new QWidgetStack( container ); |
177 | txtChooserField1 = new QLineEdit( m_widgetStack1 ); | 187 | txtChooserField1 = new QLineEdit( m_widgetStack1 ); |
178 | m_widgetStack1 -> addWidget( txtChooserField1, TextField ); | 188 | m_widgetStack1 -> addWidget( txtChooserField1, TextField ); |
179 | gl->addWidget( m_widgetStack1, 4, 1 ); | 189 | gl->addWidget( m_widgetStack1, 4, 1 ); |
180 | m_widgetStack1 -> raiseWidget( TextField ); | 190 | m_widgetStack1 -> raiseWidget( TextField ); |
181 | 191 | ||
182 | // Chooser 2 | 192 | // Chooser 2 |
183 | cmbChooserField2 = new QComboBox( FALSE, container ); | 193 | cmbChooserField2 = new QComboBox( FALSE, container ); |
194 | QWhatsThis::add( cmbChooserField2, tr( "Press to select attribute to change" ) ); | ||
184 | cmbChooserField2->setMaximumWidth( 90 ); | 195 | cmbChooserField2->setMaximumWidth( 90 ); |
185 | gl->addWidget( cmbChooserField2, 5, 0 ); | 196 | gl->addWidget( cmbChooserField2, 5, 0 ); |
186 | // Textfield for chooser 2 | 197 | // Textfield for chooser 2 |
187 | // Now use WidgetStack to contain the textfield and the default-email combo! | 198 | // Now use WidgetStack to contain the textfield and the default-email combo! |
188 | m_widgetStack2 = new QWidgetStack( container ); | 199 | m_widgetStack2 = new QWidgetStack( container ); |
189 | txtChooserField2 = new QLineEdit( m_widgetStack2 ); | 200 | txtChooserField2 = new QLineEdit( m_widgetStack2 ); |
190 | m_widgetStack2 -> addWidget( txtChooserField2, TextField ); | 201 | m_widgetStack2 -> addWidget( txtChooserField2, TextField ); |
191 | gl->addWidget( m_widgetStack2, 5, 1 ); | 202 | gl->addWidget( m_widgetStack2, 5, 1 ); |
192 | m_widgetStack2 -> raiseWidget( TextField ); | 203 | m_widgetStack2 -> raiseWidget( TextField ); |
193 | 204 | ||
194 | // Chooser 3 | 205 | // Chooser 3 |
195 | cmbChooserField3 = new QComboBox( FALSE, container ); | 206 | cmbChooserField3 = new QComboBox( FALSE, container ); |
207 | QWhatsThis::add( cmbChooserField3, tr( "Press to select attribute to change" ) ); | ||
196 | cmbChooserField3->setMaximumWidth( 90 ); | 208 | cmbChooserField3->setMaximumWidth( 90 ); |
197 | gl->addWidget( cmbChooserField3, 6, 0 ); | 209 | gl->addWidget( cmbChooserField3, 6, 0 ); |
198 | // Textfield for chooser 2 | 210 | // Textfield for chooser 2 |
199 | // Now use WidgetStack to contain the textfield and the default-email combo! | 211 | // Now use WidgetStack to contain the textfield and the default-email combo! |
200 | m_widgetStack3 = new QWidgetStack( container ); | 212 | m_widgetStack3 = new QWidgetStack( container ); |
201 | txtChooserField3 = new QLineEdit( m_widgetStack3 ); | 213 | txtChooserField3 = new QLineEdit( m_widgetStack3 ); |
202 | m_widgetStack3 -> addWidget( txtChooserField3, TextField ); | 214 | m_widgetStack3 -> addWidget( txtChooserField3, TextField ); |
203 | gl->addWidget( m_widgetStack3, 6, 1 ); | 215 | gl->addWidget( m_widgetStack3, 6, 1 ); |
204 | m_widgetStack3 -> raiseWidget( TextField ); | 216 | m_widgetStack3 -> raiseWidget( TextField ); |
205 | 217 | ||
206 | l = new QLabel( tr( "File As" ), container ); | 218 | l = new QLabel( tr( "File As" ), container ); |
219 | QWhatsThis::add( l, tr( "Press to select how to store the name (and howto show it in the listview)" ) ); | ||
207 | gl->addWidget( l, 7, 0 ); | 220 | gl->addWidget( l, 7, 0 ); |
208 | cmbFileAs = new QComboBox( TRUE, container ); | 221 | cmbFileAs = new QComboBox( TRUE, container ); |
209 | gl->addWidget( cmbFileAs, 7, 1 ); | 222 | gl->addWidget( cmbFileAs, 7, 1 ); |
210 | 223 | ||
211 | labCat = new QLabel( tr( "Category" ), container ); | 224 | labCat = new QLabel( tr( "Category" ), container ); |
212 | gl->addWidget( labCat, 8, 0 ); | 225 | gl->addWidget( labCat, 8, 0 ); |