summaryrefslogtreecommitdiff
path: root/core/settings/launcher/tabdialog.cpp
Side-by-side diff
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
@@ -4,68 +4,70 @@
           .>+-=
 _;:,     .>    :=|. This file is free software; you can
.> <`_,   >  .   <= redistribute it and/or modify it under
:`=1 )Y*s>-.--   : the terms of the GNU 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 file 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 General
..}^=.=       =       ; Public License for more details.
++=   -.     .`     .:
 :     =  ...= . :.=- You should have received a copy of the GNU
 -.   .:....=;==+<; General Public License along with this file;
  -_. . .   )=.  = see the file COPYING. If not, write to the
    --        :-=` Free Software Foundation, Inc.,
59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*/
+#include "tabdialog.h"
+
+/* OPIE */
#include <qpe/resource.h>
+#include <opie2/ofontselector.h>
+#include <opie2/otabwidget.h>
+#include <opie2/ocolorbutton.h>
+#include <opie2/ofiledialog.h>
+#include <opie2/odebug.h>
+/* QT */
#include <qlayout.h>
#include <qvbox.h>
#include <qtabbar.h>
#include <qiconview.h>
#include <qapplication.h>
#include <qlabel.h>
#include <qradiobutton.h>
#include <qbuttongroup.h>
#include <qwhatsthis.h>
#include <qcheckbox.h>
-#include <opie2/ofontselector.h>
-#include <opie2/otabwidget.h>
-#include <opie2/ocolorbutton.h>
-#include <opie2/ofiledialog.h>
-
-#include "tabdialog.h"
-
using namespace Opie::Ui;
class SampleItem : public QIconViewItem {
public:
SampleItem ( QIconView *v, const QString &text, const QPixmap &pix ) : QIconViewItem ( v, text )
{
m_large = pix;
m_small. convertFromImage ( pix. convertToImage ( ). smoothScale ( pix. width ( ) / 2, pix. height ( ) / 2 ));
}
void sizeChange ( )
{
calcRect ( );
repaint ( );
}
QPixmap *pixmap ( ) const
{
if ( iconView ( )-> itemTextPos ( ) == QIconView::Right )
return (QPixmap *) &m_small;
else
return (QPixmap *) &m_large;
}
@@ -127,49 +129,49 @@ public:
QPixmap bg ( width ( ), 9 );
QPainter painter ( &bg );
for ( int i = 0; i < 3; i++ ) {
painter. setPen ( white );
painter. drawLine ( 0, i*3, width()-1, i*3 );
painter. drawLine ( 0, i*3+1, width()-1, i*3+1 );
painter. setPen ( colorGroup().background().light(105) );
painter. drawLine ( 0, i*3+2, width()-1, i*3+2 );
}
painter.end ( );
setBackgroundPixmap ( bg );
break;
}
case TabConfig::SolidColor: {
setBackgroundPixmap ( QPixmap ( ));
if ( val. isEmpty ( ))
setBackgroundColor ( colorGroup ( ). base ( ));
else
setBackgroundColor ( val );
break;
}
case TabConfig::Image: {
- qDebug( "Loading image: %s", val.latin1() );
+ odebug << "Loading image: " << val << "" << oendl;
QPixmap bg ( Resource::loadPixmap ( "wallpaper/" + val ));
if ( bg. isNull ( )) {
QImageIO imgio;
imgio. setFileName ( val );
QSize ds = qApp-> desktop ( )-> size ( );
QString param ( "Scale( %1, %2, ScaleMin )" ); // No tr
imgio. setParameters ( param. arg ( ds. width ( )). arg ( ds. height ( )). latin1 ( ));
imgio. read ( );
bg = imgio. image ( );
}
setBackgroundPixmap ( bg );
break;
}
}
m_bgtype = t;
viewport ( )-> update ( );
}
void setTextColor ( const QColor &tc )
{
m_textcolor = tc;
QColorGroup cg = colorGroup ( );
cg. setColor ( QColorGroup::Text, tc );
setPalette ( QPalette ( cg, cg, cg ));