#ifndef OPIE_SESSION_H #define OPIE_SESSION_H #include class IOLayer; class EmulationLayer; class WidgetLayer; /** * This is a Session. A session contains * a QWidget pointer and a IOLayer * Imagine a session like a collection of what * is needed to show your widget in a tab ;) */ class Session { public: /** * c'tor with widget and layer * ownership get's transfered */ Session(); Session( const QString&, QWidgetStack* widget, IOLayer* ); ~Session(); /** * return the name of the session */ QString name()const; /** * return the widgetstack * this is used to be semi modal * for FileTransfer * * semi modal == SessionModal */ QWidgetStack* widgetStack(); /** * return the layer */ IOLayer* layer(); EmulationLayer* emulationLayer(); WidgetLayer* emulationWidget(); /* * connects the data flow from * the IOLayer to the EmulationLayer */ void connect(); /* * disconnect the dataflow * this will be done for ft */ void disconnect(); void setWidgetStack( QWidgetStack* widget ); void setEmulationLayer( EmulationLayer* 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; WidgetLayer* m_widLay; }; #endif