summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/libopie.pro6
-rw-r--r--libopie/otabwidget.cpp4
-rw-r--r--libopie/otabwidget.h3
-rw-r--r--libopie/otimepickerbase.h2
4 files changed, 8 insertions, 7 deletions
diff --git a/libopie/libopie.pro b/libopie/libopie.pro
index d5b4836..891c03e 100644
--- a/libopie/libopie.pro
+++ b/libopie/libopie.pro
@@ -1,25 +1,25 @@
1TEMPLATE = lib 1TEMPLATE = lib
2CONFIG += qte warn_on release 2CONFIG += qte warn_on release
3HEADERS = ofontmenu.h ofileselector.h ofiledialog.h ofileview.h tododb.h todoevent.h todoresource.h todovcalresource.h xmltree.h colordialog.h colorpopupmenu.h oclickablelabel.h oprocctrl.h oprocess.h odevice.h otimepicker.h otabwidget.h otabinfo.h 3HEADERS = ofontmenu.h ofileselector.h ofiledialog.h ofileview.h tododb.h todoevent.h todoresource.h todovcalresource.h xmltree.h colordialog.h colorpopupmenu.h oclickablelabel.h oprocctrl.h oprocess.h odevice.h otimepicker.h otabwidget.h otabbar.h otabinfo.h
4SOURCES = ofontmenu.cc ofileselector.cc ofiledialog.cc xmltree.cc tododb.cpp todoevent.cpp todovcalresource.cpp colordialog.cpp colorpopupmenu.cpp oclickablelabel.cpp oprocctrl.cpp oprocess.cpp odevice.cpp otimepicker.cpp otabwidget.cpp 4SOURCES = ofontmenu.cc ofileselector.cc ofiledialog.cc xmltree.cc tododb.cpp todoevent.cpp todovcalresource.cpp colordialog.cpp colorpopupmenu.cpp oclickablelabel.cpp oprocctrl.cpp oprocess.cpp odevice.cpp otimepicker.cpp otabwidget.cpp otabbar.cpp
5TARGET = opie 5TARGET = opie
6INCLUDEPATH += $(OPIEDIR)/include 6INCLUDEPATH += $(OPIEDIR)/include
7DESTDIR = $(QTDIR)/lib$(PROJMAK) 7DESTDIR = $(QTDIR)/lib$(PROJMAK)
8#VERSION = 1.0.0 8#VERSION = 1.0.0
9 9
10INTERFACES = otimepickerbase.ui 10INTERFACES = otimepickerbase.ui
11 11
12TRANSLATIONS = ../i18n/de/libopie.ts \ 12TRANSLATIONS = ../i18n/de/libopie.ts \
13 ../i18n/en/libopie.ts \ 13 ../i18n/en/libopie.ts \
14 ../i18n/es/libopie.ts \ 14 ../i18n/es/libopie.ts \
15 ../i18n/fr/libopie.ts \ 15 ../i18n/fr/libopie.ts \
16 ../i18n/hu/libopie.ts \ 16 ../i18n/hu/libopie.ts \
17 ../i18n/ja/libopie.ts \ 17 ../i18n/ja/libopie.ts \
18 ../i18n/ko/libopie.ts \ 18 ../i18n/ko/libopie.ts \
19 ../i18n/no/libopie.ts \ 19 ../i18n/no/libopie.ts \
20 ../i18n/pl/libopie.ts \ 20 ../i18n/pl/libopie.ts \
21 ../i18n/pt/libopie.ts \ 21 ../i18n/pt/libopie.ts \
22 ../i18n/pt_BR/libopie.ts \ 22 ../i18n/pt_BR/libopie.ts \
23 ../i18n/sl/libopie.ts \ 23 ../i18n/sl/libopie.ts \
24 ../i18n/zh_CN/libopie.ts \ 24 ../i18n/zh_CN/libopie.ts \
25 ../i18n/zh_TW/libopie.ts 25 ../i18n/zh_TW/libopie.ts
diff --git a/libopie/otabwidget.cpp b/libopie/otabwidget.cpp
index b60d472..d5b963b 100644
--- a/libopie/otabwidget.cpp
+++ b/libopie/otabwidget.cpp
@@ -12,88 +12,88 @@
12 - .   .-<_>     .<> Foundation; either version 2 of the License, 12 - .   .-<_>     .<> Foundation; either version 2 of the License,
13     ._= =}       : or (at your option) any later version. 13     ._= =}       : or (at your option) any later version.
14    .%`+i>       _;_. 14    .%`+i>       _;_.
15    .i_,=:_.      -<s. This program is distributed in the hope that 15    .i_,=:_.      -<s. This program is distributed in the hope that
16     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY; 16     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
17    : ..    .:,     . . . without even the implied warranty of 17    : ..    .:,     . . . without even the implied warranty of
18    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A 18    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
19  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU 19  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
20..}^=.=       =       ; Library General Public License for more 20..}^=.=       =       ; Library General Public License for more
21++=   -.     .`     .: details. 21++=   -.     .`     .: details.
22 :     =  ...= . :.=- 22 :     =  ...= . :.=-
23 -.   .:....=;==+<; You should have received a copy of the GNU 23 -.   .:....=;==+<; You should have received a copy of the GNU
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 {
51 tabBarStyle = IconTab; 51 tabBarStyle = IconTab;
52 } 52 }
53 QString pos = config.readEntry( "TabPosition", "Top"); 53 QString pos = config.readEntry( "TabPosition", "Top");
54 if ( pos == "Bottom" ) 54 if ( pos == "Bottom" )
55 { 55 {
56 tabBarPosition = Bottom; 56 tabBarPosition = Bottom;
57 } 57 }
58 else 58 else
59 { 59 {
60 tabBarPosition = Top; 60 tabBarPosition = Top;
61 } 61 }
62 } 62 }
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 )
88 { 88 {
89 tabBarStack->raiseWidget( tabList ); 89 tabBarStack->raiseWidget( tabList );
90 } 90 }
91 91
92 if ( tabBarPosition == Bottom ) 92 if ( tabBarPosition == Bottom )
93 { 93 {
94 tabBar->setShape( QTabBar::RoundedBelow ); 94 tabBar->setShape( QTabBar::RoundedBelow );
95 } 95 }
96 96
97 currentTab= 0x0; 97 currentTab= 0x0;
98} 98}
99 99
diff --git a/libopie/otabwidget.h b/libopie/otabwidget.h
index 6a0fbe8..bacda07 100644
--- a/libopie/otabwidget.h
+++ b/libopie/otabwidget.h
@@ -16,48 +16,49 @@
16     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY; 16     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
17    : ..    .:,     . . . without even the implied warranty of 17    : ..    .:,     . . . without even the implied warranty of
18    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A 18    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
19  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU 19  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
20..}^=.=       =       ; Library General Public License for more 20..}^=.=       =       ; Library General Public License for more
21++=   -.     .`     .: details. 21++=   -.     .`     .: details.
22 :     =  ...= . :.=- 22 :     =  ...= . :.=-
23 -.   .:....=;==+<; You should have received a copy of the GNU 23 -.   .:....=;==+<; You should have received a copy of the GNU
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#ifndef OTABWIDGET_H 32#ifndef OTABWIDGET_H
33#define OTABWIDGET_H 33#define OTABWIDGET_H
34 34
35#include "otabinfo.h" 35#include "otabinfo.h"
36 36
37#include <qwidget.h> 37#include <qwidget.h>
38#include <qlist.h> 38#include <qlist.h>
39 39
40class OTabBar;
40class QComboBox; 41class QComboBox;
41class QPixmap; 42class QPixmap;
42class QTabBar; 43class QTabBar;
43class QWidgetStack; 44class QWidgetStack;
44 45
45/** 46/**
46 * @class OTabWidget 47 * @class OTabWidget
47 * @brief The OTabWidget class provides a stack of widgets. 48 * @brief The OTabWidget class provides a stack of widgets.
48 * 49 *
49 * OTabWidget is a derivation of TrollTech's QTabWidget which provides 50 * OTabWidget is a derivation of TrollTech's QTabWidget which provides
50 * a stack of widgets. Widgets can be selected using either a tab bar or 51 * a stack of widgets. Widgets can be selected using either a tab bar or
51 * drop down list box. 52 * drop down list box.
52 * 53 *
53 * The normal way to use OTabWidget is to do the following in the 54 * The normal way to use OTabWidget is to do the following in the
54 * constructor: 55 * constructor:
55 * - Create a OTabWidget. 56 * - Create a OTabWidget.
56 * - Create a QWidget for each of the pages in the control, insert 57 * - Create a QWidget for each of the pages in the control, insert
57 * children into it, set up geometry management for it, and use addTab() 58 * children into it, set up geometry management for it, and use addTab()
58 * to add the widget. 59 * to add the widget.
59 */ 60 */
60class OTabWidget : public QWidget 61class OTabWidget : public QWidget
61{ 62{
62 Q_OBJECT 63 Q_OBJECT
63public: 64public:
@@ -162,49 +163,49 @@ public:
162 163
163/** 164/**
164 * @fn sizeHint() 165 * @fn sizeHint()
165 * @brief Reimplemented for internal purposes. 166 * @brief Reimplemented for internal purposes.
166 */ 167 */
167 QSize sizeHint() const; 168 QSize sizeHint() const;
168 169
169 170
170protected: 171protected:
171 172
172/** 173/**
173 * @fn resizeEvent( QResizeEvent * ) 174 * @fn resizeEvent( QResizeEvent * )
174 * @brief Reimplemented for internal purposes. 175 * @brief Reimplemented for internal purposes.
175 */ 176 */
176 void resizeEvent( QResizeEvent * ); 177 void resizeEvent( QResizeEvent * );
177 178
178private: 179private:
179 OTabInfoList tabs; 180 OTabInfoList tabs;
180 OTabInfo *currentTab; 181 OTabInfo *currentTab;
181 182
182 TabStyle tabBarStyle; 183 TabStyle tabBarStyle;
183 TabPosition tabBarPosition; 184 TabPosition tabBarPosition;
184 185
185 QWidgetStack *tabBarStack; 186 QWidgetStack *tabBarStack;
186 QTabBar *tabBar; 187 OTabBar *tabBar;
187 QComboBox *tabList; 188 QComboBox *tabList;
188 189
189 QWidgetStack *widgetStack; 190 QWidgetStack *widgetStack;
190 191
191/** 192/**
192 * @fn loadSmooth( const QString &name ) 193 * @fn loadSmooth( const QString &name )
193 * @brief Loads icon for widget. 194 * @brief Loads icon for widget.
194 * 195 *
195 * @param name Name of icon image file. 196 * @param name Name of icon image file.
196 */ 197 */
197 QPixmap loadSmooth( const QString & ); 198 QPixmap loadSmooth( const QString & );
198 199
199/** 200/**
200 * @fn selectTab( OTabInfo *tab ) 201 * @fn selectTab( OTabInfo *tab )
201 * @brief Internal function to select desired widget. 202 * @brief Internal function to select desired widget.
202 * 203 *
203 * @param tab Pointer to data for widget. 204 * @param tab Pointer to data for widget.
204 */ 205 */
205 void selectTab( OTabInfo * ); 206 void selectTab( OTabInfo * );
206 207
207/** 208/**
208 * @fn setUpLayout() 209 * @fn setUpLayout()
209 * @brief Internal function to adjust layout. 210 * @brief Internal function to adjust layout.
210 */ 211 */
diff --git a/libopie/otimepickerbase.h b/libopie/otimepickerbase.h
index bac2b06..09598f9 100644
--- a/libopie/otimepickerbase.h
+++ b/libopie/otimepickerbase.h
@@ -1,28 +1,28 @@
1/**************************************************************************** 1/****************************************************************************
2** Form interface generated from reading ui file 'otimepickerbase.ui' 2** Form interface generated from reading ui file 'otimepickerbase.ui'
3** 3**
4** Created: Tue Aug 20 10:04:21 2002 4** Created: Tue Sep 3 13:12:19 2002
5** by: The User Interface Compiler (uic) 5** by: The User Interface Compiler (uic)
6** 6**
7** WARNING! All changes made in this file will be lost! 7** WARNING! All changes made in this file will be lost!
8****************************************************************************/ 8****************************************************************************/
9#ifndef OTIMEPICKERDIALOGBASE_H 9#ifndef OTIMEPICKERDIALOGBASE_H
10#define OTIMEPICKERDIALOGBASE_H 10#define OTIMEPICKERDIALOGBASE_H
11 11
12#include <qvariant.h> 12#include <qvariant.h>
13#include <qdialog.h> 13#include <qdialog.h>
14class QVBoxLayout; 14class QVBoxLayout;
15class QHBoxLayout; 15class QHBoxLayout;
16class QGridLayout; 16class QGridLayout;
17class OTimePicker; 17class OTimePicker;
18class QFrame; 18class QFrame;
19class QGroupBox; 19class QGroupBox;
20class QLabel; 20class QLabel;
21class QLineEdit; 21class QLineEdit;
22 22
23class OTimePickerDialogBase : public QDialog 23class OTimePickerDialogBase : public QDialog
24{ 24{
25 Q_OBJECT 25 Q_OBJECT
26 26
27public: 27public:
28 OTimePickerDialogBase( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); 28 OTimePickerDialogBase( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );