summaryrefslogtreecommitdiff
authorharlekin <harlekin>2002-06-15 19:30:18 (UTC)
committer harlekin <harlekin>2002-06-15 19:30:18 (UTC)
commitef75752efaef84e4b7350f9768f3cb3c4fd744af (patch) (side-by-side diff)
tree214003e2d50a1f9c982b4f3fbcc3f4fd3f0e1ba1
parenta041cfe9806d7089d469e14da125adab4a93a5ab (diff)
downloadopie-ef75752efaef84e4b7350f9768f3cb3c4fd744af.zip
opie-ef75752efaef84e4b7350f9768f3cb3c4fd744af.tar.gz
opie-ef75752efaef84e4b7350f9768f3cb3c4fd744af.tar.bz2
wip
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/net/opietooth/manager/bluebase.cpp10
-rw-r--r--noncore/net/opietooth/manager/bluebase.h4
-rw-r--r--noncore/net/opietooth/manager/main.cpp6
-rw-r--r--noncore/net/opietooth/manager/manager.pro6
-rw-r--r--noncore/net/opietooth/manager/scandialog.cpp113
-rw-r--r--noncore/net/opietooth/manager/scandialog.h71
-rw-r--r--noncore/net/opietooth/manager/scandialog.ui155
7 files changed, 199 insertions, 166 deletions
diff --git a/noncore/net/opietooth/manager/bluebase.cpp b/noncore/net/opietooth/manager/bluebase.cpp
index 3d446f0..c905ea3 100644
--- a/noncore/net/opietooth/manager/bluebase.cpp
+++ b/noncore/net/opietooth/manager/bluebase.cpp
@@ -40,2 +40,6 @@
+
+namespace OpieTooth {
+
+
BlueBase::BlueBase( QWidget* parent, const char* name, WFlags fl )
@@ -93,4 +97,2 @@ void BlueBase::writeConfig() {
cfg.writeEntry("enableInquiryscan", enableInquiryscan);
-
-
}
@@ -111,3 +113,2 @@ void BlueBase::initGui() {
passkeyLine->setText(defaultPasskey);
-
}
@@ -145,4 +146,2 @@ void BlueBase::applyConfigChanges() {
// falls nötig hcid killhupen - die funktionalität adden
-
-
}
@@ -164,2 +163,3 @@ BlueBase::~BlueBase(){
+}
diff --git a/noncore/net/opietooth/manager/bluebase.h b/noncore/net/opietooth/manager/bluebase.h
index fb1844c..023af7a 100644
--- a/noncore/net/opietooth/manager/bluebase.h
+++ b/noncore/net/opietooth/manager/bluebase.h
@@ -20,2 +20,4 @@ class QCheckBox;
+namespace OpieTooth {
+
class BlueBase : public BluetoothBase {
@@ -53,3 +55,3 @@ protected:
-
+}
diff --git a/noncore/net/opietooth/manager/main.cpp b/noncore/net/opietooth/manager/main.cpp
index d566419..a86e36d 100644
--- a/noncore/net/opietooth/manager/main.cpp
+++ b/noncore/net/opietooth/manager/main.cpp
@@ -22,2 +22,3 @@
+
QPEApplication *BluetoothApp;
@@ -28,5 +29,5 @@ int main( int argc, char ** argv ) {
- BlueBase t;
+ OpieTooth::BlueBase t;
- t.setCaption( BlueBase::tr("Bluetooth Manager") );
+ // t.setCaption( OpieTooth::BlueBase::tr("Bluetooth Manager") );
a.showMainWidget(&t);
@@ -36 +37,2 @@ int main( int argc, char ** argv ) {
+
diff --git a/noncore/net/opietooth/manager/manager.pro b/noncore/net/opietooth/manager/manager.pro
index c369eba..5f0a62c 100644
--- a/noncore/net/opietooth/manager/manager.pro
+++ b/noncore/net/opietooth/manager/manager.pro
@@ -3,4 +3,4 @@ TEMPLATE = app
CONFIG = qt warn_on release
-HEADERS = bluebase.h
-SOURCES = main.cpp bluebase.cpp
+HEADERS = bluebase.h scandialog.h
+SOURCES = main.cpp bluebase.cpp scandialog.cpp
INCLUDEPATH += $(OPIEDIR)/include
@@ -9,3 +9,3 @@ DEPENDPATH += $(OPIEDIR)/include
LIBS += -lqpe -lopietooth
-INTERFACES = bluetoothbase.ui devicedialog.ui scandialog.ui
+INTERFACES = bluetoothbase.ui devicedialog.ui
TARGET = $(OPIEDIR)/bin/bluetooth-manager
diff --git a/noncore/net/opietooth/manager/scandialog.cpp b/noncore/net/opietooth/manager/scandialog.cpp
new file mode 100644
index 0000000..3ddba3e
--- a/dev/null
+++ b/noncore/net/opietooth/manager/scandialog.cpp
@@ -0,0 +1,113 @@
+/* main.cpp
+ *
+ * ---------------------
+ *
+ * copyright : (c) 2002 by Maximilian Reiß
+ * email : max.reiss@gmx.de
+ *
+ */
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+
+#include "scandialog.h"
+
+#include <qframe.h>
+#include <qheader.h>
+#include <qlabel.h>
+#include <qlistview.h>
+#include <qpushbutton.h>
+#include <qlayout.h>
+#include <qvariant.h>
+#include <qtooltip.h>
+#include <qwhatsthis.h>
+
+#include <manager.h>
+#include <device.h>
+#include <remotedevice.h>
+
+
+namespace OpieTooth {
+
+/*
+
+ */
+ ScanDialog::ScanDialog( QWidget* parent, const char* name, bool modal, WFlags fl )
+ : QDialog( parent, name, modal, fl ) {
+
+ if ( !name )
+ setName( "ScanDialog" );
+ resize( 360, 392 );
+ setCaption( tr( "Scan for devices" ) );
+
+ Frame7 = new QFrame( this, "Frame7" );
+ Frame7->setGeometry( QRect( 0, 0, 240, 331 ) );
+ Frame7->setFrameShape( QFrame::StyledPanel );
+ Frame7->setFrameShadow( QFrame::Raised );
+
+ QWidget* privateLayoutWidget = new QWidget( Frame7, "Layout11" );
+ privateLayoutWidget->setGeometry( QRect( 10, 9, 221, 310 ) );
+ Layout11 = new QGridLayout( privateLayoutWidget );
+ Layout11->setSpacing( 6 );
+ Layout11->setMargin( 0 );
+
+
+ TextLabel10 = new QLabel( privateLayoutWidget, "TextLabel10" );
+ TextLabel10->setText( tr( "ersetzen durch qprogressbar" ) );
+
+ Layout11->addMultiCellWidget( TextLabel10, 1, 1, 0, 1 );
+
+ StartButton = new QPushButton( privateLayoutWidget, "PushButton13" );
+ StartButton->setText( tr( "Start" ) );
+
+ Layout11->addWidget( StartButton, 2, 0 );
+
+ PushButton6 = new QPushButton( privateLayoutWidget, "PushButton6" );
+ PushButton6->setText( tr( "Stop" ) );
+
+ Layout11->addWidget( PushButton6, 2, 1 );
+
+ ListView1 = new QListView( privateLayoutWidget, "ListView1" );
+
+ // ListView1->addColumn( tr( "In List" ) );
+ ListView1->addColumn( tr( "Device Name" ) );
+ //ListView1->addColumn( tr( "Type" ) );
+
+ Layout11->addMultiCellWidget( ListView1, 0, 0, 0, 1 );
+
+ connect( (QObject*)StartButton, SIGNAL( clicked() ), this, SLOT( startSearch() ) );
+ connect( (QObject*)localDevice, SIGNAL( foundDevices( const QString& , RemoteDevices::ValueList ) ),
+ this, SLOT(fillList(const QString& , RemoteDevices::ValueList ) ) ) ;
+ }
+
+ void ScanDialog::startSearch() {
+ // read it from config later
+ localDevice = new Manager( "hci0" );
+ localDevice->searchDevices();
+ }
+
+
+ void ScanDialog::fillList(const QString& device, RemoteDevices::ValueList deviceList) {
+
+
+ RemoteDevices::ValueList::Iterator it;
+ for( it = deviceList.begin(); it != deviceList.end(); ++it ) {
+
+
+ }
+ }
+
+/*
+ * Cleanup
+ */
+ ScanDialog::~ScanDialog() {
+ delete localDevice;
+ }
+
+}
diff --git a/noncore/net/opietooth/manager/scandialog.h b/noncore/net/opietooth/manager/scandialog.h
new file mode 100644
index 0000000..5cebb11
--- a/dev/null
+++ b/noncore/net/opietooth/manager/scandialog.h
@@ -0,0 +1,71 @@
+/* main.cpp
+ *
+ * copyright : (c) 2002 by Maximilian Reiß
+ * email : max.reiss@gmx.de
+ *
+ */
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+
+#ifndef SCANDIALOG_H
+#define SCANDIALOG_H
+
+#include <qvariant.h>
+#include <qdialog.h>
+
+
+#include <remotedevice.h>
+
+class QVBoxLayout;
+class QHBoxLayout;
+class QGridLayout;
+class QFrame;
+class QLabel;
+class QListView;
+class QListViewItem;
+class QPushButton;
+
+class Manager;
+class Device;
+
+
+namespace OpieTooth {
+
+
+
+ class ScanDialog : public QDialog {
+ Q_OBJECT
+
+ public:
+ ScanDialog( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
+ ~ScanDialog();
+
+ QFrame* Frame7;
+ QLabel* TextLabel10;
+ QPushButton* StartButton;
+ QPushButton* PushButton6;
+ QListView* ListView1;
+
+
+ protected:
+ QGridLayout* Layout11;
+
+ private slots:
+ void startSearch();
+ void fillList(const QString& device, RemoteDevices::ValueList list);
+
+ private:
+
+ Manager *localDevice;
+ };
+
+}
+
+#endif // SCANDIALOG_H
diff --git a/noncore/net/opietooth/manager/scandialog.ui b/noncore/net/opietooth/manager/scandialog.ui
deleted file mode 100644
index 37847ba..0000000
--- a/noncore/net/opietooth/manager/scandialog.ui
+++ b/dev/null
@@ -1,155 +0,0 @@
-<!DOCTYPE UI><UI>
-<class>ScanDialog</class>
-<widget>
- <class>QDialog</class>
- <property stdset="1">
- <name>name</name>
- <cstring>ScanDialog</cstring>
- </property>
- <property stdset="1">
- <name>geometry</name>
- <rect>
- <x>0</x>
- <y>0</y>
- <width>360</width>
- <height>392</height>
- </rect>
- </property>
- <property stdset="1">
- <name>caption</name>
- <string>Form3</string>
- </property>
- <widget>
- <class>QFrame</class>
- <property stdset="1">
- <name>name</name>
- <cstring>Frame7</cstring>
- </property>
- <property stdset="1">
- <name>geometry</name>
- <rect>
- <x>0</x>
- <y>0</y>
- <width>240</width>
- <height>331</height>
- </rect>
- </property>
- <property stdset="1">
- <name>frameShape</name>
- <enum>StyledPanel</enum>
- </property>
- <property stdset="1">
- <name>frameShadow</name>
- <enum>Raised</enum>
- </property>
- <widget>
- <class>QLayoutWidget</class>
- <property stdset="1">
- <name>name</name>
- <cstring>Layout11</cstring>
- </property>
- <property stdset="1">
- <name>geometry</name>
- <rect>
- <x>10</x>
- <y>9</y>
- <width>221</width>
- <height>310</height>
- </rect>
- </property>
- <grid>
- <property stdset="1">
- <name>margin</name>
- <number>0</number>
- </property>
- <property stdset="1">
- <name>spacing</name>
- <number>6</number>
- </property>
- <widget row="1" column="0" rowspan="1" colspan="2" >
- <class>QLabel</class>
- <property stdset="1">
- <name>name</name>
- <cstring>TextLabel10</cstring>
- </property>
- <property stdset="1">
- <name>text</name>
- <string>ersetzen durch qprogressbar</string>
- </property>
- </widget>
- <widget row="2" column="0" >
- <class>QPushButton</class>
- <property stdset="1">
- <name>name</name>
- <cstring>PushButton13</cstring>
- </property>
- <property stdset="1">
- <name>text</name>
- <string>Start</string>
- </property>
- </widget>
- <widget row="2" column="1" >
- <class>QPushButton</class>
- <property stdset="1">
- <name>name</name>
- <cstring>PushButton6</cstring>
- </property>
- <property stdset="1">
- <name>text</name>
- <string>Stop</string>
- </property>
- </widget>
- <widget row="0" column="0" rowspan="1" colspan="2" >
- <class>QListView</class>
- <column>
- <property>
- <name>text</name>
- <string>In List</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>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>Type</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>ListView1</cstring>
- </property>
- </widget>
- </grid>
- </widget>
- </widget>
-</widget>
-</UI>