summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-console/session.cpp
Unidiff
Diffstat (limited to 'noncore/apps/opie-console/session.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-console/session.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/noncore/apps/opie-console/session.cpp b/noncore/apps/opie-console/session.cpp
index 03d0fcd..c166d95 100644
--- a/noncore/apps/opie-console/session.cpp
+++ b/noncore/apps/opie-console/session.cpp
@@ -1,14 +1,15 @@
1 1
2 2
3#include "profile.h"
3#include "io_layer.h" 4#include "io_layer.h"
4#include "file_layer.h" 5#include "file_layer.h"
5#include "emulation_handler.h" 6#include "emulation_handler.h"
6#include "session.h" 7#include "session.h"
7 8
8 9
9Session::Session() { 10Session::Session() {
10 m_widget = 0l; 11 m_widget = 0l;
11 m_layer = 0l; 12 m_layer = 0l;
12 m_emu = 0l; 13 m_emu = 0l;
13} 14}
14Session::Session( const QString& na, QWidgetStack* widget, IOLayer* lay) 15Session::Session( const QString& na, QWidgetStack* widget, IOLayer* lay)
@@ -33,24 +34,27 @@ QWidgetStack* Session::widgetStack() {
33IOLayer* Session::layer() { 34IOLayer* Session::layer() {
34 return m_layer; 35 return m_layer;
35} 36}
36EmulationHandler* Session::emulationHandler() { 37EmulationHandler* Session::emulationHandler() {
37 return m_emu; 38 return m_emu;
38} 39}
39QWidget* Session::widget() { 40QWidget* Session::widget() {
40 if (!m_emu ) 41 if (!m_emu )
41 return 0l; 42 return 0l;
42 43
43 return m_emu->widget(); 44 return m_emu->widget();
44} 45}
46Profile Session::profile()const {
47 return m_prof;
48}
45/* 49/*
46WidgetLayer* Session::emulationWidget() { 50WidgetLayer* Session::emulationWidget() {
47 return m_widLay; 51 return m_widLay;
48} 52}
49*/ 53*/
50void Session::connect() { 54void Session::connect() {
51 if ( !m_layer || !m_emu ) 55 if ( !m_layer || !m_emu )
52 return; 56 return;
53 57
54 QObject::connect(m_layer, SIGNAL(received(const QByteArray&) ), 58 QObject::connect(m_layer, SIGNAL(received(const QByteArray&) ),
55 m_emu, SLOT(recv(const QByteArray&) ) ); 59 m_emu, SLOT(recv(const QByteArray&) ) );
56 QObject::connect(m_emu, SIGNAL(send(const QByteArray&) ), 60 QObject::connect(m_emu, SIGNAL(send(const QByteArray&) ),
@@ -82,19 +86,22 @@ void Session::setWidgetStack( QWidgetStack* wid ) {
82 86
83 m_widget = wid; 87 m_widget = wid;
84} 88}
85void Session::setIOLayer( IOLayer* lay ) { 89void Session::setIOLayer( IOLayer* lay ) {
86 delete m_layer; 90 delete m_layer;
87 m_layer = lay; 91 m_layer = lay;
88} 92}
89 93
90void Session::setEmulationHandler( EmulationHandler* lay ) { 94void Session::setEmulationHandler( EmulationHandler* lay ) {
91 delete m_emu; 95 delete m_emu;
92 m_emu = lay; 96 m_emu = lay;
93} 97}
98void Session::setProfile( const Profile& prof ) {
99 m_prof = prof;
100}
94/* 101/*
95void Session::setEmulationWidget( WidgetLayer* lay ) { 102void Session::setEmulationWidget( WidgetLayer* lay ) {
96 delete m_widLay; 103 delete m_widLay;
97 m_widLay = lay; 104 m_widLay = lay;
98} 105}
99*/ 106*/
100 107