author | ibotty <ibotty> | 2002-10-11 17:43:18 (UTC) |
---|---|---|
committer | ibotty <ibotty> | 2002-10-11 17:43:18 (UTC) |
commit | 01f26248efccbd764e7c82b74372f33a4bbae303 (patch) (side-by-side diff) | |
tree | a13712dabfa9aaeb7d9ad9353e434b8976234836 | |
parent | 00005567e4841af1f0efe090160881b286574493 (diff) | |
download | opie-01f26248efccbd764e7c82b74372f33a4bbae303.zip opie-01f26248efccbd764e7c82b74372f33a4bbae303.tar.gz opie-01f26248efccbd764e7c82b74372f33a4bbae303.tar.bz2 |
changed references to widget into references to widgetLayer or EmulationWidget.
-rw-r--r-- | noncore/apps/opie-console/metafactory.cpp | 2 | ||||
-rw-r--r-- | noncore/apps/opie-console/metafactory.h | 6 | ||||
-rw-r--r-- | noncore/apps/opie-console/profilemanager.cpp | 5 | ||||
-rw-r--r-- | noncore/apps/opie-console/session.cpp | 6 | ||||
-rw-r--r-- | noncore/apps/opie-console/session.h | 8 | ||||
-rw-r--r-- | noncore/apps/opie-console/widget.cpp | 12 | ||||
-rw-r--r-- | noncore/apps/opie-console/widget_layer.h | 3 |
7 files changed, 23 insertions, 19 deletions
diff --git a/noncore/apps/opie-console/metafactory.cpp b/noncore/apps/opie-console/metafactory.cpp index 02a9f9b..2b672cf 100644 --- a/noncore/apps/opie-console/metafactory.cpp +++ b/noncore/apps/opie-console/metafactory.cpp @@ -114,9 +114,9 @@ ProfileDialogWidget *MetaFactory::newTerminalPlugin( const QString& str, QWidget wid = (*(it.data() ) )(str,parent); } return wid; } -EmulationLayer* MetaFactory::newEmulationLayer( const QString& str, Widget* wid) { +EmulationLayer* MetaFactory::newEmulationLayer( const QString& str, WidgetLayer* wid) { EmulationLayer* lay = 0l; QMap<QString, emulationLayer>::Iterator it; it = m_emu.find( str ); diff --git a/noncore/apps/opie-console/metafactory.h b/noncore/apps/opie-console/metafactory.h index 71c35a2..d05ece4 100644 --- a/noncore/apps/opie-console/metafactory.h +++ b/noncore/apps/opie-console/metafactory.h @@ -16,15 +16,15 @@ #include "profile.h" #include "profiledialogwidget.h" #include "emulation_layer.h" -class Widget; +class WidgetLayer; class MetaFactory { public: typedef ProfileDialogWidget* (*configWidget)(const QString&, QWidget* parent); typedef IOLayer* (*iolayer)(const Profile& ); typedef FileTransferLayer* (*filelayer)(IOLayer*); - typedef EmulationLayer* (*emulationLayer)(Widget* ); + typedef EmulationLayer* (*emulationLayer)(WidgetLayer* ); MetaFactory(); ~MetaFactory(); @@ -76,9 +76,9 @@ public: */ IOLayer* newIOLayer( const QString&,const Profile& ); ProfileDialogWidget *newConnectionPlugin ( const QString&, QWidget* ); ProfileDialogWidget* newTerminalPlugin( const QString&, QWidget* ); - EmulationLayer* newEmulationLayer(const QString&, Widget* ); + EmulationLayer* newEmulationLayer(const QString&, WidgetLayer* ); /* * internal takes the maybe translated * public QString and maps it to the internal diff --git a/noncore/apps/opie-console/profilemanager.cpp b/noncore/apps/opie-console/profilemanager.cpp index dcf3cbd..78751e7 100644 --- a/noncore/apps/opie-console/profilemanager.cpp +++ b/noncore/apps/opie-console/profilemanager.cpp @@ -6,9 +6,10 @@ #include <qwidgetstack.h> #include <qpe/config.h> -#include "widget.h" +#include "widget_layer.h" +#include "emulation_widget.h" #include "metafactory.h" #include "profileconfig.h" #include "profilemanager.h" @@ -79,9 +80,9 @@ Session* ProfileManager::fromProfile( const Profile& prof, QWidget* parent) { QWidget* dummy = new QWidget(stack ); QHBoxLayout* lay = new QHBoxLayout(dummy ); stack->addWidget( dummy, 0 ); stack->raiseWidget( 0 ); - Widget* wid = new Widget(dummy ); + WidgetLayer* wid = new EmulationWidget( prof, dummy ); lay->addWidget( wid ); session->setEmulationWidget( wid ); session->setEmulationLayer( m_fact->newEmulationLayer( m_fact->external( prof.terminalName() ), diff --git a/noncore/apps/opie-console/session.cpp b/noncore/apps/opie-console/session.cpp index 42b0583..ff2c3e2 100644 --- a/noncore/apps/opie-console/session.cpp +++ b/noncore/apps/opie-console/session.cpp @@ -1,9 +1,9 @@ #include "io_layer.h" #include "file_layer.h" -#include "widget.h" +#include "widget_layer.h" #include "emulation_layer.h" #include "session.h" @@ -36,9 +36,9 @@ IOLayer* Session::layer() { } EmulationLayer* Session::emulationLayer() { return m_emLay; } -Widget* Session::emulationWidget() { +WidgetLayer* Session::emulationWidget() { return m_widLay; } void Session::connect() { if ( !m_layer || !m_emLay ) @@ -74,8 +74,8 @@ void Session::setIOLayer( IOLayer* lay ) { void Session::setEmulationLayer( EmulationLayer* lay ) { delete m_emLay; m_emLay = lay; } -void Session::setEmulationWidget( Widget* lay ) { +void Session::setEmulationWidget( WidgetLayer* lay ) { delete m_widLay; m_widLay = lay; } diff --git a/noncore/apps/opie-console/session.h b/noncore/apps/opie-console/session.h index c3673fc..64c2cdb 100644 --- a/noncore/apps/opie-console/session.h +++ b/noncore/apps/opie-console/session.h @@ -4,9 +4,9 @@ #include <qwidgetstack.h> class IOLayer; class EmulationLayer; -class Widget; +class WidgetLayer; /** * This is a Session. A session contains * a QWidget pointer and a IOLayer * Imagine a session like a collection of what @@ -41,9 +41,9 @@ public: */ IOLayer* layer(); EmulationLayer* emulationLayer(); - Widget* emulationWidget(); + WidgetLayer* emulationWidget(); /* * connects the data flow from * the IOLayer to the EmulationLayer @@ -57,18 +57,18 @@ public: void disconnect(); void setWidgetStack( QWidgetStack* widget ); void setEmulationLayer( EmulationLayer* lay ); - void setEmulationWidget( Widget* lay ); + void setEmulationWidget( WidgetLayer* lay ); void setIOLayer( IOLayer* ); void setName( const QString& ); private: QString m_name; QWidgetStack* m_widget; IOLayer* m_layer; EmulationLayer* m_emLay; - Widget* m_widLay; + WidgetLayer* m_widLay; }; #endif diff --git a/noncore/apps/opie-console/widget.cpp b/noncore/apps/opie-console/widget.cpp index b8f2906..d948179 100644 --- a/noncore/apps/opie-console/widget.cpp +++ b/noncore/apps/opie-console/widget.cpp @@ -20,8 +20,9 @@ i changed "currentSession->getEmulation()->sendString()" to "currentSession->layer()->send()" # this is not right! EmulationLayer should send it... + i changed all those to use emulationLayer()->send() instead i had to create a QByteArray before... TODO: alter Widget to use only QByteArray, where applicable. @@ -1229,9 +1230,10 @@ void Widget::dropEvent(QDropEvent* event) if (currentSession) { //currentSession->getEmulation()->sendString(dropText.local8Bit()); QByteArray tmp; // ibot: this should be pretty wrong... - currentSession->layer()->send( tmp.setRawData( dropText.local8Bit())); + // now it sends to the right layer + currentSession-> emulationLayer()->send( tmp.setRawData( dropText.local8Bit())); } // kdDebug() << "Drop:" << dropText.local8Bit() << "\n"; } } @@ -1240,9 +1242,9 @@ void Widget::dropEvent(QDropEvent* event) // kdDebug() << "Drop:" << dropText.local8Bit() << "\n"; if (currentSession) { //currentSession->getEmulation()->sendString(dropText.local8Bit()); QByteArray tmp; - currentSession->layer()->send( tmp.setRawData( dropText.local8Bit())); + currentSession->emulationLayer()->send( tmp.setRawData( dropText.local8Bit())); } // Paste it } } @@ -1256,16 +1258,16 @@ void Widget::drop_menu_activated(int item) switch (item) { case 0: // paste //currentSession->getEmulation()->sendString(dropText.local8Bit()); - currentSession->layer()->send( tmp.setRawData( dropText.local8Bit())); + currentSession->emulationLayer()->send( tmp.setRawData( dropText.local8Bit())); // KWM::activate((Window)this->winId()); break; case 1: // cd ... //currentSession->getEmulation()->sendString("cd "); tmp.setRawData( "cd " ); - currentSession->layer()->send( tmp ); + currentSession->emulationLayer()->send( tmp ); struct stat statbuf; if ( ::stat( QFile::encodeName( dropText ), &statbuf ) == 0 ) { if ( !S_ISDIR(statbuf.st_mode) ) @@ -1281,9 +1283,9 @@ void Widget::drop_menu_activated(int item) QByteArray tmp2; tmp.setRawDate( dropText.local8Bit() + "\n" ); //currentSession->getEmulation()->sendString(dropText.local8Bit()); //currentSession->getEmulation()->sendString("\n"); - currentSession->layer()->send( tmp ); + currentSession->emulationLayer()->send( tmp ); // KWM::activate((Window)this->winId()); break; } #endif diff --git a/noncore/apps/opie-console/widget_layer.h b/noncore/apps/opie-console/widget_layer.h index 5bd2ef9..01a4614 100644 --- a/noncore/apps/opie-console/widget_layer.h +++ b/noncore/apps/opie-console/widget_layer.h @@ -101,10 +101,11 @@ public: /** * reload configuration + * @param const Profile& config, the config to be used (may be the same as in constructor) */ - virtual void reloadConfig() = 0; + virtual void reloadConfig( const Profile& config ) = 0; /** * sets the scrollbar (if implemented by successor of this class) |