-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 @@ -116,5 +116,5 @@ ProfileDialogWidget *MetaFactory::newTerminalPlugin( const QString& str, QWidget return wid; } -EmulationLayer* MetaFactory::newEmulationLayer( const QString& str, Widget* wid) { +EmulationLayer* MetaFactory::newEmulationLayer( const QString& str, WidgetLayer* wid) { EmulationLayer* lay = 0l; 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 @@ -18,5 +18,5 @@ #include "emulation_layer.h" -class Widget; +class WidgetLayer; class MetaFactory { public: @@ -24,5 +24,5 @@ public: typedef IOLayer* (*iolayer)(const Profile& ); typedef FileTransferLayer* (*filelayer)(IOLayer*); - typedef EmulationLayer* (*emulationLayer)(Widget* ); + typedef EmulationLayer* (*emulationLayer)(WidgetLayer* ); MetaFactory(); @@ -78,5 +78,5 @@ public: ProfileDialogWidget *newConnectionPlugin ( const QString&, QWidget* ); ProfileDialogWidget* newTerminalPlugin( const QString&, QWidget* ); - EmulationLayer* newEmulationLayer(const QString&, Widget* ); + EmulationLayer* newEmulationLayer(const QString&, WidgetLayer* ); /* 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 @@ -8,5 +8,6 @@ #include <qpe/config.h> -#include "widget.h" +#include "widget_layer.h" +#include "emulation_widget.h" #include "metafactory.h" #include "profileconfig.h" @@ -81,5 +82,5 @@ Session* ProfileManager::fromProfile( const Profile& prof, QWidget* parent) { stack->addWidget( dummy, 0 ); stack->raiseWidget( 0 ); - Widget* wid = new Widget(dummy ); + WidgetLayer* wid = new EmulationWidget( prof, dummy ); lay->addWidget( wid ); 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 @@ -3,5 +3,5 @@ #include "io_layer.h" #include "file_layer.h" -#include "widget.h" +#include "widget_layer.h" #include "emulation_layer.h" #include "session.h" @@ -38,5 +38,5 @@ EmulationLayer* Session::emulationLayer() { return m_emLay; } -Widget* Session::emulationWidget() { +WidgetLayer* Session::emulationWidget() { return m_widLay; } @@ -76,5 +76,5 @@ void Session::setEmulationLayer( EmulationLayer* lay ) { 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 @@ -6,5 +6,5 @@ class IOLayer; class EmulationLayer; -class Widget; +class WidgetLayer; /** * This is a Session. A session contains @@ -43,5 +43,5 @@ public: EmulationLayer* emulationLayer(); - Widget* emulationWidget(); + WidgetLayer* emulationWidget(); /* @@ -59,5 +59,5 @@ public: void setWidgetStack( QWidgetStack* widget ); void setEmulationLayer( EmulationLayer* lay ); - void setEmulationWidget( Widget* lay ); + void setEmulationWidget( WidgetLayer* lay ); void setIOLayer( IOLayer* ); void setName( const QString& ); @@ -68,5 +68,5 @@ private: IOLayer* m_layer; EmulationLayer* m_emLay; - Widget* m_widLay; + WidgetLayer* m_widLay; }; 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 @@ -22,4 +22,5 @@ "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... @@ -1231,5 +1232,6 @@ void Widget::dropEvent(QDropEvent* event) 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"; @@ -1242,5 +1244,5 @@ void Widget::dropEvent(QDropEvent* event) //currentSession->getEmulation()->sendString(dropText.local8Bit()); QByteArray tmp; - currentSession->layer()->send( tmp.setRawData( dropText.local8Bit())); + currentSession->emulationLayer()->send( tmp.setRawData( dropText.local8Bit())); } // Paste it @@ -1258,5 +1260,5 @@ void Widget::drop_menu_activated(int 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()); @@ -1265,5 +1267,5 @@ void Widget::drop_menu_activated(int item) //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 ) @@ -1283,5 +1285,5 @@ void Widget::drop_menu_activated(int item) //currentSession->getEmulation()->sendString(dropText.local8Bit()); //currentSession->getEmulation()->sendString("\n"); - currentSession->layer()->send( tmp ); + currentSession->emulationLayer()->send( tmp ); // KWM::activate((Window)this->winId()); break; 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 @@ -103,6 +103,7 @@ 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; |