summaryrefslogtreecommitdiffabout
path: root/kaddressbook/details/detailsviewcontainer.cpp
Unidiff
Diffstat (limited to 'kaddressbook/details/detailsviewcontainer.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/details/detailsviewcontainer.cpp11
1 files changed, 1 insertions, 10 deletions
diff --git a/kaddressbook/details/detailsviewcontainer.cpp b/kaddressbook/details/detailsviewcontainer.cpp
index ceffc77..229cce0 100644
--- a/kaddressbook/details/detailsviewcontainer.cpp
+++ b/kaddressbook/details/detailsviewcontainer.cpp
@@ -116,48 +116,39 @@ void ViewContainer::slotStyleSelected( int index )
116 } 116 }
117 117
118 KABLookFactory *factory = mLookFactories.at( index ); 118 KABLookFactory *factory = mLookFactories.at( index );
119 119
120 mCurrentLook = factory->create(); 120 mCurrentLook = factory->create();
121 mDetailsStack->raiseWidget( mCurrentLook ); 121 mDetailsStack->raiseWidget( mCurrentLook );
122 122
123 connect( mCurrentLook, SIGNAL( sendEmail( const QString& ) ), this, 123 connect( mCurrentLook, SIGNAL( sendEmail( const QString& ) ), this,
124 SIGNAL( sendEmail( const QString& ) ) ); 124 SIGNAL( sendEmail( const QString& ) ) );
125 connect( mCurrentLook, SIGNAL( browse( const QString& ) ), this, 125 connect( mCurrentLook, SIGNAL( browse( const QString& ) ), this,
126 SIGNAL( browse( const QString& ) ) ); 126 SIGNAL( browse( const QString& ) ) );
127 } 127 }
128 128
129 mCurrentLook->restoreSettings( config ); 129 mCurrentLook->restoreSettings( config );
130 mCurrentLook->setAddressee( addr ); 130 mCurrentLook->setAddressee( addr );
131} 131}
132void ViewContainer::refreshView()
133{
134 if ( mCurrentLook ) {
135 mCurrentLook->setAddressee( mCurrentAddressee );
136 }
137}
138 132
139void ViewContainer::setAddressee( const KABC::Addressee& addressee ) 133void ViewContainer::setAddressee( const KABC::Addressee& addressee )
140{ 134{
141 if ( mCurrentLook != 0 ) { 135 if ( mCurrentLook != 0 ) {
142 if ( addressee == mCurrentAddressee )
143 return;
144 else {
145 mCurrentAddressee = addressee; 136 mCurrentAddressee = addressee;
146 mCurrentLook->setAddressee( mCurrentAddressee ); 137 mCurrentLook->setAddressee( mCurrentAddressee );
147 } 138
148 } 139 }
149} 140}
150 141
151KABC::Addressee ViewContainer::addressee() 142KABC::Addressee ViewContainer::addressee()
152{ 143{
153 static KABC::Addressee empty; // do not use! 144 static KABC::Addressee empty; // do not use!
154 145
155 if ( !mCurrentLook ) 146 if ( !mCurrentLook )
156 return empty; 147 return empty;
157 else 148 else
158 return mCurrentLook->addressee(); 149 return mCurrentLook->addressee();
159} 150}
160 151
161void ViewContainer::setReadOnly( bool state ) 152void ViewContainer::setReadOnly( bool state )
162{ 153{
163 if ( mCurrentLook ) 154 if ( mCurrentLook )