Diffstat (limited to 'noncore/apps/opie-console/session.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-console/session.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/noncore/apps/opie-console/session.cpp b/noncore/apps/opie-console/session.cpp index 4198fdc..d32b340 100644 --- a/noncore/apps/opie-console/session.cpp +++ b/noncore/apps/opie-console/session.cpp @@ -5,6 +5,10 @@ #include "session.h" -Session::Session( QWidget* widget, IOLayer* lay) - : m_widget( widget ), m_layer( lay ) +Session::Session() { + m_widget = 0l; + m_layer = 0l; +} +Session::Session( const QString& na, QWidget* widget, IOLayer* lay) + : m_name( na ), m_widget( widget ), m_layer( lay ) { } @@ -13,4 +17,7 @@ Session::~Session() { delete m_widget; } +QString Session::name()const { + return m_name; +} QWidget* Session::widget() { return m_widget; @@ -19,8 +26,13 @@ IOLayer* Session::layer() { return m_layer; } +void Session::setName( const QString& na){ + m_name = na; +} void Session::setWidget( QWidget* wid ) { + delete m_widget; m_widget = wid; } void Session::setIOLayer( IOLayer* lay ) { + delete m_layer; m_layer = lay; } |