summaryrefslogtreecommitdiff
path: root/noncore/net/opietooth/manager/pppdialog.cpp
authorzecke <zecke>2004-03-14 16:13:28 (UTC)
committer zecke <zecke>2004-03-14 16:13:28 (UTC)
commitf3d284849df36ef281dcb5aa2d00f613e3a354d8 (patch) (side-by-side diff)
tree65406b10a839ffa1ba683f59e61ef7227a0093d1 /noncore/net/opietooth/manager/pppdialog.cpp
parentf12af18557c8f376f0c6c30e80a85737ff6c592e (diff)
downloadopie-f3d284849df36ef281dcb5aa2d00f613e3a354d8.zip
opie-f3d284849df36ef281dcb5aa2d00f613e3a354d8.tar.gz
opie-f3d284849df36ef281dcb5aa2d00f613e3a354d8.tar.bz2
Fix up depends on LIBOPIE1
Proper signature for signal and slots and namespaces
Diffstat (limited to 'noncore/net/opietooth/manager/pppdialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/opietooth/manager/pppdialog.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/noncore/net/opietooth/manager/pppdialog.cpp b/noncore/net/opietooth/manager/pppdialog.cpp
index 870e7fd..78c1501 100644
--- a/noncore/net/opietooth/manager/pppdialog.cpp
+++ b/noncore/net/opietooth/manager/pppdialog.cpp
@@ -1,70 +1,69 @@
#include "pppdialog.h"
#include <qpushbutton.h>
#include <qmultilineedit.h>
#include <qlineedit.h>
#include <qlayout.h>
#include <qlabel.h>
#include <opie2/oprocess.h>
using namespace OpieTooth;
using namespace Opie::Core;
-using namespace Opie::Core;
PPPDialog::PPPDialog( QWidget* parent, const char* name, bool modal, WFlags fl, const QString& device )
: QDialog( parent, name, modal, fl ) {
if ( !name )
setName( "PPPDialog" );
setCaption( tr( "ppp connection " ) ) ;
m_device = device;
layout = new QVBoxLayout( this );
QLabel* info = new QLabel( this );
info->setText( tr("Enter an ppp script name:") );
cmdLine = new QLineEdit( this );
outPut = new QMultiLineEdit( this );
QFont outPut_font( outPut->font() );
outPut_font.setPointSize( 8 );
outPut->setFont( outPut_font );
outPut->setWordWrap( QMultiLineEdit::WidgetWidth );
connectButton = new QPushButton( this );
connectButton->setText( tr( "Connect" ) );
layout->addWidget(info);
layout->addWidget(cmdLine);
layout->addWidget(outPut);
layout->addWidget(connectButton);
connect( connectButton, SIGNAL( clicked() ), this, SLOT( connectToDevice() ) );
}
PPPDialog::~PPPDialog() {
}
void PPPDialog::connectToDevice() {
outPut->clear();
// vom popupmenu beziehen
QString connectScript = "/etc/ppp/peers/" + cmdLine->text();
OProcess* pppDial = new OProcess();
*pppDial << "pppd" << m_device << "call" << connectScript;
connect( pppDial, SIGNAL(receivedStdout(Opie::Core::OProcess*,char*,int) ),
- this, SLOT(fillOutPut(OProcess*,char*,int) ) );
+ this, SLOT(fillOutPut(Opie::Core::OProcess*,char*,int) ) );
if (!pppDial->start(OProcess::DontCare, OProcess::AllOutput) ) {
qWarning("could not start");
delete pppDial;
}
}
void PPPDialog::fillOutPut( OProcess* pppDial, char* cha, int len ) {
QCString str(cha, len );
outPut->insertLine( str );
delete pppDial;
}