summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/opietooth/manager/manager.pro4
-rw-r--r--noncore/net/opietooth/manager/opie-toothmanager.control2
-rw-r--r--noncore/net/opietooth/manager/pppdialog.cpp65
-rw-r--r--noncore/net/opietooth/manager/pppdialog.h32
4 files changed, 100 insertions, 3 deletions
diff --git a/noncore/net/opietooth/manager/manager.pro b/noncore/net/opietooth/manager/manager.pro
index d36b8df2..2d8ebe3 100644
--- a/noncore/net/opietooth/manager/manager.pro
+++ b/noncore/net/opietooth/manager/manager.pro
@@ -1,27 +1,27 @@
1TEMPLATE = app 1TEMPLATE = app
2CONFIG = qt warn_on debug 2CONFIG = qt warn_on debug
3#CONFIG = qt warn_on release 3#CONFIG = qt warn_on release
4HEADERS = btconnectionitem.h btdeviceitem.h btserviceitem.h stdpopups.h popuphelper.h bluebase.h scandialog.h btlistitem.h hciconfwrapper.h bticonloader.h 4HEADERS = btconnectionitem.h btdeviceitem.h btserviceitem.h stdpopups.h popuphelper.h bluebase.h scandialog.h btlistitem.h hciconfwrapper.h bticonloader.h pppdialog.h
5SOURCES = btconnectionitem.cpp btdeviceitem.cpp btserviceitem.h stdpopups.cpp popuphelper.cpp main.cpp bluebase.cpp scandialog.cpp btlistitem.cpp hciconfwrapper.cpp bticonloader.cpp 5SOURCES = btconnectionitem.cpp btdeviceitem.cpp btserviceitem.h stdpopups.cpp popuphelper.cpp main.cpp bluebase.cpp scandialog.cpp btlistitem.cpp hciconfwrapper.cpp bticonloader.cpp pppdialog.cpp
6INCLUDEPATH += $(OPIEDIR)/include 6INCLUDEPATH += $(OPIEDIR)/include
7INCLUDEPATH += $(OPIEDIR)/noncore/net/opietooth/lib 7INCLUDEPATH += $(OPIEDIR)/noncore/net/opietooth/lib
8DEPENDPATH += $(OPIEDIR)/include 8DEPENDPATH += $(OPIEDIR)/include
9LIBS += -lqpe -lopietooth -lopie 9LIBS += -lqpe -lopietooth -lopie
10INTERFACES = bluetoothbase.ui devicedialog.ui 10INTERFACES = bluetoothbase.ui devicedialog.ui
11DESTDIR = $(OPIEDIR)/bin 11DESTDIR = $(OPIEDIR)/bin
12TARGET = bluetooth-manager 12TARGET = bluetooth-manager
13 13
14TRANSLATIONS = ../../../../i18n/de/bluetooth-manager.ts \ 14TRANSLATIONS = ../../../../i18n/de/bluetooth-manager.ts \
15 ../../../../i18n/en/bluetooth-manager.ts \ 15 ../../../../i18n/en/bluetooth-manager.ts \
16 ../../../../i18n/es/bluetooth-manager.ts \ 16 ../../../../i18n/es/bluetooth-manager.ts \
17 ../../../../i18n/fr/bluetooth-manager.ts \ 17 ../../../../i18n/fr/bluetooth-manager.ts \
18 ../../../../i18n/hu/bluetooth-manager.ts \ 18 ../../../../i18n/hu/bluetooth-manager.ts \
19 ../../../../i18n/ja/bluetooth-manager.ts \ 19 ../../../../i18n/ja/bluetooth-manager.ts \
20 ../../../../i18n/ko/bluetooth-manager.ts \ 20 ../../../../i18n/ko/bluetooth-manager.ts \
21 ../../../../i18n/no/bluetooth-manager.ts \ 21 ../../../../i18n/no/bluetooth-manager.ts \
22 ../../../../i18n/pl/bluetooth-manager.ts \ 22 ../../../../i18n/pl/bluetooth-manager.ts \
23 ../../../../i18n/pt/bluetooth-manager.ts \ 23 ../../../../i18n/pt/bluetooth-manager.ts \
24 ../../../../i18n/pt_BR/bluetooth-manager.ts \ 24 ../../../../i18n/pt_BR/bluetooth-manager.ts \
25 ../../../../i18n/sl/bluetooth-manager.ts \ 25 ../../../../i18n/sl/bluetooth-manager.ts \
26 ../../../../i18n/zh_CN/bluetooth-manager.ts \ 26 ../../../../i18n/zh_CN/bluetooth-manager.ts \
27 ../../../../i18n/zh_TW/bluetooth-manager.ts 27 ../../../../i18n/zh_TW/bluetooth-manager.ts
diff --git a/noncore/net/opietooth/manager/opie-toothmanager.control b/noncore/net/opietooth/manager/opie-toothmanager.control
index bc53569..ba48eae 100644
--- a/noncore/net/opietooth/manager/opie-toothmanager.control
+++ b/noncore/net/opietooth/manager/opie-toothmanager.control
@@ -1,10 +1,10 @@
1Files: bin/bluetooth-manager apps/Settings/bluetooth-manager.desktop pics/opietooth/* 1Files: bin/bluetooth-manager apps/Settings/bluetooth-manager.desktop pics/opietooth/*
2Priority: optional 2Priority: optional
3Section: opie/applications 3Section: opie/applications
4Maintainer: Maximilian Rei� <max.reiss@gmx.de> 4Maintainer: Maximilian Rei� <max.reiss@gmx.de>
5Architecture: arm 5Architecture: arm
6Version: 0.3.4-$SUB_VERSION 6Version: 0.5.4-$SUB_VERSION
7Depends: opie-base ($QPE_VERSION) 7Depends: opie-base ($QPE_VERSION)
8License: GPL 8License: GPL
9Description: Bluetooth Manager application 9Description: Bluetooth Manager application
10 10
diff --git a/noncore/net/opietooth/manager/pppdialog.cpp b/noncore/net/opietooth/manager/pppdialog.cpp
new file mode 100644
index 0000000..472da73
--- a/dev/null
+++ b/noncore/net/opietooth/manager/pppdialog.cpp
@@ -0,0 +1,65 @@
1
2#include "pppdialog.h"
3#include <qpushbutton.h>
4#include <qmultilineedit.h>
5#include <qlineedit.h>
6#include <qlayout.h>
7#include <qlabel.h>
8#include <opie/oprocess.h>
9
10PPPDialog::PPPDialog( QWidget* parent, const char* name, bool modal, WFlags fl )
11 : QDialog( parent, name, modal, fl ) {
12
13 if ( !name )
14 setName( "PPPDialog" );
15 setCaption( tr( "ppp connection " ) ) ;
16
17 layout = new QVBoxLayout( this );
18
19 QLabel* info = new QLabel( this );
20 info->setText( "Enter an ppp script name:" );
21
22 cmdLine = new QLineEdit( this );
23
24 outPut = new QMultiLineEdit( this );
25 QFont outPut_font( outPut->font() );
26 outPut_font.setPointSize( 8 );
27 outPut->setFont( outPut_font );
28 outPut->setWordWrap( QMultiLineEdit::WidgetWidth );
29
30 connectButton = new QPushButton( this );
31 connectButton->setText( tr( "Connect" ) );
32
33 layout->addWidget(info);
34 layout->addWidget(cmdLine);
35 layout->addWidget(outPut);
36 layout->addWidget(connectButton);
37
38 connect( connectButton, SIGNAL( clicked() ), this, SLOT( connectToDevice() ) );
39
40}
41
42PPPDialog::~PPPDialog() {
43}
44
45void PPPDialog::connectToDevice() {
46 outPut->clear();
47 // vom popupmenu beziehen
48 QString devName = "/dev/ttyU0";
49 QString connectScript = "/etc/ppp/peers/" + cmdLine->text();
50 OProcess* pppDial = new OProcess();
51 *pppDial << "pppd" << devName << "call" << connectScript;
52 connect( pppDial, SIGNAL(receivedStdout(OProcess*, char*, int ) ),
53 this, SLOT(fillOutPut(OProcess*, char*, int ) ) );
54 if (!pppDial->start(OProcess::DontCare, OProcess::AllOutput) ) {
55 qWarning("could not start");
56 delete pppDial;
57 }
58}
59
60void PPPDialog::fillOutPut( OProcess* pppDial, char* cha, int len ) {
61 QCString str(cha, len );
62 outPut->insertLine( str );
63 delete pppDial;
64}
65
diff --git a/noncore/net/opietooth/manager/pppdialog.h b/noncore/net/opietooth/manager/pppdialog.h
new file mode 100644
index 0000000..2baecca
--- a/dev/null
+++ b/noncore/net/opietooth/manager/pppdialog.h
@@ -0,0 +1,32 @@
1#ifndef PPPDIALOG_H
2#define PPPDIALOG_H
3
4
5#include <qdialog.h>
6#include <opie/oprocess.h>
7
8class QVBoxLayout;
9class QPushButton;
10class QMultiLineEdit;
11class QLineEdit;
12
13class PPPDialog : public QDialog {
14
15 Q_OBJECT
16
17public:
18 PPPDialog( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0);
19 ~PPPDialog();
20
21
22private slots:
23 void connectToDevice();
24 void fillOutPut( OProcess* pppDial, char* cha, int len );
25protected:
26 QVBoxLayout* layout;
27 QLineEdit* cmdLine;
28 QPushButton* connectButton;
29 QMultiLineEdit* outPut;
30
31};
32#endif