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) (side-by-side diff)
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) (show 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
@@ -317,64 +317,73 @@ KABCore::KABCore( KXMLGUIClient *client, bool readWrite, QWidget *parent, const
mBRdisabled = false;
#ifndef DESKTOP_VERSION
infrared = 0;
#endif
//toggleBeamReceive( );
}
KABCore::~KABCore()
{
// save();
//saveSettings();
//KABPrefs::instance()->writeConfig();
delete AddresseeConfig::instance();
mAddressBook = 0;
KABC::StdAddressBook::close();
delete syncManager;
#ifndef DESKTOP_VERSION
if ( infrared )
delete infrared;
#endif
}
void KABCore::receive( const QCString& cmsg, const QByteArray& data )
{
qDebug("KA: QCOP message received: %s ", cmsg.data() );
if ( cmsg == "setDocument(QString)" ) {
QDataStream stream( data, IO_ReadOnly );
QString fileName;
stream >> fileName;
recieve( fileName );
return;
}
+ else if ( cmsg == "nextView()" )
+ {
+ //toggle between details/ no details
+ bool b = !mActionDetails->isChecked();
+ setDetailsVisible( b );
+ mActionDetails->setChecked( b );
+ }
+
+
}
void KABCore::toggleBeamReceive( )
{
if ( mBRdisabled )
return;
#ifndef DESKTOP_VERSION
if ( infrared ) {
qDebug("AB disable BeamReceive ");
delete infrared;
infrared = 0;
mActionBR->setChecked(false);
return;
}
qDebug("AB enable BeamReceive ");
mActionBR->setChecked(true);
infrared = new QCopChannel("QPE/Application/addressbook",this, "channelAB" ) ;
QObject::connect( infrared, SIGNAL (received ( const QCString &, const QByteArray & )),this, SLOT(receive( const QCString&, const QByteArray& )));
#endif
}
void KABCore::disableBR(bool b)
{
#ifndef DESKTOP_VERSION
if ( b ) {
if ( infrared ) {
toggleBeamReceive( );
}
mBRdisabled = true;
} else {
if ( mBRdisabled ) {