summaryrefslogtreecommitdiff
path: root/noncore/net/opietooth/manager/dunpopup.cpp
authorharlekin <harlekin>2003-03-26 22:30:46 (UTC)
committer harlekin <harlekin>2003-03-26 22:30:46 (UTC)
commita57325de7183c21df6b5ff06eff8cf7e3c328ef4 (patch) (side-by-side diff)
tree8724c094150cf0e977c54afa5c41a7e8da964e55 /noncore/net/opietooth/manager/dunpopup.cpp
parentc6e22820a2c28eb8a8f6bab690a36c3fa2605387 (diff)
downloadopie-a57325de7183c21df6b5ff06eff8cf7e3c328ef4.zip
opie-a57325de7183c21df6b5ff06eff8cf7e3c328ef4.tar.gz
opie-a57325de7183c21df6b5ff06eff8cf7e3c328ef4.tar.bz2
ups
Diffstat (limited to 'noncore/net/opietooth/manager/dunpopup.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/opietooth/manager/dunpopup.cpp63
1 files changed, 63 insertions, 0 deletions
diff --git a/noncore/net/opietooth/manager/dunpopup.cpp b/noncore/net/opietooth/manager/dunpopup.cpp
new file mode 100644
index 0000000..3043f71
--- a/dev/null
+++ b/noncore/net/opietooth/manager/dunpopup.cpp
@@ -0,0 +1,63 @@
+#include <qpe/qcopenvelope_qws.h>
+
+#include <qtimer.h>
+
+#include "dunpopup.h"
+
+using namespace OpieTooth;
+
+/*
+ * c'tor init the QAction
+ */
+DunPopup::DunPopup( OpieTooth::BTDeviceItem* item ) : QPopupMenu() {
+
+ qWarning("DunPopup c'tor");
+
+ m_item = item;
+ QAction *a, *b, *c;
+
+ m_dunconnection = 0l;
+ /* connect action */
+
+
+ a = new QAction(); // so it's get deleted
+ a->setText( tr("connect") );
+ a->addTo( this );
+ connect( a, SIGNAL( activated() ), this, SLOT( slotConnect() ) );
+
+
+ b = new QAction();
+ b->setText( tr( "connect+conf" ) );
+ b->addTo( this );
+ connect( b, SIGNAL( activated() ), this, SLOT( slotConnectAndConfig() ) );
+
+ c = new QAction();
+ c->setText( tr( "disconnect" ) );
+ c->addTo( this );
+ connect( c, SIGNAL( activated() ), this, SLOT( slotDisconnect() ) );
+
+};
+
+DunPopup::~DunPopup() {
+
+}
+
+void DunPopup::slotConnect() {
+
+ m_dunconnection = new StartDunConnection( m_item->mac() );
+ m_dunconnection->start();
+}
+
+void DunPopup::slotDisconnect() {
+ m_dunconnection->stop();
+}
+
+
+void DunPopup::slotConnectAndConfig() {
+ slotConnect();
+
+ // more intelligence here later like passing the device ( bnepX )
+ QCopEnvelope e( "QPE/System", "execute(QString)" );
+ e << QString( "networksettings" );
+
+}