author | harlekin <harlekin> | 2002-10-15 10:46:40 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2002-10-15 10:46:40 (UTC) |
commit | daae7a75b0e9ccbf1ea4c699c631ad77825e6301 (patch) (unidiff) | |
tree | 94bd75c58f42d8752b62a2281a5175a8e746f9ff /noncore/apps/opie-console/session.cpp | |
parent | e09b7ab685d29eba947c3bb021192408acae70be (diff) | |
download | opie-daae7a75b0e9ccbf1ea4c699c631ad77825e6301.zip opie-daae7a75b0e9ccbf1ea4c699c631ad77825e6301.tar.gz opie-daae7a75b0e9ccbf1ea4c699c631ad77825e6301.tar.bz2 |
- more menu handling \n - added 2 more color shemes
Diffstat (limited to 'noncore/apps/opie-console/session.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-console/session.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/noncore/apps/opie-console/session.cpp b/noncore/apps/opie-console/session.cpp index f4fbcf2..d0ace6c 100644 --- a/noncore/apps/opie-console/session.cpp +++ b/noncore/apps/opie-console/session.cpp | |||
@@ -42,32 +42,38 @@ WidgetLayer* Session::emulationWidget() { | |||
42 | } | 42 | } |
43 | */ | 43 | */ |
44 | void Session::connect() { | 44 | void Session::connect() { |
45 | if ( !m_layer || !m_emu ) | 45 | if ( !m_layer || !m_emu ) |
46 | return; | 46 | return; |
47 | 47 | ||
48 | m_connected = true; | ||
49 | |||
48 | qWarning("connection in session"); | 50 | qWarning("connection in session"); |
49 | QObject::connect(m_layer, SIGNAL(received(const QByteArray&) ), | 51 | QObject::connect(m_layer, SIGNAL(received(const QByteArray&) ), |
50 | m_emu, SLOT(recv(const QByteArray&) ) ); | 52 | m_emu, SLOT(recv(const QByteArray&) ) ); |
51 | QObject::connect(m_emu, SIGNAL(send(const QByteArray&) ), | 53 | QObject::connect(m_emu, SIGNAL(send(const QByteArray&) ), |
52 | m_layer, SLOT(send(const QByteArray&) ) ); | 54 | m_layer, SLOT(send(const QByteArray&) ) ); |
53 | |||
54 | } | 55 | } |
56 | |||
55 | void Session::disconnect() { | 57 | void Session::disconnect() { |
56 | 58 | ||
57 | if ( !m_layer || !m_emu ) | 59 | if ( !m_layer || !m_emu ) |
58 | return; | 60 | return; |
59 | 61 | ||
62 | m_connected = false; | ||
63 | |||
60 | QObject::disconnect(m_layer, SIGNAL(received(const QByteArray&) ), | 64 | QObject::disconnect(m_layer, SIGNAL(received(const QByteArray&) ), |
61 | m_emu, SLOT(recv(const QByteArray&) ) ); | 65 | m_emu, SLOT(recv(const QByteArray&) ) ); |
62 | QObject::disconnect(m_emu, SIGNAL(send(const QByteArray&) ), | 66 | QObject::disconnect(m_emu, SIGNAL(send(const QByteArray&) ), |
63 | m_layer, SLOT(send(const QByteArray&) ) ); | 67 | m_layer, SLOT(send(const QByteArray&) ) ); |
64 | } | 68 | } |
69 | |||
65 | void Session::setName( const QString& na){ | 70 | void Session::setName( const QString& na){ |
66 | m_name = na; | 71 | m_name = na; |
67 | } | 72 | } |
73 | |||
68 | void Session::setWidgetStack( QWidgetStack* wid ) { | 74 | void Session::setWidgetStack( QWidgetStack* wid ) { |
69 | delete m_emu; | 75 | delete m_emu; |
70 | m_emu = 0l; | 76 | m_emu = 0l; |
71 | delete m_widget; | 77 | delete m_widget; |
72 | /* the EmulationLayer was destroyed... */ | 78 | /* the EmulationLayer was destroyed... */ |
73 | 79 | ||
@@ -85,6 +91,10 @@ void Session::setEmulationHandler( EmulationHandler* lay ) { | |||
85 | /* | 91 | /* |
86 | void Session::setEmulationWidget( WidgetLayer* lay ) { | 92 | void Session::setEmulationWidget( WidgetLayer* lay ) { |
87 | delete m_widLay; | 93 | delete m_widLay; |
88 | m_widLay = lay; | 94 | m_widLay = lay; |
89 | } | 95 | } |
90 | */ | 96 | */ |
97 | |||
98 | bool Session::isConnected() { | ||
99 | return m_connected; | ||
100 | } | ||