Diffstat (limited to 'libopie2/opieui/otabwidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/opieui/otabwidget.cpp | 66 |
1 files changed, 30 insertions, 36 deletions
diff --git a/libopie2/opieui/otabwidget.cpp b/libopie2/opieui/otabwidget.cpp index 8d7806c..7333f5e 100644 --- a/libopie2/opieui/otabwidget.cpp +++ b/libopie2/opieui/otabwidget.cpp | |||
@@ -1,26 +1,26 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of the Opie Project | 2 | This file is part of the Opie Project |
3 | 3 | ||
4 | Copyright (c) 2002, 2005 Dan Williams <drw@handhelds.org> | 4 | Copyright (C) 2002, 2005 Dan Williams <drw@handhelds.org> |
5 | =. | 5 | =. |
6 | .=l. | 6 | .=l. |
7 | .>+-= | 7 | .>+-= |
8 | _;:, .> :=|. This program is free software; you can | 8 | _;:, .> :=|. This program is free software; you can |
9 | .> <`_, > . <= redistribute it and/or modify it under | 9 | .> <`_, > . <= redistribute it and/or modify it under |
10 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public | 10 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public |
11 | .="- .-=="i, .._ License as published by the Free Software | 11 | .="- .-=="i, .._ License as published by the Free Software |
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, |
@@ -28,3 +28,2 @@ _;:, .> :=|. This program is free software; you can | |||
28 | Boston, MA 02111-1307, USA. | 28 | Boston, MA 02111-1307, USA. |
29 | |||
30 | */ | 29 | */ |
@@ -34,6 +33,7 @@ _;:, .> :=|. This program is free software; you can | |||
34 | /* OPIE */ | 33 | /* OPIE */ |
34 | #include <opie2/oresource.h> | ||
35 | #include <opie2/otabbar.h> | ||
36 | |||
35 | #include <qpe/applnk.h> | 37 | #include <qpe/applnk.h> |
36 | #include <qpe/config.h> | 38 | #include <qpe/config.h> |
37 | #include <qpe/resource.h> | ||
38 | #include <opie2/otabbar.h> | ||
39 | 39 | ||
@@ -99,3 +99,3 @@ void OTabWidget::addTab( QWidget *child, const QString &icon, const QString &lab | |||
99 | tab->label = QString::null; | 99 | tab->label = QString::null; |
100 | tab->iconset = new QIconSet( loadSmooth( icon ) ); | 100 | tab->iconset = new QIconSet( Opie::Core::OResource::loadPixmap( icon, Opie::Core::OResource::SmallIcon ) ); |
101 | } | 101 | } |
@@ -110,3 +110,3 @@ void OTabWidget::addTab( QWidget *child, const QString &icon, const QString &lab | |||
110 | if ( m_tabBarStyle == IconList ) | 110 | if ( m_tabBarStyle == IconList ) |
111 | m_tabList->insertItem( loadSmooth( icon ), label, -1 ); | 111 | m_tabList->insertItem( Opie::Core::OResource::loadPixmap( icon, Opie::Core::OResource::SmallIcon ), label, -1 ); |
112 | else | 112 | else |
@@ -182,3 +182,3 @@ void OTabWidget::changeTab( QWidget *widget, const QString &iconset, const QStri | |||
182 | { | 182 | { |
183 | QPixmap icon( loadSmooth( iconset ) ); | 183 | QPixmap icon( Opie::Core::OResource::loadPixmap( iconset, Opie::Core::OResource::SmallIcon ) ); |
184 | 184 | ||
@@ -300,3 +300,3 @@ void OTabWidget::setTabStyle( TabStyle s ) | |||
300 | tab->label = QString::null; | 300 | tab->label = QString::null; |
301 | tab->iconset = new QIconSet( loadSmooth( tabinfo->icon() ) ); | 301 | tab->iconset = new QIconSet( Opie::Core::OResource::loadPixmap( tabinfo->icon(), Opie::Core::OResource::SmallIcon ) ); |
302 | } | 302 | } |
@@ -320,3 +320,4 @@ void OTabWidget::setTabStyle( TabStyle s ) | |||
320 | if ( m_tabBarStyle == IconList ) | 320 | if ( m_tabBarStyle == IconList ) |
321 | m_tabList->insertItem( loadSmooth( tabinfo->icon() ), tabinfo->label() ); | 321 | m_tabList->insertItem( Opie::Core::OResource::loadPixmap( tabinfo->icon(), Opie::Core::OResource::SmallIcon ), |
322 | tabinfo->label() ); | ||
322 | else | 323 | else |
@@ -367,9 +368,2 @@ void OTabWidget::slotTabListSelected( int index ) | |||
367 | 368 | ||
368 | QPixmap OTabWidget::loadSmooth( const QString &name ) | ||
369 | { | ||
370 | QPixmap p; | ||
371 | p.convertFromImage( Resource::loadImage( name ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); | ||
372 | return p; | ||
373 | } | ||
374 | |||
375 | void OTabWidget::selectTab( OTabInfo *tab ) | 369 | void OTabWidget::selectTab( OTabInfo *tab ) |