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 @@ -3,6 +3,5 @@ #include "io_layer.h" #include "file_layer.h" -#include "widget_layer.h" -#include "emulation_layer.h" +#include "emulation_handler.h" #include "session.h" @@ -11,6 +10,5 @@ Session::Session() { m_widget = 0l; m_layer = 0l; -// m_widLay = 0l; -// m_emLay = 0l; + m_emu = 0l; } Session::Session( const QString& na, QWidgetStack* widget, IOLayer* lay) @@ -19,8 +17,9 @@ Session::Session( const QString& na, QWidgetStack* widget, IOLayer* lay) // m_widLay = 0l; // m_emLay = 0l; + m_emu = 0l; } Session::~Session() { delete m_layer; -// delete m_emLay; + delete m_emu; delete m_widget; /* the widget layer should be deleted by the m_widget */ @@ -35,7 +34,8 @@ IOLayer* Session::layer() { return m_layer; } -/*EmulationLayer* Session::emulationLayer() { - return m_emLay; +EmulationHandler* Session::emulationHandler() { + return m_emu; } +/* WidgetLayer* Session::emulationWidget() { return m_widLay; @@ -43,23 +43,23 @@ WidgetLayer* Session::emulationWidget() { */ void Session::connect() { -/* if ( !m_layer || !m_emLay ) + if ( !m_layer || !m_emu ) return; + qWarning("connection in session"); QObject::connect(m_layer, SIGNAL(received(const QByteArray&) ), - m_emLay, SLOT(onRcvBlock(const QByteArray&) ) ); - QObject::connect(m_emLay, SIGNAL(sndBlock(const QByteArray&) ), + m_emu, SLOT(recv(const QByteArray&) ) ); + QObject::connect(m_emu, SIGNAL(send(const QByteArray&) ), m_layer, SLOT(send(const QByteArray&) ) ); - */ + } void Session::disconnect() { -/* - if ( !m_layer || !m_emLay ) + + if ( !m_layer || !m_emu ) return; QObject::disconnect(m_layer, SIGNAL(received(const QByteArray&) ), - m_emLay, SLOT(onRcvBlock(const QByteArray&) ) ); - QObject::disconnect(m_emLay, SIGNAL(sndBlock(const QByteArray&) ), + m_emu, SLOT(recv(const QByteArray&) ) ); + QObject::disconnect(m_emu, SIGNAL(send(const QByteArray&) ), m_layer, SLOT(send(const QByteArray&) ) ); - */ } void Session::setName( const QString& na){ @@ -67,7 +67,9 @@ void Session::setName( const QString& na){ } void Session::setWidgetStack( QWidgetStack* wid ) { + delete m_emu; + m_emu = 0l; delete m_widget; /* the EmulationLayer was destroyed... */ - //delete m_emLay; + m_widget = wid; } @@ -76,12 +78,13 @@ void Session::setIOLayer( IOLayer* lay ) { m_layer = lay; } -/* -void Session::setEmulationLayer( EmulationLayer* lay ) { - delete m_emLay; - m_emLay = lay; + +void Session::setEmulationHandler( EmulationHandler* lay ) { + delete m_emu; + m_emu = lay; } +/* void Session::setEmulationWidget( WidgetLayer* lay ) { delete m_widLay; m_widLay = lay; } -*/
\ No newline at end of file +*/ |