summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-console/profilemanager.cpp
authorzecke <zecke>2002-10-09 01:22:42 (UTC)
committer zecke <zecke>2002-10-09 01:22:42 (UTC)
commita74bf68065b94efaacb73736c7127ccb74474645 (patch) (unidiff)
treed85c40d367a4922091cc1780d8e1228d38de22c8 /noncore/apps/opie-console/profilemanager.cpp
parent8c353ec8b86ee8f82cc25172fb69dd5fee65e848 (diff)
downloadopie-a74bf68065b94efaacb73736c7127ccb74474645.zip
opie-a74bf68065b94efaacb73736c7127ccb74474645.tar.gz
opie-a74bf68065b94efaacb73736c7127ccb74474645.tar.bz2
PLANS:
move around some stuff to done, open to progress... Default add EmulationLayer stuff (vt102) EmulationLayer tried to use WidgetLayer but this did not work out KeyTrans make sure to load the Q*Dict first before accessing it! ibotty please check if this was correct MainWindow make generation of Sessions possible TabWidget go back to QTabWidget for now... this is much more testedt and I do not have to debug it. Besides that OTabWidget is a kewl widget and we will take it as soon as Sessions are tested enough TabWidget also implement setCurrent for sessions Vt102 make it compile... const QByteArray != const QByteArray&
Diffstat (limited to 'noncore/apps/opie-console/profilemanager.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-console/profilemanager.cpp44
1 files changed, 35 insertions, 9 deletions
diff --git a/noncore/apps/opie-console/profilemanager.cpp b/noncore/apps/opie-console/profilemanager.cpp
index e66ebcc..dcf3cbd 100644
--- a/noncore/apps/opie-console/profilemanager.cpp
+++ b/noncore/apps/opie-console/profilemanager.cpp
@@ -2,9 +2,12 @@
2#include <stdlib.h> 2#include <stdlib.h>
3 3
4#include <qfile.h> 4#include <qfile.h>
5#include <qlayout.h>
6#include <qwidgetstack.h>
5 7
6#include <qpe/config.h> 8#include <qpe/config.h>
7 9
10#include "widget.h"
8#include "metafactory.h" 11#include "metafactory.h"
9#include "profileconfig.h" 12#include "profileconfig.h"
10#include "profilemanager.h" 13#include "profilemanager.h"
@@ -51,17 +54,40 @@ void ProfileManager::clear() {
51Profile::ValueList ProfileManager::all()const { 54Profile::ValueList ProfileManager::all()const {
52 return m_list; 55 return m_list;
53} 56}
54Session* ProfileManager::fromProfile( const Profile& prof) { 57/*
58 * Our goal is to create a Session
59 * We will load the the IOLayer and EmulationLayer
60 * from the factory
61 * we will generate a QWidgetStack
62 * add a dummy widget with layout
63 * add "Widget" to the layout
64 * add the dummy to the stack
65 * raise the dummy
66 * call session->connect(=
67 * this way we only need to reparent
68 * in TabWidget
69 */
70Session* ProfileManager::fromProfile( const Profile& prof, QWidget* parent) {
55 Session* session = new Session(); 71 Session* session = new Session();
56 session->setName( prof.name() ); 72 session->setName( prof.name() );
57 session->setIOLayer(m_fact->newIOLayer(prof.ioLayerName(), 73 /* translate the internal name to the external */
58 prof) ); 74 session->setIOLayer(m_fact->newIOLayer( m_fact->external(prof.ioLayerName()) ,
59 /* 75 prof) );
60 * FIXME 76
61 * load emulation 77 QWidgetStack *stack = new QWidgetStack(parent);
62 * load widget? 78 session->setWidgetStack( stack );
63 * set colors + fonts 79 QWidget* dummy = new QWidget(stack );
64 */ 80 QHBoxLayout* lay = new QHBoxLayout(dummy );
81 stack->addWidget( dummy, 0 );
82 stack->raiseWidget( 0 );
83 Widget* wid = new Widget(dummy );
84 lay->addWidget( wid );
85
86 session->setEmulationWidget( wid );
87 session->setEmulationLayer( m_fact->newEmulationLayer( m_fact->external( prof.terminalName() ),
88 wid ) );
89 session->connect();
90
65 return session; 91 return session;
66} 92}
67void ProfileManager::save( ) { 93void ProfileManager::save( ) {