summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-console/emulation_widget.cpp
Side-by-side diff
Diffstat (limited to 'noncore/apps/opie-console/emulation_widget.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/opie-console/emulation_widget.cpp8
1 files changed, 0 insertions, 8 deletions
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,76 +1,68 @@
// 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
QFontMetrics fm( font() );
f_height = fm.height();
f_width = fm.maxWidth();
f_ascent = fm.ascent();
// initialize scrollbar related vars
m_scrollbar = new QScrollBar( this );
m_scrollbar->setCursor( arrowCursor );
// give reasonable defaults to m_columns, m_lines
calcGeometry();
// load config
reloadConfig( config );
m_resizing = false;
}
void EmulationWidget::reloadConfig( const Profile& config )
{
// nothing yet
}
EmulationWidget::~EmulationWidget()
{
//clean up
}
static QChar vt100extended(QChar c)
{
switch (c.unicode())
{
case 0x25c6 : return 1;
case 0x2592 : return 2;
case 0x2409 : return 3;
case 0x240c : return 4;
case 0x240d : return 5;
case 0x240a : return 6;