summaryrefslogtreecommitdiff
path: root/noncore/net/opietooth
Unidiff
Diffstat (limited to 'noncore/net/opietooth') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/opietooth/lib/startdunconnection.cpp8
-rw-r--r--noncore/net/opietooth/lib/startpanconnection.cpp16
-rw-r--r--noncore/net/opietooth/manager/bluebase.cpp32
-rw-r--r--noncore/net/opietooth/manager/obexdialog.cpp2
-rw-r--r--noncore/net/opietooth/manager/pppdialog.cpp6
-rw-r--r--noncore/net/opietooth/manager/scandialog.cpp4
6 files changed, 34 insertions, 34 deletions
diff --git a/noncore/net/opietooth/lib/startdunconnection.cpp b/noncore/net/opietooth/lib/startdunconnection.cpp
index 6b6d247..c3850eb 100644
--- a/noncore/net/opietooth/lib/startdunconnection.cpp
+++ b/noncore/net/opietooth/lib/startdunconnection.cpp
@@ -30,28 +30,28 @@ QString StartDunConnection::name() {
30void StartDunConnection::setConnectionType() { 30void StartDunConnection::setConnectionType() {
31 m_connectionType = Pan; 31 m_connectionType = Pan;
32} 32}
33 33
34StartConnection::ConnectionType StartDunConnection::type() { 34StartConnection::ConnectionType StartDunConnection::type() {
35 return m_connectionType; 35 return m_connectionType;
36} 36}
37 37
38void StartDunConnection::start() { 38void StartDunConnection::start() {
39 m_dunConnect = new OProcess(); 39 m_dunConnect = new OProcess();
40 *m_dunConnect << "dund" << "--listen" << "--connect" << m_mac; 40 *m_dunConnect << "dund" << "--listen" << "--connect" << m_mac;
41 41
42 connect( m_dunConnect, SIGNAL( processExited( OProcess* ) ) , 42 connect( m_dunConnect, SIGNAL( processExited(OProcess*) ) ,
43 this, SLOT( slotExited( OProcess* ) ) ); 43 this, SLOT( slotExited(OProcess*) ) );
44 connect( m_dunConnect, SIGNAL( receivedStdout( OProcess*, char*, int ) ), 44 connect( m_dunConnect, SIGNAL( receivedStdout(OProcess*,char*,int) ),
45 this, SLOT( slotStdOut( OProcess*, char*, int ) ) ); 45 this, SLOT( slotStdOut(OProcess*,char*,int) ) );
46 if (!m_dunConnect->start( OProcess::NotifyOnExit, OProcess::AllOutput) ) { 46 if (!m_dunConnect->start( OProcess::NotifyOnExit, OProcess::AllOutput) ) {
47 qWarning( "could not start" ); 47 qWarning( "could not start" );
48 delete m_dunConnect; 48 delete m_dunConnect;
49 } 49 }
50} 50}
51 51
52 52
53void StartDunConnection::slotExited( OProcess* proc ) { 53void StartDunConnection::slotExited( OProcess* proc ) {
54 delete m_dunConnect; 54 delete m_dunConnect;
55} 55}
56 56
57void StartDunConnection::slotStdOut(OProcess* proc, char* chars, int len) 57void StartDunConnection::slotStdOut(OProcess* proc, char* chars, int len)
diff --git a/noncore/net/opietooth/lib/startpanconnection.cpp b/noncore/net/opietooth/lib/startpanconnection.cpp
index 6e0ab7e..a42b407 100644
--- a/noncore/net/opietooth/lib/startpanconnection.cpp
+++ b/noncore/net/opietooth/lib/startpanconnection.cpp
@@ -31,28 +31,28 @@ void StartPanConnection::setConnectionType() {
31 m_connectionType = Pan; 31 m_connectionType = Pan;
32} 32}
33 33
34StartConnection::ConnectionType StartPanConnection::type() { 34StartConnection::ConnectionType StartPanConnection::type() {
35 return m_connectionType; 35 return m_connectionType;
36} 36}
37 37
38void StartPanConnection::start() { 38void StartPanConnection::start() {
39 m_panConnect = new OProcess(); 39 m_panConnect = new OProcess();
40 qDebug( "IM START " + m_mac ); 40 qDebug( "IM START " + m_mac );
41 *m_panConnect << "pand" << "--connect" << m_mac; 41 *m_panConnect << "pand" << "--connect" << m_mac;
42 42
43 connect( m_panConnect, SIGNAL( processExited( OProcess* ) ) , 43 connect( m_panConnect, SIGNAL( processExited(OProcess*) ) ,
44 this, SLOT( slotExited( OProcess* ) ) ); 44 this, SLOT( slotExited(OProcess*) ) );
45 connect( m_panConnect, SIGNAL( receivedStdout( OProcess*, char*, int ) ), 45 connect( m_panConnect, SIGNAL( receivedStdout(OProcess*,char*,int) ),
46 this, SLOT( slotStdOut( OProcess*, char*, int ) ) ); 46 this, SLOT( slotStdOut(OProcess*,char*,int) ) );
47 if (!m_panConnect->start( OProcess::NotifyOnExit, OProcess::AllOutput) ) { 47 if (!m_panConnect->start( OProcess::NotifyOnExit, OProcess::AllOutput) ) {
48 qWarning( "could not start" ); 48 qWarning( "could not start" );
49 delete m_panConnect; 49 delete m_panConnect;
50 } 50 }
51} 51}
52 52
53 53
54void StartPanConnection::slotExited( OProcess* proc ) { 54void StartPanConnection::slotExited( OProcess* proc ) {
55 delete m_panConnect; 55 delete m_panConnect;
56 m_panConnect = 0l; 56 m_panConnect = 0l;
57} 57}
58 58
@@ -61,22 +61,22 @@ void StartPanConnection::slotStdOut(OProcess* proc, char* chars, int len)
61 61
62 62
63void StartPanConnection::stop() { 63void StartPanConnection::stop() {
64 if ( m_panConnect ) { 64 if ( m_panConnect ) {
65 delete m_panConnect; 65 delete m_panConnect;
66 m_panConnect = 0l; 66 m_panConnect = 0l;
67 } 67 }
68 m_panConnect = new OProcess(); 68 m_panConnect = new OProcess();
69 qDebug("IM STOP " + m_mac); 69 qDebug("IM STOP " + m_mac);
70 70
71 *m_panConnect << "pand" << "--kill" << m_mac; 71 *m_panConnect << "pand" << "--kill" << m_mac;
72 72
73 connect( m_panConnect, SIGNAL( processExited( OProcess* ) ) , 73 connect( m_panConnect, SIGNAL( processExited(OProcess*) ) ,
74 this, SLOT( slotExited( OProcess* ) ) ); 74 this, SLOT( slotExited(OProcess*) ) );
75 connect( m_panConnect, SIGNAL( receivedStdout( OProcess*, char*, int ) ), 75 connect( m_panConnect, SIGNAL( receivedStdout(OProcess*,char*,int) ),
76 this, SLOT( slotStdOut( OProcess*, char*, int ) ) ); 76 this, SLOT( slotStdOut(OProcess*,char*,int) ) );
77 if (!m_panConnect->start( OProcess::NotifyOnExit, OProcess::AllOutput) ) { 77 if (!m_panConnect->start( OProcess::NotifyOnExit, OProcess::AllOutput) ) {
78 qWarning( "could not stop" ); 78 qWarning( "could not stop" );
79 delete m_panConnect; 79 delete m_panConnect;
80 } 80 }
81} 81}
82 82
diff --git a/noncore/net/opietooth/manager/bluebase.cpp b/noncore/net/opietooth/manager/bluebase.cpp
index 0ea45d2..29030ab 100644
--- a/noncore/net/opietooth/manager/bluebase.cpp
+++ b/noncore/net/opietooth/manager/bluebase.cpp
@@ -56,38 +56,38 @@ using namespace OpieTooth;
56 56
57BlueBase::BlueBase( QWidget* parent, const char* name, WFlags fl ) 57BlueBase::BlueBase( QWidget* parent, const char* name, WFlags fl )
58 : BluetoothBase( parent, name, fl ) 58 : BluetoothBase( parent, name, fl )
59{ 59{
60 60
61 m_localDevice = new Manager( "hci0" ); 61 m_localDevice = new Manager( "hci0" );
62 62
63 connect( PushButton2, SIGNAL( clicked() ), this, SLOT(startScan() ) ); 63 connect( PushButton2, SIGNAL( clicked() ), this, SLOT(startScan() ) );
64 connect( configApplyButton, SIGNAL(clicked() ), this, SLOT(applyConfigChanges() ) ); 64 connect( configApplyButton, SIGNAL(clicked() ), this, SLOT(applyConfigChanges() ) );
65 65
66 connect( rfcommBindButton, SIGNAL( clicked() ), this, SLOT( rfcommDialog() ) ); 66 connect( rfcommBindButton, SIGNAL( clicked() ), this, SLOT( rfcommDialog() ) );
67 // not good since lib is async 67 // not good since lib is async
68 // connect( ListView2, SIGNAL( expanded ( QListViewItem* ) ), 68 // connect( ListView2, SIGNAL( expanded(QListViewItem*) ),
69 // this, SLOT( addServicesToDevice( QListViewItem * ) ) ); 69 // this, SLOT( addServicesToDevice(QListViewItem*) ) );
70 connect( ListView2, SIGNAL( clicked( QListViewItem* )), 70 connect( ListView2, SIGNAL( clicked(QListViewItem*)),
71 this, SLOT( startServiceActionClicked( QListViewItem* ) ) ); 71 this, SLOT( startServiceActionClicked(QListViewItem*) ) );
72 connect( ListView2, SIGNAL( rightButtonClicked( QListViewItem *, const QPoint &, int ) ), 72 connect( ListView2, SIGNAL( rightButtonClicked(QListViewItem*,const QPoint&,int) ),
73 this, SLOT(startServiceActionHold( QListViewItem *, const QPoint &, int) ) ); 73 this, SLOT(startServiceActionHold(QListViewItem*,const QPoint&,int) ) );
74 connect( m_localDevice , SIGNAL( foundServices( const QString& , Services::ValueList ) ), 74 connect( m_localDevice , SIGNAL( foundServices(const QString&,Services::ValueList) ),
75 this, SLOT( addServicesToDevice( const QString& , Services::ValueList ) ) ); 75 this, SLOT( addServicesToDevice(const QString&,Services::ValueList) ) );
76 connect( m_localDevice, SIGNAL( available( const QString&, bool ) ), 76 connect( m_localDevice, SIGNAL( available(const QString&,bool) ),
77 this, SLOT( deviceActive( const QString& , bool ) ) ); 77 this, SLOT( deviceActive(const QString&,bool) ) );
78 connect( m_localDevice, SIGNAL( connections( ConnectionState::ValueList ) ), 78 connect( m_localDevice, SIGNAL( connections(ConnectionState::ValueList) ),
79 this, SLOT( addConnectedDevices( ConnectionState::ValueList ) ) ); 79 this, SLOT( addConnectedDevices(ConnectionState::ValueList) ) );
80 connect( m_localDevice, SIGNAL( signalStrength( const QString&, const QString& ) ), 80 connect( m_localDevice, SIGNAL( signalStrength(const QString&,const QString&) ),
81 this, SLOT( addSignalStrength( const QString&, const QString& ) ) ); 81 this, SLOT( addSignalStrength(const QString&,const QString&) ) );
82 82
83 83
84 // let hold be rightButtonClicked() 84 // let hold be rightButtonClicked()
85 QPEApplication::setStylusOperation( ListView2->viewport(), QPEApplication::RightOnHold); 85 QPEApplication::setStylusOperation( ListView2->viewport(), QPEApplication::RightOnHold);
86 QPEApplication::setStylusOperation( ListView4->viewport(), QPEApplication::RightOnHold); 86 QPEApplication::setStylusOperation( ListView4->viewport(), QPEApplication::RightOnHold);
87 87
88 //Load all icons needed 88 //Load all icons needed
89 m_offPix = Resource::loadPixmap( "opietooth/notconnected" ); 89 m_offPix = Resource::loadPixmap( "opietooth/notconnected" );
90 m_onPix = Resource::loadPixmap( "opietooth/connected" ); 90 m_onPix = Resource::loadPixmap( "opietooth/connected" );
91 m_findPix = Resource::loadPixmap( "opietooth/find" ); 91 m_findPix = Resource::loadPixmap( "opietooth/find" );
92 92
93 QPalette pal = this->palette(); 93 QPalette pal = this->palette();
@@ -628,26 +628,26 @@ void BlueBase::deviceActive( const QString& device, bool connected )
628 } 628 }
629 m_deviceList.remove( it ); 629 m_deviceList.remove( it );
630} 630}
631 631
632 632
633/** 633/**
634 * Open the "scan for devices" dialog 634 * Open the "scan for devices" dialog
635 */ 635 */
636void BlueBase::startScan() 636void BlueBase::startScan()
637{ 637{
638 ScanDialog *scan = new ScanDialog( this, "ScanDialog", 638 ScanDialog *scan = new ScanDialog( this, "ScanDialog",
639 true, WDestructiveClose ); 639 true, WDestructiveClose );
640 QObject::connect( scan, SIGNAL( selectedDevices( const QValueList<RemoteDevice>& ) ), 640 QObject::connect( scan, SIGNAL( selectedDevices(const QValueList<RemoteDevice>&) ),
641 this, SLOT( addSearchedDevices( const QValueList<RemoteDevice>& ) ) ); 641 this, SLOT( addSearchedDevices(const QValueList<RemoteDevice>&) ) );
642 642
643 QPEApplication::showDialog( scan ); 643 QPEApplication::showDialog( scan );
644} 644}
645 645
646 646
647/** 647/**
648 * Set the informations about the local device in information Tab 648 * Set the informations about the local device in information Tab
649 */ 649 */
650void BlueBase::setInfo() 650void BlueBase::setInfo()
651{ 651{
652 StatusLabel->setText( status() ); 652 StatusLabel->setText( status() );
653} 653}
diff --git a/noncore/net/opietooth/manager/obexdialog.cpp b/noncore/net/opietooth/manager/obexdialog.cpp
index 15973d4..46a0e3d 100644
--- a/noncore/net/opietooth/manager/obexdialog.cpp
+++ b/noncore/net/opietooth/manager/obexdialog.cpp
@@ -36,25 +36,25 @@ ObexDialog::ObexDialog( QWidget* parent, const char* name, bool modal, WFlags f
36 36
37 chNameLine = new QLineEdit( this ); 37 chNameLine = new QLineEdit( this );
38 38
39 sendButton = new QPushButton( this ); 39 sendButton = new QPushButton( this );
40 sendButton->setText( tr( "Send" ) ); 40 sendButton->setText( tr( "Send" ) );
41 41
42 layout->addWidget(info); 42 layout->addWidget(info);
43 layout->addWidget(cmdLine); 43 layout->addWidget(cmdLine);
44 layout->addWidget(browserButton); 44 layout->addWidget(browserButton);
45 layout->addWidget(chNameLine); 45 layout->addWidget(chNameLine);
46 layout->addWidget(sendButton); 46 layout->addWidget(sendButton);
47 47
48 connect( sendButton, SIGNAL( clicked() ), this, SLOT( sendData() ) ); 48 connect( sendButton, SIGNAL( clicked() ), this, SLOT( sendData() ) );
49 49
50} 50}
51 51
52ObexDialog::~ObexDialog() { 52ObexDialog::~ObexDialog() {
53} 53}
54 54
55void ObexDialog::browse() { 55void ObexDialog::browse() {
56 56
57 MimeTypes types; 57 MimeTypes types;
58 QStringList all; 58 QStringList all;
59 all << "*/*"; 59 all << "*/*";
60 types.insert("All Files", all ); 60 types.insert("All Files", all );
diff --git a/noncore/net/opietooth/manager/pppdialog.cpp b/noncore/net/opietooth/manager/pppdialog.cpp
index 1f347ce..4e58552 100644
--- a/noncore/net/opietooth/manager/pppdialog.cpp
+++ b/noncore/net/opietooth/manager/pppdialog.cpp
@@ -30,39 +30,39 @@ PPPDialog::PPPDialog( QWidget* parent, const char* name, bool modal, WFlags fl,
30 outPut_font.setPointSize( 8 ); 30 outPut_font.setPointSize( 8 );
31 outPut->setFont( outPut_font ); 31 outPut->setFont( outPut_font );
32 outPut->setWordWrap( QMultiLineEdit::WidgetWidth ); 32 outPut->setWordWrap( QMultiLineEdit::WidgetWidth );
33 33
34 connectButton = new QPushButton( this ); 34 connectButton = new QPushButton( this );
35 connectButton->setText( tr( "Connect" ) ); 35 connectButton->setText( tr( "Connect" ) );
36 36
37 layout->addWidget(info); 37 layout->addWidget(info);
38 layout->addWidget(cmdLine); 38 layout->addWidget(cmdLine);
39 layout->addWidget(outPut); 39 layout->addWidget(outPut);
40 layout->addWidget(connectButton); 40 layout->addWidget(connectButton);
41 41
42 connect( connectButton, SIGNAL( clicked() ), this, SLOT( connectToDevice() ) ); 42 connect( connectButton, SIGNAL( clicked() ), this, SLOT( connectToDevice() ) );
43 43
44} 44}
45 45
46PPPDialog::~PPPDialog() { 46PPPDialog::~PPPDialog() {
47} 47}
48 48
49void PPPDialog::connectToDevice() { 49void PPPDialog::connectToDevice() {
50 outPut->clear(); 50 outPut->clear();
51 // vom popupmenu beziehen 51 // vom popupmenu beziehen
52 QString connectScript = "/etc/ppp/peers/" + cmdLine->text(); 52 QString connectScript = "/etc/ppp/peers/" + cmdLine->text();
53 OProcess* pppDial = new OProcess(); 53 OProcess* pppDial = new OProcess();
54 *pppDial << "pppd" << m_device << "call" << connectScript; 54 *pppDial << "pppd" << m_device << "call" << connectScript;
55 connect( pppDial, SIGNAL(receivedStdout(OProcess*, char*, int ) ), 55 connect( pppDial, SIGNAL(receivedStdout(OProcess*,char*,int) ),
56 this, SLOT(fillOutPut(OProcess*, char*, int ) ) ); 56 this, SLOT(fillOutPut(OProcess*,char*,int) ) );
57 if (!pppDial->start(OProcess::DontCare, OProcess::AllOutput) ) { 57 if (!pppDial->start(OProcess::DontCare, OProcess::AllOutput) ) {
58 qWarning("could not start"); 58 qWarning("could not start");
59 delete pppDial; 59 delete pppDial;
60 } 60 }
61} 61}
62 62
63void PPPDialog::fillOutPut( OProcess* pppDial, char* cha, int len ) { 63void PPPDialog::fillOutPut( OProcess* pppDial, char* cha, int len ) {
64 QCString str(cha, len ); 64 QCString str(cha, len );
65 outPut->insertLine( str ); 65 outPut->insertLine( str );
66 delete pppDial; 66 delete pppDial;
67} 67}
68 68
diff --git a/noncore/net/opietooth/manager/scandialog.cpp b/noncore/net/opietooth/manager/scandialog.cpp
index de4f742..c8ea3e3 100644
--- a/noncore/net/opietooth/manager/scandialog.cpp
+++ b/noncore/net/opietooth/manager/scandialog.cpp
@@ -57,26 +57,26 @@ namespace OpieTooth {
57 57
58 //ListView1->addColumn( tr( "Add" ) ); 58 //ListView1->addColumn( tr( "Add" ) );
59 ListView1->addColumn( tr( "Add Device" ) ); 59 ListView1->addColumn( tr( "Add Device" ) );
60 //ListView1->addColumn( tr( "Type" ) ); 60 //ListView1->addColumn( tr( "Type" ) );
61 61
62 Layout11->addWidget( ListView1 ); 62 Layout11->addWidget( ListView1 );
63 Layout11->addWidget( progress ); 63 Layout11->addWidget( progress );
64 Layout11->addWidget( StartStopButton ); 64 Layout11->addWidget( StartStopButton );
65 65
66 localDevice = new Manager( "hci0" ); 66 localDevice = new Manager( "hci0" );
67 67
68 connect( StartStopButton, SIGNAL( clicked() ), this, SLOT( startSearch() ) ); 68 connect( StartStopButton, SIGNAL( clicked() ), this, SLOT( startSearch() ) );
69 connect( localDevice, SIGNAL( foundDevices( const QString& , RemoteDevice::ValueList ) ), 69 connect( localDevice, SIGNAL( foundDevices(const QString&,RemoteDevice::ValueList) ),
70 this, SLOT( fillList( const QString& , RemoteDevice::ValueList ) ) ) ; 70 this, SLOT( fillList(const QString&,RemoteDevice::ValueList) ) ) ;
71 71
72 progressStat = 0; 72 progressStat = 0;
73 m_search = false; 73 m_search = false;
74 } 74 }
75 75
76// hack, make cleaner later 76// hack, make cleaner later
77 void ScanDialog::progressTimer() { 77 void ScanDialog::progressTimer() {
78 78
79 progressStat++; 79 progressStat++;
80 if ( progressStat++ < 20 && m_search ) { 80 if ( progressStat++ < 20 && m_search ) {
81 QTimer::singleShot( 2000, this, SLOT( progressTimer() ) ); 81 QTimer::singleShot( 2000, this, SLOT( progressTimer() ) );
82 progress->setProgress( progressStat++ ); 82 progress->setProgress( progressStat++ );