summaryrefslogtreecommitdiff
path: root/core/apps/embeddedkonsole/session.cpp
authorwaspe <waspe>2004-02-22 12:57:58 (UTC)
committer waspe <waspe>2004-02-22 12:57:58 (UTC)
commit5bc4dbd932fcfa64773b6e17fe57c665bdcd50b8 (patch) (unidiff)
treeb97f5281b807b4218f437150a4e9082694e7a642 /core/apps/embeddedkonsole/session.cpp
parent908f9c9f0c68d1c3e5a620a69bbf0d05684e2ab3 (diff)
downloadopie-5bc4dbd932fcfa64773b6e17fe57c665bdcd50b8.zip
opie-5bc4dbd932fcfa64773b6e17fe57c665bdcd50b8.tar.gz
opie-5bc4dbd932fcfa64773b6e17fe57c665bdcd50b8.tar.bz2
merged changes form qkonsole back into opie-embeddedkonsole (most likely not bugfree !)
Diffstat (limited to 'core/apps/embeddedkonsole/session.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/apps/embeddedkonsole/session.cpp20
1 files changed, 12 insertions, 8 deletions
diff --git a/core/apps/embeddedkonsole/session.cpp b/core/apps/embeddedkonsole/session.cpp
index 520af86..17acb8c 100644
--- a/core/apps/embeddedkonsole/session.cpp
+++ b/core/apps/embeddedkonsole/session.cpp
@@ -20,20 +20,21 @@
20 The stuff in here does not belong to the terminal emulation framework, 20 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 21 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 22 to TEPTy/Emulation pairs. In fact, it is only there to demonstrate one
23 of the abilities of the framework - multible sessions. 23 of the abilities of the framework - multible sessions.
24*/ 24*/
25 25
26TESession::TESession(QMainWindow* main, TEWidget* te, const char* _pgm, QStrList & _args, const char *_term) : schema_no(0), font_no(3), pgm(_pgm), args(_args) 26TESession::TESession(QMainWindow* main, TEWidget* _te, const char* _pgm, QStrList & _args, const char *_term) : schema_no(0), font_no(3), pgm(_pgm), args(_args)
27{ 27{
28 te = _te;
29 term = _term;
30
28 // sh = new TEPty(); 31 // sh = new TEPty();
29 sh = new MyPty(); 32 sh = new MyPty();
30 em = new TEmuVt102(te); 33 em = new TEmuVt102(te);
31 34
32 term = _term;
33
34 sh->setSize(te->Lines(),te->Columns()); // not absolutely nessesary 35 sh->setSize(te->Lines(),te->Columns()); // not absolutely nessesary
35 QObject::connect( sh,SIGNAL(block_in(const char*,int)), 36 QObject::connect( sh,SIGNAL(block_in(const char*,int)),
36 em,SLOT(onRcvBlock(const char*,int)) ); 37 em,SLOT(onRcvBlock(const char*,int)) );
37 QObject::connect( em,SIGNAL(ImageSizeChanged(int,int)), 38 QObject::connect( em,SIGNAL(ImageSizeChanged(int,int)),
38 sh,SLOT(setSize(int,int))); 39 sh,SLOT(setSize(int,int)));
39 40
@@ -45,16 +46,18 @@ TESession::TESession(QMainWindow* main, TEWidget* te, const char* _pgm, QStrList
45 main,SLOT(notifySize(int,int))); 46 main,SLOT(notifySize(int,int)));
46*/ 47*/
47 QObject::connect( em,SIGNAL(sndBlock(const char*,int)), 48 QObject::connect( em,SIGNAL(sndBlock(const char*,int)),
48 sh,SLOT(send_bytes(const char*,int)) ); 49 sh,SLOT(send_bytes(const char*,int)) );
49 QObject::connect( em,SIGNAL(changeColumns(int)), 50 QObject::connect( em,SIGNAL(changeColumns(int)),
50 main,SLOT(changeColumns(int)) ); 51 main,SLOT(changeColumns(int)) );
51/* 52
53
54
52 QObject::connect( em,SIGNAL(changeTitle(int, const QString&)), 55 QObject::connect( em,SIGNAL(changeTitle(int, const QString&)),
53 main,SLOT(changeTitle(int, const QString&)) ); 56 this,SLOT(changeTitle(int, const QString&)) );
54*/ 57
55 QObject::connect( sh,SIGNAL(done(int)), this,SLOT(done(int)) ); 58 QObject::connect( sh,SIGNAL(done(int)), this,SLOT(done(int)) );
56} 59}
57 60
58 61
59 62
60void TESession::run() 63void TESession::run()
@@ -80,13 +83,13 @@ void TESession::setConnect(bool c)
80{ 83{
81 em->setConnect(c); 84 em->setConnect(c);
82} 85}
83 86
84void TESession::done(int status) 87void TESession::done(int status)
85{ 88{
86 emit done(this,status); 89 emit done(te,status);
87} 90}
88 91
89void TESession::terminate() 92void TESession::terminate()
90{ 93{
91 delete this; 94 delete this;
92} 95}
@@ -131,15 +134,16 @@ void TESession::setKeymapNo(int kn)
131 134
132void TESession::setFontNo(int fn) 135void TESession::setFontNo(int fn)
133{ 136{
134 font_no = fn; 137 font_no = fn;
135} 138}
136 139
137void TESession::setTitle(const QString& title) 140void TESession::changeTitle(int, const QString& title)
138{ 141{
139 this->title = title; 142 this->title = title;
143 emit changeTitle(te, title);
140} 144}
141 145
142const QString& TESession::Title() 146const QString& TESession::Title()
143{ 147{
144 return title; 148 return title;
145} 149}