Diffstat (limited to 'core/apps/embeddedkonsole/session.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/apps/embeddedkonsole/session.cpp | 20 |
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 | |||
@@ -22,16 +22,17 @@ | |||
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 | ||
26 | TESession::TESession(QMainWindow* main, TEWidget* te, const char* _pgm, QStrList & _args, const char *_term) : schema_no(0), font_no(3), pgm(_pgm), args(_args) | 26 | TESession::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)), |
@@ -47,12 +48,14 @@ TESession::TESession(QMainWindow* main, TEWidget* te, const char* _pgm, QStrList | |||
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 | ||
@@ -82,9 +85,9 @@ void TESession::setConnect(bool c) | |||
82 | } | 85 | } |
83 | 86 | ||
84 | void TESession::done(int status) | 87 | void TESession::done(int status) |
85 | { | 88 | { |
86 | emit done(this,status); | 89 | emit done(te,status); |
87 | } | 90 | } |
88 | 91 | ||
89 | void TESession::terminate() | 92 | void TESession::terminate() |
90 | { | 93 | { |
@@ -133,11 +136,12 @@ void TESession::setFontNo(int fn) | |||
133 | { | 136 | { |
134 | font_no = fn; | 137 | font_no = fn; |
135 | } | 138 | } |
136 | 139 | ||
137 | void TESession::setTitle(const QString& title) | 140 | void 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 | ||
142 | const QString& TESession::Title() | 146 | const QString& TESession::Title() |
143 | { | 147 | { |