summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-console
Unidiff
Diffstat (limited to 'noncore/apps/opie-console') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-console/io_bt.cpp4
-rw-r--r--noncore/apps/opie-console/io_bt.h4
-rw-r--r--noncore/apps/opie-console/io_irda.cpp4
-rw-r--r--noncore/apps/opie-console/io_irda.h4
-rw-r--r--noncore/apps/opie-console/io_modem.cpp2
-rw-r--r--noncore/apps/opie-console/io_modem.h2
-rw-r--r--noncore/apps/opie-console/mainwindow.cpp5
-rw-r--r--noncore/apps/opie-console/profileeditordialog.cpp1
-rw-r--r--noncore/apps/opie-console/profileeditordialog.h2
-rw-r--r--noncore/apps/opie-console/sz_transfer.cpp8
-rw-r--r--noncore/apps/opie-console/sz_transfer.h6
-rw-r--r--noncore/apps/opie-console/tabwidget.cpp1
-rw-r--r--noncore/apps/opie-console/tabwidget.h2
-rw-r--r--noncore/apps/opie-console/test/senderui.cpp2
-rw-r--r--noncore/apps/opie-console/test/senderui.h4
-rw-r--r--noncore/apps/opie-console/transferdialog.cpp3
16 files changed, 34 insertions, 20 deletions
diff --git a/noncore/apps/opie-console/io_bt.cpp b/noncore/apps/opie-console/io_bt.cpp
index 1a8c979..35a328f 100644
--- a/noncore/apps/opie-console/io_bt.cpp
+++ b/noncore/apps/opie-console/io_bt.cpp
@@ -1,15 +1,17 @@
1 1
2#include "io_bt.h" 2#include "io_bt.h"
3 3
4using namespace Opie::Core;
5using namespace Opie::Core;
4IOBt::IOBt( const Profile &config ) : IOSerial( config ) { 6IOBt::IOBt( const Profile &config ) : IOSerial( config ) {
5 m_attach = 0; 7 m_attach = 0;
6} 8}
7 9
8 10
9IOBt::~IOBt() { 11IOBt::~IOBt() {
10 if ( m_attach ) { 12 if ( m_attach ) {
11 delete m_attach; 13 delete m_attach;
12 } 14 }
13} 15}
14 16
15 17
@@ -27,25 +29,25 @@ bool IOBt::open() {
27 bool ret = false; 29 bool ret = false;
28 30
29 // only set up bt stuff if mac address was set, otherwise use the device set 31 // only set up bt stuff if mac address was set, otherwise use the device set
30 if ( !m_mac.isEmpty() ) { 32 if ( !m_mac.isEmpty() ) {
31 33
32 // now it should also be checked, if there is a connection to the device with that mac allready 34 // now it should also be checked, if there is a connection to the device with that mac allready
33 // hciattach here 35 // hciattach here
34 m_attach = new OProcess(); 36 m_attach = new OProcess();
35 *m_attach << "hciattach /dev/ttyS2 any 57600"; 37 *m_attach << "hciattach /dev/ttyS2 any 57600";
36 38
37 // then start hcid, then rcfomm handling (m_mac) 39 // then start hcid, then rcfomm handling (m_mac)
38 40
39 connect( m_attach, SIGNAL( processExited(OProcess*) ), 41 connect( m_attach, SIGNAL( processExited(Opie::Core::OProcess*) ),
40 this, SLOT( slotExited(OProcess*) ) ); 42 this, SLOT( slotExited(OProcess*) ) );
41 43
42 if ( m_attach->start() ) { 44 if ( m_attach->start() ) {
43 ret = IOSerial::open(); 45 ret = IOSerial::open();
44 } else { 46 } else {
45 qWarning("could not attach to device"); 47 qWarning("could not attach to device");
46 delete m_attach; 48 delete m_attach;
47 m_attach = 0; 49 m_attach = 0;
48 } 50 }
49 } else { 51 } else {
50 // directly to the normal serial 52 // directly to the normal serial
51 // TODO: look first if the connection really exists. ( is set up ) 53 // TODO: look first if the connection really exists. ( is set up )
diff --git a/noncore/apps/opie-console/io_bt.h b/noncore/apps/opie-console/io_bt.h
index df6dd38..00ca7e5 100644
--- a/noncore/apps/opie-console/io_bt.h
+++ b/noncore/apps/opie-console/io_bt.h
@@ -32,20 +32,20 @@ public:
32 32
33signals: 33signals:
34 void received(const QByteArray &); 34 void received(const QByteArray &);
35 void error(int, const QString &); 35 void error(int, const QString &);
36 36
37public slots: 37public slots:
38 virtual void send( const QByteArray& ); 38 virtual void send( const QByteArray& );
39 virtual bool open(); 39 virtual bool open();
40 virtual void close(); 40 virtual void close();
41 virtual void reload(const Profile &); 41 virtual void reload(const Profile &);
42 42
43private: 43private:
44 OProcess *m_attach; 44 Opie::Core::OProcess *m_attach;
45 QString m_mac; 45 QString m_mac;
46private slots: 46private slots:
47 void slotExited(OProcess* proc); 47 void slotExited(Opie::Core::OProcess* proc);
48 48
49}; 49};
50 50
51#endif /* OPIE_IO_IRDA */ 51#endif /* OPIE_IO_IRDA */
diff --git a/noncore/apps/opie-console/io_irda.cpp b/noncore/apps/opie-console/io_irda.cpp
index b281b7d..ba0b0e5 100644
--- a/noncore/apps/opie-console/io_irda.cpp
+++ b/noncore/apps/opie-console/io_irda.cpp
@@ -1,15 +1,17 @@
1 1
2#include "io_irda.h" 2#include "io_irda.h"
3 3
4using namespace Opie::Core;
5using namespace Opie::Core;
4IOIrda::IOIrda( const Profile &config ) : IOSerial( config ) { 6IOIrda::IOIrda( const Profile &config ) : IOSerial( config ) {
5 m_attach = 0; 7 m_attach = 0;
6} 8}
7 9
8 10
9IOIrda::~IOIrda() { 11IOIrda::~IOIrda() {
10 if ( m_attach ) { 12 if ( m_attach ) {
11 delete m_attach; 13 delete m_attach;
12 } 14 }
13} 15}
14 16
15 17
@@ -18,25 +20,25 @@ void IOIrda::close() {
18 IOSerial::close(); 20 IOSerial::close();
19 // still need error handling 21 // still need error handling
20 delete m_attach; 22 delete m_attach;
21} 23}
22 24
23bool IOIrda::open() { 25bool IOIrda::open() {
24 bool ret; 26 bool ret;
25 27
26 // irdaattach here 28 // irdaattach here
27 m_attach = new OProcess(); 29 m_attach = new OProcess();
28 *m_attach << "irattach /dev/ttyS2 -s"; 30 *m_attach << "irattach /dev/ttyS2 -s";
29 31
30 connect( m_attach, SIGNAL( processExited(OProcess*) ), 32 connect( m_attach, SIGNAL( processExited(Opie::Core::OProcess*) ),
31 this, SLOT( slotExited(OProcess*) ) ); 33 this, SLOT( slotExited(OProcess*) ) );
32 34
33 if ( m_attach->start() ) { 35 if ( m_attach->start() ) {
34 ret= IOSerial::open(); 36 ret= IOSerial::open();
35 } else { 37 } else {
36 // emit error!!! 38 // emit error!!!
37 qWarning("could not attach to device"); 39 qWarning("could not attach to device");
38 delete m_attach; 40 delete m_attach;
39 m_attach = 0l; 41 m_attach = 0l;
40 } 42 }
41 return ret; 43 return ret;
42} 44}
diff --git a/noncore/apps/opie-console/io_irda.h b/noncore/apps/opie-console/io_irda.h
index 69bed7d..fb29686 100644
--- a/noncore/apps/opie-console/io_irda.h
+++ b/noncore/apps/opie-console/io_irda.h
@@ -30,20 +30,20 @@ public:
30 30
31signals: 31signals:
32 void received(const QByteArray &); 32 void received(const QByteArray &);
33 void error(int, const QString &); 33 void error(int, const QString &);
34 34
35public slots: 35public slots:
36 virtual void send( const QByteArray& ); 36 virtual void send( const QByteArray& );
37 virtual bool open(); 37 virtual bool open();
38 virtual void close(); 38 virtual void close();
39 virtual void reload(const Profile &); 39 virtual void reload(const Profile &);
40 40
41private: 41private:
42 OProcess *m_attach; 42 Opie::Core::OProcess *m_attach;
43 43
44private slots: 44private slots:
45 void slotExited(OProcess* proc); 45 void slotExited(Opie::Core::OProcess* proc);
46 46
47}; 47};
48 48
49#endif /* OPIE_IO_IRDA */ 49#endif /* OPIE_IO_IRDA */
diff --git a/noncore/apps/opie-console/io_modem.cpp b/noncore/apps/opie-console/io_modem.cpp
index 1ce680a..b74d076 100644
--- a/noncore/apps/opie-console/io_modem.cpp
+++ b/noncore/apps/opie-console/io_modem.cpp
@@ -1,17 +1,19 @@
1 1
2#include "io_modem.h" 2#include "io_modem.h"
3 3
4#include "dialer.h" 4#include "dialer.h"
5 5
6using namespace Opie::Core;
7using namespace Opie::Core;
6IOModem::IOModem( const Profile &profile ) 8IOModem::IOModem( const Profile &profile )
7 : IOSerial( profile ) { 9 : IOSerial( profile ) {
8 m_profile = profile; 10 m_profile = profile;
9} 11}
10 12
11 13
12IOModem::~IOModem() { 14IOModem::~IOModem() {
13 15
14} 16}
15 17
16 18
17void IOModem::close() { 19void IOModem::close() {
diff --git a/noncore/apps/opie-console/io_modem.h b/noncore/apps/opie-console/io_modem.h
index 96ec3ef..5b99e00 100644
--- a/noncore/apps/opie-console/io_modem.h
+++ b/noncore/apps/opie-console/io_modem.h
@@ -58,17 +58,17 @@ public slots:
58 virtual void close(); 58 virtual void close();
59 virtual void reload(const Profile &); 59 virtual void reload(const Profile &);
60 60
61private: 61private:
62 62
63 QString m_initString, m_resetString, m_dialPref1, m_dialSuf1, m_dialPref2, 63 QString m_initString, m_resetString, m_dialPref1, m_dialSuf1, m_dialPref2,
64 m_dialSuf2, m_dialPref3, m_dialSuf3, m_connect, m_hangup, m_cancel; 64 m_dialSuf2, m_dialPref3, m_dialSuf3, m_connect, m_hangup, m_cancel;
65 int m_dialTime, m_delayRedial, m_numberTries, m_dtrDropTime, 65 int m_dialTime, m_delayRedial, m_numberTries, m_dtrDropTime,
66 m_bpsDetect, m_dcdLines, m_multiLineUntag; 66 m_bpsDetect, m_dcdLines, m_multiLineUntag;
67 Profile m_profile; 67 Profile m_profile;
68 68
69private slots: 69private slots:
70 void slotExited(OProcess* proc); 70 void slotExited(Opie::Core::OProcess* proc);
71 71
72}; 72};
73 73
74#endif 74#endif
diff --git a/noncore/apps/opie-console/mainwindow.cpp b/noncore/apps/opie-console/mainwindow.cpp
index 197f799..06a8f7d 100644
--- a/noncore/apps/opie-console/mainwindow.cpp
+++ b/noncore/apps/opie-console/mainwindow.cpp
@@ -15,24 +15,25 @@
15#include "profileeditordialog.h" 15#include "profileeditordialog.h"
16#include "configdialog.h" 16#include "configdialog.h"
17#include "default.h" 17#include "default.h"
18#include "profilemanager.h" 18#include "profilemanager.h"
19#include "mainwindow.h" 19#include "mainwindow.h"
20#include "tabwidget.h" 20#include "tabwidget.h"
21#include "transferdialog.h" 21#include "transferdialog.h"
22#include "function_keyboard.h" 22#include "function_keyboard.h"
23#include "emulation_handler.h" 23#include "emulation_handler.h"
24#include "script.h" 24#include "script.h"
25 25
26 26
27using namespace Opie::Ui;
27MainWindow::MainWindow(QWidget *parent, const char *name, WFlags) : QMainWindow(parent, name, WStyle_ContextHelp) { 28MainWindow::MainWindow(QWidget *parent, const char *name, WFlags) : QMainWindow(parent, name, WStyle_ContextHelp) {
28 KeyTrans::loadAll(); 29 KeyTrans::loadAll();
29 for (int i = 0; i < KeyTrans::count(); i++ ) { 30 for (int i = 0; i < KeyTrans::count(); i++ ) {
30 KeyTrans* s = KeyTrans::find(i ); 31 KeyTrans* s = KeyTrans::find(i );
31 assert( s ); 32 assert( s );
32 } 33 }
33 m_factory = new MetaFactory(); 34 m_factory = new MetaFactory();
34 Default def(m_factory); 35 Default def(m_factory);
35 m_sessions.setAutoDelete( TRUE ); 36 m_sessions.setAutoDelete( TRUE );
36 m_curSession = 0; 37 m_curSession = 0;
37 m_manager = new ProfileManager( m_factory ); 38 m_manager = new ProfileManager( m_factory );
38 m_manager->load(); 39 m_manager->load();
@@ -323,25 +324,25 @@ void MainWindow::slotRecordScript() {
323 currentSession()->emulationHandler()->startRecording(); 324 currentSession()->emulationHandler()->startRecording();
324 m_saveScript->setEnabled(true); 325 m_saveScript->setEnabled(true);
325 m_recordScript->setEnabled(false); 326 m_recordScript->setEnabled(false);
326 } 327 }
327} 328}
328 329
329void MainWindow::slotSaveScript() { 330void MainWindow::slotSaveScript() {
330 if (currentSession() && currentSession()->emulationHandler()->isRecording()) { 331 if (currentSession() && currentSession()->emulationHandler()->isRecording()) {
331 QMap<QString, QStringList> map; 332 QMap<QString, QStringList> map;
332 QStringList text; 333 QStringList text;
333 text << "text/plain"; 334 text << "text/plain";
334 map.insert(tr("Script"), text ); 335 map.insert(tr("Script"), text );
335 QString filename = Opie::OFileDialog::getSaveFileName(2, QPEApplication::documentDir(), QString::null, map); 336 QString filename = OFileDialog::getSaveFileName(2, QPEApplication::documentDir(), QString::null, map);
336 if (!filename.isEmpty()) { 337 if (!filename.isEmpty()) {
337 QFileInfo info(filename); 338 QFileInfo info(filename);
338 if (info.extension(FALSE) != "script") 339 if (info.extension(FALSE) != "script")
339 filename += ".script"; 340 filename += ".script";
340 DocLnk nf; 341 DocLnk nf;
341 nf.setType("text/plain"); 342 nf.setType("text/plain");
342 nf.setFile(filename); 343 nf.setFile(filename);
343 nf.setName(info.fileName()); 344 nf.setName(info.fileName());
344 FileManager fm; 345 FileManager fm;
345 fm.saveFile(nf, currentSession()->emulationHandler()->script()->script()); 346 fm.saveFile(nf, currentSession()->emulationHandler()->script()->script());
346 currentSession()->emulationHandler()->clearScript(); 347 currentSession()->emulationHandler()->clearScript();
347 m_saveScript->setEnabled(false); 348 m_saveScript->setEnabled(false);
@@ -696,25 +697,25 @@ void MainWindow::slotSaveSession() {
696 tr("<qt>There is no Connection.</qt>"), 1 ); 697 tr("<qt>There is no Connection.</qt>"), 1 );
697 return; 698 return;
698 } 699 }
699 manager()->add( currentSession()->profile() ); 700 manager()->add( currentSession()->profile() );
700 manager()->save(); 701 manager()->save();
701 populateProfiles(); 702 populateProfiles();
702} 703}
703void MainWindow::slotSaveHistory() { 704void MainWindow::slotSaveHistory() {
704 QMap<QString, QStringList> map; 705 QMap<QString, QStringList> map;
705 QStringList text; 706 QStringList text;
706 text << "text/plain"; 707 text << "text/plain";
707 map.insert(tr("History"), text ); 708 map.insert(tr("History"), text );
708 QString filename = Opie::OFileDialog::getSaveFileName(2, QPEApplication::documentDir(), QString::null, map); 709 QString filename = OFileDialog::getSaveFileName(2, QPEApplication::documentDir(), QString::null, map);
709 if (filename.isEmpty() ) return; 710 if (filename.isEmpty() ) return;
710 711
711 QFileInfo info(filename); 712 QFileInfo info(filename);
712 713
713 DocLnk nf; 714 DocLnk nf;
714 nf.setType("text/plain"); 715 nf.setType("text/plain");
715 nf.setFile(filename); 716 nf.setFile(filename);
716 nf.setName(info.fileName()); 717 nf.setName(info.fileName());
717 718
718 719
719 QFile file(filename); 720 QFile file(filename);
720 file.open(IO_WriteOnly ); 721 file.open(IO_WriteOnly );
diff --git a/noncore/apps/opie-console/profileeditordialog.cpp b/noncore/apps/opie-console/profileeditordialog.cpp
index 6e1e23e..dc42d8b 100644
--- a/noncore/apps/opie-console/profileeditordialog.cpp
+++ b/noncore/apps/opie-console/profileeditordialog.cpp
@@ -1,23 +1,24 @@
1#include <qlayout.h> 1#include <qlayout.h>
2#include <qlineedit.h> 2#include <qlineedit.h>
3#include <qlabel.h> 3#include <qlabel.h>
4#include <qmessagebox.h> 4#include <qmessagebox.h>
5#include <qcombobox.h> 5#include <qcombobox.h>
6#include <qcheckbox.h> 6#include <qcheckbox.h>
7#include <qscrollview.h> 7#include <qscrollview.h>
8 8
9#include "metafactory.h" 9#include "metafactory.h"
10#include "profileeditordialog.h" 10#include "profileeditordialog.h"
11 11
12using namespace Opie::Ui;
12namespace { 13namespace {
13 void setCurrent( const QString& str, QComboBox* bo ) { 14 void setCurrent( const QString& str, QComboBox* bo ) {
14 for (int i = 0; i < bo->count(); i++ ) { 15 for (int i = 0; i < bo->count(); i++ ) {
15 if ( bo->text(i) == str ) { 16 if ( bo->text(i) == str ) {
16 bo->setCurrentItem( i ); 17 bo->setCurrentItem( i );
17 } 18 }
18 } 19 }
19 }; 20 };
20} 21}
21 22
22ProfileEditorDialog::ProfileEditorDialog( MetaFactory* fact, 23ProfileEditorDialog::ProfileEditorDialog( MetaFactory* fact,
23 const Profile& prof ) 24 const Profile& prof )
diff --git a/noncore/apps/opie-console/profileeditordialog.h b/noncore/apps/opie-console/profileeditordialog.h
index 97bd650..e7a88e9 100644
--- a/noncore/apps/opie-console/profileeditordialog.h
+++ b/noncore/apps/opie-console/profileeditordialog.h
@@ -44,18 +44,18 @@ private:
44 QHBoxLayout* m_lay; 44 QHBoxLayout* m_lay;
45 Profile m_prof; 45 Profile m_prof;
46 46
47 QLineEdit *m_name; 47 QLineEdit *m_name;
48 QComboBox *m_conCmb, *m_termCmb; 48 QComboBox *m_conCmb, *m_termCmb;
49 QCheckBox *m_autoConnect; 49 QCheckBox *m_autoConnect;
50 50
51 QScrollView *m_svCon, *m_svTerm; 51 QScrollView *m_svCon, *m_svTerm;
52 52
53 QWidget *m_tabCon, *m_tabTerm, *m_tabKey; 53 QWidget *m_tabCon, *m_tabTerm, *m_tabKey;
54 ProfileDialogWidget* m_con, *m_term, *m_key; 54 ProfileDialogWidget* m_con, *m_term, *m_key;
55 QHBoxLayout *m_layCon, *m_layTerm, *m_layKey; 55 QHBoxLayout *m_layCon, *m_layTerm, *m_layKey;
56 OTabWidget *tabWidget; 56 Opie::Ui::OTabWidget *tabWidget;
57 QWidget *tabprof; 57 QWidget *tabprof;
58 int m_showconntab; 58 int m_showconntab;
59}; 59};
60 60
61#endif 61#endif
diff --git a/noncore/apps/opie-console/sz_transfer.cpp b/noncore/apps/opie-console/sz_transfer.cpp
index 2f82417..5958e93 100644
--- a/noncore/apps/opie-console/sz_transfer.cpp
+++ b/noncore/apps/opie-console/sz_transfer.cpp
@@ -1,44 +1,46 @@
1 1
2#include "sz_transfer.h" 2#include "sz_transfer.h"
3#include <qfile.h> 3#include <qfile.h>
4#include <stdio.h> 4#include <stdio.h>
5#include <sys/termios.h> 5#include <sys/termios.h>
6 6
7 7
8 8
9using namespace Opie::Core;
10using namespace Opie::Core;
9SzTransfer::SzTransfer(Type t, IOLayer *layer) : FileTransferLayer(layer), m_t(t) 11SzTransfer::SzTransfer(Type t, IOLayer *layer) : FileTransferLayer(layer), m_t(t)
10{ 12{
11} 13}
12 14
13SzTransfer::~SzTransfer() { 15SzTransfer::~SzTransfer() {
14} 16}
15 17
16void SzTransfer::sendFile(const QFile& file) { 18void SzTransfer::sendFile(const QFile& file) {
17 19
18 sendFile(file.name()); 20 sendFile(file.name());
19} 21}
20 22
21void SzTransfer::sendFile(const QString& file) { 23void SzTransfer::sendFile(const QString& file) {
22 24
23 //setcbreak(2); /* raw no echo */ 25 //setcbreak(2); /* raw no echo */
24 26
25 proc = new OProcess; 27 proc = new OProcess;
26 *proc << "sz"; 28 *proc << "sz";
27 *proc << "-v" << "-v" << "-b" << file; 29 *proc << "-v" << "-v" << "-b" << file;
28 connect(proc, SIGNAL(processExited(OProcess*)), 30 connect(proc, SIGNAL(processExited(Opie::Core::OProcess*)),
29 this, SLOT(sent())); 31 this, SLOT(sent()));
30 connect(proc, SIGNAL(receivedStdout(OProcess*,char*,int)), 32 connect(proc, SIGNAL(receivedStdout(Opie::Core::OProcess*,char*,int)),
31 this, SLOT(SzReceivedStdout(OProcess*,char*,int))); 33 this, SLOT(SzReceivedStdout(OProcess*,char*,int)));
32 connect(proc, SIGNAL(receivedStderr(OProcess*,char*,int)), 34 connect(proc, SIGNAL(receivedStderr(Opie::Core::OProcess*,char*,int)),
33 this, SLOT(SzReceivedStderr(OProcess*,char*,int))); 35 this, SLOT(SzReceivedStderr(OProcess*,char*,int)));
34 connect(layer(), SIGNAL(received(const QByteArray&)), 36 connect(layer(), SIGNAL(received(const QByteArray&)),
35 this, SLOT(receivedStdin(const QByteArray&))); 37 this, SLOT(receivedStdin(const QByteArray&)));
36 proc->start(OProcess::NotifyOnExit, OProcess::All); 38 proc->start(OProcess::NotifyOnExit, OProcess::All);
37 39
38} 40}
39 41
40void SzTransfer::SzReceivedStdout(OProcess *, char *buffer, int buflen) { 42void SzTransfer::SzReceivedStdout(OProcess *, char *buffer, int buflen) {
41 43
42 qWarning("recieved from sz on stdout %d bytes", buflen); 44 qWarning("recieved from sz on stdout %d bytes", buflen);
43 45
44 QByteArray data(buflen); 46 QByteArray data(buflen);
diff --git a/noncore/apps/opie-console/sz_transfer.h b/noncore/apps/opie-console/sz_transfer.h
index aa97c32..0505215 100644
--- a/noncore/apps/opie-console/sz_transfer.h
+++ b/noncore/apps/opie-console/sz_transfer.h
@@ -18,23 +18,23 @@ public:
18 SzTransfer( Type t, IOLayer * ); 18 SzTransfer( Type t, IOLayer * );
19 ~SzTransfer(); 19 ~SzTransfer();
20 20
21public slots: 21public slots:
22 /** 22 /**
23 * send a file over the layer 23 * send a file over the layer
24 */ 24 */
25 void sendFile( const QString& file ) ; 25 void sendFile( const QString& file ) ;
26 void sendFile( const QFile& ); 26 void sendFile( const QFile& );
27 void sent(); 27 void sent();
28 28
29private slots: 29private slots:
30 void SzReceivedStdout(OProcess *, char *, int); 30 void SzReceivedStdout(Opie::Core::OProcess *, char *, int);
31 void SzReceivedStderr(OProcess *, char *, int); 31 void SzReceivedStderr(Opie::Core::OProcess *, char *, int);
32 void receivedStdin(const QByteArray &); 32 void receivedStdin(const QByteArray &);
33 33
34private: 34private:
35 OProcess *proc; 35 Opie::Core::OProcess *proc;
36 Type m_t; 36 Type m_t;
37 37
38}; 38};
39 39
40#endif 40#endif
diff --git a/noncore/apps/opie-console/tabwidget.cpp b/noncore/apps/opie-console/tabwidget.cpp
index 419f8ac..6429e3c 100644
--- a/noncore/apps/opie-console/tabwidget.cpp
+++ b/noncore/apps/opie-console/tabwidget.cpp
@@ -1,15 +1,16 @@
1 1
2#include "tabwidget.h" 2#include "tabwidget.h"
3 3
4using namespace Opie::Ui;
4TabWidget::TabWidget( QWidget* parent, const char* name ) 5TabWidget::TabWidget( QWidget* parent, const char* name )
5 : OTabWidget( parent, name ) { 6 : OTabWidget( parent, name ) {
6 connect(this, SIGNAL( currentChanged(QWidget*) ), 7 connect(this, SIGNAL( currentChanged(QWidget*) ),
7 this, SLOT( slotCurChanged(QWidget*) ) ); 8 this, SLOT( slotCurChanged(QWidget*) ) );
8} 9}
9 10
10TabWidget::~TabWidget() { 11TabWidget::~TabWidget() {
11} 12}
12 13
13void TabWidget::add( Session* ses ) { 14void TabWidget::add( Session* ses ) {
14 qWarning("session ses " + ses->name() ); 15 qWarning("session ses " + ses->name() );
15 if ( !ses->widgetStack() ) return; 16 if ( !ses->widgetStack() ) return;
diff --git a/noncore/apps/opie-console/tabwidget.h b/noncore/apps/opie-console/tabwidget.h
index 98450a3..0138645 100644
--- a/noncore/apps/opie-console/tabwidget.h
+++ b/noncore/apps/opie-console/tabwidget.h
@@ -1,24 +1,24 @@
1#ifndef OPIE_TAB_WIDGET_H 1#ifndef OPIE_TAB_WIDGET_H
2#define OPIE_TAB_WIDGET_H 2#define OPIE_TAB_WIDGET_H
3 3
4#include <qmap.h> 4#include <qmap.h>
5#include <opie2/otabwidget.h> 5#include <opie2/otabwidget.h>
6 6
7#include "session.h" 7#include "session.h"
8/** 8/**
9 * This is our central tab widget 9 * This is our central tab widget
10 * we can add sessions here 10 * we can add sessions here
11 */ 11 */
12class TabWidget : public OTabWidget{ 12class TabWidget : public Opie::Ui::OTabWidget{
13 Q_OBJECT 13 Q_OBJECT
14public: 14public:
15 TabWidget(QWidget *parent, const char* name ); 15 TabWidget(QWidget *parent, const char* name );
16 ~TabWidget(); 16 ~TabWidget();
17 void add( Session* ); 17 void add( Session* );
18 void remove( Session* ); 18 void remove( Session* );
19 void setCurrent( Session* ); 19 void setCurrent( Session* );
20 20
21signals: 21signals:
22 void activated(Session* ses ); 22 void activated(Session* ses );
23private slots: 23private slots:
24 void slotCurChanged( QWidget* wid ); 24 void slotCurChanged( QWidget* wid );
diff --git a/noncore/apps/opie-console/test/senderui.cpp b/noncore/apps/opie-console/test/senderui.cpp
index b1725db..df27055 100644
--- a/noncore/apps/opie-console/test/senderui.cpp
+++ b/noncore/apps/opie-console/test/senderui.cpp
@@ -6,24 +6,26 @@
6#include <qmultilineedit.h> 6#include <qmultilineedit.h>
7#include <qsocketnotifier.h> 7#include <qsocketnotifier.h>
8 8
9#include "../profile.h" 9#include "../profile.h"
10#include "../io_serial.h" 10#include "../io_serial.h"
11#include "../filetransfer.h" 11#include "../filetransfer.h"
12#include "../filereceive.h" 12#include "../filereceive.h"
13 13
14#include <opie2/oprocess.h> 14#include <opie2/oprocess.h>
15 15
16#include "senderui.h" 16#include "senderui.h"
17 17
18using namespace Opie::Core;
19using namespace Opie::Core;
18SenderUI::SenderUI() 20SenderUI::SenderUI()
19 : Sender() { 21 : Sender() {
20 22
21 /* we do that manually */ 23 /* we do that manually */
22 Profile prof; 24 Profile prof;
23 QString str = "/dev/bty0"; 25 QString str = "/dev/bty0";
24 prof.writeEntry("Device",str ); 26 prof.writeEntry("Device",str );
25 prof.writeEntry("Baud", 19200 ); 27 prof.writeEntry("Baud", 19200 );
26 28
27 qWarning("prof " + prof.readEntry("Device") + " " + str); 29 qWarning("prof " + prof.readEntry("Device") + " " + str);
28 ser = new IOSerial(prof); 30 ser = new IOSerial(prof);
29 connect(ser, SIGNAL(received(const QByteArray&) ), 31 connect(ser, SIGNAL(received(const QByteArray&) ),
diff --git a/noncore/apps/opie-console/test/senderui.h b/noncore/apps/opie-console/test/senderui.h
index c130dcf..15f0743 100644
--- a/noncore/apps/opie-console/test/senderui.h
+++ b/noncore/apps/opie-console/test/senderui.h
@@ -1,34 +1,34 @@
1#ifndef SENDER_UI_H 1#ifndef SENDER_UI_H
2#define SENDER_UI_H 2#define SENDER_UI_H
3 3
4#include <qcstring.h> 4#include <qcstring.h>
5 5
6#include "sender.h" 6#include "sender.h"
7 7
8class IOSerial; 8class IOSerial;
9class FileTransfer; 9class FileTransfer;
10class QSocketNotifier; 10class QSocketNotifier;
11class OProcess; 11namespace Opie {namespace Core {class Opie::Core::OProcess;}}
12class SenderUI : public Sender { 12class SenderUI : public Sender {
13 Q_OBJECT 13 Q_OBJECT
14public: 14public:
15 SenderUI(); 15 SenderUI();
16 ~SenderUI(); 16 ~SenderUI();
17 17
18public slots: 18public slots:
19 void send(); 19 void send();
20 void slotSendFile(); 20 void slotSendFile();
21 void slotSend(); 21 void slotSend();
22 void slotRev(); 22 void slotRev();
23 void got(const QByteArray& ); 23 void got(const QByteArray& );
24 void fileTransComplete(); 24 void fileTransComplete();
25private: 25private:
26 IOSerial* ser; 26 IOSerial* ser;
27 FileTransfer* sz; 27 FileTransfer* sz;
28 int m_fd; 28 int m_fd;
29 QSocketNotifier* m_sock; 29 QSocketNotifier* m_sock;
30 OProcess* m_proc; 30 Opie::Core::OProcess* m_proc;
31}; 31};
32 32
33 33
34#endif 34#endif
diff --git a/noncore/apps/opie-console/transferdialog.cpp b/noncore/apps/opie-console/transferdialog.cpp
index d494a6c..75eb443 100644
--- a/noncore/apps/opie-console/transferdialog.cpp
+++ b/noncore/apps/opie-console/transferdialog.cpp
@@ -6,24 +6,25 @@
6#include <qmessagebox.h> 6#include <qmessagebox.h>
7#include <qprogressbar.h> 7#include <qprogressbar.h>
8#include <qradiobutton.h> 8#include <qradiobutton.h>
9#include <qbuttongroup.h> 9#include <qbuttongroup.h>
10 10
11#include <opie2/ofiledialog.h> 11#include <opie2/ofiledialog.h>
12 12
13#include "metafactory.h" 13#include "metafactory.h"
14#include "mainwindow.h" 14#include "mainwindow.h"
15 15
16#include "transferdialog.h" 16#include "transferdialog.h"
17 17
18using namespace Opie::Ui;
18TransferDialog::TransferDialog(QWidget *parent, MainWindow *mainwindow, const char *) 19TransferDialog::TransferDialog(QWidget *parent, MainWindow *mainwindow, const char *)
19: QDialog(parent, 0l, false), m_win(mainwindow) 20: QDialog(parent, 0l, false), m_win(mainwindow)
20{ 21{
21 m_lay = 0l; 22 m_lay = 0l;
22 m_recvlay = 0l; 23 m_recvlay = 0l;
23 QVBoxLayout *vbox, *vbox2; 24 QVBoxLayout *vbox, *vbox2;
24 QHBoxLayout *hbox, *hbox2, *hbox3; 25 QHBoxLayout *hbox, *hbox2, *hbox3;
25 QLabel *file, *mode, *progress, *status; 26 QLabel *file, *mode, *progress, *status;
26 QButtonGroup *group; 27 QButtonGroup *group;
27 QRadioButton *mode_send, *mode_receive; 28 QRadioButton *mode_send, *mode_receive;
28 29
29 m_autocleanup = 0; 30 m_autocleanup = 0;
@@ -89,25 +90,25 @@ TransferDialog::TransferDialog(QWidget *parent, MainWindow *mainwindow, const ch
89 connect(cancel, SIGNAL(clicked()), SLOT(slotCancel())); 90 connect(cancel, SIGNAL(clicked()), SLOT(slotCancel()));
90 connect(group, SIGNAL(clicked(int)), SLOT(slotMode(int))); 91 connect(group, SIGNAL(clicked(int)), SLOT(slotMode(int)));
91} 92}
92 93
93TransferDialog::~TransferDialog() 94TransferDialog::~TransferDialog()
94{ 95{
95} 96}
96 97
97void TransferDialog::slotFilename() 98void TransferDialog::slotFilename()
98{ 99{
99 QString f; 100 QString f;
100 101
101 f = Opie::OFileDialog::getOpenFileName(0); 102 f = OFileDialog::getOpenFileName(0);
102 if(!f.isNull()) filename->setText(f); 103 if(!f.isNull()) filename->setText(f);
103} 104}
104 105
105void TransferDialog::slotTransfer() 106void TransferDialog::slotTransfer()
106{ 107{
107 if((m_transfermode == id_send) && (filename->text().isEmpty())) 108 if((m_transfermode == id_send) && (filename->text().isEmpty()))
108 { 109 {
109 QMessageBox::information(this, 110 QMessageBox::information(this,
110 QObject::tr("Attention"), 111 QObject::tr("Attention"),
111 QObject::tr("No file has been specified.")); 112 QObject::tr("No file has been specified."));
112 return; 113 return;
113 } 114 }