author | zecke <zecke> | 2002-10-14 19:58:07 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-10-14 19:58:07 (UTC) |
commit | 0547ecc794209a0824fd7662e434706ac625dbb2 (patch) (unidiff) | |
tree | 90243ddbca14b2c01552d55b413be0d044c3a108 /noncore/apps/opie-console/session.cpp | |
parent | 7114c1567399d9b134af337824ef56e7d5facee7 (diff) | |
download | opie-0547ecc794209a0824fd7662e434706ac625dbb2.zip opie-0547ecc794209a0824fd7662e434706ac625dbb2.tar.gz opie-0547ecc794209a0824fd7662e434706ac625dbb2.tar.bz2 |
Make it work
history and other stuff
Diffstat (limited to 'noncore/apps/opie-console/session.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-console/session.cpp | 47 |
1 files changed, 25 insertions, 22 deletions
diff --git a/noncore/apps/opie-console/session.cpp b/noncore/apps/opie-console/session.cpp index 7cae0df..f4fbcf2 100644 --- a/noncore/apps/opie-console/session.cpp +++ b/noncore/apps/opie-console/session.cpp | |||
@@ -2,26 +2,25 @@ | |||
2 | 2 | ||
3 | #include "io_layer.h" | 3 | #include "io_layer.h" |
4 | #include "file_layer.h" | 4 | #include "file_layer.h" |
5 | #include "widget_layer.h" | 5 | #include "emulation_handler.h" |
6 | #include "emulation_layer.h" | ||
7 | #include "session.h" | 6 | #include "session.h" |
8 | 7 | ||
9 | 8 | ||
10 | Session::Session() { | 9 | Session::Session() { |
11 | m_widget = 0l; | 10 | m_widget = 0l; |
12 | m_layer = 0l; | 11 | m_layer = 0l; |
13 | // m_widLay = 0l; | 12 | m_emu = 0l; |
14 | // m_emLay = 0l; | ||
15 | } | 13 | } |
16 | Session::Session( const QString& na, QWidgetStack* widget, IOLayer* lay) | 14 | Session::Session( const QString& na, QWidgetStack* widget, IOLayer* lay) |
17 | : m_name( na ), m_widget( widget ), m_layer( lay ) | 15 | : m_name( na ), m_widget( widget ), m_layer( lay ) |
18 | { | 16 | { |
19 | // m_widLay = 0l; | 17 | // m_widLay = 0l; |
20 | // m_emLay = 0l; | 18 | // m_emLay = 0l; |
19 | m_emu = 0l; | ||
21 | } | 20 | } |
22 | Session::~Session() { | 21 | Session::~Session() { |
23 | delete m_layer; | 22 | delete m_layer; |
24 | // delete m_emLay; | 23 | delete m_emu; |
25 | delete m_widget; | 24 | delete m_widget; |
26 | /* the widget layer should be deleted by the m_widget */ | 25 | /* the widget layer should be deleted by the m_widget */ |
27 | } | 26 | } |
@@ -34,54 +33,58 @@ QWidgetStack* Session::widgetStack() { | |||
34 | IOLayer* Session::layer() { | 33 | IOLayer* Session::layer() { |
35 | return m_layer; | 34 | return m_layer; |
36 | } | 35 | } |
37 | /*EmulationLayer* Session::emulationLayer() { | 36 | EmulationHandler* Session::emulationHandler() { |
38 | return m_emLay; | 37 | return m_emu; |
39 | } | 38 | } |
39 | /* | ||
40 | WidgetLayer* Session::emulationWidget() { | 40 | WidgetLayer* Session::emulationWidget() { |
41 | return m_widLay; | 41 | return m_widLay; |
42 | } | 42 | } |
43 | */ | 43 | */ |
44 | void Session::connect() { | 44 | void Session::connect() { |
45 | /* if ( !m_layer || !m_emLay ) | 45 | if ( !m_layer || !m_emu ) |
46 | return; | 46 | return; |
47 | 47 | ||
48 | qWarning("connection in session"); | ||
48 | QObject::connect(m_layer, SIGNAL(received(const QByteArray&) ), | 49 | QObject::connect(m_layer, SIGNAL(received(const QByteArray&) ), |
49 | m_emLay, SLOT(onRcvBlock(const QByteArray&) ) ); | 50 | m_emu, SLOT(recv(const QByteArray&) ) ); |
50 | QObject::connect(m_emLay, SIGNAL(sndBlock(const QByteArray&) ), | 51 | QObject::connect(m_emu, SIGNAL(send(const QByteArray&) ), |
51 | m_layer, SLOT(send(const QByteArray&) ) ); | 52 | m_layer, SLOT(send(const QByteArray&) ) ); |
52 | */ | 53 | |
53 | } | 54 | } |
54 | void Session::disconnect() { | 55 | void Session::disconnect() { |
55 | /* | 56 | |
56 | if ( !m_layer || !m_emLay ) | 57 | if ( !m_layer || !m_emu ) |
57 | return; | 58 | return; |
58 | 59 | ||
59 | QObject::disconnect(m_layer, SIGNAL(received(const QByteArray&) ), | 60 | QObject::disconnect(m_layer, SIGNAL(received(const QByteArray&) ), |
60 | m_emLay, SLOT(onRcvBlock(const QByteArray&) ) ); | 61 | m_emu, SLOT(recv(const QByteArray&) ) ); |
61 | QObject::disconnect(m_emLay, SIGNAL(sndBlock(const QByteArray&) ), | 62 | QObject::disconnect(m_emu, SIGNAL(send(const QByteArray&) ), |
62 | m_layer, SLOT(send(const QByteArray&) ) ); | 63 | m_layer, SLOT(send(const QByteArray&) ) ); |
63 | */ | ||
64 | } | 64 | } |
65 | void Session::setName( const QString& na){ | 65 | void Session::setName( const QString& na){ |
66 | m_name = na; | 66 | m_name = na; |
67 | } | 67 | } |
68 | void Session::setWidgetStack( QWidgetStack* wid ) { | 68 | void Session::setWidgetStack( QWidgetStack* wid ) { |
69 | delete m_emu; | ||
70 | m_emu = 0l; | ||
69 | delete m_widget; | 71 | delete m_widget; |
70 | /* the EmulationLayer was destroyed... */ | 72 | /* the EmulationLayer was destroyed... */ |
71 | //delete m_emLay; | 73 | |
72 | m_widget = wid; | 74 | m_widget = wid; |
73 | } | 75 | } |
74 | void Session::setIOLayer( IOLayer* lay ) { | 76 | void Session::setIOLayer( IOLayer* lay ) { |
75 | delete m_layer; | 77 | delete m_layer; |
76 | m_layer = lay; | 78 | m_layer = lay; |
77 | } | 79 | } |
78 | /* | 80 | |
79 | void Session::setEmulationLayer( EmulationLayer* lay ) { | 81 | void Session::setEmulationHandler( EmulationHandler* lay ) { |
80 | delete m_emLay; | 82 | delete m_emu; |
81 | m_emLay = lay; | 83 | m_emu = lay; |
82 | } | 84 | } |
85 | /* | ||
83 | void Session::setEmulationWidget( WidgetLayer* lay ) { | 86 | void Session::setEmulationWidget( WidgetLayer* lay ) { |
84 | delete m_widLay; | 87 | delete m_widLay; |
85 | m_widLay = lay; | 88 | m_widLay = lay; |
86 | } | 89 | } |
87 | */ \ No newline at end of file | 90 | */ |