00001
00002 #include "pppdialog.h"
00003 #include "rfcpopup.h"
00004 #include "rfcommassigndialogimpl.h"
00005
00006
00007 #include <qpe/qpeapplication.h>
00008 #include <opie2/odebug.h>
00009 using namespace Opie::Core;
00010
00011
00012 #include <qtimer.h>
00013
00014 using namespace OpieTooth;
00015
00016
00017
00018
00019 RfcCommPopup::RfcCommPopup( OpieTooth::BTDeviceItem* item )
00020 : QPopupMenu()
00021 {
00022 owarn << "RfcCommPopup c'tor" << oendl;
00023
00024 QAction* a;
00025
00026
00027 m_item = item;
00028
00029
00030 a = new QAction( );
00031 a->setText("Connect");
00032 a->addTo( this );
00033 connect( a, SIGNAL( activated() ),
00034 this, SLOT( slotConnect() ) );
00035
00036
00037
00038 a = new QAction( );
00039 a->setText("Disconnect");
00040 a->addTo( this );
00041 connect( a, SIGNAL( activated() ) ,
00042 this, SLOT( slotDisconnect() ) );
00043
00044
00045
00046 a = new QAction( );
00047 a->setText("Bind table");
00048 a->addTo( this );
00049 connect( a, SIGNAL( activated() ),
00050 this, SLOT( slotBind() ) );
00051
00052
00053
00054 a = new QAction( );
00055 a->setText( "Bar" );
00056 a->addTo( this );
00057 connect( a, SIGNAL( activated() ),
00058 this, SLOT( slotBar() ) );
00059
00060 };
00061
00062
00063 RfcCommPopup::~RfcCommPopup()
00064 {
00065
00066
00067
00068
00069 }
00070
00071
00072 void RfcCommPopup::slotConnect()
00073 {
00074
00075 owarn << "connect" << oendl;
00076
00077 PPPDialog pppDialog;
00078 QPEApplication::execDialog( &pppDialog );
00079 }
00080
00081
00082 void RfcCommPopup::slotDisconnect()
00083 {
00084 owarn << "slot disconnected" << oendl;
00085 }
00086
00087
00088 void RfcCommPopup::slotBind()
00089 {
00090 RfcommAssignDialog rfcommAssign ( this, "RfcommAssignDialog", true, WStyle_ContextHelp );
00091
00092 rfcommAssign.newDevice( m_item->mac() );
00093
00094 if ( QPEApplication::execDialog( &rfcommAssign ) == QDialog::Accepted )
00095 {
00096 rfcommAssign.saveConfig();
00097 }
00098 }
00099
00100
00101 void RfcCommPopup::slotBar()
00102 {
00103 owarn << "slotBar" << oendl;
00104 };
00105