21 files changed, 135 insertions, 93 deletions
diff --git a/noncore/apps/opie-console/MyPty.cpp b/noncore/apps/opie-console/MyPty.cpp index a37f980..6d57703 100644 --- a/noncore/apps/opie-console/MyPty.cpp +++ b/noncore/apps/opie-console/MyPty.cpp | |||
@@ -60,16 +60,24 @@ | |||
60 | over the (obsolete) predecessor. | 60 | over the (obsolete) predecessor. |
61 | 61 | ||
62 | There's a sinister ioctl(2), signal(2) and job control stuff | 62 | There's a sinister ioctl(2), signal(2) and job control stuff |
63 | nessesary to make everything work as it should. | 63 | nessesary to make everything work as it should. |
64 | */ | 64 | */ |
65 | 65 | ||
66 | #include "procctl.h" | ||
67 | #include "MyPty.h" | ||
66 | 68 | ||
69 | /* OPIE */ | ||
70 | #include <opie2/odebug.h> | ||
71 | using namespace Opie::Core; | ||
72 | |||
73 | /* QT */ | ||
67 | #include <qsocketnotifier.h> | 74 | #include <qsocketnotifier.h> |
68 | #include <qfile.h> | 75 | #include <qfile.h> |
69 | 76 | ||
77 | /* STD */ | ||
70 | #include <stdlib.h> | 78 | #include <stdlib.h> |
71 | #include <stdio.h> | 79 | #include <stdio.h> |
72 | #include <signal.h> | 80 | #include <signal.h> |
73 | #include <fcntl.h> | 81 | #include <fcntl.h> |
74 | #include <unistd.h> | 82 | #include <unistd.h> |
75 | #include <termios.h> | 83 | #include <termios.h> |
@@ -78,29 +86,25 @@ | |||
78 | #include <sys/wait.h> | 86 | #include <sys/wait.h> |
79 | 87 | ||
80 | #ifdef HAVE_OPENPTY | 88 | #ifdef HAVE_OPENPTY |
81 | #include <pty.h> | 89 | #include <pty.h> |
82 | #endif | 90 | #endif |
83 | 91 | ||
84 | #include "procctl.h" | ||
85 | #include "MyPty.h" | ||
86 | |||
87 | |||
88 | #undef VERBOSE_DEBUG | 92 | #undef VERBOSE_DEBUG |
89 | 93 | ||
90 | 94 | ||
91 | /* -------------------------------------------------------------------------- */ | 95 | /* -------------------------------------------------------------------------- */ |
92 | 96 | ||
93 | /*! | 97 | /*! |
94 | Informs the client program about the | 98 | Informs the client program about the |
95 | actual size of the window. | 99 | actual size of the window. |
96 | */ | 100 | */ |
97 | 101 | ||
98 | void MyPty::setSize(int lines, int columns) | 102 | void MyPty::setSize(int lines, int columns) |
99 | { | 103 | { |
100 | qWarning("setting size"); | 104 | owarn << "setting size" << oendl; |
101 | struct winsize wsize; | 105 | struct winsize wsize; |
102 | wsize.ws_row = (unsigned short)lines; | 106 | wsize.ws_row = (unsigned short)lines; |
103 | wsize.ws_col = (unsigned short)columns; | 107 | wsize.ws_col = (unsigned short)columns; |
104 | if(m_fd < 0) return; | 108 | if(m_fd < 0) return; |
105 | ioctl(m_fd,TIOCSWINSZ,(char *)&wsize); | 109 | ioctl(m_fd,TIOCSWINSZ,(char *)&wsize); |
106 | } | 110 | } |
diff --git a/noncore/apps/opie-console/TEWidget.cpp b/noncore/apps/opie-console/TEWidget.cpp index e535296..d168a5e 100644 --- a/noncore/apps/opie-console/TEWidget.cpp +++ b/noncore/apps/opie-console/TEWidget.cpp | |||
@@ -1026,13 +1026,13 @@ bool TEWidget::eventFilter( QObject *obj, QEvent *e ) | |||
1026 | QApplication::sendEvent(scrollbar, e); | 1026 | QApplication::sendEvent(scrollbar, e); |
1027 | } | 1027 | } |
1028 | 1028 | ||
1029 | #ifdef FAKE_CTRL_AND_ALT | 1029 | #ifdef FAKE_CTRL_AND_ALT |
1030 | static bool control = FALSE; | 1030 | static bool control = FALSE; |
1031 | static bool alt = FALSE; | 1031 | static bool alt = FALSE; |
1032 | // qDebug(" Has a keyboard with no CTRL and ALT keys, but we fake it:"); | 1032 | // odebug << " Has a keyboard with no CTRL and ALT keys, but we fake it:" << oendl; |
1033 | bool dele=FALSE; | 1033 | bool dele=FALSE; |
1034 | if ( e->type() == QEvent::KeyPress || e->type() == QEvent::KeyRelease ) { | 1034 | if ( e->type() == QEvent::KeyPress || e->type() == QEvent::KeyRelease ) { |
1035 | QKeyEvent* ke = (QKeyEvent*)e; | 1035 | QKeyEvent* ke = (QKeyEvent*)e; |
1036 | bool keydown = e->type() == QEvent::KeyPress || ke->isAutoRepeat(); | 1036 | bool keydown = e->type() == QEvent::KeyPress || ke->isAutoRepeat(); |
1037 | switch (ke->key()) { | 1037 | switch (ke->key()) { |
1038 | case Key_F9: // let this be "Control" | 1038 | case Key_F9: // let this be "Control" |
@@ -1065,17 +1065,17 @@ bool TEWidget::eventFilter( QObject *obj, QEvent *e ) | |||
1065 | 1065 | ||
1066 | if ( e->type() == QEvent::KeyPress ) { | 1066 | if ( e->type() == QEvent::KeyPress ) { |
1067 | QKeyEvent* ke = (QKeyEvent*)e; | 1067 | QKeyEvent* ke = (QKeyEvent*)e; |
1068 | actSel=0; // Key stroke implies a screen update, so TEWidget won't | 1068 | actSel=0; // Key stroke implies a screen update, so TEWidget won't |
1069 | // know where the current selection is. | 1069 | // know where the current selection is. |
1070 | 1070 | ||
1071 | // qDebug("key pressed is 0x%x",ke->key()); | 1071 | // odebug << "key pressed is 0x" << ke->key() << "" << oendl; |
1072 | 1072 | ||
1073 | if( ke->state() == ShiftButton && ke->key() == Key_Tab) { //lets hardcode this sucker | 1073 | if( ke->state() == ShiftButton && ke->key() == Key_Tab) { //lets hardcode this sucker |
1074 | 1074 | ||
1075 | // qDebug("key pressed 2 is 0x%x",ke->key()); | 1075 | // odebug << "key pressed 2 is 0x" << ke->key() << "" << oendl; |
1076 | emitText("\\"); // expose | 1076 | emitText("\\"); // expose |
1077 | } else | 1077 | } else |
1078 | emit keyPressedSignal(ke); // expose | 1078 | emit keyPressedSignal(ke); // expose |
1079 | ke->accept(); | 1079 | ke->accept(); |
1080 | #ifdef FAKE_CTRL_AND_ALT | 1080 | #ifdef FAKE_CTRL_AND_ALT |
1081 | if ( dele ) delete e; | 1081 | if ( dele ) delete e; |
diff --git a/noncore/apps/opie-console/TEmulation.cpp b/noncore/apps/opie-console/TEmulation.cpp index d0169d7..6ff73af 100644 --- a/noncore/apps/opie-console/TEmulation.cpp +++ b/noncore/apps/opie-console/TEmulation.cpp | |||
@@ -67,12 +67,18 @@ | |||
67 | 67 | ||
68 | /* FIXME | 68 | /* FIXME |
69 | - evtl. the bulk operations could be made more transparent. | 69 | - evtl. the bulk operations could be made more transparent. |
70 | */ | 70 | */ |
71 | 71 | ||
72 | #include "TEmulation.h" | 72 | #include "TEmulation.h" |
73 | |||
74 | /* OPIE */ | ||
75 | #include <opie2/odebug.h> | ||
76 | using namespace Opie::Core; | ||
77 | |||
78 | /* STD */ | ||
73 | #include <stdio.h> | 79 | #include <stdio.h> |
74 | #include <stdlib.h> | 80 | #include <stdlib.h> |
75 | #include <unistd.h> | 81 | #include <unistd.h> |
76 | 82 | ||
77 | 83 | ||
78 | /* ------------------------------------------------------------------------- */ | 84 | /* ------------------------------------------------------------------------- */ |
@@ -201,13 +207,13 @@ void TEmulation::onRcvChar(int c) | |||
201 | 207 | ||
202 | /*! | 208 | /*! |
203 | */ | 209 | */ |
204 | 210 | ||
205 | void TEmulation::onKeyPress( QKeyEvent* ev ) | 211 | void TEmulation::onKeyPress( QKeyEvent* ev ) |
206 | { | 212 | { |
207 | qWarning("onKeyPress,...."); | 213 | owarn << "onKeyPress,...." << oendl; |
208 | if (!connected) return; // someone else gets the keys | 214 | if (!connected) return; // someone else gets the keys |
209 | if (scr->getHistCursor() != scr->getHistLines()); | 215 | if (scr->getHistCursor() != scr->getHistLines()); |
210 | scr->setHistCursor(scr->getHistLines()); | 216 | scr->setHistCursor(scr->getHistLines()); |
211 | if (!ev->text().isEmpty()) | 217 | if (!ev->text().isEmpty()) |
212 | { // A block of text | 218 | { // A block of text |
213 | // Note that the text is proper unicode. | 219 | // Note that the text is proper unicode. |
diff --git a/noncore/apps/opie-console/atconfigdialog.cpp b/noncore/apps/opie-console/atconfigdialog.cpp index 8e91b9e..c998f96 100644 --- a/noncore/apps/opie-console/atconfigdialog.cpp +++ b/noncore/apps/opie-console/atconfigdialog.cpp | |||
@@ -1,19 +1,22 @@ | |||
1 | #include "atconfigdialog.h" | ||
2 | #include "io_modem.h" | ||
1 | 3 | ||
4 | /* OPIE */ | ||
5 | #include <opie2/odebug.h> | ||
6 | using namespace Opie::Core; | ||
7 | |||
8 | /* QT */ | ||
2 | #include <qlineedit.h> | 9 | #include <qlineedit.h> |
3 | #include <qspinbox.h> | 10 | #include <qspinbox.h> |
4 | #include <qlayout.h> | 11 | #include <qlayout.h> |
5 | #include <qcombobox.h> | 12 | #include <qcombobox.h> |
6 | #include <qtabwidget.h> | 13 | #include <qtabwidget.h> |
7 | #include <qlabel.h> | 14 | #include <qlabel.h> |
8 | #include <qscrollview.h> | 15 | #include <qscrollview.h> |
9 | 16 | ||
10 | #include "atconfigdialog.h" | ||
11 | #include "io_modem.h" | ||
12 | |||
13 | |||
14 | ATConfigDialog::ATConfigDialog( QWidget* parent, const char* name, bool modal, WFlags fl ) | 17 | ATConfigDialog::ATConfigDialog( QWidget* parent, const char* name, bool modal, WFlags fl ) |
15 | : QDialog( parent, name, modal, fl ) { | 18 | : QDialog( parent, name, modal, fl ) { |
16 | 19 | ||
17 | 20 | ||
18 | setCaption( tr( "Dialing parameter setup" ) ); | 21 | setCaption( tr( "Dialing parameter setup" ) ); |
19 | 22 | ||
@@ -149,13 +152,13 @@ QWidget* ATConfigDialog::tab1( QWidget* parent ) { | |||
149 | return returnWidget; | 152 | return returnWidget; |
150 | 153 | ||
151 | } | 154 | } |
152 | 155 | ||
153 | 156 | ||
154 | void ATConfigDialog::readConfig( const Profile& config ) { | 157 | void ATConfigDialog::readConfig( const Profile& config ) { |
155 | qWarning("config in atconfigdialog"); | 158 | owarn << "config in atconfigdialog" << oendl; |
156 | 159 | ||
157 | initStringLine->setText( config.readEntry("InitString", MODEM_DEFAULT_INIT_STRING ) ); | 160 | initStringLine->setText( config.readEntry("InitString", MODEM_DEFAULT_INIT_STRING ) ); |
158 | resetStringLine->setText( config.readEntry("ResetString", MODEM_DEFAULT_RESET_STRING ) ); | 161 | resetStringLine->setText( config.readEntry("ResetString", MODEM_DEFAULT_RESET_STRING ) ); |
159 | dialPref1Line->setText( config.readEntry("DialPrefix1", MODEM_DEFAULT_DIAL_PREFIX1 ) ); | 162 | dialPref1Line->setText( config.readEntry("DialPrefix1", MODEM_DEFAULT_DIAL_PREFIX1 ) ); |
160 | dialSuf1Line->setText( config.readEntry("DialSuffix1", MODEM_DEFAULT_DIAL_SUFFIX1 ) ); | 163 | dialSuf1Line->setText( config.readEntry("DialSuffix1", MODEM_DEFAULT_DIAL_SUFFIX1 ) ); |
161 | dialPref2Line->setText( config.readEntry("DialPrefix2", MODEM_DEFAULT_DIAL_PREFIX1 ) ); | 164 | dialPref2Line->setText( config.readEntry("DialPrefix2", MODEM_DEFAULT_DIAL_PREFIX1 ) ); |
diff --git a/noncore/apps/opie-console/dialer.cpp b/noncore/apps/opie-console/dialer.cpp index 67ad10e..7010594 100644 --- a/noncore/apps/opie-console/dialer.cpp +++ b/noncore/apps/opie-console/dialer.cpp | |||
@@ -1,23 +1,28 @@ | |||
1 | #include "dialer.h" | 1 | #include "dialer.h" |
2 | #include "io_modem.h" | ||
3 | |||
4 | /* OPIE */ | ||
5 | #include <opie2/odebug.h> | ||
6 | using namespace Opie::Core; | ||
2 | 7 | ||
8 | /* QT */ | ||
3 | #include <qlayout.h> | 9 | #include <qlayout.h> |
4 | #include <qprogressbar.h> | 10 | #include <qprogressbar.h> |
5 | #include <qlabel.h> | 11 | #include <qlabel.h> |
6 | #include <qpushbutton.h> | 12 | #include <qpushbutton.h> |
7 | #include <qapp.h> | 13 | #include <qapp.h> |
8 | #include <qtimer.h> | 14 | #include <qtimer.h> |
9 | #include <qmessagebox.h> | 15 | #include <qmessagebox.h> |
10 | 16 | ||
17 | /* STD */ | ||
11 | #include <unistd.h> | 18 | #include <unistd.h> |
12 | #include <string.h> | 19 | #include <string.h> |
13 | #include <fcntl.h> | 20 | #include <fcntl.h> |
14 | #include <errno.h> | 21 | #include <errno.h> |
15 | 22 | ||
16 | #include "io_modem.h" | ||
17 | |||
18 | // State machine: | When an error occurs, we don't have to | 23 | // State machine: | When an error occurs, we don't have to |
19 | // | reset everything. | 24 | // | reset everything. |
20 | // (init) <------+ | But if the user wants to reset, | 25 | // (init) <------+ | But if the user wants to reset, |
21 | // | | | we stop dialing immediately. | 26 | // | | | we stop dialing immediately. |
22 | // v | | | 27 | // v | | |
23 | // (options) ----+ | Following the state machine is necessary | 28 | // (options) ----+ | Following the state machine is necessary |
@@ -101,13 +106,13 @@ void Dialer::slotCancel() | |||
101 | accept(); | 106 | accept(); |
102 | } | 107 | } |
103 | } | 108 | } |
104 | 109 | ||
105 | void Dialer::reset() | 110 | void Dialer::reset() |
106 | { | 111 | { |
107 | qWarning("reset"); | 112 | owarn << "reset" << oendl; |
108 | switchState(state_cancel); | 113 | switchState(state_cancel); |
109 | } | 114 | } |
110 | 115 | ||
111 | void Dialer::slotAutostart() | 116 | void Dialer::slotAutostart() |
112 | { | 117 | { |
113 | //state = state_preinit; | 118 | //state = state_preinit; |
@@ -133,35 +138,35 @@ void Dialer::dial(const QString& number) | |||
133 | reject(); | 138 | reject(); |
134 | } | 139 | } |
135 | } | 140 | } |
136 | 141 | ||
137 | void Dialer::trydial(const QString& number) | 142 | void Dialer::trydial(const QString& number) |
138 | { | 143 | { |
139 | qWarning("TryDial:%s", number.latin1() ); | 144 | owarn << "TryDial:" << number.latin1() << "" << oendl; |
140 | if(state != state_cancel) switchState(state_preinit); | 145 | if(state != state_cancel) switchState(state_preinit); |
141 | if(cleanshutdown) | 146 | if(cleanshutdown) |
142 | { | 147 | { |
143 | qWarning("HangupString " + m_profile.readEntry("HangupString", MODEM_DEFAULT_HANGUP_STRING)); | 148 | owarn << "HangupString " << m_profile.readEntry("HangupString") << oendl; |
144 | send(m_profile.readEntry("HangupString", MODEM_DEFAULT_HANGUP_STRING ) + "\r"); | 149 | send(m_profile.readEntry("HangupString", MODEM_DEFAULT_HANGUP_STRING ) + "\r"); |
145 | } | 150 | } |
146 | 151 | ||
147 | if(state != state_cancel) | 152 | if(state != state_cancel) |
148 | { | 153 | { |
149 | switchState(state_init); | 154 | switchState(state_init); |
150 | // qWarning("Init String " + m_profile.readEntry("InitString") ); | 155 | // owarn << "Init String " + m_profile.readEntry("InitString") << oendl; |
151 | send(m_profile.readEntry("InitString",MODEM_DEFAULT_INIT_STRING ) + "\r"); | 156 | send(m_profile.readEntry("InitString",MODEM_DEFAULT_INIT_STRING ) + "\r"); |
152 | QString response2 = receive(); | 157 | QString response2 = receive(); |
153 | if(!response2.contains("\nOK\r")) | 158 | if(!response2.contains("\nOK\r")) |
154 | reset(); | 159 | reset(); |
155 | } | 160 | } |
156 | 161 | ||
157 | /*if(state != state_cancel) | 162 | /*if(state != state_cancel) |
158 | { | 163 | { |
159 | switchState(state_options); | 164 | switchState(state_options); |
160 | 165 | ||
161 | qWarning("ATM3l3"); | 166 | owarn << "ATM3l3" << oendl; |
162 | send("ATM3L3\r"); | 167 | send("ATM3L3\r"); |
163 | QString response3 = receive(); | 168 | QString response3 = receive(); |
164 | if(!response3.contains("\nOK\r")) | 169 | if(!response3.contains("\nOK\r")) |
165 | reset(); | 170 | reset(); |
166 | } | 171 | } |
167 | */ | 172 | */ |
@@ -175,13 +180,13 @@ void Dialer::trydial(const QString& number) | |||
175 | if(!response4.contains("\nOK\r")) | 180 | if(!response4.contains("\nOK\r")) |
176 | reset(); | 181 | reset(); |
177 | } | 182 | } |
178 | 183 | ||
179 | if(state != state_cancel) | 184 | if(state != state_cancel) |
180 | { | 185 | { |
181 | qWarning("progress"); | 186 | owarn << "progress" << oendl; |
182 | switchState(state_dialing); | 187 | switchState(state_dialing); |
183 | 188 | ||
184 | // send(QString("ATDT %1\r").arg(number)); | 189 | // send(QString("ATDT %1\r").arg(number)); |
185 | send(QString("%1 %2\r").arg(m_profile.readEntry("DialPrefix1", MODEM_DEFAULT_DIAL_PREFIX1 )) | 190 | send(QString("%1 %2\r").arg(m_profile.readEntry("DialPrefix1", MODEM_DEFAULT_DIAL_PREFIX1 )) |
186 | .arg(number)); | 191 | .arg(number)); |
187 | 192 | ||
@@ -211,13 +216,13 @@ void Dialer::trydial(const QString& number) | |||
211 | void Dialer::send(const QString& msg) | 216 | void Dialer::send(const QString& msg) |
212 | { | 217 | { |
213 | QString m = msg; | 218 | QString m = msg; |
214 | int bytes; | 219 | int bytes; |
215 | QString termination; | 220 | QString termination; |
216 | 221 | ||
217 | qWarning("Sending: %s", m.latin1()); | 222 | owarn << "Sending: " << m.latin1() << "" << oendl; |
218 | 223 | ||
219 | /*termination = "\r"; | 224 | /*termination = "\r"; |
220 | //termination = m_profile.readEntry("Termination"); | 225 | //termination = m_profile.readEntry("Termination"); |
221 | if(termination == "\n") m = m + "\n"; | 226 | if(termination == "\n") m = m + "\n"; |
222 | else if(termination == "\r") m = m + "\r"; | 227 | else if(termination == "\r") m = m + "\r"; |
223 | else m = m + "\r\n"; | 228 | else m = m + "\r\n"; |
@@ -244,17 +249,17 @@ QString Dialer::receive() | |||
244 | 249 | ||
245 | if(ret > 0) | 250 | if(ret > 0) |
246 | { | 251 | { |
247 | for(int i = 0; i < ret; i++) | 252 | for(int i = 0; i < ret; i++) |
248 | buffer[i] = buffer[i] & 0x7F; | 253 | buffer[i] = buffer[i] & 0x7F; |
249 | buffer[ret] = 0; | 254 | buffer[ret] = 0; |
250 | qWarning("Got: %s", buffer); | 255 | owarn << "Got: " << buffer << "" << oendl; |
251 | buf.append(QString(buffer)); | 256 | buf.append(QString(buffer)); |
252 | if(buf.contains("OK") || buf.contains("ERROR") || buf.contains("CONNECT") || (buf.contains("BUSY"))) | 257 | if(buf.contains("OK") || buf.contains("ERROR") || buf.contains("CONNECT") || (buf.contains("BUSY"))) |
253 | { | 258 | { |
254 | //qWarning("Receiving: '%s'", buf.latin1()); | 259 | //owarn << "Receiving: '" << buf.latin1() << "'" << oendl; |
255 | cleanshutdown = 1; | 260 | cleanshutdown = 1; |
256 | return buf; | 261 | return buf; |
257 | }else if (buf.contains("NO CARRIER") || buf.contains("NO DIALTONE") ) { | 262 | }else if (buf.contains("NO CARRIER") || buf.contains("NO DIALTONE") ) { |
258 | cleanshutdown = 1; | 263 | cleanshutdown = 1; |
259 | return QString::null; | 264 | return QString::null; |
260 | } | 265 | } |
diff --git a/noncore/apps/opie-console/emulation_handler.cpp b/noncore/apps/opie-console/emulation_handler.cpp index 99d069f..89b70c6 100644 --- a/noncore/apps/opie-console/emulation_handler.cpp +++ b/noncore/apps/opie-console/emulation_handler.cpp | |||
@@ -1,13 +1,15 @@ | |||
1 | |||
2 | #include "TEmuVt102.h" | 1 | #include "TEmuVt102.h" |
3 | |||
4 | #include "profile.h" | 2 | #include "profile.h" |
5 | #include "emulation_handler.h" | 3 | #include "emulation_handler.h" |
6 | #include "script.h" | 4 | #include "script.h" |
7 | 5 | ||
6 | /* OPIE */ | ||
7 | #include <opie2/odebug.h> | ||
8 | using namespace Opie::Core; | ||
9 | |||
8 | EmulationHandler::EmulationHandler( const Profile& prof, QWidget* parent,const char* name ) | 10 | EmulationHandler::EmulationHandler( const Profile& prof, QWidget* parent,const char* name ) |
9 | : QObject(0, name ) | 11 | : QObject(0, name ) |
10 | { | 12 | { |
11 | m_teWid = new TEWidget( parent, "TerminalMain"); | 13 | m_teWid = new TEWidget( parent, "TerminalMain"); |
12 | // use setWrapAt(0) for classic behaviour (wrap at screen width, no scrollbar) | 14 | // use setWrapAt(0) for classic behaviour (wrap at screen width, no scrollbar) |
13 | // use setWrapAt(80) for normal console with scrollbar | 15 | // use setWrapAt(80) for normal console with scrollbar |
@@ -125,17 +127,17 @@ QColor EmulationHandler::foreColor(int col) { | |||
125 | co = Qt::white; | 127 | co = Qt::white; |
126 | break; | 128 | break; |
127 | case Profile::Black: | 129 | case Profile::Black: |
128 | co = Qt::black; | 130 | co = Qt::black; |
129 | break; | 131 | break; |
130 | case Profile::Green: | 132 | case Profile::Green: |
131 | qWarning("Foreground green"); | 133 | owarn << "Foreground green" << oendl; |
132 | co = Qt::green; | 134 | co = Qt::green; |
133 | break; | 135 | break; |
134 | case Profile::Orange: | 136 | case Profile::Orange: |
135 | qWarning("Foreground orange"); | 137 | owarn << "Foreground orange" << oendl; |
136 | co.setRgb( 231, 184, 98 ); | 138 | co.setRgb( 231, 184, 98 ); |
137 | break; | 139 | break; |
138 | } | 140 | } |
139 | 141 | ||
140 | return co; | 142 | return co; |
141 | } | 143 | } |
@@ -149,17 +151,17 @@ QColor EmulationHandler::backColor(int col ) { | |||
149 | co = Qt::black; | 151 | co = Qt::black; |
150 | break; | 152 | break; |
151 | case Profile::Black: | 153 | case Profile::Black: |
152 | co = Qt::white; | 154 | co = Qt::white; |
153 | break; | 155 | break; |
154 | case Profile::Green: | 156 | case Profile::Green: |
155 | qWarning("Background black"); | 157 | owarn << "Background black" << oendl; |
156 | co = Qt::black; | 158 | co = Qt::black; |
157 | break; | 159 | break; |
158 | case Profile::Orange: | 160 | case Profile::Orange: |
159 | qWarning("Background black"); | 161 | owarn << "Background black" << oendl; |
160 | co = Qt::black; | 162 | co = Qt::black; |
161 | break; | 163 | break; |
162 | } | 164 | } |
163 | 165 | ||
164 | return co; | 166 | return co; |
165 | } | 167 | } |
diff --git a/noncore/apps/opie-console/emulation_widget.cpp b/noncore/apps/opie-console/emulation_widget.cpp index ad8ecba..4688551 100644 --- a/noncore/apps/opie-console/emulation_widget.cpp +++ b/noncore/apps/opie-console/emulation_widget.cpp | |||
@@ -221,15 +221,15 @@ void EmulationWidget::paintEvent( QPaintEvent* pe ) | |||
221 | } | 221 | } |
222 | 222 | ||
223 | void EmulationWidget::calcGeometry() | 223 | void EmulationWidget::calcGeometry() |
224 | { | 224 | { |
225 | m_scrollbar->resize(QApplication::style().scrollBarExtent().width(), contentsRect().height() ); | 225 | m_scrollbar->resize(QApplication::style().scrollBarExtent().width(), contentsRect().height() ); |
226 | 226 | ||
227 | qDebug( QString(" TEST").arg( contentsRect().width() ) ); | 227 | odebug << QString(" TEST").arg( contentsRect().width() ) << oendl; |
228 | qDebug( QString(" TEST").arg( contentsRect().height() ) ); | 228 | odebug << QString(" TEST").arg( contentsRect().height() ) << oendl; |
229 | qDebug("NEUER TESTT!!!!!!!!"); | 229 | odebug << "NEUER TESTT!!!!!!!!" << oendl; |
230 | 230 | ||
231 | switch( scrollLoc ) | 231 | switch( scrollLoc ) |
232 | { | 232 | { |
233 | case SCRNONE : | 233 | case SCRNONE : |
234 | m_columns = ( contentsRect().width() -2 * rimX ) / f_width; | 234 | m_columns = ( contentsRect().width() -2 * rimX ) / f_width; |
235 | m_blX = ( contentsRect().width() - ( m_columns*f_width ) ) / 2; | 235 | m_blX = ( contentsRect().width() - ( m_columns*f_width ) ) / 2; |
@@ -255,13 +255,13 @@ void EmulationWidget::calcGeometry() | |||
255 | m_lines = ( contentsRect().height() - 2 * rimY ) / f_height; | 255 | m_lines = ( contentsRect().height() - 2 * rimY ) / f_height; |
256 | m_bY = ( contentsRect().height() - (m_lines * f_height ) ) / 2; | 256 | m_bY = ( contentsRect().height() - (m_lines * f_height ) ) / 2; |
257 | } | 257 | } |
258 | 258 | ||
259 | void EmulationWidget::drawAttrString( QString& string, QPainter &painter, QRect rect, Character attr, bool usePixmap, bool clear ) | 259 | void EmulationWidget::drawAttrString( QString& string, QPainter &painter, QRect rect, Character attr, bool usePixmap, bool clear ) |
260 | { | 260 | { |
261 | qWarning("Color1 %s", color_table[attr.b].color.name().latin1() ); | 261 | owarn << "Color1 " << color_table[attr.b].color.name().latin1() << "" << oendl; |
262 | if ( usePixmap && color_table[attr.b].transparent ) | 262 | if ( usePixmap && color_table[attr.b].transparent ) |
263 | { | 263 | { |
264 | painter.setBackgroundMode( TransparentMode ); | 264 | painter.setBackgroundMode( TransparentMode ); |
265 | if ( clear ) | 265 | if ( clear ) |
266 | erase( rect ); | 266 | erase( rect ); |
267 | } | 267 | } |
@@ -269,13 +269,13 @@ void EmulationWidget::drawAttrString( QString& string, QPainter &painter, QRect | |||
269 | { | 269 | { |
270 | if ( blinking ) | 270 | if ( blinking ) |
271 | painter.fillRect( rect, color_table[attr.b].color ); | 271 | painter.fillRect( rect, color_table[attr.b].color ); |
272 | else | 272 | else |
273 | { | 273 | { |
274 | painter.setBackgroundMode( OpaqueMode ); | 274 | painter.setBackgroundMode( OpaqueMode ); |
275 | qWarning("Color %s", color_table[attr.b].color.name().latin1() ); | 275 | owarn << "Color " << color_table[attr.b].color.name().latin1() << "" << oendl; |
276 | painter.setBackgroundColor( color_table[attr.b].color ); | 276 | painter.setBackgroundColor( color_table[attr.b].color ); |
277 | } | 277 | } |
278 | } | 278 | } |
279 | if ( color_table[attr.f].bold ) | 279 | if ( color_table[attr.f].bold ) |
280 | painter.setPen( QColor( 0x8F, 0x00, 0x00 ) ); | 280 | painter.setPen( QColor( 0x8F, 0x00, 0x00 ) ); |
281 | else | 281 | else |
diff --git a/noncore/apps/opie-console/function_keyboard.cpp b/noncore/apps/opie-console/function_keyboard.cpp index eb32551..6613183 100644 --- a/noncore/apps/opie-console/function_keyboard.cpp +++ b/noncore/apps/opie-console/function_keyboard.cpp | |||
@@ -1,8 +1,13 @@ | |||
1 | #include "function_keyboard.h" | 1 | #include "function_keyboard.h" |
2 | 2 | ||
3 | /* OPIE */ | ||
4 | #include <opie2/odebug.h> | ||
5 | using namespace Opie::Core; | ||
6 | |||
7 | /* QT */ | ||
3 | #include <qlayout.h> | 8 | #include <qlayout.h> |
4 | #include <qlistbox.h> | 9 | #include <qlistbox.h> |
5 | #include <qlabel.h> | 10 | #include <qlabel.h> |
6 | #include <qdir.h> | 11 | #include <qdir.h> |
7 | 12 | ||
8 | #define DEFAULT_ROWS 2 | 13 | #define DEFAULT_ROWS 2 |
@@ -34,13 +39,13 @@ FunctionKeyboard::FunctionKeyboard(QWidget *parent) : | |||
34 | keys.insert( | 39 | keys.insert( |
35 | 40 | ||
36 | handle, | 41 | handle, |
37 | FKey (value_list[0], value_list[1], value_list[2].toUShort(), value_list[3].toUShort()) | 42 | FKey (value_list[0], value_list[1], value_list[2].toUShort(), value_list[3].toUShort()) |
38 | ); | 43 | ); |
39 | } | 44 | } |
40 | //qWarning("loaded %d keys", keys.count()); | 45 | //owarn << "loaded " << keys.count() << " keys" << oendl; |
41 | */ | 46 | */ |
42 | if (keys.isEmpty()) loadDefaults(); | 47 | if (keys.isEmpty()) loadDefaults(); |
43 | 48 | ||
44 | 49 | ||
45 | 50 | ||
46 | } | 51 | } |
@@ -253,13 +258,13 @@ void FunctionKeyboard::loadDefaults() { | |||
253 | /* FunctionKeyboardConfig {{{1 */ | 258 | /* FunctionKeyboardConfig {{{1 */ |
254 | 259 | ||
255 | FunctionKeyboardConfig::FunctionKeyboardConfig(const QString& name, QWidget* parent, const char* na ) | 260 | FunctionKeyboardConfig::FunctionKeyboardConfig(const QString& name, QWidget* parent, const char* na ) |
256 | : ProfileDialogKeyWidget(name, parent, na), | 261 | : ProfileDialogKeyWidget(name, parent, na), |
257 | selectedRow(0), selectedCol(0) | 262 | selectedRow(0), selectedCol(0) |
258 | { | 263 | { |
259 | qWarning("FunctionKeyboardConfig"); | 264 | owarn << "FunctionKeyboardConfig" << oendl; |
260 | 265 | ||
261 | 266 | ||
262 | kb = new FunctionKeyboard(this); | 267 | kb = new FunctionKeyboard(this); |
263 | connect (kb, SIGNAL(keyPressed(FKey,ushort,ushort,bool)), | 268 | connect (kb, SIGNAL(keyPressed(FKey,ushort,ushort,bool)), |
264 | this, SLOT(slotKeyPressed(FKey,ushort,ushort,bool))); | 269 | this, SLOT(slotKeyPressed(FKey,ushort,ushort,bool))); |
265 | 270 | ||
diff --git a/noncore/apps/opie-console/io_bt.cpp b/noncore/apps/opie-console/io_bt.cpp index a29fa8e..c102427 100644 --- a/noncore/apps/opie-console/io_bt.cpp +++ b/noncore/apps/opie-console/io_bt.cpp | |||
@@ -1,10 +1,13 @@ | |||
1 | 1 | ||
2 | #include "io_bt.h" | 2 | #include "io_bt.h" |
3 | 3 | ||
4 | /* OPIE */ | ||
5 | #include <opie2/odebug.h> | ||
4 | using namespace Opie::Core; | 6 | using namespace Opie::Core; |
7 | |||
5 | IOBt::IOBt( const Profile &config ) : IOSerial( config ) { | 8 | IOBt::IOBt( const Profile &config ) : IOSerial( config ) { |
6 | m_attach = 0; | 9 | m_attach = 0; |
7 | } | 10 | } |
8 | 11 | ||
9 | 12 | ||
10 | IOBt::~IOBt() { | 13 | IOBt::~IOBt() { |
@@ -40,13 +43,13 @@ bool IOBt::open() { | |||
40 | connect( m_attach, SIGNAL( processExited(Opie::Core::OProcess*) ), | 43 | connect( m_attach, SIGNAL( processExited(Opie::Core::OProcess*) ), |
41 | this, SLOT( slotExited(Opie::Core::OProcess*) ) ); | 44 | this, SLOT( slotExited(Opie::Core::OProcess*) ) ); |
42 | 45 | ||
43 | if ( m_attach->start() ) { | 46 | if ( m_attach->start() ) { |
44 | ret = IOSerial::open(); | 47 | ret = IOSerial::open(); |
45 | } else { | 48 | } else { |
46 | qWarning("could not attach to device"); | 49 | owarn << "could not attach to device" << oendl; |
47 | delete m_attach; | 50 | delete m_attach; |
48 | m_attach = 0; | 51 | m_attach = 0; |
49 | } | 52 | } |
50 | } else { | 53 | } else { |
51 | // directly to the normal serial | 54 | // directly to the normal serial |
52 | // TODO: look first if the connection really exists. ( is set up ) | 55 | // TODO: look first if the connection really exists. ( is set up ) |
@@ -86,8 +89,8 @@ QBitArray IOBt::supports() const { | |||
86 | 89 | ||
87 | bool IOBt::isConnected() { | 90 | bool IOBt::isConnected() { |
88 | return false; | 91 | return false; |
89 | } | 92 | } |
90 | 93 | ||
91 | void IOBt::send(const QByteArray &data) { | 94 | void IOBt::send(const QByteArray &data) { |
92 | qDebug( "Please overload me..." ); | 95 | odebug << "Please overload me..." << oendl; |
93 | } | 96 | } |
diff --git a/noncore/apps/opie-console/io_irda.cpp b/noncore/apps/opie-console/io_irda.cpp index 07c2b62..38542f5 100644 --- a/noncore/apps/opie-console/io_irda.cpp +++ b/noncore/apps/opie-console/io_irda.cpp | |||
@@ -1,10 +1,12 @@ | |||
1 | |||
2 | #include "io_irda.h" | 1 | #include "io_irda.h" |
3 | 2 | ||
3 | /* OPIE */ | ||
4 | #include <opie2/odebug.h> | ||
4 | using namespace Opie::Core; | 5 | using namespace Opie::Core; |
6 | |||
5 | IOIrda::IOIrda( const Profile &config ) : IOSerial( config ) { | 7 | IOIrda::IOIrda( const Profile &config ) : IOSerial( config ) { |
6 | m_attach = 0; | 8 | m_attach = 0; |
7 | } | 9 | } |
8 | 10 | ||
9 | 11 | ||
10 | IOIrda::~IOIrda() { | 12 | IOIrda::~IOIrda() { |
@@ -32,13 +34,13 @@ bool IOIrda::open() { | |||
32 | this, SLOT( slotExited(Opie::Core::OProcess*) ) ); | 34 | this, SLOT( slotExited(Opie::Core::OProcess*) ) ); |
33 | 35 | ||
34 | if ( m_attach->start() ) { | 36 | if ( m_attach->start() ) { |
35 | ret= IOSerial::open(); | 37 | ret= IOSerial::open(); |
36 | } else { | 38 | } else { |
37 | // emit error!!! | 39 | // emit error!!! |
38 | qWarning("could not attach to device"); | 40 | owarn << "could not attach to device" << oendl; |
39 | delete m_attach; | 41 | delete m_attach; |
40 | m_attach = 0l; | 42 | m_attach = 0l; |
41 | } | 43 | } |
42 | return ret; | 44 | return ret; |
43 | } | 45 | } |
44 | 46 | ||
@@ -71,8 +73,8 @@ QBitArray IOIrda::supports()const { | |||
71 | 73 | ||
72 | bool IOIrda::isConnected() { | 74 | bool IOIrda::isConnected() { |
73 | return false; | 75 | return false; |
74 | } | 76 | } |
75 | 77 | ||
76 | void IOIrda::send(const QByteArray &data) { | 78 | void IOIrda::send(const QByteArray &data) { |
77 | qDebug( "Please overload me..." ); | 79 | odebug << "Please overload me..." << oendl; |
78 | } | 80 | } |
diff --git a/noncore/apps/opie-console/io_modem.cpp b/noncore/apps/opie-console/io_modem.cpp index b74d076..c499dfe 100644 --- a/noncore/apps/opie-console/io_modem.cpp +++ b/noncore/apps/opie-console/io_modem.cpp | |||
@@ -1,21 +1,21 @@ | |||
1 | 1 | ||
2 | #include "io_modem.h" | 2 | #include "io_modem.h" |
3 | |||
4 | #include "dialer.h" | 3 | #include "dialer.h" |
5 | 4 | ||
5 | /* OPIE */ | ||
6 | #include <opie2/odebug.h> | ||
6 | using namespace Opie::Core; | 7 | using namespace Opie::Core; |
7 | using namespace Opie::Core; | 8 | |
8 | IOModem::IOModem( const Profile &profile ) | 9 | IOModem::IOModem( const Profile &profile ) |
9 | : IOSerial( profile ) { | 10 | : IOSerial( profile ) { |
10 | m_profile = profile; | 11 | m_profile = profile; |
11 | } | 12 | } |
12 | 13 | ||
13 | 14 | ||
14 | IOModem::~IOModem() { | 15 | IOModem::~IOModem() { |
15 | |||
16 | } | 16 | } |
17 | 17 | ||
18 | 18 | ||
19 | void IOModem::close() { | 19 | void IOModem::close() { |
20 | // Hangup, discarding result | 20 | // Hangup, discarding result |
21 | //int fd = rawIO(); | 21 | //int fd = rawIO(); |
@@ -101,8 +101,8 @@ QBitArray IOModem::supports()const { | |||
101 | 101 | ||
102 | bool IOModem::isConnected() { | 102 | bool IOModem::isConnected() { |
103 | return false; | 103 | return false; |
104 | } | 104 | } |
105 | 105 | ||
106 | void IOModem::send(const QByteArray &data) { | 106 | void IOModem::send(const QByteArray &data) { |
107 | qDebug( "Please overload me..." ); | 107 | odebug << "Please overload me..." << oendl; |
108 | } | 108 | } |
diff --git a/noncore/apps/opie-console/main.cpp b/noncore/apps/opie-console/main.cpp index dfb2f83..1bd4338 100644 --- a/noncore/apps/opie-console/main.cpp +++ b/noncore/apps/opie-console/main.cpp | |||
@@ -88,13 +88,13 @@ void FixIt::fixIt() { | |||
88 | 88 | ||
89 | int main(int argc, char **argv) { | 89 | int main(int argc, char **argv) { |
90 | // too bad this gives us trouble the taskbar... argv[0]="embeddedkonsole"; | 90 | // too bad this gives us trouble the taskbar... argv[0]="embeddedkonsole"; |
91 | QPEApplication app( argc, argv ); | 91 | QPEApplication app( argc, argv ); |
92 | 92 | ||
93 | #ifdef FSCKED_DISTRIBUTION | 93 | #ifdef FSCKED_DISTRIBUTION |
94 | qWarning("fscked"); | 94 | owarn << "fscked" << oendl; |
95 | FixIt it; | 95 | FixIt it; |
96 | it.fixIt(); | 96 | it.fixIt(); |
97 | #endif | 97 | #endif |
98 | 98 | ||
99 | MainWindow mw; | 99 | MainWindow mw; |
100 | mw.setCaption(QObject::tr("Opie Console") ); | 100 | mw.setCaption(QObject::tr("Opie Console") ); |
diff --git a/noncore/apps/opie-console/mainwindow.cpp b/noncore/apps/opie-console/mainwindow.cpp index 06a8f7d..b403b4d 100644 --- a/noncore/apps/opie-console/mainwindow.cpp +++ b/noncore/apps/opie-console/mainwindow.cpp | |||
@@ -1,33 +1,36 @@ | |||
1 | #include <assert.h> | ||
2 | |||
3 | #include <qaction.h> | ||
4 | #include <qmenubar.h> | ||
5 | #include <qtoolbar.h> | ||
6 | #include <qmessagebox.h> | ||
7 | #include <qwhatsthis.h> | ||
8 | #include <qfileinfo.h> | ||
9 | |||
10 | #include <qpe/filemanager.h> | ||
11 | |||
12 | #include <opie2/ofiledialog.h> | ||
13 | |||
14 | #include "TEmulation.h" | 1 | #include "TEmulation.h" |
15 | #include "profileeditordialog.h" | 2 | #include "profileeditordialog.h" |
16 | #include "configdialog.h" | 3 | #include "configdialog.h" |
17 | #include "default.h" | 4 | #include "default.h" |
18 | #include "profilemanager.h" | 5 | #include "profilemanager.h" |
19 | #include "mainwindow.h" | 6 | #include "mainwindow.h" |
20 | #include "tabwidget.h" | 7 | #include "tabwidget.h" |
21 | #include "transferdialog.h" | 8 | #include "transferdialog.h" |
22 | #include "function_keyboard.h" | 9 | #include "function_keyboard.h" |
23 | #include "emulation_handler.h" | 10 | #include "emulation_handler.h" |
24 | #include "script.h" | 11 | #include "script.h" |
25 | 12 | ||
26 | 13 | /* OPIE */ | |
14 | #include <opie2/odebug.h> | ||
15 | #include <opie2/ofiledialog.h> | ||
16 | #include <qpe/filemanager.h> | ||
17 | using namespace Opie::Core; | ||
27 | using namespace Opie::Ui; | 18 | using namespace Opie::Ui; |
19 | |||
20 | /* QT */ | ||
21 | #include <qaction.h> | ||
22 | #include <qmenubar.h> | ||
23 | #include <qtoolbar.h> | ||
24 | #include <qmessagebox.h> | ||
25 | #include <qwhatsthis.h> | ||
26 | #include <qfileinfo.h> | ||
27 | |||
28 | /* STD */ | ||
29 | #include <assert.h> | ||
30 | |||
28 | MainWindow::MainWindow(QWidget *parent, const char *name, WFlags) : QMainWindow(parent, name, WStyle_ContextHelp) { | 31 | MainWindow::MainWindow(QWidget *parent, const char *name, WFlags) : QMainWindow(parent, name, WStyle_ContextHelp) { |
29 | KeyTrans::loadAll(); | 32 | KeyTrans::loadAll(); |
30 | for (int i = 0; i < KeyTrans::count(); i++ ) { | 33 | for (int i = 0; i < KeyTrans::count(); i++ ) { |
31 | KeyTrans* s = KeyTrans::find(i ); | 34 | KeyTrans* s = KeyTrans::find(i ); |
32 | assert( s ); | 35 | assert( s ); |
33 | } | 36 | } |
@@ -443,19 +446,19 @@ void MainWindow::slotConfigure() { | |||
443 | */ | 446 | */ |
444 | void MainWindow::slotClose() { | 447 | void MainWindow::slotClose() { |
445 | if (!currentSession() ) | 448 | if (!currentSession() ) |
446 | return; | 449 | return; |
447 | 450 | ||
448 | Session* ses = currentSession(); | 451 | Session* ses = currentSession(); |
449 | qWarning("removing! currentSession %s", currentSession()->name().latin1() ); | 452 | owarn << "removing! currentSession " << currentSession()->name().latin1() << "" << oendl; |
450 | /* set to NULL to be safe, if its needed slotSessionChanged resets it automatically */ | 453 | /* set to NULL to be safe, if its needed slotSessionChanged resets it automatically */ |
451 | m_curSession = NULL; | 454 | m_curSession = NULL; |
452 | tabWidget()->remove( /*currentSession()*/ses ); | 455 | tabWidget()->remove( /*currentSession()*/ses ); |
453 | /*it's autodelete */ | 456 | /*it's autodelete */ |
454 | m_sessions.remove( ses ); | 457 | m_sessions.remove( ses ); |
455 | qWarning("after remove!!"); | 458 | owarn << "after remove!!" << oendl; |
456 | 459 | ||
457 | if (!currentSession() ) { | 460 | if (!currentSession() ) { |
458 | m_connect->setEnabled( false ); | 461 | m_connect->setEnabled( false ); |
459 | m_disconnect->setEnabled( false ); | 462 | m_disconnect->setEnabled( false ); |
460 | m_terminate->setEnabled( false ); | 463 | m_terminate->setEnabled( false ); |
461 | m_transfer->setEnabled( false ); | 464 | m_transfer->setEnabled( false ); |
@@ -567,22 +570,22 @@ void MainWindow::slotOpenButtons( bool state ) { | |||
567 | } | 570 | } |
568 | } | 571 | } |
569 | 572 | ||
570 | 573 | ||
571 | 574 | ||
572 | void MainWindow::slotSessionChanged( Session* ses ) { | 575 | void MainWindow::slotSessionChanged( Session* ses ) { |
573 | qWarning("changed!"); | 576 | owarn << "changed!" << oendl; |
574 | 577 | ||
575 | if(m_curSession) | 578 | if(m_curSession) |
576 | if(m_curSession->transferDialog()) m_curSession->transferDialog()->hide(); | 579 | if(m_curSession->transferDialog()) m_curSession->transferDialog()->hide(); |
577 | if(ses) | 580 | if(ses) |
578 | if(ses->transferDialog()) ses->transferDialog()->show(); | 581 | if(ses->transferDialog()) ses->transferDialog()->show(); |
579 | 582 | ||
580 | if ( ses ) { | 583 | if ( ses ) { |
581 | m_curSession = ses; | 584 | m_curSession = ses; |
582 | qDebug(QString("is connected : %1").arg( m_curSession->layer()->isConnected() ) ); | 585 | odebug << QString("is connected : %1").arg( m_curSession->layer()->isConnected() ) << oendl; |
583 | if ( m_curSession->layer()->isConnected() ) { | 586 | if ( m_curSession->layer()->isConnected() ) { |
584 | m_connect->setEnabled( false ); | 587 | m_connect->setEnabled( false ); |
585 | m_disconnect->setEnabled( true ); | 588 | m_disconnect->setEnabled( true ); |
586 | m_recordScript->setEnabled(!m_curSession->emulationHandler()->isRecording()); | 589 | m_recordScript->setEnabled(!m_curSession->emulationHandler()->isRecording()); |
587 | m_saveScript->setEnabled(m_curSession->emulationHandler()->isRecording()); | 590 | m_saveScript->setEnabled(m_curSession->emulationHandler()->isRecording()); |
588 | m_scripts->setItemEnabled(m_runScript_id, true); | 591 | m_scripts->setItemEnabled(m_runScript_id, true); |
diff --git a/noncore/apps/opie-console/modemconfigwidget.cpp b/noncore/apps/opie-console/modemconfigwidget.cpp index 3466e3a..9fdaf73 100644 --- a/noncore/apps/opie-console/modemconfigwidget.cpp +++ b/noncore/apps/opie-console/modemconfigwidget.cpp | |||
@@ -1,18 +1,21 @@ | |||
1 | #include "modemconfigwidget.h" | ||
2 | #include "dialdialog.h" | ||
1 | 3 | ||
4 | /* OPIE */ | ||
5 | #include <opie2/odebug.h> | ||
2 | #include <qpe/qpeapplication.h> | 6 | #include <qpe/qpeapplication.h> |
7 | using namespace Opie::Core; | ||
3 | 8 | ||
9 | /* QT */ | ||
4 | #include <qlabel.h> | 10 | #include <qlabel.h> |
5 | #include <qlayout.h> | 11 | #include <qlayout.h> |
6 | #include <qcombobox.h> | 12 | #include <qcombobox.h> |
7 | #include <qpushbutton.h> | 13 | #include <qpushbutton.h> |
8 | #include <qhbox.h> | 14 | #include <qhbox.h> |
9 | 15 | ||
10 | #include "modemconfigwidget.h" | ||
11 | #include "dialdialog.h" | ||
12 | |||
13 | namespace { | 16 | namespace { |
14 | void setCurrent( const QString& str, QComboBox* bo ) { | 17 | void setCurrent( const QString& str, QComboBox* bo ) { |
15 | uint b = bo->count(); | 18 | uint b = bo->count(); |
16 | for (int i = 0; i < bo->count(); i++ ) { | 19 | for (int i = 0; i < bo->count(); i++ ) { |
17 | if ( bo->text(i) == str ) { | 20 | if ( bo->text(i) == str ) { |
18 | bo->setCurrentItem( i ); | 21 | bo->setCurrentItem( i ); |
@@ -132,13 +135,13 @@ void ModemConfigWidget::load( const Profile& prof ) { | |||
132 | m_base->setStop( IOLayerBase::Stop_One ); | 135 | m_base->setStop( IOLayerBase::Stop_One ); |
133 | } | 136 | } |
134 | 137 | ||
135 | 138 | ||
136 | atConf->readConfig( prof ); | 139 | atConf->readConfig( prof ); |
137 | if ( prof.readEntry( "Device" ).isEmpty() ) { | 140 | if ( prof.readEntry( "Device" ).isEmpty() ) { |
138 | qWarning("device empty!"); | 141 | owarn << "device empty!" << oendl; |
139 | return; | 142 | return; |
140 | } | 143 | } |
141 | setCurrent( prof.readEntry( "Device" ), m_deviceCmb ); | 144 | setCurrent( prof.readEntry( "Device" ), m_deviceCmb ); |
142 | 145 | ||
143 | 146 | ||
144 | } | 147 | } |
diff --git a/noncore/apps/opie-console/opie-console.pro b/noncore/apps/opie-console/opie-console.pro index 7a15828..f7e33e9 100644 --- a/noncore/apps/opie-console/opie-console.pro +++ b/noncore/apps/opie-console/opie-console.pro | |||
@@ -1,10 +1,8 @@ | |||
1 | TEMPLATE = app | 1 | TEMPLATE = app |
2 | TMAKE_CXXFLAGS += -DHAVE_OPENPTY | ||
3 | CONFIG += qt warn_on | 2 | CONFIG += qt warn_on |
4 | #CONFIG = qt | ||
5 | DESTDIR = $(OPIEDIR)/bin | 3 | DESTDIR = $(OPIEDIR)/bin |
6 | HEADERS = io_layer.h io_serial.h io_irda.h io_bt.h io_modem.h \ | 4 | HEADERS = io_layer.h io_serial.h io_irda.h io_bt.h io_modem.h \ |
7 | file_layer.h filetransfer.h \ | 5 | file_layer.h filetransfer.h \ |
8 | metafactory.h \ | 6 | metafactory.h \ |
9 | session.h \ | 7 | session.h \ |
10 | mainwindow.h \ | 8 | mainwindow.h \ |
@@ -67,10 +65,10 @@ SOURCES = io_layer.cpp io_serial.cpp io_irda.cpp io_bt.cpp io_modem.cpp \ | |||
67 | INTERFACES = configurebase.ui editbase.ui | 65 | INTERFACES = configurebase.ui editbase.ui |
68 | INCLUDEPATH += $(OPIEDIR)/include | 66 | INCLUDEPATH += $(OPIEDIR)/include |
69 | DEPENDPATH += $(OPIEDIR)/include | 67 | DEPENDPATH += $(OPIEDIR)/include |
70 | LIBS += -lqpe -lopiecore2 -lopieui2 -lutil | 68 | LIBS += -lqpe -lopiecore2 -lopieui2 -lutil |
71 | TARGET = opie-console | 69 | TARGET = opie-console |
72 | 70 | ||
73 | 71 | DEFINES += HAVE_OPENPTY | |
74 | 72 | ||
75 | 73 | ||
76 | include ( $(OPIEDIR)/include.pro ) | 74 | include ( $(OPIEDIR)/include.pro ) |
diff --git a/noncore/apps/opie-console/sz_transfer.cpp b/noncore/apps/opie-console/sz_transfer.cpp index fbc5306..f505998 100644 --- a/noncore/apps/opie-console/sz_transfer.cpp +++ b/noncore/apps/opie-console/sz_transfer.cpp | |||
@@ -38,13 +38,13 @@ void SzTransfer::sendFile(const QString& file) { | |||
38 | proc->start(OProcess::NotifyOnExit, OProcess::All); | 38 | proc->start(OProcess::NotifyOnExit, OProcess::All); |
39 | 39 | ||
40 | } | 40 | } |
41 | 41 | ||
42 | void SzTransfer::SzReceivedStdout(OProcess *, char *buffer, int buflen) { | 42 | void SzTransfer::SzReceivedStdout(OProcess *, char *buffer, int buflen) { |
43 | 43 | ||
44 | qWarning("recieved from sz on stdout %d bytes", buflen); | 44 | owarn << "recieved from sz on stdout " << buflen << " bytes" << oendl; |
45 | 45 | ||
46 | QByteArray data(buflen); | 46 | QByteArray data(buflen); |
47 | data.fill(*buffer, buflen); | 47 | data.fill(*buffer, buflen); |
48 | for (uint i = 0; i < data.count(); i++ ) { | 48 | for (uint i = 0; i < data.count(); i++ ) { |
49 | printf("%c", buffer[i] ); | 49 | printf("%c", buffer[i] ); |
50 | } | 50 | } |
@@ -62,22 +62,22 @@ void SzTransfer::SzReceivedStderr(OProcess *, char *buffer, int length) { | |||
62 | // printf("%c", buffer[i]); | 62 | // printf("%c", buffer[i]); |
63 | //printf("\n"); | 63 | //printf("\n"); |
64 | } | 64 | } |
65 | 65 | ||
66 | void SzTransfer::receivedStdin(const QByteArray &data) { | 66 | void SzTransfer::receivedStdin(const QByteArray &data) { |
67 | 67 | ||
68 | qWarning("recieved from io_serial %d bytes", data.size()); | 68 | owarn << "recieved from io_serial " << data.size() << " bytes" << oendl; |
69 | 69 | ||
70 | // recieved data from the io layer goes to sz | 70 | // recieved data from the io layer goes to sz |
71 | proc->writeStdin(data.data(), data.size()); | 71 | proc->writeStdin(data.data(), data.size()); |
72 | 72 | ||
73 | } | 73 | } |
74 | 74 | ||
75 | void SzTransfer::sent() { | 75 | void SzTransfer::sent() { |
76 | 76 | ||
77 | qWarning("sent file"); | 77 | owarn << "sent file" << oendl; |
78 | 78 | ||
79 | //setcbreak(0); /* default */ | 79 | //setcbreak(0); /* default */ |
80 | 80 | ||
81 | 81 | ||
82 | delete proc; | 82 | delete proc; |
83 | disconnect(layer(), SIGNAL(received(const QByteArray&)), | 83 | disconnect(layer(), SIGNAL(received(const QByteArray&)), |
diff --git a/noncore/apps/opie-console/tabwidget.cpp b/noncore/apps/opie-console/tabwidget.cpp index 6429e3c..41a91ed 100644 --- a/noncore/apps/opie-console/tabwidget.cpp +++ b/noncore/apps/opie-console/tabwidget.cpp | |||
@@ -1,21 +1,24 @@ | |||
1 | |||
2 | #include "tabwidget.h" | 1 | #include "tabwidget.h" |
3 | 2 | ||
3 | /* OPIE */ | ||
4 | #include <opie2/odebug.h> | ||
5 | using namespace Opie::Core; | ||
4 | using namespace Opie::Ui; | 6 | using namespace Opie::Ui; |
7 | |||
5 | TabWidget::TabWidget( QWidget* parent, const char* name ) | 8 | TabWidget::TabWidget( QWidget* parent, const char* name ) |
6 | : OTabWidget( parent, name ) { | 9 | : OTabWidget( parent, name ) { |
7 | connect(this, SIGNAL( currentChanged(QWidget*) ), | 10 | connect(this, SIGNAL( currentChanged(QWidget*) ), |
8 | this, SLOT( slotCurChanged(QWidget*) ) ); | 11 | this, SLOT( slotCurChanged(QWidget*) ) ); |
9 | } | 12 | } |
10 | 13 | ||
11 | TabWidget::~TabWidget() { | 14 | TabWidget::~TabWidget() { |
12 | } | 15 | } |
13 | 16 | ||
14 | void TabWidget::add( Session* ses ) { | 17 | void TabWidget::add( Session* ses ) { |
15 | qWarning("session ses " + ses->name() ); | 18 | owarn << "session ses " + ses->name() << oendl; |
16 | if ( !ses->widgetStack() ) return; | 19 | if ( !ses->widgetStack() ) return; |
17 | //reparent( ses->widgetStack(), QPoint() ); | 20 | //reparent( ses->widgetStack(), QPoint() ); |
18 | addTab( ses->widgetStack(), "console/konsole", ses->name() ); | 21 | addTab( ses->widgetStack(), "console/konsole", ses->name() ); |
19 | //addTab( ses->widgetStack(), ses->name() ); | 22 | //addTab( ses->widgetStack(), ses->name() ); |
20 | m_map.insert( ses->widgetStack(), ses ); | 23 | m_map.insert( ses->widgetStack(), ses ); |
21 | } | 24 | } |
diff --git a/noncore/apps/opie-console/terminalwidget.cpp b/noncore/apps/opie-console/terminalwidget.cpp index 6870487..087476b 100644 --- a/noncore/apps/opie-console/terminalwidget.cpp +++ b/noncore/apps/opie-console/terminalwidget.cpp | |||
@@ -1,16 +1,21 @@ | |||
1 | #include "terminalwidget.h" | ||
2 | |||
3 | /* OPIE */ | ||
4 | #include <opie2/odebug.h> | ||
5 | using namespace Opie::Core; | ||
6 | |||
7 | /* QT */ | ||
1 | #include <qlabel.h> | 8 | #include <qlabel.h> |
2 | #include <qcheckbox.h> | 9 | #include <qcheckbox.h> |
3 | #include <qcombobox.h> | 10 | #include <qcombobox.h> |
4 | #include <qradiobutton.h> | 11 | #include <qradiobutton.h> |
5 | #include <qhgroupbox.h> | 12 | #include <qhgroupbox.h> |
6 | #include <qhbuttongroup.h> | 13 | #include <qhbuttongroup.h> |
7 | #include <qlayout.h> | 14 | #include <qlayout.h> |
8 | 15 | ||
9 | #include "terminalwidget.h" | ||
10 | |||
11 | namespace { | 16 | namespace { |
12 | enum TermIds { | 17 | enum TermIds { |
13 | id_term_vt100 = 0, | 18 | id_term_vt100 = 0, |
14 | id_term_vt102, | 19 | id_term_vt102, |
15 | id_term_linux, | 20 | id_term_linux, |
16 | id_term_xterm | 21 | id_term_xterm |
@@ -66,13 +71,13 @@ TerminalWidget::TerminalWidget( const QString& name, QWidget* parent, | |||
66 | 71 | ||
67 | m_lroot->add( m_groupConv ); | 72 | m_lroot->add( m_groupConv ); |
68 | m_lroot->add( m_groupOptions ); | 73 | m_lroot->add( m_groupOptions ); |
69 | m_lroot->addStretch( 0 ); | 74 | m_lroot->addStretch( 0 ); |
70 | 75 | ||
71 | // Fill in some options | 76 | // Fill in some options |
72 | qWarning("Options for terminal box"); | 77 | owarn << "Options for terminal box" << oendl; |
73 | m_terminalBox->insertItem( tr("VT 100"), 0 ); // /*, id_term_vt100*/ ); | 78 | m_terminalBox->insertItem( tr("VT 100"), 0 ); // /*, id_term_vt100*/ ); |
74 | m_terminalBox->insertItem( tr("VT 102"), 1 ); // /* , id_term_vt102 */); | 79 | m_terminalBox->insertItem( tr("VT 102"), 1 ); // /* , id_term_vt102 */); |
75 | m_terminalBox->insertItem( tr("Linux Console"), 2 ); //, id_term_linux ); | 80 | m_terminalBox->insertItem( tr("Linux Console"), 2 ); //, id_term_linux ); |
76 | m_terminalBox->insertItem( tr("X-Terminal"), 3 ); //, id_term_xterm ); | 81 | m_terminalBox->insertItem( tr("X-Terminal"), 3 ); //, id_term_xterm ); |
77 | //m_terminalBox->insertItem( tr("ANSI"), id_term_ansi ); | 82 | //m_terminalBox->insertItem( tr("ANSI"), id_term_ansi ); |
78 | 83 | ||
diff --git a/noncore/apps/opie-console/test/senderui.cpp b/noncore/apps/opie-console/test/senderui.cpp index df27055..45fd11d 100644 --- a/noncore/apps/opie-console/test/senderui.cpp +++ b/noncore/apps/opie-console/test/senderui.cpp | |||
@@ -23,21 +23,21 @@ SenderUI::SenderUI() | |||
23 | /* we do that manually */ | 23 | /* we do that manually */ |
24 | Profile prof; | 24 | Profile prof; |
25 | QString str = "/dev/bty0"; | 25 | QString str = "/dev/bty0"; |
26 | prof.writeEntry("Device",str ); | 26 | prof.writeEntry("Device",str ); |
27 | prof.writeEntry("Baud", 19200 ); | 27 | prof.writeEntry("Baud", 19200 ); |
28 | 28 | ||
29 | qWarning("prof " + prof.readEntry("Device") + " " + str); | 29 | owarn << "prof " + prof.readEntry("Device") + " " + str << oendl; |
30 | ser = new IOSerial(prof); | 30 | ser = new IOSerial(prof); |
31 | connect(ser, SIGNAL(received(const QByteArray&) ), | 31 | connect(ser, SIGNAL(received(const QByteArray&) ), |
32 | this, SLOT(got(const QByteArray&) ) ); | 32 | this, SLOT(got(const QByteArray&) ) ); |
33 | 33 | ||
34 | if ( ser->open() ) | 34 | if ( ser->open() ) |
35 | qWarning("opened!!!"); | 35 | owarn << "opened!!!" << oendl; |
36 | else | 36 | else |
37 | qWarning("could not open"); | 37 | owarn << "could not open" << oendl; |
38 | 38 | ||
39 | 39 | ||
40 | } | 40 | } |
41 | SenderUI::~SenderUI() { | 41 | SenderUI::~SenderUI() { |
42 | 42 | ||
43 | } | 43 | } |
@@ -49,31 +49,31 @@ void SenderUI::slotSendFile() { | |||
49 | connect (sz, SIGNAL(sent()), | 49 | connect (sz, SIGNAL(sent()), |
50 | this, SLOT(fileTransComplete())); | 50 | this, SLOT(fileTransComplete())); |
51 | } | 51 | } |
52 | 52 | ||
53 | void SenderUI::slotSend() { | 53 | void SenderUI::slotSend() { |
54 | QCString str = MultiLineEdit1->text().utf8(); | 54 | QCString str = MultiLineEdit1->text().utf8(); |
55 | qWarning("sending: %s", str.data() ); | 55 | owarn << "sending: " << str.data() << "" << oendl; |
56 | str = str.replace( QRegExp("\n"), "\r"); | 56 | str = str.replace( QRegExp("\n"), "\r"); |
57 | ser->send( str ); | 57 | ser->send( str ); |
58 | } | 58 | } |
59 | void SenderUI::got(const QByteArray& ar) { | 59 | void SenderUI::got(const QByteArray& ar) { |
60 | qWarning("got:"); | 60 | owarn << "got:" << oendl; |
61 | for ( uint i = 0; i < ar.count(); i++ ) { | 61 | for ( uint i = 0; i < ar.count(); i++ ) { |
62 | printf("%c", ar[i] ); | 62 | printf("%c", ar[i] ); |
63 | } | 63 | } |
64 | printf("\n"); | 64 | printf("\n"); |
65 | } | 65 | } |
66 | 66 | ||
67 | void SenderUI::fileTransComplete() { | 67 | void SenderUI::fileTransComplete() { |
68 | 68 | ||
69 | qWarning("file transfer complete"); | 69 | owarn << "file transfer complete" << oendl; |
70 | } | 70 | } |
71 | void SenderUI::send() { | 71 | void SenderUI::send() { |
72 | 72 | ||
73 | } | 73 | } |
74 | void SenderUI::slotRev(){ | 74 | void SenderUI::slotRev(){ |
75 | qWarning("Going to receive!"); | 75 | owarn << "Going to receive!" << oendl; |
76 | FileReceive *rev = new FileReceive( FileReceive::SZ, ser ); | 76 | FileReceive *rev = new FileReceive( FileReceive::SZ, ser ); |
77 | rev->receive(); | 77 | rev->receive(); |
78 | 78 | ||
79 | } | 79 | } |
diff --git a/noncore/apps/opie-console/widget.cpp b/noncore/apps/opie-console/widget.cpp index e17dfd4..c51983f 100644 --- a/noncore/apps/opie-console/widget.cpp +++ b/noncore/apps/opie-console/widget.cpp | |||
@@ -992,13 +992,13 @@ bool Widget::eventFilter( QObject *obj, QEvent *e ) | |||
992 | QApplication::sendEvent(scrollbar, e); | 992 | QApplication::sendEvent(scrollbar, e); |
993 | } | 993 | } |
994 | 994 | ||
995 | #ifdef FAKE_CTRL_AND_ALT | 995 | #ifdef FAKE_CTRL_AND_ALT |
996 | static bool control = FALSE; | 996 | static bool control = FALSE; |
997 | static bool alt = FALSE; | 997 | static bool alt = FALSE; |
998 | // qDebug(" Has a keyboard with no CTRL and ALT keys, but we fake it:"); | 998 | // odebug << " Has a keyboard with no CTRL and ALT keys, but we fake it:" << oendl; |
999 | bool dele=FALSE; | 999 | bool dele=FALSE; |
1000 | if ( e->type() == QEvent::KeyPress || e->type() == QEvent::KeyRelease ) { | 1000 | if ( e->type() == QEvent::KeyPress || e->type() == QEvent::KeyRelease ) { |
1001 | QKeyEvent* ke = (QKeyEvent*)e; | 1001 | QKeyEvent* ke = (QKeyEvent*)e; |
1002 | bool keydown = e->type() == QEvent::KeyPress || ke->isAutoRepeat(); | 1002 | bool keydown = e->type() == QEvent::KeyPress || ke->isAutoRepeat(); |
1003 | switch (ke->key()) { | 1003 | switch (ke->key()) { |
1004 | case Key_F9: // let this be "Control" | 1004 | case Key_F9: // let this be "Control" |
@@ -1031,17 +1031,17 @@ bool Widget::eventFilter( QObject *obj, QEvent *e ) | |||
1031 | 1031 | ||
1032 | if ( e->type() == QEvent::KeyPress ) { | 1032 | if ( e->type() == QEvent::KeyPress ) { |
1033 | QKeyEvent* ke = (QKeyEvent*)e; | 1033 | QKeyEvent* ke = (QKeyEvent*)e; |
1034 | actSel=0; // Key stroke implies a screen update, so Widget won't | 1034 | actSel=0; // Key stroke implies a screen update, so Widget won't |
1035 | // know where the current selection is. | 1035 | // know where the current selection is. |
1036 | 1036 | ||
1037 | // qDebug("key pressed is 0x%x",ke->key()); | 1037 | // odebug << "key pressed is 0x" << ke->key() << "" << oendl; |
1038 | 1038 | ||
1039 | if( ke->state() == ShiftButton && ke->key() == Key_Tab) { //lets hardcode this sucker | 1039 | if( ke->state() == ShiftButton && ke->key() == Key_Tab) { //lets hardcode this sucker |
1040 | 1040 | ||
1041 | // qDebug("key pressed 2 is 0x%x",ke->key()); | 1041 | // odebug << "key pressed 2 is 0x" << ke->key() << "" << oendl; |
1042 | emitText("\\"); // expose | 1042 | emitText("\\"); // expose |
1043 | } else | 1043 | } else |
1044 | emit keyPressedSignal(ke); // expose | 1044 | emit keyPressedSignal(ke); // expose |
1045 | ke->accept(); | 1045 | ke->accept(); |
1046 | #ifdef FAKE_CTRL_AND_ALT | 1046 | #ifdef FAKE_CTRL_AND_ALT |
1047 | if ( dele ) delete e; | 1047 | if ( dele ) delete e; |
diff --git a/noncore/apps/opie-console/widget_layer.cpp b/noncore/apps/opie-console/widget_layer.cpp index 96dda1c..ab25919 100644 --- a/noncore/apps/opie-console/widget_layer.cpp +++ b/noncore/apps/opie-console/widget_layer.cpp | |||
@@ -72,13 +72,13 @@ bool WidgetLayer::eventFilter( QObject *obj, QEvent *e ) | |||
72 | if ( obj != this /* when embedded */ && obj != parent() /* when standalone */ ) | 72 | if ( obj != this /* when embedded */ && obj != parent() /* when standalone */ ) |
73 | return false; // not us | 73 | return false; // not us |
74 | 74 | ||
75 | #ifdef FAKE_CTRL_AND_ALT | 75 | #ifdef FAKE_CTRL_AND_ALT |
76 | static bool control = false; | 76 | static bool control = false; |
77 | static bool alt = false; | 77 | static bool alt = false; |
78 | // qDebug(" Has a keyboard with no CTRL and ALT keys, but we fake it:"); | 78 | // odebug << " Has a keyboard with no CTRL and ALT keys, but we fake it:" << oendl; |
79 | bool dele = false; | 79 | bool dele = false; |
80 | if ( e->type() == QEvent::KeyPress || e->type() == QEvent::KeyRelease ) { | 80 | if ( e->type() == QEvent::KeyPress || e->type() == QEvent::KeyRelease ) { |
81 | QKeyEvent* ke = (QKeyEvent*)e; | 81 | QKeyEvent* ke = (QKeyEvent*)e; |
82 | bool keydown = e->type() == QEvent::KeyPress || ke->isAutoRepeat(); | 82 | bool keydown = e->type() == QEvent::KeyPress || ke->isAutoRepeat(); |
83 | switch (ke->key()) { | 83 | switch (ke->key()) { |
84 | case Key_F9: // let this be "Control" | 84 | case Key_F9: // let this be "Control" |
@@ -112,13 +112,13 @@ QChar(a,0)); | |||
112 | 112 | ||
113 | if ( e->type() == QEvent::KeyPress ) { | 113 | if ( e->type() == QEvent::KeyPress ) { |
114 | QKeyEvent* ke = (QKeyEvent*)e; | 114 | QKeyEvent* ke = (QKeyEvent*)e; |
115 | //actSel=0; // Key stroke implies a screen update, so Widget won't | 115 | //actSel=0; // Key stroke implies a screen update, so Widget won't |
116 | // know where the current selection is. | 116 | // know where the current selection is. |
117 | 117 | ||
118 | // qDebug("key pressed is 0x%x",ke->key()); | 118 | // odebug << "key pressed is 0x" << ke->key() << "" << oendl; |
119 | 119 | ||
120 | if( ke->state() == ShiftButton && ke->key() == Key_Tab) { //lets hardcode this sucker | 120 | if( ke->state() == ShiftButton && ke->key() == Key_Tab) { //lets hardcode this sucker |
121 | insertText("\\"); // expose | 121 | insertText("\\"); // expose |
122 | } else | 122 | } else |
123 | emit keyPressed( ke ); // expose | 123 | emit keyPressed( ke ); // expose |
124 | ke->accept(); | 124 | ke->accept(); |