author | drw <drw> | 2005-03-01 00:16:32 (UTC) |
---|---|---|
committer | drw <drw> | 2005-03-01 00:16:32 (UTC) |
commit | 73faad9d936d5af7a331411a9572fd362907e023 (patch) (unidiff) | |
tree | aaa2b212906baba1b5c25d772b9a181f52f05284 | |
parent | 2daad674b92c1fd94b0260a15f0baa732e5db20e (diff) | |
download | opie-73faad9d936d5af7a331411a9572fd362907e023.zip opie-73faad9d936d5af7a331411a9572fd362907e023.tar.gz opie-73faad9d936d5af7a331411a9572fd362907e023.tar.bz2 |
Provide initial values for tab bar style & position
-rw-r--r-- | libopie2/opieui/otabwidget.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libopie2/opieui/otabwidget.cpp b/libopie2/opieui/otabwidget.cpp index 01747e1..ae396b9 100644 --- a/libopie2/opieui/otabwidget.cpp +++ b/libopie2/opieui/otabwidget.cpp | |||
@@ -25,48 +25,50 @@ _;:, .> :=|. This program is free software; you can | |||
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 <opie2/otabwidget.h> | 32 | #include <opie2/otabwidget.h> |
33 | 33 | ||
34 | /* OPIE */ | 34 | /* OPIE */ |
35 | #include <qpe/applnk.h> | 35 | #include <qpe/applnk.h> |
36 | #include <qpe/config.h> | 36 | #include <qpe/config.h> |
37 | #include <qpe/resource.h> | 37 | #include <qpe/resource.h> |
38 | #include <opie2/otabbar.h> | 38 | #include <opie2/otabbar.h> |
39 | 39 | ||
40 | /* QT */ | 40 | /* QT */ |
41 | #include <qcombobox.h> | 41 | #include <qcombobox.h> |
42 | #include <qwidgetstack.h> | 42 | #include <qwidgetstack.h> |
43 | 43 | ||
44 | using namespace Opie::Ui; | 44 | using namespace Opie::Ui; |
45 | 45 | ||
46 | OTabWidget::OTabWidget( QWidget *parent, const char *name, TabStyle s, TabPosition p ) | 46 | OTabWidget::OTabWidget( QWidget *parent, const char *name, TabStyle s, TabPosition p ) |
47 | : QWidget( parent, name ) | 47 | : QWidget( parent, name ) |
48 | , m_currTab( 0l ) | 48 | , m_currTab( 0l ) |
49 | , m_tabBarStyle( Global ) | ||
50 | , m_tabBarPosition( Top ) | ||
49 | , m_usingTabs( true ) | 51 | , m_usingTabs( true ) |
50 | , m_tabBar( 0l ) | 52 | , m_tabBar( 0l ) |
51 | , m_tabList( 0l ) | 53 | , m_tabList( 0l ) |
52 | { | 54 | { |
53 | if ( s == Global ) | 55 | if ( s == Global ) |
54 | { | 56 | { |
55 | // Read Opie global settings for style and position | 57 | // Read Opie global settings for style and position |
56 | Config config( "qpe" ); | 58 | Config config( "qpe" ); |
57 | config.setGroup( "Appearance" ); | 59 | config.setGroup( "Appearance" ); |
58 | 60 | ||
59 | // Style | 61 | // Style |
60 | s = ( TabStyle ) config.readNumEntry( "TabStyle", (int) IconTab ); | 62 | s = ( TabStyle ) config.readNumEntry( "TabStyle", (int) IconTab ); |
61 | if ( s <= Global || s > IconList) | 63 | if ( s <= Global || s > IconList) |
62 | s = IconTab; | 64 | s = IconTab; |
63 | 65 | ||
64 | // Position | 66 | // Position |
65 | ( config.readEntry( "TabPosition", "Top" ) == "Bottom" ) ? p = Bottom | 67 | ( config.readEntry( "TabPosition", "Top" ) == "Bottom" ) ? p = Bottom |
66 | : p = Top; | 68 | : p = Top; |
67 | } | 69 | } |
68 | 70 | ||
69 | // Initialize widget stack for tab widgets | 71 | // Initialize widget stack for tab widgets |
70 | m_widgetStack = new QWidgetStack( this ); | 72 | m_widgetStack = new QWidgetStack( this ); |
71 | m_widgetStack->setFrameStyle( QFrame::NoFrame ); | 73 | m_widgetStack->setFrameStyle( QFrame::NoFrame ); |
72 | m_widgetStack->setLineWidth( style().defaultFrameWidth() ); | 74 | m_widgetStack->setLineWidth( style().defaultFrameWidth() ); |