summaryrefslogtreecommitdiffabout
authorulf69 <ulf69>2004-09-02 23:28:05 (UTC)
committer ulf69 <ulf69>2004-09-02 23:28:05 (UTC)
commit546841acf4cdfd83d576cdd2a5ddbcc94c3921f6 (patch) (unidiff)
tree8b3c70012f7c00e5585c91bd6e689ea784ed56f2
parenta2d8fcc8f1fcd64c01e41cb8ba31ae17a5ea5a8b (diff)
downloadkdepimpi-546841acf4cdfd83d576cdd2a5ddbcc94c3921f6.zip
kdepimpi-546841acf4cdfd83d576cdd2a5ddbcc94c3921f6.tar.gz
kdepimpi-546841acf4cdfd83d576cdd2a5ddbcc94c3921f6.tar.bz2
sourceforge 1014894: display contact name in Edit Contact dialog header
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/addresseeeditordialog.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/kaddressbook/addresseeeditordialog.cpp b/kaddressbook/addresseeeditordialog.cpp
index 5e42640..a84fc61 100644
--- a/kaddressbook/addresseeeditordialog.cpp
+++ b/kaddressbook/addresseeeditordialog.cpp
@@ -45,48 +45,50 @@ AddresseeEditorDialog::AddresseeEditorDialog( KABCore *core, QWidget *parent,
45 45
46 QVBoxLayout *layout = new QVBoxLayout( page ); 46 QVBoxLayout *layout = new QVBoxLayout( page );
47 47
48 mEditorWidget = new AddresseeEditorWidget( core, false, page ); 48 mEditorWidget = new AddresseeEditorWidget( core, false, page );
49 connect( mEditorWidget, SIGNAL( modified( const KABC::Addressee::List& ) ), 49 connect( mEditorWidget, SIGNAL( modified( const KABC::Addressee::List& ) ),
50 SLOT( widgetModified() ) ); 50 SLOT( widgetModified() ) );
51 layout->addWidget( mEditorWidget ); 51 layout->addWidget( mEditorWidget );
52 52
53 enableButton( KDialogBase::Apply, false ); 53 enableButton( KDialogBase::Apply, false );
54 if ( QApplication::desktop()->width() < 480 ) { 54 if ( QApplication::desktop()->width() < 480 ) {
55 hideButtons(); 55 hideButtons();
56 } 56 }
57} 57}
58 58
59AddresseeEditorDialog::~AddresseeEditorDialog() 59AddresseeEditorDialog::~AddresseeEditorDialog()
60{ 60{
61 //emit editorDestroyed( mEditorWidget->addressee().uid() ); 61 //emit editorDestroyed( mEditorWidget->addressee().uid() );
62} 62}
63 63
64void AddresseeEditorDialog::setAddressee( const KABC::Addressee &addr ) 64void AddresseeEditorDialog::setAddressee( const KABC::Addressee &addr )
65{ 65{
66 enableButton( KDialogBase::Apply, false ); 66 enableButton( KDialogBase::Apply, false );
67 67
68 mEditorWidget->setAddressee( addr ); 68 mEditorWidget->setAddressee( addr );
69
70 this->setCaption("Edit " + addr.formattedName());
69} 71}
70 72
71KABC::Addressee AddresseeEditorDialog::addressee() 73KABC::Addressee AddresseeEditorDialog::addressee()
72{ 74{
73 return mEditorWidget->addressee(); 75 return mEditorWidget->addressee();
74} 76}
75 77
76bool AddresseeEditorDialog::dirty() 78bool AddresseeEditorDialog::dirty()
77{ 79{
78 return mEditorWidget->dirty(); 80 return mEditorWidget->dirty();
79} 81}
80 82
81void AddresseeEditorDialog::slotApply() 83void AddresseeEditorDialog::slotApply()
82{ 84{
83 if ( mEditorWidget->dirty() ) { 85 if ( mEditorWidget->dirty() ) {
84 mEditorWidget->save(); 86 mEditorWidget->save();
85 emit contactModified( mEditorWidget->addressee() ); 87 emit contactModified( mEditorWidget->addressee() );
86 } 88 }
87 89
88 enableButton( KDialogBase::Apply, false ); 90 enableButton( KDialogBase::Apply, false );
89 91
90 KDialogBase::slotApply(); 92 KDialogBase::slotApply();
91} 93}
92 94