author | harlekin <harlekin> | 2002-10-05 22:21:04 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2002-10-05 22:21:04 (UTC) |
commit | 48b16b3a3557e70abf90e83b84396258b92b652e (patch) (unidiff) | |
tree | 9dad37a08e79da5705a8297b2bf09a0b2441f3b6 /noncore/apps/opie-console/tabwidget.cpp | |
parent | 99425255c4afcd75ee6b2f903487cb958d3acdee (diff) | |
download | opie-48b16b3a3557e70abf90e83b84396258b92b652e.zip opie-48b16b3a3557e70abf90e83b84396258b92b652e.tar.gz opie-48b16b3a3557e70abf90e83b84396258b92b652e.tar.bz2 |
otabwidget instead of qtabwidget
Diffstat (limited to 'noncore/apps/opie-console/tabwidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-console/tabwidget.cpp | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/noncore/apps/opie-console/tabwidget.cpp b/noncore/apps/opie-console/tabwidget.cpp index 6091aa2..783bf13 100644 --- a/noncore/apps/opie-console/tabwidget.cpp +++ b/noncore/apps/opie-console/tabwidget.cpp | |||
@@ -1,28 +1,34 @@ | |||
1 | 1 | ||
2 | #include "tabwidget.h" | 2 | #include "tabwidget.h" |
3 | 3 | ||
4 | TabWidget::TabWidget( QWidget* parent, const char* name ) | 4 | TabWidget::TabWidget( QWidget* parent, const char* name ) |
5 | : QTabWidget( parent, name ) | 5 | : OTabWidget( parent, name ) { |
6 | { | 6 | connect(this, SIGNAL( currentChanged(QWidget*) ), |
7 | connect(this, SIGNAL(currentChanged(QWidget*) ), | 7 | this, SLOT( slotCurChanged(QWidget*) ) ); |
8 | this, SLOT(slotCurChanged(QWidget*) ) ); | ||
9 | } | 8 | } |
9 | |||
10 | TabWidget::~TabWidget() { | 10 | TabWidget::~TabWidget() { |
11 | } | 11 | } |
12 | |||
12 | void TabWidget::add( Session* ses ) { | 13 | void TabWidget::add( Session* ses ) { |
13 | if ( !ses->widget() ) return; | 14 | if ( !ses->widget() ) return; |
14 | addTab( ses->widget(), ses->name() ); | 15 | addTab( ses->widget(), "console/konsole", ses->name() ); |
15 | m_map.insert( ses->widget(), ses ); | 16 | m_map.insert( ses->widget(), ses ); |
16 | } | 17 | } |
18 | |||
17 | void TabWidget::remove( Session* ses ) { | 19 | void TabWidget::remove( Session* ses ) { |
18 | m_map.remove( ses->widget() ); | 20 | m_map.remove( ses->widget() ); |
19 | removePage( ses->widget() ); | 21 | removePage( ses->widget() ); |
20 | } | 22 | } |
23 | |||
21 | void TabWidget::slotCurChanged( QWidget* wid ) { | 24 | void TabWidget::slotCurChanged( QWidget* wid ) { |
22 | QMap<QWidget*, Session*>::Iterator it; | 25 | QMap<QWidget*, Session*>::Iterator it; |
23 | it = m_map.find(wid ); | 26 | it = m_map.find( wid ); |
24 | if (it == m_map.end() ) | 27 | if ( it == m_map.end() ) { |
25 | return; | 28 | return; |
29 | } | ||
26 | 30 | ||
27 | emit activated( it.data() ); | 31 | emit activated( it.data() ); |
28 | } | 32 | } |
33 | |||
34 | |||