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.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/noncore/apps/opie-console/session.cpp b/noncore/apps/opie-console/session.cpp
index 1034ede..b7f14c5 100644
--- a/noncore/apps/opie-console/session.cpp
+++ b/noncore/apps/opie-console/session.cpp
@@ -1,115 +1,115 @@
1 1
2 2
3#include "file_layer.h" 3#include "file_layer.h"
4#include "emulation_handler.h" 4#include "emulation_handler.h"
5#include "session.h" 5#include "session.h"
6 6
7 7
8Session::Session() { 8Session::Session() {
9 m_widget = 0l; 9 m_widget = 0l;
10 m_layer = 0l; 10 m_layer = 0l;
11 m_emu = 0l; 11 m_emu = 0l;
12 m_transfer = 0l; 12 m_transfer = 0l;
13} 13}
14Session::Session( const QString& na, QWidgetStack* widget, IOLayer* lay) 14Session::Session( const QString& na, QWidgetStack* widget, IOLayer* lay)
15 : m_name( na ), m_widget( widget ), m_layer( lay ) 15 : m_name( na ), m_widget( widget ), m_layer( lay )
16{ 16{
17// m_widLay = 0l; 17// m_widLay = 0l;
18// m_emLay = 0l; 18// m_emLay = 0l;
19 m_emu = 0l; 19 m_emu = 0l;
20} 20}
21Session::~Session() { 21Session::~Session() {
22 delete m_layer; 22 delete m_layer;
23 delete m_emu; 23 delete m_emu;
24 delete m_widget; 24 delete m_widget;
25 /* the widget layer should be deleted by the m_widget */ 25 /* the widget layer should be deleted by the m_widget */
26} 26}
27QString Session::name()const { 27QString Session::name()const {
28 return m_name; 28 return m_name;
29} 29}
30QWidgetStack* Session::widgetStack() { 30QWidgetStack* Session::widgetStack() {
31 return m_widget; 31 return m_widget;
32} 32}
33IOLayer* Session::layer() { 33IOLayer* Session::layer() {
34 return m_layer; 34 return m_layer;
35} 35}
36EmulationHandler* Session::emulationHandler() { 36EmulationHandler* Session::emulationHandler() {
37 return m_emu; 37 return m_emu;
38} 38}
39QWidget* Session::widget() { 39QWidget* Session::widget() {
40 if (!m_emu ) 40 if (!m_emu )
41 return 0l; 41 return 0l;
42 42
43 return m_emu->widget(); 43 return m_emu->widget();
44} 44}
45Profile Session::profile()const { 45Profile Session::profile()const {
46 return m_prof; 46 return m_prof;
47} 47}
48/* 48/*
49WidgetLayer* Session::emulationWidget() { 49WidgetLayer* Session::emulationWidget() {
50 return m_widLay; 50 return m_widLay;
51} 51}
52*/ 52*/
53void Session::connect() { 53void Session::connect() {
54 if ( !m_layer || !m_emu ) 54 if ( !m_layer || !m_emu )
55 return; 55 return;
56 56
57 QObject::connect(m_layer, SIGNAL(received(const QByteArray&) ), 57 QObject::connect(m_layer, SIGNAL(received(const QByteArray&) ),
58 m_emu, SLOT(recv(const QByteArray&) ) ); 58 m_emu, SLOT(recv(const QByteArray&) ) );
59 QObject::connect(m_emu, SIGNAL(send(const QByteArray&) ), 59 QObject::connect(m_emu, SIGNAL(send(const QByteArray&) ),
60 m_layer, SLOT(send(const QByteArray&) ) ); 60 m_layer, SLOT(send(const QByteArray&) ) );
61 QObject::connect(m_emu, SIGNAL(changeSize(int, int) ), 61 QObject::connect(m_emu, SIGNAL(changeSize(int,int) ),
62 m_layer, SLOT(setSize(int, int) ) ); 62 m_layer, SLOT(setSize(int,int) ) );
63} 63}
64 64
65void Session::disconnect() { 65void Session::disconnect() {
66 66
67 if ( !m_layer || !m_emu ) 67 if ( !m_layer || !m_emu )
68 return; 68 return;
69 69
70 QObject::disconnect(m_layer, SIGNAL(received(const QByteArray&) ), 70 QObject::disconnect(m_layer, SIGNAL(received(const QByteArray&) ),
71 m_emu, SLOT(recv(const QByteArray&) ) ); 71 m_emu, SLOT(recv(const QByteArray&) ) );
72 QObject::disconnect(m_emu, SIGNAL(send(const QByteArray&) ), 72 QObject::disconnect(m_emu, SIGNAL(send(const QByteArray&) ),
73 m_layer, SLOT(send(const QByteArray&) ) ); 73 m_layer, SLOT(send(const QByteArray&) ) );
74} 74}
75 75
76void Session::setName( const QString& na){ 76void Session::setName( const QString& na){
77 m_name = na; 77 m_name = na;
78} 78}
79 79
80void Session::setWidgetStack( QWidgetStack* wid ) { 80void Session::setWidgetStack( QWidgetStack* wid ) {
81 delete m_emu; 81 delete m_emu;
82 m_emu = 0l; 82 m_emu = 0l;
83 delete m_widget; 83 delete m_widget;
84 /* the EmulationLayer was destroyed... */ 84 /* the EmulationLayer was destroyed... */
85 85
86 m_widget = wid; 86 m_widget = wid;
87} 87}
88void Session::setIOLayer( IOLayer* lay ) { 88void Session::setIOLayer( IOLayer* lay ) {
89 delete m_layer; 89 delete m_layer;
90 m_layer = lay; 90 m_layer = lay;
91} 91}
92 92
93void Session::setEmulationHandler( EmulationHandler* lay ) { 93void Session::setEmulationHandler( EmulationHandler* lay ) {
94 delete m_emu; 94 delete m_emu;
95 m_emu = lay; 95 m_emu = lay;
96} 96}
97void Session::setProfile( const Profile& prof ) { 97void Session::setProfile( const Profile& prof ) {
98 m_prof = prof; 98 m_prof = prof;
99} 99}
100/* 100/*
101void Session::setEmulationWidget( WidgetLayer* lay ) { 101void Session::setEmulationWidget( WidgetLayer* lay ) {
102 delete m_widLay; 102 delete m_widLay;
103 m_widLay = lay; 103 m_widLay = lay;
104} 104}
105*/ 105*/
106void Session::setTransferDialog(QWidget *d) 106void Session::setTransferDialog(QWidget *d)
107{ 107{
108 m_transfer = d; 108 m_transfer = d;
109} 109}
110 110
111QWidget *Session::transferDialog() 111QWidget *Session::transferDialog()
112{ 112{
113 return m_transfer; 113 return m_transfer;
114} 114}
115 115