author | chicken <chicken> | 2004-03-01 16:53:58 (UTC) |
---|---|---|
committer | chicken <chicken> | 2004-03-01 16:53:58 (UTC) |
commit | 8de0eea414192d758746a5f3950b9765e9709bf9 (patch) (unidiff) | |
tree | 75f7c619ba161f395c058691af152226992d20a7 /core/apps/embeddedkonsole | |
parent | 49615014f281a58bd9bde5543692ffddab052755 (diff) | |
download | opie-8de0eea414192d758746a5f3950b9765e9709bf9.zip opie-8de0eea414192d758746a5f3950b9765e9709bf9.tar.gz opie-8de0eea414192d758746a5f3950b9765e9709bf9.tar.bz2 |
fix includes
-rw-r--r-- | core/apps/embeddedkonsole/MyPty.cpp | 1 | ||||
-rw-r--r-- | core/apps/embeddedkonsole/TEWidget.cpp | 9 | ||||
-rw-r--r-- | core/apps/embeddedkonsole/TEmuVt102.cpp | 5 | ||||
-rw-r--r-- | core/apps/embeddedkonsole/TEmulation.cpp | 3 | ||||
-rw-r--r-- | core/apps/embeddedkonsole/commandeditdialog.cpp | 8 | ||||
-rw-r--r-- | core/apps/embeddedkonsole/commandeditwidget.cpp | 4 | ||||
-rw-r--r-- | core/apps/embeddedkonsole/keytrans.cpp | 1 | ||||
-rw-r--r-- | core/apps/embeddedkonsole/konsole.cpp | 21 | ||||
-rw-r--r-- | core/apps/embeddedkonsole/playlistselection.cpp | 7 | ||||
-rw-r--r-- | core/apps/embeddedkonsole/session.cpp | 1 |
10 files changed, 0 insertions, 60 deletions
diff --git a/core/apps/embeddedkonsole/MyPty.cpp b/core/apps/embeddedkonsole/MyPty.cpp index 5a8519a..d05e31e 100644 --- a/core/apps/embeddedkonsole/MyPty.cpp +++ b/core/apps/embeddedkonsole/MyPty.cpp | |||
@@ -46,49 +46,48 @@ | |||
46 | 46 | ||
47 | clearify TEPty::done vs. TEPty::~TEPty semantics. | 47 | clearify TEPty::done vs. TEPty::~TEPty semantics. |
48 | check if pty is restartable via run after done. | 48 | check if pty is restartable via run after done. |
49 | 49 | ||
50 | \par Pseudo terminals | 50 | \par Pseudo terminals |
51 | 51 | ||
52 | Pseudo terminals are a unique feature of UNIX, and always come in form of | 52 | Pseudo terminals are a unique feature of UNIX, and always come in form of |
53 | pairs of devices (/dev/ptyXX and /dev/ttyXX), which are connected to each | 53 | pairs of devices (/dev/ptyXX and /dev/ttyXX), which are connected to each |
54 | other by the operating system. One may think of them as two serial devices | 54 | other by the operating system. One may think of them as two serial devices |
55 | linked by a null-modem cable. Being based on devices the number of | 55 | linked by a null-modem cable. Being based on devices the number of |
56 | simultanous instances of this class is (globally) limited by the number of | 56 | simultanous instances of this class is (globally) limited by the number of |
57 | those device pairs, which is 256. | 57 | those device pairs, which is 256. |
58 | 58 | ||
59 | Another technic are UNIX 98 PTY's. These are supported also, and prefered | 59 | Another technic are UNIX 98 PTY's. These are supported also, and prefered |
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 | 66 | ||
67 | #include <qfileinfo.h> | 67 | #include <qfileinfo.h> |
68 | #include <qapplication.h> | 68 | #include <qapplication.h> |
69 | #include <qsocketnotifier.h> | 69 | #include <qsocketnotifier.h> |
70 | #include <qstring.h> | ||
71 | 70 | ||
72 | #include <stdlib.h> | 71 | #include <stdlib.h> |
73 | #include <stdio.h> | 72 | #include <stdio.h> |
74 | #include <signal.h> | 73 | #include <signal.h> |
75 | #include <fcntl.h> | 74 | #include <fcntl.h> |
76 | #include <unistd.h> | 75 | #include <unistd.h> |
77 | #include <termios.h> | 76 | #include <termios.h> |
78 | #include <sys/types.h> | 77 | #include <sys/types.h> |
79 | #include <sys/ioctl.h> | 78 | #include <sys/ioctl.h> |
80 | #include <sys/wait.h> | 79 | #include <sys/wait.h> |
81 | 80 | ||
82 | #ifdef HAVE_OPENPTY | 81 | #ifdef HAVE_OPENPTY |
83 | #include <pty.h> | 82 | #include <pty.h> |
84 | #endif | 83 | #endif |
85 | 84 | ||
86 | #include "MyPty.h" | 85 | #include "MyPty.h" |
87 | 86 | ||
88 | 87 | ||
89 | #undef VERBOSE_DEBUG | 88 | #undef VERBOSE_DEBUG |
90 | 89 | ||
91 | 90 | ||
92 | /* -------------------------------------------------------------------------- */ | 91 | /* -------------------------------------------------------------------------- */ |
93 | 92 | ||
94 | /*! | 93 | /*! |
diff --git a/core/apps/embeddedkonsole/TEWidget.cpp b/core/apps/embeddedkonsole/TEWidget.cpp index de5e585..8206e4b 100644 --- a/core/apps/embeddedkonsole/TEWidget.cpp +++ b/core/apps/embeddedkonsole/TEWidget.cpp | |||
@@ -31,63 +31,54 @@ | |||
31 | <li> (internally) the external image is simply copied to the internal | 31 | <li> (internally) the external image is simply copied to the internal |
32 | when a setImage happens. During a resizeEvent no painting is done | 32 | when a setImage happens. During a resizeEvent no painting is done |
33 | a paintEvent is expected to follow anyway. | 33 | a paintEvent is expected to follow anyway. |
34 | </ul> | 34 | </ul> |
35 | 35 | ||
36 | \sa TEScreen \sa Emulation | 36 | \sa TEScreen \sa Emulation |
37 | */ | 37 | */ |
38 | 38 | ||
39 | /* FIXME: | 39 | /* FIXME: |
40 | - 'image' may also be used uninitialized (it isn't in fact) in resizeEvent | 40 | - 'image' may also be used uninitialized (it isn't in fact) in resizeEvent |
41 | - 'font_a' not used in mouse events | 41 | - 'font_a' not used in mouse events |
42 | - add destructor | 42 | - add destructor |
43 | */ | 43 | */ |
44 | 44 | ||
45 | /* TODO | 45 | /* TODO |
46 | - evtl. be sensitive to `paletteChange' while using default colors. | 46 | - evtl. be sensitive to `paletteChange' while using default colors. |
47 | - set different 'rounding' styles? I.e. have a mode to show clipped chars? | 47 | - set different 'rounding' styles? I.e. have a mode to show clipped chars? |
48 | */ | 48 | */ |
49 | 49 | ||
50 | // #include "config.h" | 50 | // #include "config.h" |
51 | #include "TEWidget.h" | 51 | #include "TEWidget.h" |
52 | #include "session.h" | 52 | #include "session.h" |
53 | #include <qpe/config.h> | 53 | #include <qpe/config.h> |
54 | 54 | ||
55 | #include <qpe/resource.h> | ||
56 | #include <qpe/sound.h> | ||
57 | 55 | ||
58 | #if !(QT_NO_COP) | 56 | #if !(QT_NO_COP) |
59 | #include <qpe/qcopenvelope_qws.h> | 57 | #include <qpe/qcopenvelope_qws.h> |
60 | #endif | 58 | #endif |
61 | 59 | ||
62 | #include <qcursor.h> | ||
63 | #include <qregexp.h> | ||
64 | #include <qpainter.h> | ||
65 | #include <qclipboard.h> | 60 | #include <qclipboard.h> |
66 | #include <qstyle.h> | ||
67 | #include <qfile.h> | ||
68 | #include <qdragobject.h> | ||
69 | #include <qnamespace.h> | ||
70 | 61 | ||
71 | #include <stdio.h> | 62 | #include <stdio.h> |
72 | #include <stdlib.h> | 63 | #include <stdlib.h> |
73 | #include <unistd.h> | 64 | #include <unistd.h> |
74 | #include <ctype.h> | 65 | #include <ctype.h> |
75 | #include <sys/stat.h> | 66 | #include <sys/stat.h> |
76 | #include <sys/types.h> | 67 | #include <sys/types.h> |
77 | #include <signal.h> | 68 | #include <signal.h> |
78 | 69 | ||
79 | #include <assert.h> | 70 | #include <assert.h> |
80 | 71 | ||
81 | // #include "TEWidget.moc" | 72 | // #include "TEWidget.moc" |
82 | //#include <kapp.h> | 73 | //#include <kapp.h> |
83 | //#include <kcursor.h> | 74 | //#include <kcursor.h> |
84 | //#include <kurl.h> | 75 | //#include <kurl.h> |
85 | //#include <kdebug.h> | 76 | //#include <kdebug.h> |
86 | //#include <klocale.h> | 77 | //#include <klocale.h> |
87 | 78 | ||
88 | #define HERE printf("%s(%d): %s\n",__FILE__,__LINE__,__FUNCTION__) | 79 | #define HERE printf("%s(%d): %s\n",__FILE__,__LINE__,__FUNCTION__) |
89 | #define HCNT(Name) // { static int cnt = 1; printf("%s(%d): %s %d\n",__FILE__,__LINE__,Name,cnt++); } | 80 | #define HCNT(Name) // { static int cnt = 1; printf("%s(%d): %s %d\n",__FILE__,__LINE__,Name,cnt++); } |
90 | 81 | ||
91 | #define loc(X,Y) ((Y)*columns+(X)) | 82 | #define loc(X,Y) ((Y)*columns+(X)) |
92 | 83 | ||
93 | //FIXME: the rim should normally be 1, 0 only when running in full screen mode. | 84 | //FIXME: the rim should normally be 1, 0 only when running in full screen mode. |
diff --git a/core/apps/embeddedkonsole/TEmuVt102.cpp b/core/apps/embeddedkonsole/TEmuVt102.cpp index 275c18d..0d6aef5 100644 --- a/core/apps/embeddedkonsole/TEmuVt102.cpp +++ b/core/apps/embeddedkonsole/TEmuVt102.cpp | |||
@@ -3,56 +3,51 @@ | |||
3 | /* [TEmuVt102.C] VT102 Terminal Emulation */ | 3 | /* [TEmuVt102.C] VT102 Terminal Emulation */ |
4 | /* */ | 4 | /* */ |
5 | /* ------------------------------------------------------------------------- */ | 5 | /* ------------------------------------------------------------------------- */ |
6 | /* */ | 6 | /* */ |
7 | /* Copyright (c) 1997,1998 by Lars Doelle <lars.doelle@on-line.de> */ | 7 | /* Copyright (c) 1997,1998 by Lars Doelle <lars.doelle@on-line.de> */ |
8 | /* */ | 8 | /* */ |
9 | /* This file is part of Konsole - an X terminal for KDE */ | 9 | /* This file is part of Konsole - an X terminal for KDE */ |
10 | /* */ | 10 | /* */ |
11 | /* ------------------------------------------------------------------------- */ | 11 | /* ------------------------------------------------------------------------- */ |
12 | /* */ | 12 | /* */ |
13 | /* Ported Konsole to Qt/Embedded */ | 13 | /* Ported Konsole to Qt/Embedded */ |
14 | /* */ | 14 | /* */ |
15 | /* Copyright (C) 2000 by John Ryland <jryland@trolltech.com> */ | 15 | /* Copyright (C) 2000 by John Ryland <jryland@trolltech.com> */ |
16 | /* */ | 16 | /* */ |
17 | /* -------------------------------------------------------------------------- */ | 17 | /* -------------------------------------------------------------------------- */ |
18 | 18 | ||
19 | /*! \class TEmuVt102 | 19 | /*! \class TEmuVt102 |
20 | 20 | ||
21 | \brief Actual Emulation for Konsole | 21 | \brief Actual Emulation for Konsole |
22 | 22 | ||
23 | \sa TEWidget \sa TEScreen | 23 | \sa TEWidget \sa TEScreen |
24 | */ | 24 | */ |
25 | 25 | ||
26 | #include "TEmuVt102.h" | 26 | #include "TEmuVt102.h" |
27 | #include "TEWidget.h" | ||
28 | #include "TEScreen.h" | ||
29 | #include "keytrans.h" | ||
30 | 27 | ||
31 | #include <stdio.h> | 28 | #include <stdio.h> |
32 | #include <unistd.h> | 29 | #include <unistd.h> |
33 | #include <qkeycode.h> | ||
34 | #include <qtextcodec.h> | ||
35 | 30 | ||
36 | 31 | ||
37 | /* VT102 Terminal Emulation | 32 | /* VT102 Terminal Emulation |
38 | 33 | ||
39 | This class puts together the screens, the pty and the widget to a | 34 | This class puts together the screens, the pty and the widget to a |
40 | complete terminal emulation. Beside combining it's componentes, it | 35 | complete terminal emulation. Beside combining it's componentes, it |
41 | handles the emulations's protocol. | 36 | handles the emulations's protocol. |
42 | 37 | ||
43 | This module consists of the following sections: | 38 | This module consists of the following sections: |
44 | 39 | ||
45 | - Constructor/Destructor | 40 | - Constructor/Destructor |
46 | - Incoming Bytes Event pipeline | 41 | - Incoming Bytes Event pipeline |
47 | - Outgoing Bytes | 42 | - Outgoing Bytes |
48 | - Mouse Events | 43 | - Mouse Events |
49 | - Keyboard Events | 44 | - Keyboard Events |
50 | - Modes and Charset State | 45 | - Modes and Charset State |
51 | - Diagnostics | 46 | - Diagnostics |
52 | */ | 47 | */ |
53 | 48 | ||
54 | 49 | ||
55 | /* ------------------------------------------------------------------------- */ | 50 | /* ------------------------------------------------------------------------- */ |
56 | /* */ | 51 | /* */ |
57 | /* Constructor / Destructor */ | 52 | /* Constructor / Destructor */ |
58 | /* */ | 53 | /* */ |
diff --git a/core/apps/embeddedkonsole/TEmulation.cpp b/core/apps/embeddedkonsole/TEmulation.cpp index a539757..54f408e 100644 --- a/core/apps/embeddedkonsole/TEmulation.cpp +++ b/core/apps/embeddedkonsole/TEmulation.cpp | |||
@@ -49,54 +49,51 @@ | |||
49 | 49 | ||
50 | We use a refreshing algorithm here that has been adoped from rxvt/kvt. | 50 | We use a refreshing algorithm here that has been adoped from rxvt/kvt. |
51 | 51 | ||
52 | By this, refreshing is driven by a timer, which is (re)started whenever | 52 | By this, refreshing is driven by a timer, which is (re)started whenever |
53 | a new bunch of data to be interpreted by the emulation arives at `onRcvBlock'. | 53 | a new bunch of data to be interpreted by the emulation arives at `onRcvBlock'. |
54 | As soon as no more data arrive for `BULK_TIMEOUT' milliseconds, we trigger | 54 | As soon as no more data arrive for `BULK_TIMEOUT' milliseconds, we trigger |
55 | refresh. This rule suits both bulk display operation as done by curses as | 55 | refresh. This rule suits both bulk display operation as done by curses as |
56 | well as individual characters typed. | 56 | well as individual characters typed. |
57 | (BULK_TIMEOUT < 1000 / max characters received from keyboard per second). | 57 | (BULK_TIMEOUT < 1000 / max characters received from keyboard per second). |
58 | 58 | ||
59 | Additionally, we trigger refreshing by newlines comming in to make visual | 59 | Additionally, we trigger refreshing by newlines comming in to make visual |
60 | snapshots of lists as produced by `cat', `ls' and likely programs, thereby | 60 | snapshots of lists as produced by `cat', `ls' and likely programs, thereby |
61 | producing the illusion of a permanent and immediate display operation. | 61 | producing the illusion of a permanent and immediate display operation. |
62 | 62 | ||
63 | As a sort of catch-all needed for cases where none of the above | 63 | As a sort of catch-all needed for cases where none of the above |
64 | conditions catch, the screen refresh is also triggered by a count | 64 | conditions catch, the screen refresh is also triggered by a count |
65 | of incoming bulks (`bulk_incnt'). | 65 | of incoming bulks (`bulk_incnt'). |
66 | */ | 66 | */ |
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 | #include "TEWidget.h" | ||
74 | #include "TEScreen.h" | ||
75 | #include <stdio.h> | 73 | #include <stdio.h> |
76 | #include <stdlib.h> | 74 | #include <stdlib.h> |
77 | #include <unistd.h> | 75 | #include <unistd.h> |
78 | #include <qkeycode.h> | ||
79 | 76 | ||
80 | 77 | ||
81 | /* ------------------------------------------------------------------------- */ | 78 | /* ------------------------------------------------------------------------- */ |
82 | /* */ | 79 | /* */ |
83 | /* TEmulation */ | 80 | /* TEmulation */ |
84 | /* */ | 81 | /* */ |
85 | /* ------------------------------------------------------------------------- */ | 82 | /* ------------------------------------------------------------------------- */ |
86 | 83 | ||
87 | #define CNTL(c) ((c)-'@') | 84 | #define CNTL(c) ((c)-'@') |
88 | 85 | ||
89 | /*! | 86 | /*! |
90 | */ | 87 | */ |
91 | 88 | ||
92 | TEmulation::TEmulation(TEWidget* gui) | 89 | TEmulation::TEmulation(TEWidget* gui) |
93 | : decoder((QTextDecoder*)NULL) | 90 | : decoder((QTextDecoder*)NULL) |
94 | { | 91 | { |
95 | this->gui = gui; | 92 | this->gui = gui; |
96 | 93 | ||
97 | screen[0] = new TEScreen(gui->Lines(),gui->Columns()); | 94 | screen[0] = new TEScreen(gui->Lines(),gui->Columns()); |
98 | screen[1] = new TEScreen(gui->Lines(),gui->Columns()); | 95 | screen[1] = new TEScreen(gui->Lines(),gui->Columns()); |
99 | scr = screen[0]; | 96 | scr = screen[0]; |
100 | 97 | ||
101 | bulk_nlcnt = 0; // reset bulk newline counter | 98 | bulk_nlcnt = 0; // reset bulk newline counter |
102 | bulk_incnt = 0; // reset bulk counter | 99 | bulk_incnt = 0; // reset bulk counter |
diff --git a/core/apps/embeddedkonsole/commandeditdialog.cpp b/core/apps/embeddedkonsole/commandeditdialog.cpp index e4255f3..c0066d8 100644 --- a/core/apps/embeddedkonsole/commandeditdialog.cpp +++ b/core/apps/embeddedkonsole/commandeditdialog.cpp | |||
@@ -1,42 +1,34 @@ | |||
1 | //comandeditdialog.cpp | 1 | //comandeditdialog.cpp |
2 | 2 | ||
3 | #include "commandeditdialog.h" | 3 | #include "commandeditdialog.h" |
4 | #include "playlistselection.h" | 4 | #include "playlistselection.h" |
5 | #include <qstring.h> | ||
6 | #include <qpe/config.h> | 5 | #include <qpe/config.h> |
7 | #include <qtoolbar.h> | ||
8 | #include <qwidget.h> | ||
9 | #include <qmenubar.h> | ||
10 | #include <qpe/resource.h> | 6 | #include <qpe/resource.h> |
11 | #include <qlist.h> | ||
12 | #include <qtoolbutton.h> | 7 | #include <qtoolbutton.h> |
13 | #include <qvbox.h> | ||
14 | #include <qlistview.h> | ||
15 | #include <qlineedit.h> | 8 | #include <qlineedit.h> |
16 | #include <qheader.h> | 9 | #include <qheader.h> |
17 | #include <qlabel.h> | 10 | #include <qlabel.h> |
18 | #include <qmessagebox.h> | ||
19 | #include "smallcommandeditdialogbase.h" | 11 | #include "smallcommandeditdialogbase.h" |
20 | 12 | ||
21 | CommandEditDialog::CommandEditDialog(QWidget *parent, const char* name, WFlags fl ) | 13 | CommandEditDialog::CommandEditDialog(QWidget *parent, const char* name, WFlags fl ) |
22 | : CommandEditDialogBase(parent, name, TRUE, fl) | 14 | : CommandEditDialogBase(parent, name, TRUE, fl) |
23 | 15 | ||
24 | { | 16 | { |
25 | m_SuggestedCommandList->addColumn( tr("Command Selection") ); | 17 | m_SuggestedCommandList->addColumn( tr("Command Selection") ); |
26 | m_SuggestedCommandList->header()->hide(); | 18 | m_SuggestedCommandList->header()->hide(); |
27 | m_SuggestedCommandList->setSorting(-1,FALSE); | 19 | m_SuggestedCommandList->setSorting(-1,FALSE); |
28 | m_SuggestedCommandList->clearSelection(); | 20 | m_SuggestedCommandList->clearSelection(); |
29 | m_SuggestedCommandList->setSorting(0,TRUE); | 21 | m_SuggestedCommandList->setSorting(0,TRUE); |
30 | QListViewItem *item; | 22 | QListViewItem *item; |
31 | item = new QListViewItem( m_SuggestedCommandList,"export "); | 23 | item = new QListViewItem( m_SuggestedCommandList,"export "); |
32 | item = new QListViewItem( m_SuggestedCommandList,"ifconfig "); | 24 | item = new QListViewItem( m_SuggestedCommandList,"ifconfig "); |
33 | item = new QListViewItem( m_SuggestedCommandList,"ipkg "); | 25 | item = new QListViewItem( m_SuggestedCommandList,"ipkg "); |
34 | item = new QListViewItem( m_SuggestedCommandList,"gzip "); | 26 | item = new QListViewItem( m_SuggestedCommandList,"gzip "); |
35 | item = new QListViewItem( m_SuggestedCommandList,"gunzip "); | 27 | item = new QListViewItem( m_SuggestedCommandList,"gunzip "); |
36 | item = new QListViewItem( m_SuggestedCommandList,"chgrp "); | 28 | item = new QListViewItem( m_SuggestedCommandList,"chgrp "); |
37 | item = new QListViewItem( m_SuggestedCommandList,"chown "); | 29 | item = new QListViewItem( m_SuggestedCommandList,"chown "); |
38 | item = new QListViewItem( m_SuggestedCommandList,"date "); | 30 | item = new QListViewItem( m_SuggestedCommandList,"date "); |
39 | item = new QListViewItem( m_SuggestedCommandList,"dd "); | 31 | item = new QListViewItem( m_SuggestedCommandList,"dd "); |
40 | item = new QListViewItem( m_SuggestedCommandList,"dmesg "); | 32 | item = new QListViewItem( m_SuggestedCommandList,"dmesg "); |
41 | item = new QListViewItem( m_SuggestedCommandList,"fuser "); | 33 | item = new QListViewItem( m_SuggestedCommandList,"fuser "); |
42 | item = new QListViewItem( m_SuggestedCommandList,"hostname "); | 34 | item = new QListViewItem( m_SuggestedCommandList,"hostname "); |
diff --git a/core/apps/embeddedkonsole/commandeditwidget.cpp b/core/apps/embeddedkonsole/commandeditwidget.cpp index 6a2c482..ed8dade 100644 --- a/core/apps/embeddedkonsole/commandeditwidget.cpp +++ b/core/apps/embeddedkonsole/commandeditwidget.cpp | |||
@@ -8,54 +8,50 @@ | |||
8 | .> <`_, > . <= redistribute it and/or modify it under | 8 | .> <`_, > . <= redistribute it and/or modify it under |
9 | :`=1 )Y*s>-.-- : the terms of the GNU General Public | 9 | :`=1 )Y*s>-.-- : the terms of the GNU General Public |
10 | .="- .-=="i, .._ License as published by the Free Software | 10 | .="- .-=="i, .._ License as published by the Free Software |
11 | - . .-<_> .<> Foundation; either version 2 of the License, | 11 | - . .-<_> .<> Foundation; either version 2 of the License, |
12 | ._= =} : or (at your option) any later version. | 12 | ._= =} : or (at your option) any later version. |
13 | .%`+i> _;_. | 13 | .%`+i> _;_. |
14 | .i_,=:_. -<s. This program is distributed in the hope that | 14 | .i_,=:_. -<s. This program is distributed in the hope that |
15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
16 | : .. .:, . . . without even the implied warranty of | 16 | : .. .:, . . . without even the implied warranty of |
17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | 18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU |
19 | ..}^=.= = ; Library General Public License for more | 19 | ..}^=.= = ; Library General Public License for more |
20 | ++= -. .` .: details. | 20 | ++= -. .` .: details. |
21 | : = ...= . :.=- | 21 | : = ...= . :.=- |
22 | -. .:....=;==+<; You should have received a copy of the GNU | 22 | -. .:....=;==+<; You should have received a copy of the GNU |
23 | -_. . . )=. = Library General Public License along with | 23 | -_. . . )=. = Library General Public License along with |
24 | -- :-=` this library; see the file COPYING.LIB. | 24 | -- :-=` this library; see the file COPYING.LIB. |
25 | If not, write to the Free Software Foundation, | 25 | If not, write to the Free Software Foundation, |
26 | Inc., 59 Temple Place - Suite 330, | 26 | Inc., 59 Temple Place - Suite 330, |
27 | Boston, MA 02111-1307, USA. | 27 | Boston, MA 02111-1307, USA. |
28 | 28 | ||
29 | */ | 29 | */ |
30 | #include "commandeditwidget.h" | 30 | #include "commandeditwidget.h" |
31 | 31 | ||
32 | #include <qpushbutton.h> | ||
33 | #include "playlistselection.h" | 32 | #include "playlistselection.h" |
34 | #include <qlayout.h> | 33 | #include <qlayout.h> |
35 | #include <qvariant.h> | ||
36 | #include <qtooltip.h> | ||
37 | #include <qwhatsthis.h> | ||
38 | 34 | ||
39 | /* | 35 | /* |
40 | * Constructs a Form1 which is a child of 'parent', with the | 36 | * Constructs a Form1 which is a child of 'parent', with the |
41 | * name 'name' and widget flags set to 'f' | 37 | * name 'name' and widget flags set to 'f' |
42 | */ | 38 | */ |
43 | Form1::Form1( QWidget* parent, const char* name, WFlags fl ) | 39 | Form1::Form1( QWidget* parent, const char* name, WFlags fl ) |
44 | : QWidget( parent, name, fl ) | 40 | : QWidget( parent, name, fl ) |
45 | { | 41 | { |
46 | if ( !name ) | 42 | if ( !name ) |
47 | resize( 596, 480 ); | 43 | resize( 596, 480 ); |
48 | Form1Layout = new QGridLayout( this ); | 44 | Form1Layout = new QGridLayout( this ); |
49 | Form1Layout->setSpacing( 6 ); | 45 | Form1Layout->setSpacing( 6 ); |
50 | Form1Layout->setMargin( 11 ); | 46 | Form1Layout->setMargin( 11 ); |
51 | 47 | ||
52 | MyCustomWidget1 = new PlayListSelection( this, "MyCustomWidget1" ); | 48 | MyCustomWidget1 = new PlayListSelection( this, "MyCustomWidget1" ); |
53 | 49 | ||
54 | Form1Layout->addWidget( MyCustomWidget1, 0, 0 ); | 50 | Form1Layout->addWidget( MyCustomWidget1, 0, 0 ); |
55 | } | 51 | } |
56 | 52 | ||
57 | /* | 53 | /* |
58 | * Destroys the object and frees any allocated resources | 54 | * Destroys the object and frees any allocated resources |
59 | */ | 55 | */ |
60 | Form1::~Form1() | 56 | Form1::~Form1() |
61 | { | 57 | { |
diff --git a/core/apps/embeddedkonsole/keytrans.cpp b/core/apps/embeddedkonsole/keytrans.cpp index d569ae0..45a7960 100644 --- a/core/apps/embeddedkonsole/keytrans.cpp +++ b/core/apps/embeddedkonsole/keytrans.cpp | |||
@@ -676,31 +676,30 @@ void KeyTrans::loadAll() | |||
676 | } | 676 | } |
677 | 677 | ||
678 | // Debugging material ----------------------------------------------------------- | 678 | // Debugging material ----------------------------------------------------------- |
679 | /* | 679 | /* |
680 | void TestTokenizer(QBuffer &buf) | 680 | void TestTokenizer(QBuffer &buf) |
681 | { | 681 | { |
682 | // opening sequence | 682 | // opening sequence |
683 | 683 | ||
684 | buf.open(IO_ReadOnly); | 684 | buf.open(IO_ReadOnly); |
685 | cc = buf.getch(); | 685 | cc = buf.getch(); |
686 | lineno = 1; | 686 | lineno = 1; |
687 | 687 | ||
688 | // Test tokenizer | 688 | // Test tokenizer |
689 | 689 | ||
690 | while (getSymbol(buf)) ReportToken(); | 690 | while (getSymbol(buf)) ReportToken(); |
691 | 691 | ||
692 | buf.close(); | 692 | buf.close(); |
693 | } | 693 | } |
694 | 694 | ||
695 | void test() | 695 | void test() |
696 | { | 696 | { |
697 | // Opening sequence | 697 | // Opening sequence |
698 | 698 | ||
699 | QCString txt = | 699 | QCString txt = |
700 | #include "default.keytab.h" | ||
701 | ; | 700 | ; |
702 | QBuffer buf(txt); | 701 | QBuffer buf(txt); |
703 | if (0) TestTokenizer(buf); | 702 | if (0) TestTokenizer(buf); |
704 | if (1) { KeyTrans kt; kt.scanTable(buf); } | 703 | if (1) { KeyTrans kt; kt.scanTable(buf); } |
705 | } | 704 | } |
706 | */ | 705 | */ |
diff --git a/core/apps/embeddedkonsole/konsole.cpp b/core/apps/embeddedkonsole/konsole.cpp index 084c39d..281835e 100644 --- a/core/apps/embeddedkonsole/konsole.cpp +++ b/core/apps/embeddedkonsole/konsole.cpp | |||
@@ -12,83 +12,62 @@ | |||
12 | /* The material contained in here more or less directly orginates from */ | 12 | /* The material contained in here more or less directly orginates from */ |
13 | /* kvt, which is copyright (c) 1996 by Matthias Ettrich <ettrich@kde.org> */ | 13 | /* kvt, which is copyright (c) 1996 by Matthias Ettrich <ettrich@kde.org> */ |
14 | /* */ | 14 | /* */ |
15 | /* ---------------------------------------------------------------------- */ | 15 | /* ---------------------------------------------------------------------- */ |
16 | /* */ | 16 | /* */ |
17 | /* Ported Konsole to Qt/Embedded */ | 17 | /* Ported Konsole to Qt/Embedded */ |
18 | /* */ | 18 | /* */ |
19 | /* Copyright (C) 2000 by John Ryland <jryland@trolltech.com> */ | 19 | /* Copyright (C) 2000 by John Ryland <jryland@trolltech.com> */ |
20 | /* */ | 20 | /* */ |
21 | /* -------------------------------------------------------------------------- */ | 21 | /* -------------------------------------------------------------------------- */ |
22 | // enhancements added by L.J. Potter <ljp@llornkcor.com> | 22 | // enhancements added by L.J. Potter <ljp@llornkcor.com> |
23 | // enhancements added by Phillip Kuhn | 23 | // enhancements added by Phillip Kuhn |
24 | 24 | ||
25 | #include <stdlib.h> | 25 | #include <stdlib.h> |
26 | #include <sys/types.h> | 26 | #include <sys/types.h> |
27 | #include <pwd.h> | 27 | #include <pwd.h> |
28 | #include <unistd.h> | 28 | #include <unistd.h> |
29 | 29 | ||
30 | #ifdef QT_QWS_OPIE | 30 | #ifdef QT_QWS_OPIE |
31 | #include <opie2/ocolorpopupmenu.h> | 31 | #include <opie2/ocolorpopupmenu.h> |
32 | #endif | 32 | #endif |
33 | 33 | ||
34 | #include <qpe/resource.h> | 34 | #include <qpe/resource.h> |
35 | 35 | ||
36 | #include <qdir.h> | ||
37 | #include <qevent.h> | ||
38 | #include <qdragobject.h> | ||
39 | #include <qobjectlist.h> | ||
40 | #include <qtoolbutton.h> | ||
41 | #include <qtoolbar.h> | ||
42 | #include <qpushbutton.h> | ||
43 | #include <qfontdialog.h> | ||
44 | #include <qglobal.h> | ||
45 | #include <qpainter.h> | ||
46 | #include <qmenubar.h> | 36 | #include <qmenubar.h> |
47 | #include <qmessagebox.h> | ||
48 | #include <qaction.h> | ||
49 | #include <qapplication.h> | ||
50 | #include <qfontmetrics.h> | ||
51 | #include <qcombobox.h> | ||
52 | #include <qevent.h> | ||
53 | #include <qtabwidget.h> | ||
54 | #include <qtabbar.h> | 37 | #include <qtabbar.h> |
55 | #include <qpe/config.h> | 38 | #include <qpe/config.h> |
56 | #include <qstringlist.h> | ||
57 | #include <qpalette.h> | ||
58 | #include <qfontdatabase.h> | 39 | #include <qfontdatabase.h> |
59 | #include <qfile.h> | 40 | #include <qfile.h> |
60 | #include <qspinbox.h> | 41 | #include <qspinbox.h> |
61 | #include <qlayout.h> | 42 | #include <qlayout.h> |
62 | #include <qvbox.h> | ||
63 | 43 | ||
64 | #include <sys/wait.h> | 44 | #include <sys/wait.h> |
65 | #include <stdio.h> | 45 | #include <stdio.h> |
66 | #include <stdlib.h> | 46 | #include <stdlib.h> |
67 | #include <assert.h> | 47 | #include <assert.h> |
68 | 48 | ||
69 | #include "konsole.h" | 49 | #include "konsole.h" |
70 | #include "keytrans.h" | ||
71 | #include "commandeditdialog.h" | 50 | #include "commandeditdialog.h" |
72 | 51 | ||
73 | class EKNumTabBar : public QTabBar | 52 | class EKNumTabBar : public QTabBar |
74 | { | 53 | { |
75 | public: | 54 | public: |
76 | EKNumTabBar(QWidget *parent = 0, const char *name = 0) : | 55 | EKNumTabBar(QWidget *parent = 0, const char *name = 0) : |
77 | QTabBar(parent, name) | 56 | QTabBar(parent, name) |
78 | {} | 57 | {} |
79 | 58 | ||
80 | // QList<QTab> *getTabList() { return(tabList()); } | 59 | // QList<QTab> *getTabList() { return(tabList()); } |
81 | 60 | ||
82 | void numberTabs() | 61 | void numberTabs() |
83 | { | 62 | { |
84 | // Yes, it really is this messy. QTabWidget needs functions | 63 | // Yes, it really is this messy. QTabWidget needs functions |
85 | // that provide acces to tabs in a sequential way. | 64 | // that provide acces to tabs in a sequential way. |
86 | int m=INT_MIN; | 65 | int m=INT_MIN; |
87 | for (int i=0; i<count(); i++) | 66 | for (int i=0; i<count(); i++) |
88 | { | 67 | { |
89 | QTab* left=0; | 68 | QTab* left=0; |
90 | QListIterator<QTab> it(*tabList()); | 69 | QListIterator<QTab> it(*tabList()); |
91 | int x=INT_MAX; | 70 | int x=INT_MAX; |
92 | for( QTab* t; (t=it.current()); ++it ) | 71 | for( QTab* t; (t=it.current()); ++it ) |
93 | { | 72 | { |
94 | int tx = t->rect().x(); | 73 | int tx = t->rect().x(); |
diff --git a/core/apps/embeddedkonsole/playlistselection.cpp b/core/apps/embeddedkonsole/playlistselection.cpp index 4dd3126..fc5330f 100644 --- a/core/apps/embeddedkonsole/playlistselection.cpp +++ b/core/apps/embeddedkonsole/playlistselection.cpp | |||
@@ -1,51 +1,44 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. | 2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of Qtopia Environment. | 4 | ** This file is part of Qtopia Environment. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** This file may be distributed and/or modified under the terms of the |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | ** GNU General Public License version 2 as published by the Free Software |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
15 | ** | 15 | ** |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | #include <qpe/applnk.h> | ||
21 | #include <qpe/resource.h> | ||
22 | #include <qpainter.h> | ||
23 | #include <qimage.h> | ||
24 | #include <qheader.h> | 20 | #include <qheader.h> |
25 | #include <qlistview.h> | ||
26 | #include <qlist.h> | ||
27 | #include <qpixmap.h> | ||
28 | 21 | ||
29 | #include "playlistselection.h" | 22 | #include "playlistselection.h" |
30 | 23 | ||
31 | #include <stdlib.h> | 24 | #include <stdlib.h> |
32 | 25 | ||
33 | 26 | ||
34 | 27 | ||
35 | 28 | ||
36 | 29 | ||
37 | PlayListSelection::PlayListSelection( QWidget *parent, const char *name ) | 30 | PlayListSelection::PlayListSelection( QWidget *parent, const char *name ) |
38 | : QListView( parent, name ) | 31 | : QListView( parent, name ) |
39 | { | 32 | { |
40 | setAllColumnsShowFocus( TRUE ); | 33 | setAllColumnsShowFocus( TRUE ); |
41 | addColumn( tr( "Command Selection" ) ); | 34 | addColumn( tr( "Command Selection" ) ); |
42 | header()->hide(); | 35 | header()->hide(); |
43 | setSorting( -1, FALSE ); | 36 | setSorting( -1, FALSE ); |
44 | } | 37 | } |
45 | 38 | ||
46 | 39 | ||
47 | PlayListSelection::~PlayListSelection() { | 40 | PlayListSelection::~PlayListSelection() { |
48 | } | 41 | } |
49 | 42 | ||
50 | 43 | ||
51 | 44 | ||
diff --git a/core/apps/embeddedkonsole/session.cpp b/core/apps/embeddedkonsole/session.cpp index 17acb8c..043b8db 100644 --- a/core/apps/embeddedkonsole/session.cpp +++ b/core/apps/embeddedkonsole/session.cpp | |||
@@ -1,33 +1,32 @@ | |||
1 | /* -------------------------------------------------------------------------- */ | 1 | /* -------------------------------------------------------------------------- */ |
2 | /* */ | 2 | /* */ |
3 | /* Ported Konsole to Qt/Embedded */ | 3 | /* Ported Konsole to Qt/Embedded */ |
4 | /* */ | 4 | /* */ |
5 | /* Copyright (C) 2000 by John Ryland <jryland@trolltech.com> */ | 5 | /* Copyright (C) 2000 by John Ryland <jryland@trolltech.com> */ |
6 | /* */ | 6 | /* */ |
7 | /* -------------------------------------------------------------------------- */ | 7 | /* -------------------------------------------------------------------------- */ |
8 | #include "session.h" | 8 | #include "session.h" |
9 | #include <qpushbutton.h> | ||
10 | // #include <kdebug.h> | 9 | // #include <kdebug.h> |
11 | 10 | ||
12 | #include <stdlib.h> | 11 | #include <stdlib.h> |
13 | 12 | ||
14 | #define HERE fprintf(stderr,"%s(%d): here\n",__FILE__,__LINE__) | 13 | #define HERE fprintf(stderr,"%s(%d): here\n",__FILE__,__LINE__) |
15 | 14 | ||
16 | /*! \class TESession | 15 | /*! \class TESession |
17 | 16 | ||
18 | Sessions are combinations of TEPTy and Emulations. | 17 | Sessions are combinations of TEPTy and Emulations. |
19 | 18 | ||
20 | The stuff in here does not belong to the terminal emulation framework, | 19 | The stuff in here does not belong to the terminal emulation framework, |
21 | but to main.C. It serves it's duty by providing a single reference | 20 | but to main.C. It serves it's duty by providing a single reference |
22 | to TEPTy/Emulation pairs. In fact, it is only there to demonstrate one | 21 | to TEPTy/Emulation pairs. In fact, it is only there to demonstrate one |
23 | of the abilities of the framework - multible sessions. | 22 | of the abilities of the framework - multible sessions. |
24 | */ | 23 | */ |
25 | 24 | ||
26 | TESession::TESession(QMainWindow* main, TEWidget* _te, const char* _pgm, QStrList & _args, const char *_term) : schema_no(0), font_no(3), pgm(_pgm), args(_args) | 25 | TESession::TESession(QMainWindow* main, TEWidget* _te, const char* _pgm, QStrList & _args, const char *_term) : schema_no(0), font_no(3), pgm(_pgm), args(_args) |
27 | { | 26 | { |
28 | te = _te; | 27 | te = _te; |
29 | term = _term; | 28 | term = _term; |
30 | 29 | ||
31 | // sh = new TEPty(); | 30 | // sh = new TEPty(); |
32 | sh = new MyPty(); | 31 | sh = new MyPty(); |
33 | em = new TEmuVt102(te); | 32 | em = new TEmuVt102(te); |