summaryrefslogtreecommitdiff
path: root/noncore/net/opietooth/manager/scandialog.cpp
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 /noncore/net/opietooth/manager/scandialog.cpp
parenta041cfe9806d7089d469e14da125adab4a93a5ab (diff)
downloadopie-ef75752efaef84e4b7350f9768f3cb3c4fd744af.zip
opie-ef75752efaef84e4b7350f9768f3cb3c4fd744af.tar.gz
opie-ef75752efaef84e4b7350f9768f3cb3c4fd744af.tar.bz2
wip
Diffstat (limited to 'noncore/net/opietooth/manager/scandialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/opietooth/manager/scandialog.cpp113
1 files changed, 113 insertions, 0 deletions
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;
+ }
+
+}