summaryrefslogtreecommitdiff
path: root/noncore/net/opietooth/manager/pppdialog.cpp
authormickeyl <mickeyl>2004-04-04 13:54:40 (UTC)
committer mickeyl <mickeyl>2004-04-04 13:54:40 (UTC)
commit16cf79e90b5217f8d4bfce2a0fa817ae4b73db36 (patch) (unidiff)
tree0701eae15aa606a0211a2fccfde0eafdac69357c /noncore/net/opietooth/manager/pppdialog.cpp
parent8d2d2664e5f544b8292806e617deb7a0e4170dc0 (diff)
downloadopie-16cf79e90b5217f8d4bfce2a0fa817ae4b73db36.zip
opie-16cf79e90b5217f8d4bfce2a0fa817ae4b73db36.tar.gz
opie-16cf79e90b5217f8d4bfce2a0fa817ae4b73db36.tar.bz2
convert to Opie Debugging Framework
Diffstat (limited to 'noncore/net/opietooth/manager/pppdialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/opietooth/manager/pppdialog.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/net/opietooth/manager/pppdialog.cpp b/noncore/net/opietooth/manager/pppdialog.cpp
index 78c1501..989bf45 100644
--- a/noncore/net/opietooth/manager/pppdialog.cpp
+++ b/noncore/net/opietooth/manager/pppdialog.cpp
@@ -11,59 +11,59 @@ using namespace OpieTooth;
11 11
12using namespace Opie::Core; 12using namespace Opie::Core;
13PPPDialog::PPPDialog( QWidget* parent, const char* name, bool modal, WFlags fl, const QString& device ) 13PPPDialog::PPPDialog( QWidget* parent, const char* name, bool modal, WFlags fl, const QString& device )
14 : QDialog( parent, name, modal, fl ) { 14 : QDialog( parent, name, modal, fl ) {
15 15
16 if ( !name ) 16 if ( !name )
17 setName( "PPPDialog" ); 17 setName( "PPPDialog" );
18 setCaption( tr( "ppp connection " ) ) ; 18 setCaption( tr( "ppp connection " ) ) ;
19 19
20 m_device = device; 20 m_device = device;
21 21
22 layout = new QVBoxLayout( this ); 22 layout = new QVBoxLayout( this );
23 23
24 QLabel* info = new QLabel( this ); 24 QLabel* info = new QLabel( this );
25 info->setText( tr("Enter an ppp script name:") ); 25 info->setText( tr("Enter an ppp script name:") );
26 26
27 cmdLine = new QLineEdit( this ); 27 cmdLine = new QLineEdit( this );
28 28
29 outPut = new QMultiLineEdit( this ); 29 outPut = new QMultiLineEdit( this );
30 QFont outPut_font( outPut->font() ); 30 QFont outPut_font( outPut->font() );
31 outPut_font.setPointSize( 8 ); 31 outPut_font.setPointSize( 8 );
32 outPut->setFont( outPut_font ); 32 outPut->setFont( outPut_font );
33 outPut->setWordWrap( QMultiLineEdit::WidgetWidth ); 33 outPut->setWordWrap( QMultiLineEdit::WidgetWidth );
34 34
35 connectButton = new QPushButton( this ); 35 connectButton = new QPushButton( this );
36 connectButton->setText( tr( "Connect" ) ); 36 connectButton->setText( tr( "Connect" ) );
37 37
38 layout->addWidget(info); 38 layout->addWidget(info);
39 layout->addWidget(cmdLine); 39 layout->addWidget(cmdLine);
40 layout->addWidget(outPut); 40 layout->addWidget(outPut);
41 layout->addWidget(connectButton); 41 layout->addWidget(connectButton);
42 42
43 connect( connectButton, SIGNAL( clicked() ), this, SLOT( connectToDevice() ) ); 43 connect( connectButton, SIGNAL( clicked() ), this, SLOT( connectToDevice() ) );
44 44
45} 45}
46 46
47PPPDialog::~PPPDialog() { 47PPPDialog::~PPPDialog() {
48} 48}
49 49
50void PPPDialog::connectToDevice() { 50void PPPDialog::connectToDevice() {
51 outPut->clear(); 51 outPut->clear();
52 // vom popupmenu beziehen 52 // vom popupmenu beziehen
53 QString connectScript = "/etc/ppp/peers/" + cmdLine->text(); 53 QString connectScript = "/etc/ppp/peers/" + cmdLine->text();
54 OProcess* pppDial = new OProcess(); 54 OProcess* pppDial = new OProcess();
55 *pppDial << "pppd" << m_device << "call" << connectScript; 55 *pppDial << "pppd" << m_device << "call" << connectScript;
56 connect( pppDial, SIGNAL(receivedStdout(Opie::Core::OProcess*,char*,int) ), 56 connect( pppDial, SIGNAL(receivedStdout(Opie::Core::OProcess*,char*,int) ),
57 this, SLOT(fillOutPut(Opie::Core::OProcess*,char*,int) ) ); 57 this, SLOT(fillOutPut(Opie::Core::OProcess*,char*,int) ) );
58 if (!pppDial->start(OProcess::DontCare, OProcess::AllOutput) ) { 58 if (!pppDial->start(OProcess::DontCare, OProcess::AllOutput) ) {
59 qWarning("could not start"); 59 owarn << "could not start" << oendl;
60 delete pppDial; 60 delete pppDial;
61 } 61 }
62} 62}
63 63
64void PPPDialog::fillOutPut( OProcess* pppDial, char* cha, int len ) { 64void PPPDialog::fillOutPut( OProcess* pppDial, char* cha, int len ) {
65 QCString str(cha, len ); 65 QCString str(cha, len );
66 outPut->insertLine( str ); 66 outPut->insertLine( str );
67 delete pppDial; 67 delete pppDial;
68} 68}
69 69