Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

dunpopup.cpp

Go to the documentation of this file.
00001 #include <qpe/qcopenvelope_qws.h>
00002 
00003 #include <qtimer.h>
00004 #include <opie2/odebug.h>
00005 using namespace Opie::Core;
00006 
00007 #include "dunpopup.h"
00008 
00009 using namespace OpieTooth;
00010 
00011 /*
00012  * c'tor init the QAction
00013  */
00014 DunPopup::DunPopup( OpieTooth::BTDeviceItem* item ) : QPopupMenu()  {
00015 
00016     owarn << "DunPopup c'tor" << oendl; 
00017 
00018     m_item = item;
00019     QAction *a, *b, *c;
00020 
00021     m_dunconnection = 0l;
00022     /* connect action */
00023 
00024 
00025     a = new QAction(); // so it's get deleted
00026     a->setText( tr("connect") );
00027     a->addTo( this );
00028     connect( a, SIGNAL( activated() ), this, SLOT( slotConnect() ) );
00029 
00030 
00031     b = new QAction();
00032     b->setText( tr( "connect+conf" ) );
00033     b->addTo( this );
00034     connect( b, SIGNAL( activated() ), this, SLOT( slotConnectAndConfig() ) );
00035 
00036     c = new QAction();
00037     c->setText( tr( "disconnect" ) );
00038     c->addTo( this );
00039     connect( c, SIGNAL( activated() ), this, SLOT( slotDisconnect() ) );
00040 
00041 };
00042 
00043 DunPopup::~DunPopup() {
00044 
00045 }
00046 
00047 void DunPopup::slotConnect() {
00048 
00049     m_dunconnection = new StartDunConnection( m_item->mac() );
00050     m_dunconnection->start();
00051 }
00052 
00053 void DunPopup::slotDisconnect()  {
00054     m_dunconnection->stop();
00055 }
00056 
00057 
00058 void DunPopup::slotConnectAndConfig() {
00059     slotConnect();
00060 
00061     // more intelligence here later like passing the device ( bnepX )
00062     QCopEnvelope e( "QPE/System", "execute(QString)" );
00063     e << QString( "networksettings" );
00064 
00065 }

Generated on Sat Nov 5 16:17:44 2005 for OPIE by  doxygen 1.4.2