author | drw <drw> | 2005-02-25 21:43:00 (UTC) |
---|---|---|
committer | drw <drw> | 2005-02-25 21:43:00 (UTC) |
commit | f2f2b0bc7f8fbb0ecbfd7548b7a29618cc5a9139 (patch) (side-by-side diff) | |
tree | 8dfef7af3cd038b3a27570e64234388c8c563884 /libopie2/opieui/otabwidget.h | |
parent | 8cddb795296ddc1f9bd3203a9441c555a565f476 (diff) | |
download | opie-f2f2b0bc7f8fbb0ecbfd7548b7a29618cc5a9139.zip opie-f2f2b0bc7f8fbb0ecbfd7548b7a29618cc5a9139.tar.gz opie-f2f2b0bc7f8fbb0ecbfd7548b7a29618cc5a9139.tar.bz2 |
Reworked OTabWidget - optimized (now uses less runtime resources), fix display issue where tabbar appears to float a few pixels above where it should
-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 @@ /* - This file is part of the Opie Project - Copyright (C) 2002 Dan Williams <williamsdr@acm.org> + This file is part of the Opie Project + Copyright (C) 2002, 2005 Dan Williams <drw@handhelds.org> =. .=l. - .>+-= - _;:, .> :=|. This program is free software; you can -.> <`_, > . <= redistribute it and/or modify it under -:`=1 )Y*s>-.-- : the terms of the GNU Library General Public -.="- .-=="i, .._ License as published by the Free Software - - . .-<_> .<> Foundation; either version 2 of the License, - ._= =} : or (at your option) any later version. - .%`+i> _;_. - .i_,=:_. -<s. This program is distributed in the hope that - + . -:. = it will be useful, but WITHOUT ANY WARRANTY; - : .. .:, . . . without even the implied warranty of - =_ + =;=|` MERCHANTABILITY or FITNESS FOR A - _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU -..}^=.= = ; Library General Public License for more -++= -. .` .: details. - : = ...= . :.=- - -. .:....=;==+<; You should have received a copy of the GNU - -_. . . )=. = Library General Public License along with - -- :-=` this library; see the file COPYING.LIB. + .>+-= +_;:, .> :=|. This program is free software; you can +.> <`_, > . <= redistribute it and/or modify it under +:`=1 )Y*s>-.-- : the terms of the GNU Library General Public +.="- .-=="i, .._ License as published by the Free Software +- . .-<_> .<> Foundation; either version 2 of the License, + ._= =} : or (at your option) any later version. + .%`+i> _;_. + .i_,=:_. -<s. This program is distributed in the hope that + + . -:. = it will be useful, but WITHOUT ANY WARRANTY; + : .. .:, . . . without even the implied warranty of + =_ + =;=|` MERCHANTABILITY or FITNESS FOR A + _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU +..}^=.= = ; Library General Public License for more +++= -. .` .: details. +: = ...= . :.=- +-. .:....=;==+<; You should have received a copy of the GNU + -_. . . )=. = Library General Public License along with + -- :-=` this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef OTABWIDGET_H #define OTABWIDGET_H /* OPIE */ #include <opie2/otabinfo.h> @@ -185,62 +185,57 @@ class OTabWidget : public QWidget */ void setCurrentTab( const QString & ); /** * @fn setCurrentTab( int ) * @brief Selects and brings to top the desired widget, by using id. * * @param tab id for widget to select. */ void setCurrentTab(int); /** - * @fn sizeHint()const - * @brief Reimplemented for internal purposes. - */ - QSize sizeHint() const; - -/** * @fn currentTab( ) * @brief returns current tab id. */ // ### make const int currentTab()/* const */; /** * @brief returns the current page of the active tab * * @since 1.2 */ QWidget* currentWidget()const; protected: /** * @fn resizeEvent( QResizeEvent * ) * @brief Reimplemented for internal purposes. */ void resizeEvent( QResizeEvent * ); private: - OTabInfoList tabs; - OTabInfo *currTab; - - TabStyle tabBarStyle; - TabPosition tabBarPosition; - - QWidgetStack *tabBarStack; - OTabBar *tabBar; - QComboBox *tabList; + OTabInfoList m_tabs; // List of information for tabs + OTabInfo *m_currTab; // Current tab displayed + TabStyle m_tabBarStyle; // Current style of control + TabPosition m_tabBarPosition; // Position of selector control + bool m_usingTabs; // Indicates whether style is either TextTab or IconTab + // (saves from having to always check for these 2 values) + + // UI components + OTabBar *m_tabBar; + QComboBox *m_tabList; + QWidgetStack *m_widgetStack; - QWidgetStack *widgetStack; class Private; Private* d; /** * @fn loadSmooth( const QString &name ) * @brief Loads icon for widget. * * @param name Name of icon image file. */ QPixmap loadSmooth( const QString & ); /** |