-rw-r--r-- | kaddressbook/views/contactlistview.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/kaddressbook/views/contactlistview.cpp b/kaddressbook/views/contactlistview.cpp index 09d9c03..9accf78 100644 --- a/kaddressbook/views/contactlistview.cpp +++ b/kaddressbook/views/contactlistview.cpp | |||
@@ -225,69 +225,69 @@ ContactListView *ContactListViewItem::parent() | |||
225 | 225 | ||
226 | 226 | ||
227 | void ContactListViewItem::refresh() | 227 | void ContactListViewItem::refresh() |
228 | { | 228 | { |
229 | // Update our addressee, since it may have changed else were | 229 | // Update our addressee, since it may have changed else were |
230 | mAddressee = mDocument->findByUid(mAddressee.uid()); | 230 | mAddressee = mDocument->findByUid(mAddressee.uid()); |
231 | if (mAddressee.isEmpty()) | 231 | if (mAddressee.isEmpty()) |
232 | return; | 232 | return; |
233 | 233 | ||
234 | int i = 0; | 234 | int i = 0; |
235 | KABC::Field::List::ConstIterator it; | 235 | KABC::Field::List::ConstIterator it; |
236 | for( it = mFields.begin(); it != mFields.end(); ++it ) { | 236 | for( it = mFields.begin(); it != mFields.end(); ++it ) { |
237 | setText( i++, (*it)->value( mAddressee ) ); | 237 | setText( i++, (*it)->value( mAddressee ) ); |
238 | } | 238 | } |
239 | } | 239 | } |
240 | 240 | ||
241 | /////////////////////////////// | 241 | /////////////////////////////// |
242 | // ContactListView | 242 | // ContactListView |
243 | 243 | ||
244 | ContactListView::ContactListView(KAddressBookTableView *view, | 244 | ContactListView::ContactListView(KAddressBookTableView *view, |
245 | KABC::AddressBook* /* doc */, | 245 | KABC::AddressBook* /* doc */, |
246 | QWidget *parent, | 246 | QWidget *parent, |
247 | const char *name ) | 247 | const char *name ) |
248 | : KListView( parent, name ), | 248 | : KListView( parent, name ), |
249 | pabWidget( view ), | 249 | pabWidget( view ), |
250 | oldColumn( 0 ) | 250 | oldColumn( 0 ) |
251 | { | 251 | { |
252 | mFlagBlockKeyPressed = false; | 252 | mFlagBlockKeyPressed = false; |
253 | mFlagKeyPressed = false; | 253 | mFlagKeyPressed = false; |
254 | mABackground = true; | 254 | mABackground = true; |
255 | mSingleLine = false; | 255 | mSingleLine = false; |
256 | mToolTips = true; | 256 | mToolTips = true; |
257 | #ifndef KAB_EMBEDDED | 257 | |
258 | mAlternateColor = KGlobalSettings::alternateBackgroundColor(); | 258 | mAlternateColor = KGlobalSettings::alternateBackgroundColor(); |
259 | #else //KAB_EMBEDDED | 259 | |
260 | mAlternateColor = QColor(240, 240, 240); | 260 | |
261 | #endif //KAB_EMBEDDED | 261 | |
262 | 262 | ||
263 | setAlternateBackgroundEnabled(mABackground); | 263 | setAlternateBackgroundEnabled(mABackground); |
264 | setAcceptDrops( true ); | 264 | setAcceptDrops( true ); |
265 | viewport()->setAcceptDrops( true ); | 265 | viewport()->setAcceptDrops( true ); |
266 | setAllColumnsShowFocus( true ); | 266 | setAllColumnsShowFocus( true ); |
267 | setShowSortIndicator(true); | 267 | setShowSortIndicator(true); |
268 | 268 | ||
269 | setSelectionModeExt( KListView::Extended ); | 269 | setSelectionModeExt( KListView::Extended ); |
270 | setDropVisualizer(false); | 270 | setDropVisualizer(false); |
271 | // setFrameStyle(QFrame::NoFrame); | 271 | // setFrameStyle(QFrame::NoFrame); |
272 | //setLineWidth ( 0 ); | 272 | //setLineWidth ( 0 ); |
273 | //setMidLineWidth ( 0 ); | 273 | //setMidLineWidth ( 0 ); |
274 | //setMargin ( 0 ); | 274 | //setMargin ( 0 ); |
275 | #ifndef KAB_EMBEDDED | 275 | #ifndef KAB_EMBEDDED |
276 | connect(this, SIGNAL(dropped(QDropEvent*)), | 276 | connect(this, SIGNAL(dropped(QDropEvent*)), |
277 | this, SLOT(itemDropped(QDropEvent*))); | 277 | this, SLOT(itemDropped(QDropEvent*))); |
278 | #endif //KAB_EMBEDDED | 278 | #endif //KAB_EMBEDDED |
279 | 279 | ||
280 | 280 | ||
281 | new DynamicTip( this ); | 281 | new DynamicTip( this ); |
282 | } | 282 | } |
283 | void ContactListView::printMe() | 283 | void ContactListView::printMe() |
284 | { | 284 | { |
285 | #ifdef DESKTOP_VERSION | 285 | #ifdef DESKTOP_VERSION |
286 | QPrinter printer; | 286 | QPrinter printer; |
287 | if (!printer.setup() ) | 287 | if (!printer.setup() ) |
288 | return; | 288 | return; |
289 | QPainter p; | 289 | QPainter p; |
290 | p.begin ( &printer ); | 290 | p.begin ( &printer ); |
291 | QPaintDeviceMetrics m = QPaintDeviceMetrics ( &printer ); | 291 | QPaintDeviceMetrics m = QPaintDeviceMetrics ( &printer ); |
292 | float dx, dy; | 292 | float dx, dy; |
293 | int wid = (m.width() * 9)/10; | 293 | int wid = (m.width() * 9)/10; |