author | zautrix <zautrix> | 2005-08-10 12:07:33 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-08-10 12:07:33 (UTC) |
commit | a238b7709a6abcf39dc5f79c26270d04bf18f00c (patch) (unidiff) | |
tree | 7e87a8bcdfbc65f1e7fbfe1690a5f2ac36f69815 | |
parent | 722a463b47ba8fe2dbf52329fec27af4125d530b (diff) | |
download | kdepimpi-a238b7709a6abcf39dc5f79c26270d04bf18f00c.zip kdepimpi-a238b7709a6abcf39dc5f79c26270d04bf18f00c.tar.gz kdepimpi-a238b7709a6abcf39dc5f79c26270d04bf18f00c.tar.bz2 |
fixx
-rw-r--r-- | kaddressbook/addresseeeditorwidget.cpp | 32 | ||||
-rw-r--r-- | kaddressbook/addresseeeditorwidget.h | 2 |
2 files changed, 28 insertions, 6 deletions
diff --git a/kaddressbook/addresseeeditorwidget.cpp b/kaddressbook/addresseeeditorwidget.cpp index 29abd6f..310d628 100644 --- a/kaddressbook/addresseeeditorwidget.cpp +++ b/kaddressbook/addresseeeditorwidget.cpp | |||
@@ -190,3 +190,5 @@ void AddresseeEditorWidget::setupTab1() | |||
190 | 190 | ||
191 | label = new QLabel( i18n( "Role:" ), tab1 ); | 191 | button = new QPushButton( i18n( "Role:" ), tab1 ); |
192 | connect( button, SIGNAL( clicked() ), SLOT( setRole2FN() ) ); | ||
193 | //label = new QLabel( i18n( "Role:" ), tab1 ); | ||
192 | mRoleEdit = new KLineEdit( tab1 ); | 194 | mRoleEdit = new KLineEdit( tab1 ); |
@@ -194,4 +196,4 @@ void AddresseeEditorWidget::setupTab1() | |||
194 | SLOT( textChanged( const QString& ) ) ); | 196 | SLOT( textChanged( const QString& ) ) ); |
195 | label->setBuddy( mRoleEdit ); | 197 | //label->setBuddy( mRoleEdit ); |
196 | layout->addWidget( label, 1, 0 ); | 198 | layout->addWidget( button, 1, 0 ); |
197 | layout->addWidget( mRoleEdit, 1, 1 ); | 199 | layout->addWidget( mRoleEdit, 1, 1 ); |
@@ -199,8 +201,10 @@ void AddresseeEditorWidget::setupTab1() | |||
199 | // Organization | 201 | // Organization |
200 | label = new QLabel( i18n( "Organization:" ), tab1 ); | 202 | button = new QPushButton( i18n( "Organization:" ), tab1 ); |
203 | connect( button, SIGNAL( clicked() ), SLOT( setCompany2FN() ) ); | ||
204 | //label = new QLabel( i18n( "Organization:" ), tab1 ); | ||
201 | mOrgEdit = new KLineEdit( tab1 ); | 205 | mOrgEdit = new KLineEdit( tab1 ); |
202 | label->setBuddy( mOrgEdit ); | 206 | //label->setBuddy( mOrgEdit ); |
203 | connect( mOrgEdit, SIGNAL( textChanged( const QString& ) ), | 207 | connect( mOrgEdit, SIGNAL( textChanged( const QString& ) ), |
204 | SLOT( textChanged( const QString& ) ) ); | 208 | SLOT( textChanged( const QString& ) ) ); |
205 | layout->addWidget( label, 2, 0 ); | 209 | layout->addWidget( button, 2, 0 ); |
206 | layout->addWidget( mOrgEdit, 2, 1 ); | 210 | layout->addWidget( mOrgEdit, 2, 1 ); |
@@ -327,2 +331,18 @@ void AddresseeEditorWidget::setupTab1() | |||
327 | 331 | ||
332 | void AddresseeEditorWidget::setRole2FN() | ||
333 | { | ||
334 | if ( mRoleEdit->text().isEmpty() ) return; | ||
335 | mFormattedNameType = NameEditDialog::CustomName; | ||
336 | mAddressee.setFormattedName( mRoleEdit->text() ); | ||
337 | mFormattedNameLabel->setText( mRoleEdit->text() ); | ||
338 | mDirty = true; | ||
339 | } | ||
340 | void AddresseeEditorWidget::setCompany2FN() | ||
341 | { | ||
342 | if ( mOrgEdit->text().isEmpty() ) return; | ||
343 | mFormattedNameType = NameEditDialog::CustomName; | ||
344 | mAddressee.setFormattedName( mOrgEdit->text() ); | ||
345 | mFormattedNameLabel->setText( mOrgEdit->text() ); | ||
346 | mDirty = true; | ||
347 | } | ||
328 | 348 | ||
diff --git a/kaddressbook/addresseeeditorwidget.h b/kaddressbook/addresseeeditorwidget.h index 995f30e..eaf5b16 100644 --- a/kaddressbook/addresseeeditorwidget.h +++ b/kaddressbook/addresseeeditorwidget.h | |||
@@ -91,2 +91,4 @@ class AddresseeEditorWidget : public ExtensionWidget | |||
91 | protected slots: | 91 | protected slots: |
92 | void setRole2FN(); | ||
93 | void setCompany2FN(); | ||
92 | void textChanged( const QString& ); | 94 | void textChanged( const QString& ); |