-rw-r--r-- | noncore/net/opietooth/manager/manager.pro | 4 | ||||
-rw-r--r-- | noncore/net/opietooth/manager/opie-toothmanager.control | 2 | ||||
-rw-r--r-- | noncore/net/opietooth/manager/pppdialog.cpp | 65 | ||||
-rw-r--r-- | noncore/net/opietooth/manager/pppdialog.h | 32 |
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 @@ | |||
1 | TEMPLATE = app | 1 | TEMPLATE = app |
2 | CONFIG = qt warn_on debug | 2 | CONFIG = qt warn_on debug |
3 | #CONFIG = qt warn_on release | 3 | #CONFIG = qt warn_on release |
4 | HEADERS = btconnectionitem.h btdeviceitem.h btserviceitem.h stdpopups.h popuphelper.h bluebase.h scandialog.h btlistitem.h hciconfwrapper.h bticonloader.h | 4 | HEADERS = btconnectionitem.h btdeviceitem.h btserviceitem.h stdpopups.h popuphelper.h bluebase.h scandialog.h btlistitem.h hciconfwrapper.h bticonloader.h pppdialog.h |
5 | SOURCES = btconnectionitem.cpp btdeviceitem.cpp btserviceitem.h stdpopups.cpp popuphelper.cpp main.cpp bluebase.cpp scandialog.cpp btlistitem.cpp hciconfwrapper.cpp bticonloader.cpp | 5 | SOURCES = btconnectionitem.cpp btdeviceitem.cpp btserviceitem.h stdpopups.cpp popuphelper.cpp main.cpp bluebase.cpp scandialog.cpp btlistitem.cpp hciconfwrapper.cpp bticonloader.cpp pppdialog.cpp |
6 | INCLUDEPATH += $(OPIEDIR)/include | 6 | INCLUDEPATH += $(OPIEDIR)/include |
7 | INCLUDEPATH += $(OPIEDIR)/noncore/net/opietooth/lib | 7 | INCLUDEPATH += $(OPIEDIR)/noncore/net/opietooth/lib |
8 | DEPENDPATH += $(OPIEDIR)/include | 8 | DEPENDPATH += $(OPIEDIR)/include |
9 | LIBS += -lqpe -lopietooth -lopie | 9 | LIBS += -lqpe -lopietooth -lopie |
10 | INTERFACES = bluetoothbase.ui devicedialog.ui | 10 | INTERFACES = bluetoothbase.ui devicedialog.ui |
11 | DESTDIR = $(OPIEDIR)/bin | 11 | DESTDIR = $(OPIEDIR)/bin |
12 | TARGET = bluetooth-manager | 12 | TARGET = bluetooth-manager |
13 | 13 | ||
14 | TRANSLATIONS = ../../../../i18n/de/bluetooth-manager.ts \ | 14 | TRANSLATIONS = ../../../../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 @@ | |||
1 | Files: bin/bluetooth-manager apps/Settings/bluetooth-manager.desktop pics/opietooth/* | 1 | Files: bin/bluetooth-manager apps/Settings/bluetooth-manager.desktop pics/opietooth/* |
2 | Priority: optional | 2 | Priority: optional |
3 | Section: opie/applications | 3 | Section: opie/applications |
4 | Maintainer: Maximilian Reiß <max.reiss@gmx.de> | 4 | Maintainer: Maximilian Reiß <max.reiss@gmx.de> |
5 | Architecture: arm | 5 | Architecture: arm |
6 | Version: 0.3.4-$SUB_VERSION | 6 | Version: 0.5.4-$SUB_VERSION |
7 | Depends: opie-base ($QPE_VERSION) | 7 | Depends: opie-base ($QPE_VERSION) |
8 | License: GPL | 8 | License: GPL |
9 | Description: Bluetooth Manager application | 9 | Description: 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 | |||
10 | PPPDialog::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 | |||
42 | PPPDialog::~PPPDialog() { | ||
43 | } | ||
44 | |||
45 | void 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 | |||
60 | void 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 | |||
8 | class QVBoxLayout; | ||
9 | class QPushButton; | ||
10 | class QMultiLineEdit; | ||
11 | class QLineEdit; | ||
12 | |||
13 | class PPPDialog : public QDialog { | ||
14 | |||
15 | Q_OBJECT | ||
16 | |||
17 | public: | ||
18 | PPPDialog( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0); | ||
19 | ~PPPDialog(); | ||
20 | |||
21 | |||
22 | private slots: | ||
23 | void connectToDevice(); | ||
24 | void fillOutPut( OProcess* pppDial, char* cha, int len ); | ||
25 | protected: | ||
26 | QVBoxLayout* layout; | ||
27 | QLineEdit* cmdLine; | ||
28 | QPushButton* connectButton; | ||
29 | QMultiLineEdit* outPut; | ||
30 | |||
31 | }; | ||
32 | #endif | ||