summaryrefslogtreecommitdiff
path: root/noncore/apps
Side-by-side diff
Diffstat (limited to 'noncore/apps') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-console/MyPty.cpp2
-rw-r--r--noncore/apps/opie-console/TEWidget.cpp8
-rw-r--r--noncore/apps/opie-console/TEmuVt102.cpp5
-rw-r--r--noncore/apps/opie-console/TEmulation.cpp3
-rw-r--r--noncore/apps/opie-console/configdialog.cpp3
-rw-r--r--noncore/apps/opie-console/consoleconfigwidget.cpp2
-rw-r--r--noncore/apps/opie-console/default.cpp1
-rw-r--r--noncore/apps/opie-console/dialdialog.cpp3
-rw-r--r--noncore/apps/opie-console/emulation_handler.cpp3
-rw-r--r--noncore/apps/opie-console/emulation_layer.cpp3
-rw-r--r--noncore/apps/opie-console/emulation_widget.cpp8
-rw-r--r--noncore/apps/opie-console/file_layer.cpp1
-rw-r--r--noncore/apps/opie-console/filetransfer.cpp1
-rw-r--r--noncore/apps/opie-console/function_keyboard.cpp8
-rw-r--r--noncore/apps/opie-console/iolayerbase.cpp2
-rw-r--r--noncore/apps/opie-console/main.cpp1
-rw-r--r--noncore/apps/opie-console/mainwindow.cpp10
-rw-r--r--noncore/apps/opie-console/metafactory.cpp1
-rw-r--r--noncore/apps/opie-console/modemconfigwidget.cpp2
-rw-r--r--noncore/apps/opie-console/profileeditordialog.cpp1
-rw-r--r--noncore/apps/opie-console/profilemanager.cpp5
-rw-r--r--noncore/apps/opie-console/receive_layer.cpp3
-rw-r--r--noncore/apps/opie-console/script.cpp1
-rw-r--r--noncore/apps/opie-console/session.cpp2
-rw-r--r--noncore/apps/opie-console/terminalwidget.cpp4
-rw-r--r--noncore/apps/opie-console/transferdialog.cpp2
-rw-r--r--noncore/apps/opie-console/vt102emulation.cpp5
-rw-r--r--noncore/apps/opie-console/widget.cpp8
-rw-r--r--noncore/apps/opie-console/widget_layer.cpp4
29 files changed, 0 insertions, 102 deletions
diff --git a/noncore/apps/opie-console/MyPty.cpp b/noncore/apps/opie-console/MyPty.cpp
index b2f6a74..a37f980 100644
--- a/noncore/apps/opie-console/MyPty.cpp
+++ b/noncore/apps/opie-console/MyPty.cpp
@@ -43,51 +43,49 @@
[NOTE: much of the technical stuff below will be replaced by forkpty.]
publish the SIGCHLD signal if not related to an instance.
clearify TEPty::done vs. TEPty::~TEPty semantics.
check if pty is restartable via run after done.
\par Pseudo terminals
Pseudo terminals are a unique feature of UNIX, and always come in form of
pairs of devices (/dev/ptyXX and /dev/ttyXX), which are connected to each
other by the operating system. One may think of them as two serial devices
linked by a null-modem cable. Being based on devices the number of
simultanous instances of this class is (globally) limited by the number of
those device pairs, which is 256.
Another technic are UNIX 98 PTY's. These are supported also, and prefered
over the (obsolete) predecessor.
There's a sinister ioctl(2), signal(2) and job control stuff
nessesary to make everything work as it should.
*/
-#include <qapplication.h>
#include <qsocketnotifier.h>
-#include <qstring.h>
#include <qfile.h>
#include <stdlib.h>
#include <stdio.h>
#include <signal.h>
#include <fcntl.h>
#include <unistd.h>
#include <termios.h>
#include <sys/types.h>
#include <sys/ioctl.h>
#include <sys/wait.h>
#ifdef HAVE_OPENPTY
#include <pty.h>
#endif
#include "procctl.h"
#include "MyPty.h"
#undef VERBOSE_DEBUG
/* -------------------------------------------------------------------------- */
diff --git a/noncore/apps/opie-console/TEWidget.cpp b/noncore/apps/opie-console/TEWidget.cpp
index 444924b..e535296 100644
--- a/noncore/apps/opie-console/TEWidget.cpp
+++ b/noncore/apps/opie-console/TEWidget.cpp
@@ -28,60 +28,52 @@
<ul>
<li> The internal image has the size of the widget (evtl. rounded up)
<li> The external image used in setImage can have any size.
<li> (internally) the external image is simply copied to the internal
when a setImage happens. During a resizeEvent no painting is done
a paintEvent is expected to follow anyway.
</ul>
\sa TEScreen \sa Emulation
*/
/* FIXME:
- 'image' may also be used uninitialized (it isn't in fact) in resizeEvent
- 'font_a' not used in mouse events
- add destructor
*/
/* TODO
- evtl. be sensitive to `paletteChange' while using default colors.
- set different 'rounding' styles? I.e. have a mode to show clipped chars?
*/
// #include "config.h"
#include "TEWidget.h"
-#include "session.h"
#include <qpe/config.h>
#include <qapplication.h>
-#include <qcursor.h>
-#include <qregexp.h>
-#include <qpainter.h>
#include <qclipboard.h>
-#include <qstyle.h>
-#include <qfile.h>
-#include <qdragobject.h>
-#include <qvbox.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <ctype.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <signal.h>
#include <assert.h>
// #include "TEWidget.moc"
//#include <kapp.h>
//#include <kcursor.h>
//#include <kurl.h>
//#include <kdebug.h>
//#include <klocale.h>
#define HERE printf("%s(%d): %s\n",__FILE__,__LINE__,__FUNCTION__)
#define HCNT(Name) // { static int cnt = 1; printf("%s(%d): %s %d\n",__FILE__,__LINE__,Name,cnt++); }
#define loc(X,Y) ((Y)*columns+(X))
diff --git a/noncore/apps/opie-console/TEmuVt102.cpp b/noncore/apps/opie-console/TEmuVt102.cpp
index 275c18d..0d6aef5 100644
--- a/noncore/apps/opie-console/TEmuVt102.cpp
+++ b/noncore/apps/opie-console/TEmuVt102.cpp
@@ -3,56 +3,51 @@
/* [TEmuVt102.C] VT102 Terminal Emulation */
/* */
/* ------------------------------------------------------------------------- */
/* */
/* Copyright (c) 1997,1998 by Lars Doelle <lars.doelle@on-line.de> */
/* */
/* This file is part of Konsole - an X terminal for KDE */
/* */
/* ------------------------------------------------------------------------- */
/* */
/* Ported Konsole to Qt/Embedded */
/* */
/* Copyright (C) 2000 by John Ryland <jryland@trolltech.com> */
/* */
/* -------------------------------------------------------------------------- */
/*! \class TEmuVt102
\brief Actual Emulation for Konsole
\sa TEWidget \sa TEScreen
*/
#include "TEmuVt102.h"
-#include "TEWidget.h"
-#include "TEScreen.h"
-#include "keytrans.h"
#include <stdio.h>
#include <unistd.h>
-#include <qkeycode.h>
-#include <qtextcodec.h>
/* VT102 Terminal Emulation
This class puts together the screens, the pty and the widget to a
complete terminal emulation. Beside combining it's componentes, it
handles the emulations's protocol.
This module consists of the following sections:
- Constructor/Destructor
- Incoming Bytes Event pipeline
- Outgoing Bytes
- Mouse Events
- Keyboard Events
- Modes and Charset State
- Diagnostics
*/
/* ------------------------------------------------------------------------- */
/* */
/* Constructor / Destructor */
/* */
diff --git a/noncore/apps/opie-console/TEmulation.cpp b/noncore/apps/opie-console/TEmulation.cpp
index 3b1b9e1..d0169d7 100644
--- a/noncore/apps/opie-console/TEmulation.cpp
+++ b/noncore/apps/opie-console/TEmulation.cpp
@@ -49,54 +49,51 @@
We use a refreshing algorithm here that has been adoped from rxvt/kvt.
By this, refreshing is driven by a timer, which is (re)started whenever
a new bunch of data to be interpreted by the emulation arives at `onRcvBlock'.
As soon as no more data arrive for `BULK_TIMEOUT' milliseconds, we trigger
refresh. This rule suits both bulk display operation as done by curses as
well as individual characters typed.
(BULK_TIMEOUT < 1000 / max characters received from keyboard per second).
Additionally, we trigger refreshing by newlines comming in to make visual
snapshots of lists as produced by `cat', `ls' and likely programs, thereby
producing the illusion of a permanent and immediate display operation.
As a sort of catch-all needed for cases where none of the above
conditions catch, the screen refresh is also triggered by a count
of incoming bulks (`bulk_incnt').
*/
/* FIXME
- evtl. the bulk operations could be made more transparent.
*/
#include "TEmulation.h"
-#include "TEWidget.h"
-#include "TEScreen.h"
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
-#include <qkeycode.h>
/* ------------------------------------------------------------------------- */
/* */
/* TEmulation */
/* */
/* ------------------------------------------------------------------------- */
#define CNTL(c) ((c)-'@')
/*!
*/
TEmulation::TEmulation(TEWidget* gui)
: decoder((QTextDecoder*)NULL)
{
this->gui = gui;
screen[0] = new TEScreen(gui->Lines(),gui->Columns());
screen[1] = new TEScreen(gui->Lines(),gui->Columns());
scr = screen[0];
bulk_nlcnt = 0; // reset bulk newline counter
bulk_incnt = 0; // reset bulk counter
diff --git a/noncore/apps/opie-console/configdialog.cpp b/noncore/apps/opie-console/configdialog.cpp
index 53b3853..b23f4d0 100644
--- a/noncore/apps/opie-console/configdialog.cpp
+++ b/noncore/apps/opie-console/configdialog.cpp
@@ -1,31 +1,28 @@
-#include <qdialog.h>
#include <qlistview.h>
-#include "profile.h"
#include "configdialog.h"
-#include "metafactory.h"
#include "profileeditordialog.h"
class ConfigListItem : public QListViewItem {
public:
ConfigListItem( QListView* item, const Profile& );
~ConfigListItem();
Profile profile()const;
private:
Profile m_prof;
};
ConfigListItem::ConfigListItem( QListView* item, const Profile& prof )
: QListViewItem( item ), m_prof( prof )
{
setText(0, prof.name() );
}
ConfigListItem::~ConfigListItem() {
}
Profile ConfigListItem::profile()const {
return m_prof;
}
/* Dialog */
diff --git a/noncore/apps/opie-console/consoleconfigwidget.cpp b/noncore/apps/opie-console/consoleconfigwidget.cpp
index faedc58..a6ad8d2 100644
--- a/noncore/apps/opie-console/consoleconfigwidget.cpp
+++ b/noncore/apps/opie-console/consoleconfigwidget.cpp
@@ -1,32 +1,30 @@
#include <qlabel.h>
#include <qlayout.h>
-#include <qcombobox.h>
#include <qlineedit.h>
#include <qpushbutton.h>
#include <qlistview.h>
#include <qhbox.h>
-#include <qregexp.h>
#include <stdio.h>
#include <pwd.h>
#include <sys/types.h>
#include "consoleconfigwidget.h"
ConsoleConfigWidget::ConsoleConfigWidget( const QString& name, QWidget* parent,
const char* na )
: ProfileDialogConnectionWidget( name, parent, na ) {
m_lay = new QVBoxLayout( this );
QLabel *label = new QLabel(tr("Command to execute"), this);
m_lay->addWidget(label);
m_cmd = new QLineEdit(this);
m_lay->addWidget(m_cmd);
label = new QLabel(tr("Environment Variables"), this);
m_lay->addWidget(label);
m_env = new QListView(this);
m_env->addColumn(tr("Name"));
m_env->addColumn(tr("Value"));
m_lay->addWidget(m_env);
QHBox *hbox = new QHBox(this);
diff --git a/noncore/apps/opie-console/default.cpp b/noncore/apps/opie-console/default.cpp
index b060139..c237575 100644
--- a/noncore/apps/opie-console/default.cpp
+++ b/noncore/apps/opie-console/default.cpp
@@ -1,25 +1,24 @@
-#include "io_serial.h"
#include "io_irda.h"
#include "io_bt.h"
#include "io_modem.h"
#include "filetransfer.h"
#include "filereceive.h"
#include "serialconfigwidget.h"
#include "irdaconfigwidget.h"
#include "btconfigwidget.h"
#include "modemconfigwidget.h"
#include "terminalwidget.h"
#include "function_keyboard.h"
#include "consoleconfigwidget.h"
#include "MyPty.h"
#include "default.h"
extern "C" {
// FILE Transfer Stuff
FileTransferLayer* newSZTransfer(IOLayer* lay) {
return new FileTransfer( FileTransfer::SZ, lay );
}
FileTransferLayer* newSYTransfer(IOLayer* lay) {
return new FileTransfer( FileTransfer::SY, lay );
}
diff --git a/noncore/apps/opie-console/dialdialog.cpp b/noncore/apps/opie-console/dialdialog.cpp
index b91727b..6bc1240 100644
--- a/noncore/apps/opie-console/dialdialog.cpp
+++ b/noncore/apps/opie-console/dialdialog.cpp
@@ -1,32 +1,29 @@
#include <qlayout.h>
#include <qlabel.h>
-#include <qcombobox.h>
-#include <qscrollview.h>
#include <qpushbutton.h>
-#include <qfont.h>
#include <qbuttongroup.h>
#include "dialdialog.h"
DialDialog::DialDialog( QWidget* parent, const char* name, bool modal, WFlags fl )
: QDialog( parent, name, modal, fl ) {
setCaption( tr( "Enter number" ) );
QVBoxLayout *mainLayout = new QVBoxLayout( this );
QLabel *textLabel = new QLabel( this );
textLabel->setTextFormat( QLabel::RichText );
textLabel->setText( tr("Enter the number you want to dial. When finished, press ok") );
m_dialLine = new QLineEdit( this );
m_dialLine->setReadOnly( true );
m_dialLine->setFrame( false );
m_dialLine->setAlignment( Qt::AlignLeft );
QFont dialLine_font( m_dialLine->font() );
dialLine_font.setBold( TRUE );
dialLine_font.setPointSize( 18 );
diff --git a/noncore/apps/opie-console/emulation_handler.cpp b/noncore/apps/opie-console/emulation_handler.cpp
index 235facb..2c1d888 100644
--- a/noncore/apps/opie-console/emulation_handler.cpp
+++ b/noncore/apps/opie-console/emulation_handler.cpp
@@ -1,28 +1,25 @@
-#include <qwidget.h>
-#include <qpushbutton.h>
-#include "TEWidget.h"
#include "TEmuVt102.h"
#include "profile.h"
#include "emulation_handler.h"
#include "script.h"
EmulationHandler::EmulationHandler( const Profile& prof, QWidget* parent,const char* name )
: QObject(0, name )
{
m_teWid = new TEWidget( parent, "TerminalMain");
// use setWrapAt(0) for classic behaviour (wrap at screen width, no scrollbar)
// use setWrapAt(80) for normal console with scrollbar
setWrap(prof.readNumEntry("Wrap", 0) ? 0 : 80);
m_teWid->setMinimumSize(150, 70 );
m_script = 0;
parent->resize( m_teWid->calcSize(80, 24 ) );
m_teEmu = new TEmuVt102(m_teWid );
connect(m_teEmu,SIGNAL(ImageSizeChanged(int, int) ),
this, SIGNAL(changeSize(int, int) ) );
connect(m_teEmu, SIGNAL(sndBlock(const char*, int) ),
this, SLOT(recvEmulation(const char*, int) ) );
m_teEmu->setConnect( true );
m_teEmu->setHistory( TRUE );
diff --git a/noncore/apps/opie-console/emulation_layer.cpp b/noncore/apps/opie-console/emulation_layer.cpp
index 6a2679e..2bef801 100644
--- a/noncore/apps/opie-console/emulation_layer.cpp
+++ b/noncore/apps/opie-console/emulation_layer.cpp
@@ -55,54 +55,51 @@
We use a refreshing algorithm here that has been adoped from rxvt/kvt.
By this, refreshing is driven by a timer, which is (re)started whenever
a new bunch of data to be interpreted by the emulation arives at `onRcvBlock'.
As soon as no more data arrive for `BULK_TIMEOUT' milliseconds, we trigger
refresh. This rule suits both bulk display operation as done by curses as
well as individual characters typed.
(BULK_TIMEOUT < 1000 / max characters received from keyboard per second).
Additionally, we trigger refreshing by newlines comming in to make visual
snapshots of lists as produced by `cat', `ls' and likely programs, thereby
producing the illusion of a permanent and immediate display operation.
As a sort of catch-all needed for cases where none of the above
conditions catch, the screen refresh is also triggered by a count
of incoming bulks (`bulk_incnt').
*/
/* FIXME
- evtl. the bulk operations could be made more transparent.
*/
#include "emulation_layer.h"
-#include "widget_layer.h"
-#include "screen.h"
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
-#include <qkeycode.h>
/* ------------------------------------------------------------------------- */
/* */
/* EmulationLayer */
/* */
/* ------------------------------------------------------------------------- */
#define CNTL(c) ((c)-'@')
/*!
*/
EmulationLayer::EmulationLayer( WidgetLayer* gui )
: decoder((QTextDecoder*)NULL)
{
this->gui = gui;
screen[0] = new Screen(gui->lines(),gui->columns());
screen[1] = new Screen(gui->lines(),gui->columns());
scr = screen[0];
bulk_nlcnt = 0; // reset bulk newline counter
bulk_incnt = 0; // reset bulk counter
diff --git a/noncore/apps/opie-console/emulation_widget.cpp b/noncore/apps/opie-console/emulation_widget.cpp
index 9f95c72..ad8ecba 100644
--- a/noncore/apps/opie-console/emulation_widget.cpp
+++ b/noncore/apps/opie-console/emulation_widget.cpp
@@ -1,36 +1,28 @@
// opie-console includes
#include "emulation_widget.h"
-#include "common.h"
-#include "widget_layer.h"
-#include "profile.h"
// qt includes
-#include <qwidget.h>
-#include <qarray.h>
-#include <qstring.h>
-#include <qpainter.h>
-#include <qrect.h>
#include <qscrollbar.h>
#define rimX 0 // left/right rim width
#define rimY 0 // top/bottom rim high
static const ColorEntry color_table[TABLE_COLORS] =
{
ColorEntry(QColor(0x00,0x00,0x00), 0, 0 ), ColorEntry( QColor(0xB2,0xB2,0xB2), 1, 0 ), // Dfore, Dback
ColorEntry(QColor(0x00,0x00,0x00), 0, 0 ), ColorEntry( QColor(0xB2,0x18,0x18), 0, 0 ), // Black, Red
ColorEntry(QColor(0x18,0xB2,0x18), 0, 0 ), ColorEntry( QColor(0xB2,0x68,0x18), 0, 0 ), // Green, Yellow
ColorEntry(QColor(0x18,0x18,0xB2), 0, 0 ), ColorEntry( QColor(0xB2,0x18,0xB2), 0, 0 ), // Blue, Magenta
ColorEntry(QColor(0x18,0xB2,0xB2), 0, 0 ), ColorEntry( QColor(0xB2,0xB2,0xB2), 0, 0 ), // Cyan, White
// intensiv
ColorEntry(QColor(0x00,0x00,0x00), 0, 1 ), ColorEntry( QColor(0xFF,0xFF,0xFF), 1, 0 ),
ColorEntry(QColor(0x68,0x68,0x68), 0, 0 ), ColorEntry( QColor(0xFF,0x54,0x54), 0, 0 ),
ColorEntry(QColor(0x54,0xFF,0x54), 0, 0 ), ColorEntry( QColor(0xFF,0xFF,0x54), 0, 0 ),
ColorEntry(QColor(0x54,0x54,0xFF), 0, 0 ), ColorEntry( QColor(0xB2,0x18,0xB2), 0, 0 ),
ColorEntry(QColor(0x54,0xFF,0xFF), 0, 0 ), ColorEntry( QColor(0xFF,0xFF,0xFF), 0, 0 )
};
EmulationWidget::EmulationWidget( const Profile& config, QWidget *parent, const char* name ) : WidgetLayer( config, parent, name )
{
// initialize font attributes
diff --git a/noncore/apps/opie-console/file_layer.cpp b/noncore/apps/opie-console/file_layer.cpp
index 0c83700..9ddef80 100644
--- a/noncore/apps/opie-console/file_layer.cpp
+++ b/noncore/apps/opie-console/file_layer.cpp
@@ -1,23 +1,22 @@
-#include <qfile.h>
#include <opie/oprocess.h>
#include "file_layer.h"
FileTransferLayer::FileTransferLayer(IOLayer *layer)
: QObject(), m_layer( layer )
{
}
FileTransferLayer::~FileTransferLayer() {
}
void FileTransferLayer::sendFile(const QFile&) {
}
void FileTransferLayer::sendFile(const QString&) {
}
IOLayer* FileTransferLayer::layer() {
return m_layer;
}
diff --git a/noncore/apps/opie-console/filetransfer.cpp b/noncore/apps/opie-console/filetransfer.cpp
index 5144941..347d6e0 100644
--- a/noncore/apps/opie-console/filetransfer.cpp
+++ b/noncore/apps/opie-console/filetransfer.cpp
@@ -1,31 +1,30 @@
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <fcntl.h>
#include <unistd.h>
-#include <qcstring.h>
#include <qsocketnotifier.h>
#include <opie/oprocess.h>
#include "procctl.h"
#include "filetransfer.h"
FileTransfer::FileTransfer( Type t, IOLayer* lay )
: FileTransferLayer( lay ), m_type( t ), m_pid ( 0 ) {
signal(SIGPIPE, SIG_IGN );
m_pid = 0;
m_not = 0l;
m_proc = 0l;
}
FileTransfer::~FileTransfer() {
}
/**
* now we will send the file.
*
* we request an fd. The IOLayer should be closed
* then we will setup a pipe for progress communication
diff --git a/noncore/apps/opie-console/function_keyboard.cpp b/noncore/apps/opie-console/function_keyboard.cpp
index 0191915..c232d89 100644
--- a/noncore/apps/opie-console/function_keyboard.cpp
+++ b/noncore/apps/opie-console/function_keyboard.cpp
@@ -1,37 +1,29 @@
#include "function_keyboard.h"
-#include <qpe/resource.h>
-#include <qpe/qpeapplication.h>
-#include <qsizepolicy.h>
-#include <qevent.h>
-#include <qwindowsystem_qws.h>
-#include <qapplication.h>
#include <qlayout.h>
-#include <qspinbox.h>
#include <qlistbox.h>
#include <qlabel.h>
-#include <qcombobox.h>
#include <qdir.h>
#define DEFAULT_ROWS 2
#define DEFAULT_COLS 12
/* FunctionKeyboard {{{1 */
FunctionKeyboard::FunctionKeyboard(QWidget *parent) :
QFrame(parent), numRows(DEFAULT_ROWS), numCols(DEFAULT_COLS),
pressedRow(0), pressedCol(0) {
setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed));
/*
* all the saving/loading is now done in a profile. downside is that you cant modify
* the keyboard for all profiles, but must do it on a profile-basis
*
Config conf("opie-console-keys");
conf.setGroup("keys");
for (uint r = 0; r < numRows; r++)
for (uint c = 0; c < numCols; c++) {
QString handle = "r" + QString::number(r) + "c" + QString::number(c);
diff --git a/noncore/apps/opie-console/iolayerbase.cpp b/noncore/apps/opie-console/iolayerbase.cpp
index ba7c86e..b434e66 100644
--- a/noncore/apps/opie-console/iolayerbase.cpp
+++ b/noncore/apps/opie-console/iolayerbase.cpp
@@ -1,31 +1,29 @@
#include <qlabel.h>
#include <qlayout.h>
#include <qcombobox.h>
-#include <qbuttongroup.h>
#include <qhbuttongroup.h>
#include <qradiobutton.h>
-#include <qhbox.h>
#include "iolayerbase.h"
namespace {
enum ParityIds {
id_parity_none,
id_parity_odd,
id_parity_even
};
enum FlowIds {
id_flow_hw,
id_flow_sw,
id_flow_none,
};
enum SpeedIds {
id_baud_115200,
id_baud_57600,
id_baud_38400,
id_baud_19200,
id_baud_9600
};
diff --git a/noncore/apps/opie-console/main.cpp b/noncore/apps/opie-console/main.cpp
index 228db57..dfb2f83 100644
--- a/noncore/apps/opie-console/main.cpp
+++ b/noncore/apps/opie-console/main.cpp
@@ -1,31 +1,30 @@
#include <sys/types.h>
#include <stdio.h>
#include <stdlib.h>
#include <signal.h>
-#include <qfile.h>
#include <qpe/qpeapplication.h>
#include "mainwindow.h"
//#define FSCKED_DISTRIBUTION 1
#ifdef FSCKED_DISTRIBUTION
/*
* The Zaurus rom
*/
class FixIt {
public:
FixIt();
~FixIt();
void fixIt();
/* no real interested in implementing it */
void breakIt() {
};
char* m_file;
};
FixIt::FixIt() {
/* the new inittab */
diff --git a/noncore/apps/opie-console/mainwindow.cpp b/noncore/apps/opie-console/mainwindow.cpp
index 3c9603c..2673335 100644
--- a/noncore/apps/opie-console/mainwindow.cpp
+++ b/noncore/apps/opie-console/mainwindow.cpp
@@ -1,51 +1,41 @@
#include <assert.h>
#include <qaction.h>
#include <qmenubar.h>
-#include <qlabel.h>
-#include <qpopupmenu.h>
#include <qtoolbar.h>
#include <qmessagebox.h>
-#include <qpushbutton.h>
#include <qwhatsthis.h>
#include <qfileinfo.h>
-#include <qtextstream.h>
-#include <qpe/resource.h>
-#include <qpe/qpeapplication.h>
#include <qpe/filemanager.h>
-#include <qpe/mimetype.h>
#include <opie/ofiledialog.h>
#include "TEmulation.h"
-#include "keytrans.h"
#include "profileeditordialog.h"
#include "configdialog.h"
#include "default.h"
-#include "metafactory.h"
-#include "profile.h"
#include "profilemanager.h"
#include "mainwindow.h"
#include "tabwidget.h"
#include "transferdialog.h"
#include "function_keyboard.h"
#include "emulation_handler.h"
#include "script.h"
MainWindow::MainWindow(QWidget *parent, const char *name, WFlags) : QMainWindow(parent, name, WStyle_ContextHelp) {
KeyTrans::loadAll();
for (int i = 0; i < KeyTrans::count(); i++ ) {
KeyTrans* s = KeyTrans::find(i );
assert( s );
}
m_factory = new MetaFactory();
Default def(m_factory);
m_sessions.setAutoDelete( TRUE );
m_curSession = 0;
m_manager = new ProfileManager( m_factory );
m_manager->load();
m_scriptsData.setAutoDelete(TRUE);
initUI();
diff --git a/noncore/apps/opie-console/metafactory.cpp b/noncore/apps/opie-console/metafactory.cpp
index 24928e7..32e93ce 100644
--- a/noncore/apps/opie-console/metafactory.cpp
+++ b/noncore/apps/opie-console/metafactory.cpp
@@ -1,25 +1,24 @@
-#include <qpe/config.h>
#include "metafactory.h"
MetaFactory::MetaFactory() {
}
MetaFactory::~MetaFactory() {
}
void MetaFactory::addConnectionWidgetFactory( const QCString& name,
const QString& str,
configWidget wid) {
m_strings.insert( str, name );
m_conFact.insert( str, wid );
}
void MetaFactory::addTerminalWidgetFactory( const QCString& name,
const QString& str,
configWidget wid ) {
m_strings.insert( str, name );
m_termFact.insert( str, wid );
}
void MetaFactory::addKeyboardWidgetFactory( const QCString& name,
const QString & str,
configWidget wid) {
m_strings.insert( str, name );
m_keyFact.insert( str, wid );
diff --git a/noncore/apps/opie-console/modemconfigwidget.cpp b/noncore/apps/opie-console/modemconfigwidget.cpp
index f7fb6f3..e552990 100644
--- a/noncore/apps/opie-console/modemconfigwidget.cpp
+++ b/noncore/apps/opie-console/modemconfigwidget.cpp
@@ -1,31 +1,29 @@
#include <qlabel.h>
#include <qlayout.h>
#include <qcombobox.h>
-#include <qlineedit.h>
#include <qpushbutton.h>
#include <qhbox.h>
-#include <qregexp.h>
#include "modemconfigwidget.h"
#include "dialdialog.h"
namespace {
void setCurrent( const QString& str, QComboBox* bo ) {
uint b = bo->count();
for (int i = 0; i < bo->count(); i++ ) {
if ( bo->text(i) == str ) {
bo->setCurrentItem( i );
return;
}
}
bo->insertItem( str );
bo->setCurrentItem( b );
}
}
ModemConfigWidget::ModemConfigWidget( const QString& name, QWidget* parent,
const char* na )
: ProfileDialogConnectionWidget( name, parent, na ) {
m_lay = new QVBoxLayout( this );
m_device = new QLabel(tr( "Modem is attached to:" ), this );
diff --git a/noncore/apps/opie-console/profileeditordialog.cpp b/noncore/apps/opie-console/profileeditordialog.cpp
index e2501a6..979e89d 100644
--- a/noncore/apps/opie-console/profileeditordialog.cpp
+++ b/noncore/apps/opie-console/profileeditordialog.cpp
@@ -1,29 +1,28 @@
#include <qlayout.h>
#include <qlineedit.h>
#include <qlabel.h>
#include <qmessagebox.h>
-#include <qstringlist.h>
#include <qcombobox.h>
#include <qcheckbox.h>
#include <qscrollview.h>
#include "metafactory.h"
#include "profileeditordialog.h"
namespace {
void setCurrent( const QString& str, QComboBox* bo ) {
for (int i = 0; i < bo->count(); i++ ) {
if ( bo->text(i) == str ) {
bo->setCurrentItem( i );
}
}
};
}
ProfileEditorDialog::ProfileEditorDialog( MetaFactory* fact,
const Profile& prof )
: QDialog(0, 0, TRUE), m_fact( fact ), m_prof( prof )
{
initUI();
// Apply current profile
diff --git a/noncore/apps/opie-console/profilemanager.cpp b/noncore/apps/opie-console/profilemanager.cpp
index cad2567..71188d1 100644
--- a/noncore/apps/opie-console/profilemanager.cpp
+++ b/noncore/apps/opie-console/profilemanager.cpp
@@ -1,37 +1,32 @@
#include <stdio.h>
#include <stdlib.h>
#include <qfile.h>
#include <qhbox.h>
-#include <qlayout.h>
-#include <qwidgetstack.h>
-#include <qpe/config.h>
#include "emulation_handler.h"
-#include "widget_layer.h"
-#include "emulation_widget.h"
#include "metafactory.h"
#include "profileconfig.h"
#include "profilemanager.h"
ProfileManager::ProfileManager( MetaFactory* fact )
: m_fact( fact )
{
}
ProfileManager::~ProfileManager() {
}
void ProfileManager::load() {
m_list.clear();
ProfileConfig conf("opie-console-profiles");
QStringList groups = conf.groups();
QStringList::Iterator it;
/*
* for each profile
*/
for ( it = groups.begin(); it != groups.end(); ++it ) {
conf.setGroup( (*it) );
Profile prof;
diff --git a/noncore/apps/opie-console/receive_layer.cpp b/noncore/apps/opie-console/receive_layer.cpp
index bbde339..b255452 100644
--- a/noncore/apps/opie-console/receive_layer.cpp
+++ b/noncore/apps/opie-console/receive_layer.cpp
@@ -1,31 +1,28 @@
#include <unistd.h>
#include <qdir.h>
-#include <qstring.h>
-#include <qfile.h>
-#include "io_layer.h"
#include "receive_layer.h"
ReceiveLayer::ReceiveLayer( IOLayer* lay, const QString& startDir )
: QObject(), m_curDir( startDir ), m_layer(lay )
{
}
ReceiveLayer::~ReceiveLayer() {
}
IOLayer* ReceiveLayer::layer() {
return m_layer;
}
QString ReceiveLayer::currentDir()const{
if (m_curDir.isEmpty() )
return QDir::currentDirPath();
return m_curDir;
}
void ReceiveLayer::changeDir( const QString& str) {
::chdir( str.latin1() );
}
void ReceiveLayer::receive( const QString& dir, Mode, Features ) {
receive( dir );
}
diff --git a/noncore/apps/opie-console/script.cpp b/noncore/apps/opie-console/script.cpp
index e6e9d6d..faea412 100644
--- a/noncore/apps/opie-console/script.cpp
+++ b/noncore/apps/opie-console/script.cpp
@@ -1,26 +1,25 @@
#include <qfile.h>
-#include <qtextstream.h>
#include "script.h"
Script::Script() {
}
Script::Script(const QString fileName) {
QFile file(fileName);
file.open(IO_ReadOnly );
m_script = file.readAll();
}
void Script::saveTo(const QString fileName) const {
QFile file(fileName);
file.open(IO_WriteOnly);
file.writeBlock(m_script);
file.close();
}
void Script::append(const QByteArray &data) {
int size = m_script.size();
m_script.resize(size + data.size());
memcpy(m_script.data() + size, data.data(), data.size());
}
diff --git a/noncore/apps/opie-console/session.cpp b/noncore/apps/opie-console/session.cpp
index 4f52584..1034ede 100644
--- a/noncore/apps/opie-console/session.cpp
+++ b/noncore/apps/opie-console/session.cpp
@@ -1,28 +1,26 @@
-#include "profile.h"
-#include "io_layer.h"
#include "file_layer.h"
#include "emulation_handler.h"
#include "session.h"
Session::Session() {
m_widget = 0l;
m_layer = 0l;
m_emu = 0l;
m_transfer = 0l;
}
Session::Session( const QString& na, QWidgetStack* widget, IOLayer* lay)
: m_name( na ), m_widget( widget ), m_layer( lay )
{
// m_widLay = 0l;
// m_emLay = 0l;
m_emu = 0l;
}
Session::~Session() {
delete m_layer;
delete m_emu;
delete m_widget;
/* the widget layer should be deleted by the m_widget */
}
diff --git a/noncore/apps/opie-console/terminalwidget.cpp b/noncore/apps/opie-console/terminalwidget.cpp
index 70f7c9b..6870487 100644
--- a/noncore/apps/opie-console/terminalwidget.cpp
+++ b/noncore/apps/opie-console/terminalwidget.cpp
@@ -1,35 +1,31 @@
-#include <qbuttongroup.h>
#include <qlabel.h>
#include <qcheckbox.h>
#include <qcombobox.h>
#include <qradiobutton.h>
-#include <qgroupbox.h>
-#include <qvbox.h>
#include <qhgroupbox.h>
#include <qhbuttongroup.h>
#include <qlayout.h>
-#include <qhbox.h>
#include "terminalwidget.h"
namespace {
enum TermIds {
id_term_vt100 = 0,
id_term_vt102,
id_term_linux,
id_term_xterm
};
enum ColourIds {
id_term_black,
id_term_white,
id_term_green,
id_term_orange
};
enum FontIds {
id_size_small,
id_size_medium,
id_size_large
};
};
diff --git a/noncore/apps/opie-console/transferdialog.cpp b/noncore/apps/opie-console/transferdialog.cpp
index 0af1911..55dd748 100644
--- a/noncore/apps/opie-console/transferdialog.cpp
+++ b/noncore/apps/opie-console/transferdialog.cpp
@@ -1,38 +1,36 @@
#include <qlayout.h>
#include <qcombobox.h>
#include <qlabel.h>
#include <qlineedit.h>
#include <qpushbutton.h>
#include <qmessagebox.h>
#include <qprogressbar.h>
#include <qradiobutton.h>
#include <qbuttongroup.h>
#include <opie/ofiledialog.h>
-#include "file_layer.h"
-#include "receive_layer.h"
#include "metafactory.h"
#include "mainwindow.h"
#include "transferdialog.h"
TransferDialog::TransferDialog(QWidget *parent, MainWindow *mainwindow, const char *)
: QDialog(parent, 0l, false), m_win(mainwindow)
{
m_lay = 0l;
m_recvlay = 0l;
QVBoxLayout *vbox, *vbox2;
QHBoxLayout *hbox, *hbox2, *hbox3;
QLabel *file, *mode, *progress, *status;
QButtonGroup *group;
QRadioButton *mode_send, *mode_receive;
m_autocleanup = 0;
m_running = true;
group = new QButtonGroup(QObject::tr("Transfer mode"), this);
mode_send = new QRadioButton(QObject::tr("Send"), group);
mode_receive = new QRadioButton(QObject::tr("Receive"), group);
group->insert(mode_send, id_send);
group->insert(mode_receive, id_receive);
diff --git a/noncore/apps/opie-console/vt102emulation.cpp b/noncore/apps/opie-console/vt102emulation.cpp
index 0ebefa0..35b789c 100644
--- a/noncore/apps/opie-console/vt102emulation.cpp
+++ b/noncore/apps/opie-console/vt102emulation.cpp
@@ -3,56 +3,51 @@
/* [vt102emulation.cpp] VT102 Terminal Emulation */
/* */
/* ------------------------------------------------------------------------- */
/* */
/* Copyright (c) 1997,1998 by Lars Doelle <lars.doelle@on-line.de> */
/* */
/* This file is part of Konsole - an X terminal for KDE */
/* */
/* ------------------------------------------------------------------------- */
/* */
/* Ported Konsole to Qt/Embedded */
/* */
/* Copyright (C) 2000 by John Ryland <jryland@trolltech.com> */
/* */
/* -------------------------------------------------------------------------- */
/*! \class Vt102Emulation
\brief Actual Emulation for Konsole
\sa Widget \sa Screen \sa EmulationLayer
*/
#include "vt102emulation.h"
-#include "widget_layer.h"
-#include "screen.h"
-#include "keytrans.h"
#include <stdio.h>
#include <unistd.h>
-#include <qkeycode.h>
-#include <qtextcodec.h>
/* VT102 Terminal Emulation
This class puts together the screens, the pty and the widget to a
complete terminal emulation. Beside combining it's componentes, it
handles the emulations's protocol.
This module consists of the following sections:
- Constructor/Destructor
- Incoming Bytes Event pipeline
- Outgoing Bytes
- Mouse Events
- Keyboard Events
- Modes and Charset State
- Diagnostics
*/
/* ------------------------------------------------------------------------- */
/* */
/* Constructor / Destructor */
/* */
diff --git a/noncore/apps/opie-console/widget.cpp b/noncore/apps/opie-console/widget.cpp
index 10045c6..e17dfd4 100644
--- a/noncore/apps/opie-console/widget.cpp
+++ b/noncore/apps/opie-console/widget.cpp
@@ -43,59 +43,51 @@ alter Widget to use only QByteArray, where applicable.
<ul>
<li> The internal image has the size of the widget (evtl. rounded up)
<li> The external image used in setImage can have any size.
<li> (internally) the external image is simply copied to the internal
when a setImage happens. During a resizeEvent no painting is done
a paintEvent is expected to follow anyway.
</ul>
\sa TEScreen \sa Emulation
*/
/* FIXME:
- 'image' may also be used uninitialized (it isn't in fact) in resizeEvent
- 'font_a' not used in mouse events
- add destructor
*/
/* TODO
- evtl. be sensitive to `paletteChange' while using default colors.
- set different 'rounding' styles? I.e. have a mode to show clipped chars?
*/
// #include "config.h"
#include "widget.h"
-#include "session.h"
#include <qpe/config.h>
-#include <qapplication.h>
-#include <qcursor.h>
-#include <qregexp.h>
-#include <qpainter.h>
#include <qclipboard.h>
-#include <qstyle.h>
-#include <qfile.h>
-#include <qdragobject.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <ctype.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <signal.h>
#include <assert.h>
// #include "widget.moc"
//#include <kapp.h>
//#include <kcursor.h>
//#include <kurl.h>
//#include <kdebug.h>
//#include <klocale.h>
#define HERE printf("%s(%d): %s\n",__FILE__,__LINE__,__FUNCTION__)
#define HCNT(Name) // { static int cnt = 1; printf("%s(%d): %s %d\n",__FILE__,__LINE__,Name,cnt++); }
#define loc(X,Y) ((Y)*columns+(X))
//FIXME: the rim should normally be 1, 0 only when running in full screen mode.
diff --git a/noncore/apps/opie-console/widget_layer.cpp b/noncore/apps/opie-console/widget_layer.cpp
index ac84f8b..96dda1c 100644
--- a/noncore/apps/opie-console/widget_layer.cpp
+++ b/noncore/apps/opie-console/widget_layer.cpp
@@ -1,44 +1,40 @@
/* ------------------------------------------------------------------------- */
/* */
/* widget_layer.cpp Widget Layer */
/* */
/* opie developers <opie@handhelds.org> */
/* */
/* ------------------------------------------------------------------------- */
#include "widget_layer.h"
-#include <qclipboard.h>
-#include <qregexp.h>
-#include <qglobal.h>
#include <string.h>
//#include <
-#include "common.h"
WidgetLayer::WidgetLayer( const Profile &config, QWidget *parent, const char *name ) : QFrame( parent, name )
{
// get the clipboard
m_clipboard = QApplication::clipboard();
// when data on clipboard changes, clear selection
QObject::connect( (QObject*) m_clipboard, SIGNAL( dataChanged() ),
(QObject*)this, SLOT( onClearSelection() ) );
// initialize vars:
m_lines = 1;
m_columns = 1;
m_resizing = false;
// just for demonstrating
//m_image = QArray<Character>( m_lines * m_columns );
m_image = QArray<Character>( 1 );
// we need to install an event filter,
// to emit keypresses.
qApp->installEventFilter( this );