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.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/noncore/apps/opie-console/emulation_handler.cpp b/noncore/apps/opie-console/emulation_handler.cpp
index 7924568..235facb 100644
--- a/noncore/apps/opie-console/emulation_handler.cpp
+++ b/noncore/apps/opie-console/emulation_handler.cpp
@@ -10,48 +10,51 @@
10 10
11EmulationHandler::EmulationHandler( const Profile& prof, QWidget* parent,const char* name ) 11EmulationHandler::EmulationHandler( const Profile& prof, QWidget* parent,const char* name )
12 : QObject(0, name ) 12 : QObject(0, name )
13{ 13{
14 m_teWid = new TEWidget( parent, "TerminalMain"); 14 m_teWid = new TEWidget( parent, "TerminalMain");
15 // use setWrapAt(0) for classic behaviour (wrap at screen width, no scrollbar) 15 // use setWrapAt(0) for classic behaviour (wrap at screen width, no scrollbar)
16 // use setWrapAt(80) for normal console with scrollbar 16 // use setWrapAt(80) for normal console with scrollbar
17 setWrap(prof.readNumEntry("Wrap", 0) ? 0 : 80); 17 setWrap(prof.readNumEntry("Wrap", 0) ? 0 : 80);
18 m_teWid->setMinimumSize(150, 70 ); 18 m_teWid->setMinimumSize(150, 70 );
19 m_script = 0; 19 m_script = 0;
20 parent->resize( m_teWid->calcSize(80, 24 ) ); 20 parent->resize( m_teWid->calcSize(80, 24 ) );
21 m_teEmu = new TEmuVt102(m_teWid ); 21 m_teEmu = new TEmuVt102(m_teWid );
22 22
23 connect(m_teEmu,SIGNAL(ImageSizeChanged(int, int) ), 23 connect(m_teEmu,SIGNAL(ImageSizeChanged(int, int) ),
24 this, SIGNAL(changeSize(int, int) ) ); 24 this, SIGNAL(changeSize(int, int) ) );
25 connect(m_teEmu, SIGNAL(sndBlock(const char*, int) ), 25 connect(m_teEmu, SIGNAL(sndBlock(const char*, int) ),
26 this, SLOT(recvEmulation(const char*, int) ) ); 26 this, SLOT(recvEmulation(const char*, int) ) );
27 m_teEmu->setConnect( true ); 27 m_teEmu->setConnect( true );
28 m_teEmu->setHistory( TRUE ); 28 m_teEmu->setHistory( TRUE );
29 load( prof ); 29 load( prof );
30 30
31 31
32 32
33} 33}
34TEmulation* EmulationHandler::emulation() {
35 return m_teEmu;
36}
34EmulationHandler::~EmulationHandler() { 37EmulationHandler::~EmulationHandler() {
35 if (isRecording()) 38 if (isRecording())
36 clearScript(); 39 clearScript();
37 delete m_teEmu; 40 delete m_teEmu;
38 delete m_teWid; 41 delete m_teWid;
39} 42}
40 43
41void EmulationHandler::load( const Profile& prof) { 44void EmulationHandler::load( const Profile& prof) {
42 m_teWid->setVTFont( font( prof.readNumEntry("Font") ) ); 45 m_teWid->setVTFont( font( prof.readNumEntry("Font") ) );
43 int num = prof.readNumEntry("Color"); 46 int num = prof.readNumEntry("Color");
44 setColor( foreColor(num), backColor(num) ); 47 setColor( foreColor(num), backColor(num) );
45 m_teWid->setBackgroundColor(backColor(num) ); 48 m_teWid->setBackgroundColor(backColor(num) );
46 49
47 int term = prof.readNumEntry("Terminal", 0) ; 50 int term = prof.readNumEntry("Terminal", 0) ;
48 switch(term) { 51 switch(term) {
49 default: 52 default:
50 case Profile::VT102: 53 case Profile::VT102:
51 case Profile::VT100: 54 case Profile::VT100:
52 m_teEmu->setKeytrans("vt100.keytab"); 55 m_teEmu->setKeytrans("vt100.keytab");
53 break; 56 break;
54 case Profile::Linux: 57 case Profile::Linux:
55 m_teEmu->setKeytrans("linux.keytab"); 58 m_teEmu->setKeytrans("linux.keytab");
56 break; 59 break;
57 case Profile::XTerm: 60 case Profile::XTerm: