summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/opie-console/tabwidget.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/noncore/apps/opie-console/tabwidget.cpp b/noncore/apps/opie-console/tabwidget.cpp
index 41a91ed..152c26b 100644
--- a/noncore/apps/opie-console/tabwidget.cpp
+++ b/noncore/apps/opie-console/tabwidget.cpp
@@ -1,48 +1,50 @@
+
+
#include "tabwidget.h"
/* OPIE */
#include <opie2/odebug.h>
using namespace Opie::Core;
-using namespace Opie::Ui;
+using Opie::Ui::OTabWidget;
TabWidget::TabWidget( QWidget* parent, const char* name )
: OTabWidget( parent, name ) {
connect(this, SIGNAL( currentChanged(QWidget*) ),
this, SLOT( slotCurChanged(QWidget*) ) );
}
TabWidget::~TabWidget() {
}
void TabWidget::add( Session* ses ) {
owarn << "session ses " + ses->name() << oendl;
if ( !ses->widgetStack() ) return;
//reparent( ses->widgetStack(), QPoint() );
addTab( ses->widgetStack(), "console/konsole", ses->name() );
//addTab( ses->widgetStack(), ses->name() );
m_map.insert( ses->widgetStack(), ses );
}
void TabWidget::remove( Session* ses ) {
m_map.remove( ses->widgetStack() );
removePage( ses->widgetStack() );
}
void TabWidget::slotCurChanged( QWidget* wid ) {
QMap<QWidget*, Session*>::Iterator it;
it = m_map.find( wid );
if ( it == m_map.end() ) {
return;
}
emit activated( it.data() );
}
void TabWidget::setCurrent( Session* ses ) {
if (!ses )
return;
//showPage( ses->widgetStack() );
setCurrentTab( ses->widgetStack() );
}