Diffstat (limited to 'noncore/apps/opie-console/profilemanager.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-console/profilemanager.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/noncore/apps/opie-console/profilemanager.cpp b/noncore/apps/opie-console/profilemanager.cpp index 4b88dec..113327c 100644 --- a/noncore/apps/opie-console/profilemanager.cpp +++ b/noncore/apps/opie-console/profilemanager.cpp | |||
@@ -1,21 +1,22 @@ | |||
1 | #include <stdio.h> | 1 | #include <stdio.h> |
2 | #include <stdlib.h> | 2 | #include <stdlib.h> |
3 | 3 | ||
4 | #include <qfile.h> | 4 | #include <qfile.h> |
5 | #include <qlayout.h> | 5 | #include <qlayout.h> |
6 | #include <qwidgetstack.h> | 6 | #include <qwidgetstack.h> |
7 | 7 | ||
8 | #include <qpe/config.h> | 8 | #include <qpe/config.h> |
9 | 9 | ||
10 | #include "emulation_handler.h" | ||
10 | #include "widget_layer.h" | 11 | #include "widget_layer.h" |
11 | #include "emulation_widget.h" | 12 | #include "emulation_widget.h" |
12 | #include "metafactory.h" | 13 | #include "metafactory.h" |
13 | #include "profileconfig.h" | 14 | #include "profileconfig.h" |
14 | #include "profilemanager.h" | 15 | #include "profilemanager.h" |
15 | 16 | ||
16 | ProfileManager::ProfileManager( MetaFactory* fact ) | 17 | ProfileManager::ProfileManager( MetaFactory* fact ) |
17 | : m_fact( fact ) | 18 | : m_fact( fact ) |
18 | { | 19 | { |
19 | 20 | ||
20 | } | 21 | } |
21 | ProfileManager::~ProfileManager() { | 22 | ProfileManager::~ProfileManager() { |
@@ -74,30 +75,32 @@ Session* ProfileManager::fromProfile( const Profile& prof, QWidget* parent) { | |||
74 | Session* session = new Session(); | 75 | Session* session = new Session(); |
75 | session->setName( prof.name() ); | 76 | session->setName( prof.name() ); |
76 | /* translate the internal name to the external */ | 77 | /* translate the internal name to the external */ |
77 | session->setIOLayer(m_fact->newIOLayer( m_fact->external(prof.ioLayerName()) , | 78 | session->setIOLayer(m_fact->newIOLayer( m_fact->external(prof.ioLayerName()) , |
78 | prof) ); | 79 | prof) ); |
79 | 80 | ||
80 | QWidgetStack *stack = new QWidgetStack(parent); | 81 | QWidgetStack *stack = new QWidgetStack(parent); |
81 | session->setWidgetStack( stack ); | 82 | session->setWidgetStack( stack ); |
82 | QWidget* dummy = new QWidget( stack ); | 83 | QWidget* dummy = new QWidget( stack ); |
83 | QHBoxLayout* lay = new QHBoxLayout(dummy ); | 84 | QHBoxLayout* lay = new QHBoxLayout(dummy ); |
84 | stack->addWidget( dummy, 0 ); | 85 | stack->addWidget( dummy, 0 ); |
85 | stack->raiseWidget( 0 ); | 86 | stack->raiseWidget( 0 ); |
86 | WidgetLayer* wid = new EmulationWidget( prof, dummy ); | 87 | EmulationHandler* handler = new EmulationHandler(prof,dummy ); |
87 | lay->addWidget( wid ); | 88 | lay->addWidget( handler->widget() ); |
88 | 89 | // WidgetLayer* wid = new EmulationWidget( prof, dummy ); | |
89 | session->setEmulationWidget( wid ); | 90 | // lay->addWidget( wid ); |
90 | session->setEmulationLayer( m_fact->newEmulationLayer( m_fact->external( prof.terminalName() ), | 91 | |
91 | wid ) ); | 92 | // session->setEmulationWidget( wid ); |
93 | // session->setEmulationLayer( m_fact->newEmulationLayer( m_fact->external( prof.terminalName() ), | ||
94 | // wid ) ); | ||
92 | session->connect(); | 95 | session->connect(); |
93 | 96 | ||
94 | return session; | 97 | return session; |
95 | } | 98 | } |
96 | void ProfileManager::save( ) { | 99 | void ProfileManager::save( ) { |
97 | QFile::remove( (QString(getenv("HOME") )+ "/Settings/opie-console-profiles.conf" ) ); | 100 | QFile::remove( (QString(getenv("HOME") )+ "/Settings/opie-console-profiles.conf" ) ); |
98 | ProfileConfig conf("opie-console-profiles"); | 101 | ProfileConfig conf("opie-console-profiles"); |
99 | Profile::ValueList::Iterator it2; | 102 | Profile::ValueList::Iterator it2; |
100 | for (it2 = m_list.begin(); it2 != m_list.end(); ++it2 ) { | 103 | for (it2 = m_list.begin(); it2 != m_list.end(); ++it2 ) { |
101 | conf.setGroup( (*it2).name() ); | 104 | conf.setGroup( (*it2).name() ); |
102 | 105 | ||
103 | /* now the config stuff */ | 106 | /* now the config stuff */ |