summaryrefslogtreecommitdiffabout
path: root/kaddressbook
authorulf69 <ulf69>2004-10-28 00:21:13 (UTC)
committer ulf69 <ulf69>2004-10-28 00:21:13 (UTC)
commit621a8505690485db909a573f83433873197595c0 (patch) (unidiff)
tree1a37fcbdbf439b1d0411ee4d40973fce521be6ea /kaddressbook
parent0b7fefe9f97ced1e4b2d93d26e12385aadb7b7e9 (diff)
downloadkdepimpi-621a8505690485db909a573f83433873197595c0.zip
kdepimpi-621a8505690485db909a573f83433873197595c0.tar.gz
kdepimpi-621a8505690485db909a573f83433873197595c0.tar.bz2
implemented "nextView" QCop message to toggle between table and detailview
Diffstat (limited to 'kaddressbook') (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/kabcore.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp
index d1dcb6e..638abc9 100644
--- a/kaddressbook/kabcore.cpp
+++ b/kaddressbook/kabcore.cpp
@@ -325,48 +325,57 @@ KABCore::~KABCore()
325{ 325{
326 // save(); 326 // save();
327 //saveSettings(); 327 //saveSettings();
328 //KABPrefs::instance()->writeConfig(); 328 //KABPrefs::instance()->writeConfig();
329 delete AddresseeConfig::instance(); 329 delete AddresseeConfig::instance();
330 mAddressBook = 0; 330 mAddressBook = 0;
331 KABC::StdAddressBook::close(); 331 KABC::StdAddressBook::close();
332 332
333 delete syncManager; 333 delete syncManager;
334#ifndef DESKTOP_VERSION 334#ifndef DESKTOP_VERSION
335 if ( infrared ) 335 if ( infrared )
336 delete infrared; 336 delete infrared;
337#endif 337#endif
338} 338}
339void KABCore::receive( const QCString& cmsg, const QByteArray& data ) 339void KABCore::receive( const QCString& cmsg, const QByteArray& data )
340{ 340{
341 qDebug("KA: QCOP message received: %s ", cmsg.data() ); 341 qDebug("KA: QCOP message received: %s ", cmsg.data() );
342 if ( cmsg == "setDocument(QString)" ) { 342 if ( cmsg == "setDocument(QString)" ) {
343 QDataStream stream( data, IO_ReadOnly ); 343 QDataStream stream( data, IO_ReadOnly );
344 QString fileName; 344 QString fileName;
345 stream >> fileName; 345 stream >> fileName;
346 recieve( fileName ); 346 recieve( fileName );
347 return; 347 return;
348 } 348 }
349 else if ( cmsg == "nextView()" )
350 {
351 //toggle between details/ no details
352 bool b = !mActionDetails->isChecked();
353 setDetailsVisible( b );
354 mActionDetails->setChecked( b );
355 }
356
357
349} 358}
350void KABCore::toggleBeamReceive( ) 359void KABCore::toggleBeamReceive( )
351{ 360{
352 if ( mBRdisabled ) 361 if ( mBRdisabled )
353 return; 362 return;
354#ifndef DESKTOP_VERSION 363#ifndef DESKTOP_VERSION
355 if ( infrared ) { 364 if ( infrared ) {
356 qDebug("AB disable BeamReceive "); 365 qDebug("AB disable BeamReceive ");
357 delete infrared; 366 delete infrared;
358 infrared = 0; 367 infrared = 0;
359 mActionBR->setChecked(false); 368 mActionBR->setChecked(false);
360 return; 369 return;
361 } 370 }
362 qDebug("AB enable BeamReceive "); 371 qDebug("AB enable BeamReceive ");
363 mActionBR->setChecked(true); 372 mActionBR->setChecked(true);
364 373
365 infrared = new QCopChannel("QPE/Application/addressbook",this, "channelAB" ) ; 374 infrared = new QCopChannel("QPE/Application/addressbook",this, "channelAB" ) ;
366 QObject::connect( infrared, SIGNAL (received ( const QCString &, const QByteArray & )),this, SLOT(receive( const QCString&, const QByteArray& ))); 375 QObject::connect( infrared, SIGNAL (received ( const QCString &, const QByteArray & )),this, SLOT(receive( const QCString&, const QByteArray& )));
367#endif 376#endif
368} 377}
369 378
370 379
371void KABCore::disableBR(bool b) 380void KABCore::disableBR(bool b)
372{ 381{