summaryrefslogtreecommitdiff
path: root/noncore/net/opietooth/manager
Side-by-side diff
Diffstat (limited to 'noncore/net/opietooth/manager') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/opietooth/manager/bluebase.cpp2
-rw-r--r--noncore/net/opietooth/manager/bluetoothbase.ui665
-rw-r--r--noncore/net/opietooth/manager/panpopup.cpp46
-rw-r--r--noncore/net/opietooth/manager/panpopup.h11
4 files changed, 336 insertions, 388 deletions
diff --git a/noncore/net/opietooth/manager/bluebase.cpp b/noncore/net/opietooth/manager/bluebase.cpp
index b5a09e5..04fa117 100644
--- a/noncore/net/opietooth/manager/bluebase.cpp
+++ b/noncore/net/opietooth/manager/bluebase.cpp
@@ -335,3 +335,3 @@ void BlueBase::startServiceActionHold( QListViewItem * item, const QPoint & poin
qWarning("Searching id %d %s", it.key(), it.data().latin1() );
- popup = m_popHelper.find( it.key() /*1*/,
+ popup = m_popHelper.find( 4358,
service->services(),
diff --git a/noncore/net/opietooth/manager/bluetoothbase.ui b/noncore/net/opietooth/manager/bluetoothbase.ui
index b51c8c6..9ff970f 100644
--- a/noncore/net/opietooth/manager/bluetoothbase.ui
+++ b/noncore/net/opietooth/manager/bluetoothbase.ui
@@ -13,3 +13,3 @@
<y>0</y>
- <width>228</width>
+ <width>224</width>
<height>320</height>
@@ -21,295 +21,183 @@
</property>
- <widget>
- <class>QTabWidget</class>
+ <property>
+ <name>layoutMargin</name>
+ </property>
+ <property>
+ <name>layoutSpacing</name>
+ </property>
+ <vbox>
<property stdset="1">
- <name>name</name>
- <cstring>Status</cstring>
+ <name>margin</name>
+ <number>0</number>
</property>
<property stdset="1">
- <name>geometry</name>
- <rect>
- <x>0</x>
- <y>0</y>
- <width>260</width>
- <height>350</height>
- </rect>
+ <name>spacing</name>
+ <number>0</number>
</property>
<widget>
- <class>QWidget</class>
+ <class>QTabWidget</class>
<property stdset="1">
<name>name</name>
- <cstring>tab</cstring>
+ <cstring>Status</cstring>
</property>
- <attribute>
- <name>title</name>
- <string>Devices</string>
- </attribute>
- <spacer>
- <property>
- <name>name</name>
- <cstring>Spacer3</cstring>
- </property>
- <property stdset="1">
- <name>orientation</name>
- <enum>Vertical</enum>
- </property>
+ <property>
+ <name>layoutMargin</name>
+ </property>
+ <property>
+ <name>layoutSpacing</name>
+ </property>
+ <widget>
+ <class>QWidget</class>
<property stdset="1">
- <name>sizeType</name>
- <enum>Expanding</enum>
- </property>
- <property>
- <name>sizeHint</name>
- <size>
- <width>20</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- <spacer>
- <property>
<name>name</name>
- <cstring>Spacer1</cstring>
+ <cstring>tab</cstring>
</property>
- <property stdset="1">
- <name>orientation</name>
- <enum>Vertical</enum>
- </property>
- <property stdset="1">
- <name>sizeType</name>
- <enum>Fixed</enum>
- </property>
- <property>
- <name>sizeHint</name>
- <size>
- <width>20</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- <widget>
- <class>QListView</class>
- <column>
- <property>
- <name>text</name>
- <string>Device Name</string>
- </property>
- <property>
- <name>clickable</name>
- <bool>true</bool>
- </property>
- <property>
- <name>resizeable</name>
- <bool>true</bool>
- </property>
- </column>
- <column>
- <property>
- <name>text</name>
- <string>Online</string>
- </property>
- <property>
- <name>clickable</name>
- <bool>true</bool>
+ <attribute>
+ <name>title</name>
+ <string>Devices</string>
+ </attribute>
+ <vbox>
+ <property stdset="1">
+ <name>margin</name>
+ <number>2</number>
</property>
- <property>
- <name>resizeable</name>
- <bool>true</bool>
+ <property stdset="1">
+ <name>spacing</name>
+ <number>2</number>
</property>
- </column>
- <property stdset="1">
- <name>name</name>
- <cstring>ListView2</cstring>
- </property>
- <property stdset="1">
- <name>geometry</name>
- <rect>
- <x>0</x>
- <y>0</y>
- <width>230</width>
- <height>230</height>
- </rect>
- </property>
+ <widget>
+ <class>QListView</class>
+ <column>
+ <property>
+ <name>text</name>
+ <string>Device Name</string>
+ </property>
+ <property>
+ <name>clickable</name>
+ <bool>true</bool>
+ </property>
+ <property>
+ <name>resizeable</name>
+ <bool>true</bool>
+ </property>
+ </column>
+ <column>
+ <property>
+ <name>text</name>
+ <string>Online</string>
+ </property>
+ <property>
+ <name>clickable</name>
+ <bool>true</bool>
+ </property>
+ <property>
+ <name>resizeable</name>
+ <bool>true</bool>
+ </property>
+ </column>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>ListView2</cstring>
+ </property>
+ </widget>
+ <widget>
+ <class>QPushButton</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>PushButton2</cstring>
+ </property>
+ <property stdset="1">
+ <name>sizePolicy</name>
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>0</vsizetype>
+ </sizepolicy>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>Scan for Devices</string>
+ </property>
+ </widget>
+ </vbox>
</widget>
<widget>
- <class>QPushButton</class>
+ <class>QWidget</class>
<property stdset="1">
<name>name</name>
- <cstring>PushButton2</cstring>
- </property>
- <property stdset="1">
- <name>geometry</name>
- <rect>
- <x>40</x>
- <y>231</y>
- <width>154</width>
- <height>30</height>
- </rect>
- </property>
- <property stdset="1">
- <name>sizePolicy</name>
- <sizepolicy>
- <hsizetype>0</hsizetype>
- <vsizetype>0</vsizetype>
- </sizepolicy>
- </property>
- <property stdset="1">
- <name>text</name>
- <string>Scan for Devices</string>
+ <cstring>tab</cstring>
</property>
- </widget>
- </widget>
- <widget>
- <class>QWidget</class>
- <property stdset="1">
- <name>name</name>
- <cstring>tab</cstring>
- </property>
- <attribute>
- <name>title</name>
- <string>Connections</string>
- </attribute>
- <widget>
- <class>QListView</class>
- <column>
- <property>
- <name>text</name>
- <string>Device Name</string>
- </property>
- <property>
- <name>clickable</name>
- <bool>true</bool>
- </property>
- <property>
- <name>resizeable</name>
- <bool>true</bool>
- </property>
- </column>
- <column>
- <property>
- <name>text</name>
- <string>Connection type</string>
- </property>
- <property>
- <name>clickable</name>
- <bool>true</bool>
- </property>
- <property>
- <name>resizeable</name>
- <bool>true</bool>
- </property>
- </column>
- <column>
- <property>
- <name>text</name>
- <string>Signal</string>
- </property>
- <property>
- <name>clickable</name>
- <bool>true</bool>
+ <attribute>
+ <name>title</name>
+ <string>Connections</string>
+ </attribute>
+ <vbox>
+ <property stdset="1">
+ <name>margin</name>
+ <number>2</number>
</property>
- <property>
- <name>resizeable</name>
- <bool>true</bool>
+ <property stdset="1">
+ <name>spacing</name>
+ <number>2</number>
</property>
- </column>
- <property stdset="1">
- <name>name</name>
- <cstring>ListView4</cstring>
- </property>
- <property stdset="1">
- <name>geometry</name>
- <rect>
- <x>0</x>
- <y>0</y>
- <width>240</width>
- <height>240</height>
- </rect>
- </property>
- </widget>
- </widget>
- <widget>
- <class>QWidget</class>
- <property stdset="1">
- <name>name</name>
- <cstring>tab</cstring>
- </property>
- <attribute>
- <name>title</name>
- <string>Config</string>
- </attribute>
- <widget>
- <class>QLabel</class>
- <property stdset="1">
- <name>name</name>
- <cstring>deviceNameLabel</cstring>
- </property>
- <property stdset="1">
- <name>geometry</name>
- <rect>
- <x>10</x>
- <y>10</y>
- <width>70</width>
- <height>20</height>
- </rect>
- </property>
- <property stdset="1">
- <name>text</name>
- <string>Device Name</string>
- </property>
- </widget>
- <widget>
- <class>QLabel</class>
- <property stdset="1">
- <name>name</name>
- <cstring>passkeyLabel</cstring>
- </property>
- <property stdset="1">
- <name>geometry</name>
- <rect>
- <x>10</x>
- <y>50</y>
- <width>80</width>
- <height>20</height>
- </rect>
- </property>
- <property stdset="1">
- <name>text</name>
- <string>Default Passkey</string>
- </property>
- </widget>
- <widget>
- <class>QLineEdit</class>
- <property stdset="1">
- <name>name</name>
- <cstring>passkeyLine</cstring>
- </property>
- <property stdset="1">
- <name>geometry</name>
- <rect>
- <x>98</x>
- <y>53</y>
- <width>120</width>
- <height>22</height>
- </rect>
- </property>
- <property stdset="1">
- <name>echoMode</name>
- <enum>Password</enum>
- </property>
+ <widget>
+ <class>QListView</class>
+ <column>
+ <property>
+ <name>text</name>
+ <string>Device Name</string>
+ </property>
+ <property>
+ <name>clickable</name>
+ <bool>true</bool>
+ </property>
+ <property>
+ <name>resizeable</name>
+ <bool>true</bool>
+ </property>
+ </column>
+ <column>
+ <property>
+ <name>text</name>
+ <string>Connection type</string>
+ </property>
+ <property>
+ <name>clickable</name>
+ <bool>true</bool>
+ </property>
+ <property>
+ <name>resizeable</name>
+ <bool>true</bool>
+ </property>
+ </column>
+ <column>
+ <property>
+ <name>text</name>
+ <string>Signal</string>
+ </property>
+ <property>
+ <name>clickable</name>
+ <bool>true</bool>
+ </property>
+ <property>
+ <name>resizeable</name>
+ <bool>true</bool>
+ </property>
+ </column>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>ListView4</cstring>
+ </property>
+ </widget>
+ </vbox>
</widget>
<widget>
- <class>QLayoutWidget</class>
+ <class>QWidget</class>
<property stdset="1">
<name>name</name>
- <cstring>Layout5</cstring>
- </property>
- <property stdset="1">
- <name>geometry</name>
- <rect>
- <x>10</x>
- <y>100</y>
- <width>188</width>
- <height>120</height>
- </rect>
+ <cstring>tab</cstring>
</property>
+ <attribute>
+ <name>title</name>
+ <string>Config</string>
+ </attribute>
<vbox>
@@ -317,3 +205,3 @@
<name>margin</name>
- <number>0</number>
+ <number>2</number>
</property>
@@ -321,42 +209,144 @@
<name>spacing</name>
- <number>6</number>
+ <number>2</number>
</property>
<widget>
- <class>QCheckBox</class>
+ <class>QLayoutWidget</class>
<property stdset="1">
<name>name</name>
- <cstring>authCheckBox</cstring>
- </property>
- <property stdset="1">
- <name>text</name>
- <string>enable authentification</string>
+ <cstring>Layout2</cstring>
</property>
+ <hbox>
+ <property stdset="1">
+ <name>margin</name>
+ <number>0</number>
+ </property>
+ <property stdset="1">
+ <name>spacing</name>
+ <number>6</number>
+ </property>
+ <widget>
+ <class>QLabel</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>deviceNameLabel</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>Device Name</string>
+ </property>
+ </widget>
+ <widget>
+ <class>QLineEdit</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>deviceNameLine</cstring>
+ </property>
+ </widget>
+ </hbox>
</widget>
<widget>
- <class>QCheckBox</class>
+ <class>QLayoutWidget</class>
<property stdset="1">
<name>name</name>
- <cstring>cryptCheckBox</cstring>
- </property>
- <property stdset="1">
- <name>text</name>
- <string>enable encryption</string>
+ <cstring>Layout3</cstring>
</property>
+ <hbox>
+ <property stdset="1">
+ <name>margin</name>
+ <number>0</number>
+ </property>
+ <property stdset="1">
+ <name>spacing</name>
+ <number>6</number>
+ </property>
+ <widget>
+ <class>QLabel</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>passkeyLabel</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>Default Passkey</string>
+ </property>
+ </widget>
+ <widget>
+ <class>QLineEdit</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>passkeyLine</cstring>
+ </property>
+ <property stdset="1">
+ <name>echoMode</name>
+ <enum>Password</enum>
+ </property>
+ </widget>
+ </hbox>
</widget>
<widget>
- <class>QCheckBox</class>
+ <class>QLayoutWidget</class>
<property stdset="1">
<name>name</name>
- <cstring>pagescanCheckBox</cstring>
- </property>
- <property stdset="1">
- <name>text</name>
- <string>Enable Page scan</string>
+ <cstring>Layout5</cstring>
</property>
+ <vbox>
+ <property stdset="1">
+ <name>margin</name>
+ <number>0</number>
+ </property>
+ <property stdset="1">
+ <name>spacing</name>
+ <number>6</number>
+ </property>
+ <widget>
+ <class>QCheckBox</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>authCheckBox</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>enable authentification</string>
+ </property>
+ </widget>
+ <widget>
+ <class>QCheckBox</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>cryptCheckBox</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>enable encryption</string>
+ </property>
+ </widget>
+ <widget>
+ <class>QCheckBox</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>pagescanCheckBox</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>Enable Page scan</string>
+ </property>
+ </widget>
+ <widget>
+ <class>QCheckBox</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>inquiryscanCheckBox</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>Enable Inquiry scan</string>
+ </property>
+ </widget>
+ </vbox>
</widget>
<widget>
- <class>QCheckBox</class>
+ <class>QPushButton</class>
<property stdset="1">
<name>name</name>
- <cstring>inquiryscanCheckBox</cstring>
+ <cstring>configApplyButton</cstring>
</property>
@@ -364,3 +354,3 @@
<name>text</name>
- <string>Enable Inquiry scan</string>
+ <string>Apply</string>
</property>
@@ -370,70 +360,35 @@
<widget>
- <class>QLineEdit</class>
+ <class>QWidget</class>
<property stdset="1">
<name>name</name>
- <cstring>deviceNameLine</cstring>
- </property>
- <property stdset="1">
- <name>geometry</name>
- <rect>
- <x>98</x>
- <y>13</y>
- <width>120</width>
- <height>22</height>
- </rect>
- </property>
- </widget>
- <widget>
- <class>QPushButton</class>
- <property stdset="1">
- <name>name</name>
- <cstring>configApplyButton</cstring>
- </property>
- <property stdset="1">
- <name>geometry</name>
- <rect>
- <x>60</x>
- <y>230</y>
- <width>99</width>
- <height>32</height>
- </rect>
- </property>
- <property stdset="1">
- <name>text</name>
- <string>Apply</string>
- </property>
- </widget>
- </widget>
- <widget>
- <class>QWidget</class>
- <property stdset="1">
- <name>name</name>
- <cstring>tab</cstring>
- </property>
- <attribute>
- <name>title</name>
- <string>Status</string>
- </attribute>
- <widget>
- <class>QLabel</class>
- <property stdset="1">
- <name>name</name>
- <cstring>StatusLabel</cstring>
- </property>
- <property stdset="1">
- <name>geometry</name>
- <rect>
- <x>10</x>
- <y>10</y>
- <width>220</width>
- <height>250</height>
- </rect>
- </property>
- <property stdset="1">
- <name>text</name>
- <string>Status Label</string>
+ <cstring>tab</cstring>
</property>
+ <attribute>
+ <name>title</name>
+ <string>Status</string>
+ </attribute>
+ <vbox>
+ <property stdset="1">
+ <name>margin</name>
+ <number>2</number>
+ </property>
+ <property stdset="1">
+ <name>spacing</name>
+ <number>2</number>
+ </property>
+ <widget>
+ <class>QLabel</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>StatusLabel</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>Status Label</string>
+ </property>
+ </widget>
+ </vbox>
</widget>
</widget>
- </widget>
+ </vbox>
</widget>
diff --git a/noncore/net/opietooth/manager/panpopup.cpp b/noncore/net/opietooth/manager/panpopup.cpp
index d3d1347..61e632b 100644
--- a/noncore/net/opietooth/manager/panpopup.cpp
+++ b/noncore/net/opietooth/manager/panpopup.cpp
@@ -16,8 +16,10 @@ PanPopup::PanPopup( OpieTooth::BTDeviceItem* item ) : QPopupMenu() {
m_item = item;
- m_panconnect = 0l;
- QAction *a, *b;
+ QAction *a, *b, *c;
+ m_panconnection = 0l;
/* connect action */
- a = new QAction( ); // so it's get deleted
- a->setText( "connect" );
+
+
+ a = new QAction(); // so it's get deleted
+ a->setText( tr("connect") );
a->addTo( this );
@@ -25,6 +27,13 @@ PanPopup::PanPopup( OpieTooth::BTDeviceItem* item ) : QPopupMenu() {
+
b = new QAction();
- b->setText( "connect+conf" );
+ 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() ) );
+
};
@@ -32,3 +41,3 @@ PanPopup::PanPopup( OpieTooth::BTDeviceItem* item ) : QPopupMenu() {
PanPopup::~PanPopup() {
- delete m_panconnect;
+
}
@@ -36,27 +45,10 @@ PanPopup::~PanPopup() {
void PanPopup::slotConnect() {
-
-
- // SHOULD move to lib
- // before pand must be in "pand --listen --role panu" mode ( client )
-
- m_panconnect = new OProcess();
- *m_panconnect << "pand" << "--connect" << m_item->mac();
-
- connect( m_panconnect, SIGNAL( processExited( OProcess* ) ) ,
- this, SLOT( slotConnectExited( OProcess* ) ) );
- connect( m_panconnect, SIGNAL( receivedStdout( OProcess*, char*, int ) ),
- this, SLOT( slotConnectOut( OProcess*, char*, int ) ) );
- if (!m_panconnect->start( OProcess::NotifyOnExit, OProcess::AllOutput) ) {
- qWarning( "could not start" );
- delete m_panconnect;
- }
+ m_panconnection = new StartPanConnection( m_item->mac() );
+ m_panconnection->start();
}
-void PanPopup::slotExited( OProcess* proc ) {
- delete m_panconnect;
+void PanPopup::slotDisconnect() {
+ m_panconnection->stop();
}
-void PanPopup::slotStdOut(OProcess* proc, char* chars, int len)
-{}
-
diff --git a/noncore/net/opietooth/manager/panpopup.h b/noncore/net/opietooth/manager/panpopup.h
index 9d99f5e..1496f3a 100644
--- a/noncore/net/opietooth/manager/panpopup.h
+++ b/noncore/net/opietooth/manager/panpopup.h
@@ -5,3 +5,4 @@
#include <qaction.h>
-#include <opie/oprocess.h>
+
+#include <startpanconnection.h>
@@ -9,2 +10,3 @@
+
namespace OpieTooth {
@@ -21,3 +23,3 @@ namespace OpieTooth {
QAction* m_push;
- OProcess* m_panconnect;
+ OpieTooth::StartPanConnection* m_panconnection;
OpieTooth::BTDeviceItem *m_item;
@@ -25,6 +27,5 @@ namespace OpieTooth {
void slotConnect();
+ void slotDisconnect();
void slotConnectAndConfig();
- void slotExited( OProcess* proc );
- void slotStdOut( OProcess* proc, char* chars, int len );
- };
+ };
};