-rw-r--r-- | libopie2/opieui/otabwidget.h | 69 |
1 files changed, 32 insertions, 37 deletions
diff --git a/libopie2/opieui/otabwidget.h b/libopie2/opieui/otabwidget.h index b3423e8..e925592 100644 --- a/libopie2/opieui/otabwidget.h +++ b/libopie2/opieui/otabwidget.h | |||
@@ -1,36 +1,36 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of the Opie Project | 2 | This file is part of the Opie Project |
3 | Copyright (C) 2002 Dan Williams <williamsdr@acm.org> | 3 | Copyright (C) 2002, 2005 Dan Williams <drw@handhelds.org> |
4 | =. | 4 | =. |
5 | .=l. | 5 | .=l. |
6 | .>+-= | 6 | .>+-= |
7 | _;:, .> :=|. This program is free software; you can | 7 | _;:, .> :=|. This program is free software; you can |
8 | .> <`_, > . <= redistribute it and/or modify it under | 8 | .> <`_, > . <= redistribute it and/or modify it under |
9 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public | 9 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public |
10 | .="- .-=="i, .._ License as published by the Free Software | 10 | .="- .-=="i, .._ License as published by the Free Software |
11 | - . .-<_> .<> Foundation; either version 2 of the License, | 11 | - . .-<_> .<> Foundation; either version 2 of the License, |
12 | ._= =} : or (at your option) any later version. | 12 | ._= =} : or (at your option) any later version. |
13 | .%`+i> _;_. | 13 | .%`+i> _;_. |
14 | .i_,=:_. -<s. This program is distributed in the hope that | 14 | .i_,=:_. -<s. This program is distributed in the hope that |
15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
16 | : .. .:, . . . without even the implied warranty of | 16 | : .. .:, . . . without even the implied warranty of |
17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | 18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU |
19 | ..}^=.= = ; Library General Public License for more | 19 | ..}^=.= = ; Library General Public License for more |
20 | ++= -. .` .: details. | 20 | ++= -. .` .: details. |
21 | : = ...= . :.=- | 21 | : = ...= . :.=- |
22 | -. .:....=;==+<; You should have received a copy of the GNU | 22 | -. .:....=;==+<; You should have received a copy of the GNU |
23 | -_. . . )=. = Library General Public License along with | 23 | -_. . . )=. = Library General Public License along with |
24 | -- :-=` this library; see the file COPYING.LIB. | 24 | -- :-=` this library; see the file COPYING.LIB. |
25 | If not, write to the Free Software Foundation, | 25 | If not, write to the Free Software Foundation, |
26 | Inc., 59 Temple Place - Suite 330, | 26 | Inc., 59 Temple Place - Suite 330, |
27 | Boston, MA 02111-1307, USA. | 27 | Boston, MA 02111-1307, USA. |
28 | 28 | ||
29 | */ | 29 | */ |
30 | 30 | ||
31 | #ifndef OTABWIDGET_H | 31 | #ifndef OTABWIDGET_H |
32 | #define OTABWIDGET_H | 32 | #define OTABWIDGET_H |
33 | 33 | ||
34 | /* OPIE */ | 34 | /* OPIE */ |
35 | #include <opie2/otabinfo.h> | 35 | #include <opie2/otabinfo.h> |
36 | 36 | ||
@@ -185,62 +185,57 @@ class OTabWidget : public QWidget | |||
185 | */ | 185 | */ |
186 | void setCurrentTab( const QString & ); | 186 | void setCurrentTab( const QString & ); |
187 | 187 | ||
188 | /** | 188 | /** |
189 | * @fn setCurrentTab( int ) | 189 | * @fn setCurrentTab( int ) |
190 | * @brief Selects and brings to top the desired widget, by using id. | 190 | * @brief Selects and brings to top the desired widget, by using id. |
191 | * | 191 | * |
192 | * @param tab id for widget to select. | 192 | * @param tab id for widget to select. |
193 | */ | 193 | */ |
194 | void setCurrentTab(int); | 194 | void setCurrentTab(int); |
195 | 195 | ||
196 | /** | 196 | /** |
197 | * @fn sizeHint()const | ||
198 | * @brief Reimplemented for internal purposes. | ||
199 | */ | ||
200 | QSize sizeHint() const; | ||
201 | |||
202 | /** | ||
203 | * @fn currentTab( ) | 197 | * @fn currentTab( ) |
204 | * @brief returns current tab id. | 198 | * @brief returns current tab id. |
205 | */ | 199 | */ |
206 | // ### make const | 200 | // ### make const |
207 | int currentTab()/* const */; | 201 | int currentTab()/* const */; |
208 | /** | 202 | /** |
209 | * @brief returns the current page of the active tab | 203 | * @brief returns the current page of the active tab |
210 | * | 204 | * |
211 | * @since 1.2 | 205 | * @since 1.2 |
212 | */ | 206 | */ |
213 | QWidget* currentWidget()const; | 207 | QWidget* currentWidget()const; |
214 | 208 | ||
215 | protected: | 209 | protected: |
216 | 210 | ||
217 | /** | 211 | /** |
218 | * @fn resizeEvent( QResizeEvent * ) | 212 | * @fn resizeEvent( QResizeEvent * ) |
219 | * @brief Reimplemented for internal purposes. | 213 | * @brief Reimplemented for internal purposes. |
220 | */ | 214 | */ |
221 | void resizeEvent( QResizeEvent * ); | 215 | void resizeEvent( QResizeEvent * ); |
222 | 216 | ||
223 | private: | 217 | private: |
224 | OTabInfoList tabs; | 218 | OTabInfoList m_tabs; // List of information for tabs |
225 | OTabInfo *currTab; | 219 | OTabInfo *m_currTab; // Current tab displayed |
226 | 220 | TabStyle m_tabBarStyle; // Current style of control | |
227 | TabStyle tabBarStyle; | 221 | TabPosition m_tabBarPosition; // Position of selector control |
228 | TabPosition tabBarPosition; | 222 | bool m_usingTabs; // Indicates whether style is either TextTab or IconTab |
229 | 223 | // (saves from having to always check for these 2 values) | |
230 | QWidgetStack *tabBarStack; | 224 | |
231 | OTabBar *tabBar; | 225 | // UI components |
232 | QComboBox *tabList; | 226 | OTabBar *m_tabBar; |
227 | QComboBox *m_tabList; | ||
228 | QWidgetStack *m_widgetStack; | ||
233 | 229 | ||
234 | QWidgetStack *widgetStack; | ||
235 | class Private; | 230 | class Private; |
236 | Private* d; | 231 | Private* d; |
237 | 232 | ||
238 | /** | 233 | /** |
239 | * @fn loadSmooth( const QString &name ) | 234 | * @fn loadSmooth( const QString &name ) |
240 | * @brief Loads icon for widget. | 235 | * @brief Loads icon for widget. |
241 | * | 236 | * |
242 | * @param name Name of icon image file. | 237 | * @param name Name of icon image file. |
243 | */ | 238 | */ |
244 | QPixmap loadSmooth( const QString & ); | 239 | QPixmap loadSmooth( const QString & ); |
245 | 240 | ||
246 | /** | 241 | /** |