summaryrefslogtreecommitdiff
path: root/libopie/otabwidget.cpp
Unidiff
Diffstat (limited to 'libopie/otabwidget.cpp') (more/less context) (show whitespace changes)
-rw-r--r--libopie/otabwidget.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/libopie/otabwidget.cpp b/libopie/otabwidget.cpp
index b60d472..d5b963b 100644
--- a/libopie/otabwidget.cpp
+++ b/libopie/otabwidget.cpp
@@ -24,27 +24,27 @@
24  -_. . .   )=.  = Library General Public License along with 24  -_. . .   )=.  = Library General Public License along with
25    --        :-=` this library; see the file COPYING.LIB. 25    --        :-=` this library; see the file COPYING.LIB.
26 If not, write to the Free Software Foundation, 26 If not, write to the Free Software Foundation,
27 Inc., 59 Temple Place - Suite 330, 27 Inc., 59 Temple Place - Suite 330,
28 Boston, MA 02111-1307, USA. 28 Boston, MA 02111-1307, USA.
29 29
30*/ 30*/
31 31
32#include "otabwidget.h" 32#include "otabwidget.h"
33 33
34#include <qpe/config.h> 34#include <qpe/config.h>
35#include <qpe/resource.h> 35#include <qpe/resource.h>
36#include <opie/otabbar.h>
36 37
37#include <qcombobox.h> 38#include <qcombobox.h>
38#include <qtabbar.h>
39#include <qwidgetstack.h> 39#include <qwidgetstack.h>
40 40
41OTabWidget::OTabWidget( QWidget *parent, const char *name, TabStyle s, TabPosition p ) 41OTabWidget::OTabWidget( QWidget *parent, const char *name, TabStyle s, TabPosition p )
42 : QWidget( parent, name ) 42 : QWidget( parent, name )
43{ 43{
44 if ( s == Global ) 44 if ( s == Global )
45 { 45 {
46 Config config( "qpe" ); 46 Config config( "qpe" );
47 config.setGroup( "Appearance" ); 47 config.setGroup( "Appearance" );
48 tabBarStyle = ( TabStyle ) config.readNumEntry( "TabStyle", (int) IconTab ); 48 tabBarStyle = ( TabStyle ) config.readNumEntry( "TabStyle", (int) IconTab );
49 if ( tabBarStyle <= Global || tabBarStyle > IconList) 49 if ( tabBarStyle <= Global || tabBarStyle > IconList)
50 { 50 {
@@ -63,25 +63,25 @@ OTabWidget::OTabWidget( QWidget *parent, const char *name, TabStyle s, TabPositi
63 else 63 else
64 { 64 {
65 tabBarStyle = s; 65 tabBarStyle = s;
66 tabBarPosition = p; 66 tabBarPosition = p;
67 } 67 }
68 68
69 widgetStack = new QWidgetStack( this, "widgetstack" ); 69 widgetStack = new QWidgetStack( this, "widgetstack" );
70 widgetStack->setFrameStyle( QFrame::StyledPanel | QFrame::Raised ); 70 widgetStack->setFrameStyle( QFrame::StyledPanel | QFrame::Raised );
71 widgetStack->setLineWidth( style().defaultFrameWidth() ); 71 widgetStack->setLineWidth( style().defaultFrameWidth() );
72 72
73 tabBarStack = new QWidgetStack( this, "tabbarstack" ); 73 tabBarStack = new QWidgetStack( this, "tabbarstack" );
74 74
75 tabBar = new QTabBar( tabBarStack, "tabbar" ); 75 tabBar = new OTabBar( tabBarStack, "tabbar" );
76 tabBarStack->addWidget( tabBar, 0 ); 76 tabBarStack->addWidget( tabBar, 0 );
77 connect( tabBar, SIGNAL( selected( int ) ), this, SLOT( slotTabBarSelected( int ) ) ); 77 connect( tabBar, SIGNAL( selected( int ) ), this, SLOT( slotTabBarSelected( int ) ) );
78 78
79 tabList = new QComboBox( false, tabBarStack, "tablist" ); 79 tabList = new QComboBox( false, tabBarStack, "tablist" );
80 tabBarStack->addWidget( tabList, 1 ); 80 tabBarStack->addWidget( tabList, 1 );
81 connect( tabList, SIGNAL( activated( int ) ), this, SLOT( slotTabListSelected( int ) ) ); 81 connect( tabList, SIGNAL( activated( int ) ), this, SLOT( slotTabListSelected( int ) ) );
82 82
83 if ( tabBarStyle == TextTab || tabBarStyle == IconTab ) 83 if ( tabBarStyle == TextTab || tabBarStyle == IconTab )
84 { 84 {
85 tabBarStack->raiseWidget( tabBar ); 85 tabBarStack->raiseWidget( tabBar );
86 } 86 }
87 else if ( tabBarStyle == TextList || tabBarStyle == IconList ) 87 else if ( tabBarStyle == TextList || tabBarStyle == IconList )