summaryrefslogtreecommitdiff
path: root/core/settings/launcher/tabdialog.cpp
authorar <ar>2004-05-02 17:31:50 (UTC)
committer ar <ar>2004-05-02 17:31:50 (UTC)
commita210b9a597ba0c929d95c38ffbaf972916c7b8a7 (patch) (unidiff)
treece121d5017eb054222c86e0afb6057a28ea7bf8a /core/settings/launcher/tabdialog.cpp
parent18759e9156c96795831120408a9da0d3b4ec71a4 (diff)
downloadopie-a210b9a597ba0c929d95c38ffbaf972916c7b8a7.zip
opie-a210b9a597ba0c929d95c38ffbaf972916c7b8a7.tar.gz
opie-a210b9a597ba0c929d95c38ffbaf972916c7b8a7.tar.bz2
- convert qDebug to odebug
Diffstat (limited to 'core/settings/launcher/tabdialog.cpp') (more/less context) (show whitespace changes)
-rw-r--r--core/settings/launcher/tabdialog.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/core/settings/launcher/tabdialog.cpp b/core/settings/launcher/tabdialog.cpp
index 763b360..546e229 100644
--- a/core/settings/launcher/tabdialog.cpp
+++ b/core/settings/launcher/tabdialog.cpp
@@ -16,44 +16,46 @@
16  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU General 16  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU General
17..}^=.=       =       ; Public License for more details. 17..}^=.=       =       ; Public License for more details.
18++=   -.     .`     .: 18++=   -.     .`     .:
19 :     =  ...= . :.=- You should have received a copy of the GNU 19 :     =  ...= . :.=- You should have received a copy of the GNU
20 -.   .:....=;==+<; General Public License along with this file; 20 -.   .:....=;==+<; General Public License along with this file;
21  -_. . .   )=.  = see the file COPYING. If not, write to the 21  -_. . .   )=.  = see the file COPYING. If not, write to the
22    --        :-=` Free Software Foundation, Inc., 22    --        :-=` Free Software Foundation, Inc.,
23 59 Temple Place - Suite 330, 23 59 Temple Place - Suite 330,
24 Boston, MA 02111-1307, USA. 24 Boston, MA 02111-1307, USA.
25 25
26*/ 26*/
27 27
28#include "tabdialog.h"
29
30/* OPIE */
28#include <qpe/resource.h> 31#include <qpe/resource.h>
32#include <opie2/ofontselector.h>
33#include <opie2/otabwidget.h>
34#include <opie2/ocolorbutton.h>
35#include <opie2/ofiledialog.h>
36#include <opie2/odebug.h>
29 37
38/* QT */
30#include <qlayout.h> 39#include <qlayout.h>
31#include <qvbox.h> 40#include <qvbox.h>
32#include <qtabbar.h> 41#include <qtabbar.h>
33#include <qiconview.h> 42#include <qiconview.h>
34#include <qapplication.h> 43#include <qapplication.h>
35#include <qlabel.h> 44#include <qlabel.h>
36#include <qradiobutton.h> 45#include <qradiobutton.h>
37#include <qbuttongroup.h> 46#include <qbuttongroup.h>
38#include <qwhatsthis.h> 47#include <qwhatsthis.h>
39#include <qcheckbox.h> 48#include <qcheckbox.h>
40 49
41#include <opie2/ofontselector.h>
42#include <opie2/otabwidget.h>
43#include <opie2/ocolorbutton.h>
44#include <opie2/ofiledialog.h>
45
46#include "tabdialog.h"
47
48 50
49using namespace Opie::Ui; 51using namespace Opie::Ui;
50class SampleItem : public QIconViewItem { 52class SampleItem : public QIconViewItem {
51public: 53public:
52 SampleItem ( QIconView *v, const QString &text, const QPixmap &pix ) : QIconViewItem ( v, text ) 54 SampleItem ( QIconView *v, const QString &text, const QPixmap &pix ) : QIconViewItem ( v, text )
53 { 55 {
54 m_large = pix; 56 m_large = pix;
55 m_small. convertFromImage ( pix. convertToImage ( ). smoothScale ( pix. width ( ) / 2, pix. height ( ) / 2 )); 57 m_small. convertFromImage ( pix. convertToImage ( ). smoothScale ( pix. width ( ) / 2, pix. height ( ) / 2 ));
56 } 58 }
57 59
58 void sizeChange ( ) 60 void sizeChange ( )
59 { 61 {
@@ -139,25 +141,25 @@ public:
139 } 141 }
140 142
141 case TabConfig::SolidColor: { 143 case TabConfig::SolidColor: {
142 setBackgroundPixmap ( QPixmap ( )); 144 setBackgroundPixmap ( QPixmap ( ));
143 if ( val. isEmpty ( )) 145 if ( val. isEmpty ( ))
144 setBackgroundColor ( colorGroup ( ). base ( )); 146 setBackgroundColor ( colorGroup ( ). base ( ));
145 else 147 else
146 setBackgroundColor ( val ); 148 setBackgroundColor ( val );
147 break; 149 break;
148 } 150 }
149 151
150 case TabConfig::Image: { 152 case TabConfig::Image: {
151 qDebug( "Loading image: %s", val.latin1() ); 153 odebug << "Loading image: " << val << "" << oendl;
152 QPixmap bg ( Resource::loadPixmap ( "wallpaper/" + val )); 154 QPixmap bg ( Resource::loadPixmap ( "wallpaper/" + val ));
153 if ( bg. isNull ( )) { 155 if ( bg. isNull ( )) {
154 QImageIO imgio; 156 QImageIO imgio;
155 imgio. setFileName ( val ); 157 imgio. setFileName ( val );
156 QSize ds = qApp-> desktop ( )-> size ( ); 158 QSize ds = qApp-> desktop ( )-> size ( );
157 QString param ( "Scale( %1, %2, ScaleMin )" ); // No tr 159 QString param ( "Scale( %1, %2, ScaleMin )" ); // No tr
158 imgio. setParameters ( param. arg ( ds. width ( )). arg ( ds. height ( )). latin1 ( )); 160 imgio. setParameters ( param. arg ( ds. width ( )). arg ( ds. height ( )). latin1 ( ));
159 imgio. read ( ); 161 imgio. read ( );
160 bg = imgio. image ( ); 162 bg = imgio. image ( );
161 } 163 }
162 setBackgroundPixmap ( bg ); 164 setBackgroundPixmap ( bg );
163 break; 165 break;