author | zecke <zecke> | 2002-10-14 17:46:45 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-10-14 17:46:45 (UTC) |
commit | 2c5e8939ba073a42c032f5a9660ed0dd4580bf88 (patch) (unidiff) | |
tree | 163d660eb057ba0f78c119465d85413d3524ed1b /noncore/apps/opie-console/session.cpp | |
parent | 51e18b363eb37621479a059af58da3040db1be7e (diff) | |
download | opie-2c5e8939ba073a42c032f5a9660ed0dd4580bf88.zip opie-2c5e8939ba073a42c032f5a9660ed0dd4580bf88.tar.gz opie-2c5e8939ba073a42c032f5a9660ed0dd4580bf88.tar.bz2 |
The new old TerminalWidget I'm anything but happy about it
Diffstat (limited to 'noncore/apps/opie-console/session.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-console/session.cpp | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/noncore/apps/opie-console/session.cpp b/noncore/apps/opie-console/session.cpp index ff2c3e2..7cae0df 100644 --- a/noncore/apps/opie-console/session.cpp +++ b/noncore/apps/opie-console/session.cpp | |||
@@ -7,75 +7,81 @@ | |||
7 | #include "session.h" | 7 | #include "session.h" |
8 | 8 | ||
9 | 9 | ||
10 | Session::Session() { | 10 | Session::Session() { |
11 | m_widget = 0l; | 11 | m_widget = 0l; |
12 | m_layer = 0l; | 12 | m_layer = 0l; |
13 | m_widLay = 0l; | 13 | // m_widLay = 0l; |
14 | m_emLay = 0l; | 14 | // m_emLay = 0l; |
15 | } | 15 | } |
16 | Session::Session( const QString& na, QWidgetStack* widget, IOLayer* lay) | 16 | Session::Session( const QString& na, QWidgetStack* widget, IOLayer* lay) |
17 | : m_name( na ), m_widget( widget ), m_layer( lay ) | 17 | : m_name( na ), m_widget( widget ), m_layer( lay ) |
18 | { | 18 | { |
19 | m_widLay = 0l; | 19 | // m_widLay = 0l; |
20 | m_emLay = 0l; | 20 | // m_emLay = 0l; |
21 | } | 21 | } |
22 | Session::~Session() { | 22 | Session::~Session() { |
23 | delete m_layer; | 23 | delete m_layer; |
24 | delete m_emLay; | 24 | // delete m_emLay; |
25 | delete m_widget; | 25 | delete m_widget; |
26 | /* the widget layer should be deleted by the m_widget */ | 26 | /* the widget layer should be deleted by the m_widget */ |
27 | } | 27 | } |
28 | QString Session::name()const { | 28 | QString Session::name()const { |
29 | return m_name; | 29 | return m_name; |
30 | } | 30 | } |
31 | QWidgetStack* Session::widgetStack() { | 31 | QWidgetStack* Session::widgetStack() { |
32 | return m_widget; | 32 | return m_widget; |
33 | } | 33 | } |
34 | IOLayer* Session::layer() { | 34 | IOLayer* Session::layer() { |
35 | return m_layer; | 35 | return m_layer; |
36 | } | 36 | } |
37 | EmulationLayer* Session::emulationLayer() { | 37 | /*EmulationLayer* Session::emulationLayer() { |
38 | return m_emLay; | 38 | return m_emLay; |
39 | } | 39 | } |
40 | WidgetLayer* Session::emulationWidget() { | 40 | WidgetLayer* Session::emulationWidget() { |
41 | return m_widLay; | 41 | return m_widLay; |
42 | } | 42 | } |
43 | */ | ||
43 | void Session::connect() { | 44 | void Session::connect() { |
44 | if ( !m_layer || !m_emLay ) | 45 | /* if ( !m_layer || !m_emLay ) |
45 | return; | 46 | return; |
46 | 47 | ||
47 | QObject::connect(m_layer, SIGNAL(received(const QByteArray&) ), | 48 | QObject::connect(m_layer, SIGNAL(received(const QByteArray&) ), |
48 | m_emLay, SLOT(onRcvBlock(const QByteArray&) ) ); | 49 | m_emLay, SLOT(onRcvBlock(const QByteArray&) ) ); |
49 | QObject::connect(m_emLay, SIGNAL(sndBlock(const QByteArray&) ), | 50 | QObject::connect(m_emLay, SIGNAL(sndBlock(const QByteArray&) ), |
50 | m_layer, SLOT(send(const QByteArray&) ) ); | 51 | m_layer, SLOT(send(const QByteArray&) ) ); |
52 | */ | ||
51 | } | 53 | } |
52 | void Session::disconnect() { | 54 | void Session::disconnect() { |
55 | /* | ||
53 | if ( !m_layer || !m_emLay ) | 56 | if ( !m_layer || !m_emLay ) |
54 | return; | 57 | return; |
55 | 58 | ||
56 | QObject::disconnect(m_layer, SIGNAL(received(const QByteArray&) ), | 59 | QObject::disconnect(m_layer, SIGNAL(received(const QByteArray&) ), |
57 | m_emLay, SLOT(onRcvBlock(const QByteArray&) ) ); | 60 | m_emLay, SLOT(onRcvBlock(const QByteArray&) ) ); |
58 | QObject::disconnect(m_emLay, SIGNAL(sndBlock(const QByteArray&) ), | 61 | QObject::disconnect(m_emLay, SIGNAL(sndBlock(const QByteArray&) ), |
59 | m_layer, SLOT(send(const QByteArray&) ) ); | 62 | m_layer, SLOT(send(const QByteArray&) ) ); |
63 | */ | ||
60 | } | 64 | } |
61 | void Session::setName( const QString& na){ | 65 | void Session::setName( const QString& na){ |
62 | m_name = na; | 66 | m_name = na; |
63 | } | 67 | } |
64 | void Session::setWidgetStack( QWidgetStack* wid ) { | 68 | void Session::setWidgetStack( QWidgetStack* wid ) { |
65 | delete m_widget; | 69 | delete m_widget; |
66 | /* the EmulationLayer was destroyed... */ | 70 | /* the EmulationLayer was destroyed... */ |
67 | delete m_emLay; | 71 | //delete m_emLay; |
68 | m_widget = wid; | 72 | m_widget = wid; |
69 | } | 73 | } |
70 | void Session::setIOLayer( IOLayer* lay ) { | 74 | void Session::setIOLayer( IOLayer* lay ) { |
71 | delete m_layer; | 75 | delete m_layer; |
72 | m_layer = lay; | 76 | m_layer = lay; |
73 | } | 77 | } |
78 | /* | ||
74 | void Session::setEmulationLayer( EmulationLayer* lay ) { | 79 | void Session::setEmulationLayer( EmulationLayer* lay ) { |
75 | delete m_emLay; | 80 | delete m_emLay; |
76 | m_emLay = lay; | 81 | m_emLay = lay; |
77 | } | 82 | } |
78 | void Session::setEmulationWidget( WidgetLayer* lay ) { | 83 | void Session::setEmulationWidget( WidgetLayer* lay ) { |
79 | delete m_widLay; | 84 | delete m_widLay; |
80 | m_widLay = lay; | 85 | m_widLay = lay; |
81 | } | 86 | } |
87 | */ \ No newline at end of file | ||