summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-console/session.cpp
authorharlekin <harlekin>2002-10-15 10:46:40 (UTC)
committer harlekin <harlekin>2002-10-15 10:46:40 (UTC)
commitdaae7a75b0e9ccbf1ea4c699c631ad77825e6301 (patch) (unidiff)
tree94bd75c58f42d8752b62a2281a5175a8e746f9ff /noncore/apps/opie-console/session.cpp
parente09b7ab685d29eba947c3bb021192408acae70be (diff)
downloadopie-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.cpp12
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*/
44void Session::connect() { 44void 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
55void Session::disconnect() { 57void 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
65void Session::setName( const QString& na){ 70void Session::setName( const QString& na){
66 m_name = na; 71 m_name = na;
67} 72}
73
68void Session::setWidgetStack( QWidgetStack* wid ) { 74void 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/*
86void Session::setEmulationWidget( WidgetLayer* lay ) { 92void 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
98bool Session::isConnected() {
99 return m_connected;
100}