summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-console/emulation_handler.cpp
Unidiff
Diffstat (limited to 'noncore/apps/opie-console/emulation_handler.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-console/emulation_handler.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/noncore/apps/opie-console/emulation_handler.cpp b/noncore/apps/opie-console/emulation_handler.cpp
index c67c7c7..9e7f56c 100644
--- a/noncore/apps/opie-console/emulation_handler.cpp
+++ b/noncore/apps/opie-console/emulation_handler.cpp
@@ -10,39 +10,43 @@ EmulationHandler::EmulationHandler( const Profile& prof, QWidget* parent,const c
10 : QObject(0, name ) 10 : QObject(0, name )
11{ 11{
12 m_teWid = new TEWidget( parent, "TerminalMain"); 12 m_teWid = new TEWidget( parent, "TerminalMain");
13 m_teWid->setMinimumSize(150, 70 ); 13 m_teWid->setMinimumSize(150, 70 );
14 parent->resize( m_teWid->calcSize(80, 24 ) ); 14 parent->resize( m_teWid->calcSize(80, 24 ) );
15 m_teEmu = new TEmuVt102(m_teWid ); 15 m_teEmu = new TEmuVt102(m_teWid );
16 16
17 connect(m_teEmu,SIGNAL(ImageSizeChanged(int, int) ), 17 connect(m_teEmu,SIGNAL(ImageSizeChanged(int, int) ),
18 this, SIGNAL(changeSize(int, int) ) ); 18 this, SIGNAL(changeSize(int, int) ) );
19 connect(m_teEmu, SIGNAL(sndBlock(const char*, int) ), 19 connect(m_teEmu, SIGNAL(sndBlock(const char*, int) ),
20 this, SLOT(recvEmulation(const char*, int) ) ); 20 this, SLOT(recvEmulation(const char*, int) ) );
21 m_teEmu->setConnect( true ); 21 m_teEmu->setConnect( true );
22 m_teEmu->setHistory( TRUE );
22 load( prof ); 23 load( prof );
23 24
24 25
25 26
26} 27}
27EmulationHandler::~EmulationHandler() { 28EmulationHandler::~EmulationHandler() {
28 delete m_teEmu; 29 delete m_teEmu;
29 delete m_teWid; 30 delete m_teWid;
30} 31}
31void EmulationHandler::load( const Profile& ) { 32void EmulationHandler::load( const Profile& ) {
32 QFont font = QFont("Fixed", 12, QFont::Normal ); 33 QFont font = QFont("Fixed", 12, QFont::Normal );
33 font.setFixedPitch(TRUE); 34 font.setFixedPitch(TRUE);
34 m_teWid->setVTFont( font ); 35 m_teWid->setVTFont( font );
35 m_teWid->setBackgroundColor(Qt::black ); 36 m_teWid->setBackgroundColor(Qt::gray );
36} 37}
37void EmulationHandler::recv( const QByteArray& ar) { 38void EmulationHandler::recv( const QByteArray& ar) {
39 qWarning("received in EmulationHandler!");
38 m_teEmu->onRcvBlock(ar.data(), ar.count() ); 40 m_teEmu->onRcvBlock(ar.data(), ar.count() );
39} 41}
40void EmulationHandler::recvEmulation(const char* src, int len ) { 42void EmulationHandler::recvEmulation(const char* src, int len ) {
43 qWarning("received from te ");
41 QByteArray ar(len); 44 QByteArray ar(len);
45
42 memcpy(ar.data(), src, sizeof(char) * len ); 46 memcpy(ar.data(), src, sizeof(char) * len );
43 47
44 emit send(ar); 48 emit send(ar);
45} 49}
46QWidget* EmulationHandler::widget() { 50QWidget* EmulationHandler::widget() {
47 return m_teWid; 51 return m_teWid;
48} 52}