-rw-r--r-- | noncore/apps/opie-console/emulation_handler.cpp | 6 | ||||
-rw-r--r-- | noncore/apps/opie-console/profilemanager.cpp | 9 | ||||
-rw-r--r-- | noncore/apps/opie-console/session.cpp | 47 | ||||
-rw-r--r-- | noncore/apps/opie-console/session.h | 12 |
4 files changed, 43 insertions, 31 deletions
diff --git a/noncore/apps/opie-console/emulation_handler.cpp b/noncore/apps/opie-console/emulation_handler.cpp index c67c7c7..9e7f56c 100644 --- a/noncore/apps/opie-console/emulation_handler.cpp +++ b/noncore/apps/opie-console/emulation_handler.cpp | |||
@@ -1,48 +1,52 @@ | |||
1 | #include <qwidget.h> | 1 | #include <qwidget.h> |
2 | 2 | ||
3 | #include "TEWidget.h" | 3 | #include "TEWidget.h" |
4 | #include "TEmuVt102.h" | 4 | #include "TEmuVt102.h" |
5 | 5 | ||
6 | #include "emulation_handler.h" | 6 | #include "emulation_handler.h" |
7 | 7 | ||
8 | 8 | ||
9 | EmulationHandler::EmulationHandler( const Profile& prof, QWidget* parent,const char* name ) | 9 | EmulationHandler::EmulationHandler( const Profile& prof, QWidget* parent,const char* name ) |
10 | : QObject(0, name ) | 10 | : QObject(0, name ) |
11 | { | 11 | { |
12 | m_teWid = new TEWidget( parent, "TerminalMain"); | 12 | m_teWid = new TEWidget( parent, "TerminalMain"); |
13 | m_teWid->setMinimumSize(150, 70 ); | 13 | m_teWid->setMinimumSize(150, 70 ); |
14 | parent->resize( m_teWid->calcSize(80, 24 ) ); | 14 | parent->resize( m_teWid->calcSize(80, 24 ) ); |
15 | m_teEmu = new TEmuVt102(m_teWid ); | 15 | m_teEmu = new TEmuVt102(m_teWid ); |
16 | 16 | ||
17 | connect(m_teEmu,SIGNAL(ImageSizeChanged(int, int) ), | 17 | connect(m_teEmu,SIGNAL(ImageSizeChanged(int, int) ), |
18 | this, SIGNAL(changeSize(int, int) ) ); | 18 | this, SIGNAL(changeSize(int, int) ) ); |
19 | connect(m_teEmu, SIGNAL(sndBlock(const char*, int) ), | 19 | connect(m_teEmu, SIGNAL(sndBlock(const char*, int) ), |
20 | this, SLOT(recvEmulation(const char*, int) ) ); | 20 | this, SLOT(recvEmulation(const char*, int) ) ); |
21 | m_teEmu->setConnect( true ); | 21 | m_teEmu->setConnect( true ); |
22 | m_teEmu->setHistory( TRUE ); | ||
22 | load( prof ); | 23 | load( prof ); |
23 | 24 | ||
24 | 25 | ||
25 | 26 | ||
26 | } | 27 | } |
27 | EmulationHandler::~EmulationHandler() { | 28 | EmulationHandler::~EmulationHandler() { |
28 | delete m_teEmu; | 29 | delete m_teEmu; |
29 | delete m_teWid; | 30 | delete m_teWid; |
30 | } | 31 | } |
31 | void EmulationHandler::load( const Profile& ) { | 32 | void EmulationHandler::load( const Profile& ) { |
32 | QFont font = QFont("Fixed", 12, QFont::Normal ); | 33 | QFont font = QFont("Fixed", 12, QFont::Normal ); |
33 | font.setFixedPitch(TRUE); | 34 | font.setFixedPitch(TRUE); |
34 | m_teWid->setVTFont( font ); | 35 | m_teWid->setVTFont( font ); |
35 | m_teWid->setBackgroundColor(Qt::black ); | 36 | m_teWid->setBackgroundColor(Qt::gray ); |
36 | } | 37 | } |
37 | void EmulationHandler::recv( const QByteArray& ar) { | 38 | void EmulationHandler::recv( const QByteArray& ar) { |
39 | qWarning("received in EmulationHandler!"); | ||
38 | m_teEmu->onRcvBlock(ar.data(), ar.count() ); | 40 | m_teEmu->onRcvBlock(ar.data(), ar.count() ); |
39 | } | 41 | } |
40 | void EmulationHandler::recvEmulation(const char* src, int len ) { | 42 | void EmulationHandler::recvEmulation(const char* src, int len ) { |
43 | qWarning("received from te "); | ||
41 | QByteArray ar(len); | 44 | QByteArray ar(len); |
45 | |||
42 | memcpy(ar.data(), src, sizeof(char) * len ); | 46 | memcpy(ar.data(), src, sizeof(char) * len ); |
43 | 47 | ||
44 | emit send(ar); | 48 | emit send(ar); |
45 | } | 49 | } |
46 | QWidget* EmulationHandler::widget() { | 50 | QWidget* EmulationHandler::widget() { |
47 | return m_teWid; | 51 | return m_teWid; |
48 | } | 52 | } |
diff --git a/noncore/apps/opie-console/profilemanager.cpp b/noncore/apps/opie-console/profilemanager.cpp index e8bdb2e..95a46f9 100644 --- a/noncore/apps/opie-console/profilemanager.cpp +++ b/noncore/apps/opie-console/profilemanager.cpp | |||
@@ -27,109 +27,118 @@ void ProfileManager::load() { | |||
27 | qWarning("load"); | 27 | qWarning("load"); |
28 | ProfileConfig conf("opie-console-profiles"); | 28 | ProfileConfig conf("opie-console-profiles"); |
29 | QStringList groups = conf.groups(); | 29 | QStringList groups = conf.groups(); |
30 | QStringList::Iterator it; | 30 | QStringList::Iterator it; |
31 | 31 | ||
32 | /* | 32 | /* |
33 | * for each profile | 33 | * for each profile |
34 | */ | 34 | */ |
35 | for ( it = groups.begin(); it != groups.end(); ++it ) { | 35 | for ( it = groups.begin(); it != groups.end(); ++it ) { |
36 | qWarning("group " + (*it) ); | 36 | qWarning("group " + (*it) ); |
37 | conf.setGroup( (*it) ); | 37 | conf.setGroup( (*it) ); |
38 | Profile prof; | 38 | Profile prof; |
39 | prof.setName( conf.readEntry("name") ); | 39 | prof.setName( conf.readEntry("name") ); |
40 | prof.setIOLayer( conf.readEntry("iolayer").utf8() ); | 40 | prof.setIOLayer( conf.readEntry("iolayer").utf8() ); |
41 | prof.setTerminalName( conf.readEntry("term").utf8() ); | 41 | prof.setTerminalName( conf.readEntry("term").utf8() ); |
42 | qWarning(" %s %s", conf.readEntry("iolayer").latin1(), prof.ioLayerName().data() ); | 42 | qWarning(" %s %s", conf.readEntry("iolayer").latin1(), prof.ioLayerName().data() ); |
43 | prof.setBackground( conf.readNumEntry("back") ); | 43 | prof.setBackground( conf.readNumEntry("back") ); |
44 | prof.setForeground( conf.readNumEntry("fore") ); | 44 | prof.setForeground( conf.readNumEntry("fore") ); |
45 | prof.setTerminal( conf.readNumEntry("terminal") ); | 45 | prof.setTerminal( conf.readNumEntry("terminal") ); |
46 | 46 | ||
47 | // THIS is evil because all data get's reset | 47 | // THIS is evil because all data get's reset |
48 | prof.setConf( conf.items( (*it) ) ); | 48 | prof.setConf( conf.items( (*it) ) ); |
49 | 49 | ||
50 | /* now add it */ | 50 | /* now add it */ |
51 | m_list.append( prof ); | 51 | m_list.append( prof ); |
52 | } | 52 | } |
53 | 53 | ||
54 | } | 54 | } |
55 | void ProfileManager::clear() { | 55 | void ProfileManager::clear() { |
56 | m_list.clear(); | 56 | m_list.clear(); |
57 | } | 57 | } |
58 | Profile::ValueList ProfileManager::all()const { | 58 | Profile::ValueList ProfileManager::all()const { |
59 | return m_list; | 59 | return m_list; |
60 | } | 60 | } |
61 | /* | 61 | /* |
62 | * Our goal is to create a Session | 62 | * Our goal is to create a Session |
63 | * We will load the the IOLayer and EmulationLayer | 63 | * We will load the the IOLayer and EmulationLayer |
64 | * from the factory | 64 | * from the factory |
65 | * we will generate a QWidgetStack | 65 | * we will generate a QWidgetStack |
66 | * add a dummy widget with layout | 66 | * add a dummy widget with layout |
67 | * add "Widget" to the layout | 67 | * add "Widget" to the layout |
68 | * add the dummy to the stack | 68 | * add the dummy to the stack |
69 | * raise the dummy | 69 | * raise the dummy |
70 | * call session->connect(= | 70 | * call session->connect(= |
71 | * this way we only need to reparent | 71 | * this way we only need to reparent |
72 | * in TabWidget | 72 | * in TabWidget |
73 | */ | 73 | */ |
74 | Session* ProfileManager::fromProfile( const Profile& prof, QWidget* parent) { | 74 | Session* ProfileManager::fromProfile( const Profile& prof, QWidget* parent) { |
75 | /* TEST PROFILE!!! | ||
76 | Profile prof; | ||
77 | QString str = "/dev/ttyS0"; | ||
78 | prof.writeEntry("Device",str ); | ||
79 | prof.writeEntry("Baud", 115200 ); | ||
80 | prof.setIOLayer("serial"); | ||
81 | prof.setName( "test"); | ||
82 | */ | ||
75 | Session* session = new Session(); | 83 | Session* session = new Session(); |
76 | session->setName( prof.name() ); | 84 | session->setName( prof.name() ); |
77 | /* translate the internal name to the external */ | 85 | /* translate the internal name to the external */ |
78 | session->setIOLayer(m_fact->newIOLayer( m_fact->external(prof.ioLayerName()) , | 86 | session->setIOLayer(m_fact->newIOLayer( m_fact->external(prof.ioLayerName()) , |
79 | prof) ); | 87 | prof) ); |
80 | 88 | ||
81 | QWidgetStack *stack = new QWidgetStack( parent ); | 89 | QWidgetStack *stack = new QWidgetStack( parent ); |
82 | session->setWidgetStack( stack ); | 90 | session->setWidgetStack( stack ); |
83 | QWidget* dummy = new QWidget( stack ); | 91 | QWidget* dummy = new QWidget( stack ); |
84 | QHBoxLayout* lay = new QHBoxLayout( dummy ); | 92 | QHBoxLayout* lay = new QHBoxLayout( dummy ); |
85 | stack->addWidget( dummy, 0 ); | 93 | stack->addWidget( dummy, 0 ); |
86 | stack->raiseWidget( 0 ); | 94 | stack->raiseWidget( 0 ); |
87 | EmulationHandler* handler = new EmulationHandler(prof,dummy ); | 95 | EmulationHandler* handler = new EmulationHandler(prof,dummy ); |
96 | session->setEmulationHandler( handler ); | ||
88 | lay->addWidget( handler->widget() ); | 97 | lay->addWidget( handler->widget() ); |
89 | // WidgetLayer* wid = new EmulationWidget( prof, dummy ); | 98 | // WidgetLayer* wid = new EmulationWidget( prof, dummy ); |
90 | // lay->addWidget( wid ); | 99 | // lay->addWidget( wid ); |
91 | 100 | ||
92 | // session->setEmulationWidget( wid ); | 101 | // session->setEmulationWidget( wid ); |
93 | // session->setEmulationLayer( m_fact->newEmulationLayer( m_fact->external( prof.terminalName() ), | 102 | // session->setEmulationLayer( m_fact->newEmulationLayer( m_fact->external( prof.terminalName() ), |
94 | // wid ) ); | 103 | // wid ) ); |
95 | session->connect(); | 104 | session->connect(); |
96 | 105 | ||
97 | return session; | 106 | return session; |
98 | } | 107 | } |
99 | void ProfileManager::save( ) { | 108 | void ProfileManager::save( ) { |
100 | QFile::remove( (QString(getenv("HOME") )+ "/Settings/opie-console-profiles.conf" ) ); | 109 | QFile::remove( (QString(getenv("HOME") )+ "/Settings/opie-console-profiles.conf" ) ); |
101 | ProfileConfig conf("opie-console-profiles"); | 110 | ProfileConfig conf("opie-console-profiles"); |
102 | Profile::ValueList::Iterator it2; | 111 | Profile::ValueList::Iterator it2; |
103 | for (it2 = m_list.begin(); it2 != m_list.end(); ++it2 ) { | 112 | for (it2 = m_list.begin(); it2 != m_list.end(); ++it2 ) { |
104 | conf.setGroup( (*it2).name() ); | 113 | conf.setGroup( (*it2).name() ); |
105 | 114 | ||
106 | /* now the config stuff */ | 115 | /* now the config stuff */ |
107 | QMap<QString, QString> map = (*it2).conf(); | 116 | QMap<QString, QString> map = (*it2).conf(); |
108 | QMap<QString, QString>::Iterator confIt; | 117 | QMap<QString, QString>::Iterator confIt; |
109 | for ( confIt = map.begin(); confIt != map.end(); ++confIt ) { | 118 | for ( confIt = map.begin(); confIt != map.end(); ++confIt ) { |
110 | conf.writeEntry( confIt.key(), confIt.data() ); | 119 | conf.writeEntry( confIt.key(), confIt.data() ); |
111 | } | 120 | } |
112 | 121 | ||
113 | conf.writeEntry( "name", (*it2).name() ); | 122 | conf.writeEntry( "name", (*it2).name() ); |
114 | QString str = QString::fromUtf8( (*it2).ioLayerName() ); | 123 | QString str = QString::fromUtf8( (*it2).ioLayerName() ); |
115 | qWarning("IOLayerName " + str ); | 124 | qWarning("IOLayerName " + str ); |
116 | 125 | ||
117 | conf.writeEntry( "iolayer", str ); | 126 | conf.writeEntry( "iolayer", str ); |
118 | conf.writeEntry( "term", QString::fromUtf8( (*it2).terminalName() ) ); | 127 | conf.writeEntry( "term", QString::fromUtf8( (*it2).terminalName() ) ); |
119 | conf.writeEntry( "back", (*it2).background() ); | 128 | conf.writeEntry( "back", (*it2).background() ); |
120 | conf.writeEntry( "fore", (*it2).foreground() ); | 129 | conf.writeEntry( "fore", (*it2).foreground() ); |
121 | conf.writeEntry( "terminal", (*it2).terminal() ); | 130 | conf.writeEntry( "terminal", (*it2).terminal() ); |
122 | } | 131 | } |
123 | } | 132 | } |
124 | void ProfileManager::setProfiles( const Profile::ValueList& list ) { | 133 | void ProfileManager::setProfiles( const Profile::ValueList& list ) { |
125 | m_list = list; | 134 | m_list = list; |
126 | }; | 135 | }; |
127 | Profile ProfileManager::profile( const QString& name )const { | 136 | Profile ProfileManager::profile( const QString& name )const { |
128 | Profile prof; | 137 | Profile prof; |
129 | Profile::ValueList::ConstIterator it; | 138 | Profile::ValueList::ConstIterator it; |
130 | for ( it = m_list.begin(); it != m_list.end(); ++it ) { | 139 | for ( it = m_list.begin(); it != m_list.end(); ++it ) { |
131 | if ( name == (*it).name() ) { | 140 | if ( name == (*it).name() ) { |
132 | prof = (*it); | 141 | prof = (*it); |
133 | break; | 142 | break; |
134 | } | 143 | } |
135 | } | 144 | } |
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 | |||
@@ -1,87 +1,90 @@ | |||
1 | 1 | ||
2 | 2 | ||
3 | #include "io_layer.h" | 3 | #include "io_layer.h" |
4 | #include "file_layer.h" | 4 | #include "file_layer.h" |
5 | #include "widget_layer.h" | 5 | #include "emulation_handler.h" |
6 | #include "emulation_layer.h" | ||
7 | #include "session.h" | 6 | #include "session.h" |
8 | 7 | ||
9 | 8 | ||
10 | Session::Session() { | 9 | Session::Session() { |
11 | m_widget = 0l; | 10 | m_widget = 0l; |
12 | m_layer = 0l; | 11 | m_layer = 0l; |
13 | // m_widLay = 0l; | 12 | m_emu = 0l; |
14 | // m_emLay = 0l; | ||
15 | } | 13 | } |
16 | Session::Session( const QString& na, QWidgetStack* widget, IOLayer* lay) | 14 | Session::Session( const QString& na, QWidgetStack* widget, IOLayer* lay) |
17 | : m_name( na ), m_widget( widget ), m_layer( lay ) | 15 | : m_name( na ), m_widget( widget ), m_layer( lay ) |
18 | { | 16 | { |
19 | // m_widLay = 0l; | 17 | // m_widLay = 0l; |
20 | // m_emLay = 0l; | 18 | // m_emLay = 0l; |
19 | m_emu = 0l; | ||
21 | } | 20 | } |
22 | Session::~Session() { | 21 | Session::~Session() { |
23 | delete m_layer; | 22 | delete m_layer; |
24 | // delete m_emLay; | 23 | delete m_emu; |
25 | delete m_widget; | 24 | delete m_widget; |
26 | /* the widget layer should be deleted by the m_widget */ | 25 | /* the widget layer should be deleted by the m_widget */ |
27 | } | 26 | } |
28 | QString Session::name()const { | 27 | QString Session::name()const { |
29 | return m_name; | 28 | return m_name; |
30 | } | 29 | } |
31 | QWidgetStack* Session::widgetStack() { | 30 | QWidgetStack* Session::widgetStack() { |
32 | return m_widget; | 31 | return m_widget; |
33 | } | 32 | } |
34 | IOLayer* Session::layer() { | 33 | IOLayer* Session::layer() { |
35 | return m_layer; | 34 | return m_layer; |
36 | } | 35 | } |
37 | /*EmulationLayer* Session::emulationLayer() { | 36 | EmulationHandler* Session::emulationHandler() { |
38 | return m_emLay; | 37 | return m_emu; |
39 | } | 38 | } |
39 | /* | ||
40 | WidgetLayer* Session::emulationWidget() { | 40 | WidgetLayer* Session::emulationWidget() { |
41 | return m_widLay; | 41 | return m_widLay; |
42 | } | 42 | } |
43 | */ | 43 | */ |
44 | void Session::connect() { | 44 | void Session::connect() { |
45 | /* if ( !m_layer || !m_emLay ) | 45 | if ( !m_layer || !m_emu ) |
46 | return; | 46 | return; |
47 | 47 | ||
48 | qWarning("connection in session"); | ||
48 | QObject::connect(m_layer, SIGNAL(received(const QByteArray&) ), | 49 | QObject::connect(m_layer, SIGNAL(received(const QByteArray&) ), |
49 | m_emLay, SLOT(onRcvBlock(const QByteArray&) ) ); | 50 | m_emu, SLOT(recv(const QByteArray&) ) ); |
50 | QObject::connect(m_emLay, SIGNAL(sndBlock(const QByteArray&) ), | 51 | QObject::connect(m_emu, SIGNAL(send(const QByteArray&) ), |
51 | m_layer, SLOT(send(const QByteArray&) ) ); | 52 | m_layer, SLOT(send(const QByteArray&) ) ); |
52 | */ | 53 | |
53 | } | 54 | } |
54 | void Session::disconnect() { | 55 | void Session::disconnect() { |
55 | /* | 56 | |
56 | if ( !m_layer || !m_emLay ) | 57 | if ( !m_layer || !m_emu ) |
57 | return; | 58 | return; |
58 | 59 | ||
59 | QObject::disconnect(m_layer, SIGNAL(received(const QByteArray&) ), | 60 | QObject::disconnect(m_layer, SIGNAL(received(const QByteArray&) ), |
60 | m_emLay, SLOT(onRcvBlock(const QByteArray&) ) ); | 61 | m_emu, SLOT(recv(const QByteArray&) ) ); |
61 | QObject::disconnect(m_emLay, SIGNAL(sndBlock(const QByteArray&) ), | 62 | QObject::disconnect(m_emu, SIGNAL(send(const QByteArray&) ), |
62 | m_layer, SLOT(send(const QByteArray&) ) ); | 63 | m_layer, SLOT(send(const QByteArray&) ) ); |
63 | */ | ||
64 | } | 64 | } |
65 | void Session::setName( const QString& na){ | 65 | void Session::setName( const QString& na){ |
66 | m_name = na; | 66 | m_name = na; |
67 | } | 67 | } |
68 | void Session::setWidgetStack( QWidgetStack* wid ) { | 68 | void Session::setWidgetStack( QWidgetStack* wid ) { |
69 | delete m_emu; | ||
70 | m_emu = 0l; | ||
69 | delete m_widget; | 71 | delete m_widget; |
70 | /* the EmulationLayer was destroyed... */ | 72 | /* the EmulationLayer was destroyed... */ |
71 | //delete m_emLay; | 73 | |
72 | m_widget = wid; | 74 | m_widget = wid; |
73 | } | 75 | } |
74 | void Session::setIOLayer( IOLayer* lay ) { | 76 | void Session::setIOLayer( IOLayer* lay ) { |
75 | delete m_layer; | 77 | delete m_layer; |
76 | m_layer = lay; | 78 | m_layer = lay; |
77 | } | 79 | } |
78 | /* | 80 | |
79 | void Session::setEmulationLayer( EmulationLayer* lay ) { | 81 | void Session::setEmulationHandler( EmulationHandler* lay ) { |
80 | delete m_emLay; | 82 | delete m_emu; |
81 | m_emLay = lay; | 83 | m_emu = lay; |
82 | } | 84 | } |
85 | /* | ||
83 | void Session::setEmulationWidget( WidgetLayer* lay ) { | 86 | void Session::setEmulationWidget( WidgetLayer* lay ) { |
84 | delete m_widLay; | 87 | delete m_widLay; |
85 | m_widLay = lay; | 88 | m_widLay = lay; |
86 | } | 89 | } |
87 | */ \ No newline at end of file | 90 | */ |
diff --git a/noncore/apps/opie-console/session.h b/noncore/apps/opie-console/session.h index 04bf257..c3f3661 100644 --- a/noncore/apps/opie-console/session.h +++ b/noncore/apps/opie-console/session.h | |||
@@ -1,74 +1,70 @@ | |||
1 | #ifndef OPIE_SESSION_H | 1 | #ifndef OPIE_SESSION_H |
2 | #define OPIE_SESSION_H | 2 | #define OPIE_SESSION_H |
3 | 3 | ||
4 | #include <qwidgetstack.h> | 4 | #include <qwidgetstack.h> |
5 | 5 | ||
6 | class IOLayer; | 6 | class IOLayer; |
7 | class EmulationLayer; | 7 | class EmulationHandler; |
8 | class WidgetLayer; | ||
9 | /** | 8 | /** |
10 | * This is a Session. A session contains | 9 | * This is a Session. A session contains |
11 | * a QWidget pointer and a IOLayer | 10 | * a QWidget pointer and a IOLayer |
12 | * Imagine a session like a collection of what | 11 | * Imagine a session like a collection of what |
13 | * is needed to show your widget in a tab ;) | 12 | * is needed to show your widget in a tab ;) |
14 | */ | 13 | */ |
15 | class Session { | 14 | class Session { |
16 | public: | 15 | public: |
17 | /** | 16 | /** |
18 | * c'tor with widget and layer | 17 | * c'tor with widget and layer |
19 | * ownership get's transfered | 18 | * ownership get's transfered |
20 | */ | 19 | */ |
21 | Session(); | 20 | Session(); |
22 | Session( const QString&, QWidgetStack* widget, IOLayer* ); | 21 | Session( const QString&, QWidgetStack* widget, IOLayer* ); |
23 | ~Session(); | 22 | ~Session(); |
24 | 23 | ||
25 | /** | 24 | /** |
26 | * return the name of the session | 25 | * return the name of the session |
27 | */ | 26 | */ |
28 | QString name()const; | 27 | QString name()const; |
29 | 28 | ||
30 | /** | 29 | /** |
31 | * return the widgetstack | 30 | * return the widgetstack |
32 | * this is used to be semi modal | 31 | * this is used to be semi modal |
33 | * for FileTransfer | 32 | * for FileTransfer |
34 | * | 33 | * |
35 | * semi modal == SessionModal | 34 | * semi modal == SessionModal |
36 | */ | 35 | */ |
37 | QWidgetStack* widgetStack(); | 36 | QWidgetStack* widgetStack(); |
38 | 37 | ||
39 | /** | 38 | /** |
40 | * return the layer | 39 | * return the layer |
41 | */ | 40 | */ |
42 | IOLayer* layer(); | 41 | IOLayer* layer(); |
43 | 42 | ||
44 | // EmulationLayer* emulationLayer(); | 43 | EmulationHandler* emulationHandler(); |
45 | WidgetLayer* emulationWidget(); | ||
46 | 44 | ||
47 | /* | 45 | /* |
48 | * connects the data flow from | 46 | * connects the data flow from |
49 | * the IOLayer to the EmulationLayer | 47 | * the IOLayer to the EmulationLayer |
50 | */ | 48 | */ |
51 | void connect(); | 49 | void connect(); |
52 | 50 | ||
53 | /* | 51 | /* |
54 | * disconnect the dataflow | 52 | * disconnect the dataflow |
55 | * this will be done for ft | 53 | * this will be done for ft |
56 | */ | 54 | */ |
57 | void disconnect(); | 55 | void disconnect(); |
58 | 56 | ||
59 | void setWidgetStack( QWidgetStack* widget ); | 57 | void setWidgetStack( QWidgetStack* widget ); |
60 | // void setEmulationLayer( EmulationLayer* lay ); | 58 | void setEmulationHandler( EmulationHandler* lay ); |
61 | // void setEmulationWidget( WidgetLayer* lay ); | ||
62 | void setIOLayer( IOLayer* ); | 59 | void setIOLayer( IOLayer* ); |
63 | void setName( const QString& ); | 60 | void setName( const QString& ); |
64 | 61 | ||
65 | private: | 62 | private: |
66 | QString m_name; | 63 | QString m_name; |
67 | QWidgetStack* m_widget; | 64 | QWidgetStack* m_widget; |
68 | IOLayer* m_layer; | 65 | IOLayer* m_layer; |
69 | // EmulationLayer* m_emLay; | 66 | EmulationHandler* m_emu; |
70 | // WidgetLayer* m_widLay; | ||
71 | 67 | ||
72 | }; | 68 | }; |
73 | 69 | ||
74 | #endif | 70 | #endif |