From bd476ac2563bee270f79c8db995b8e1e08eec77f Mon Sep 17 00:00:00 2001 From: cniehaus Date: Sun, 01 Dec 2002 13:22:33 +0000 Subject: perhaps tille finds some time for debugging this --- diff --git a/noncore/apps/oxygen/psewidget.cpp b/noncore/apps/oxygen/psewidget.cpp index eb4093b..d7126b9 100644 --- a/noncore/apps/oxygen/psewidget.cpp +++ b/noncore/apps/oxygen/psewidget.cpp @@ -44,6 +44,7 @@ PSEWidget::PSEWidget() : QWidget() PSEframe.current()->setMinimumHeight( 11 ); PSEframe.current()->setPalette( QPalette( PSEColor( configobj.readEntry( "Block" ) ) ) ); connect( PSEframe.current(), SIGNAL( num(QString) ), this, SLOT( slotShowElement(QString) )); + connect( PSEframe.current(), SIGNAL( num(QString) ), this, SLOT( inverseColor(QString) )); } oxyDW = new OxydataWidget(this); @@ -66,7 +67,17 @@ QColor PSEWidget::PSEColor( QString block ) void PSEWidget::inverseColor( QString number ) { - //foo + Config configobj( QPEApplication::qpeDir() +"share/oxygen/oxygendata", Config::File ); + configobj.setGroup( number ); + QString block = configobj.readEntry( "Block" ); + QColor c; + if ( block == "s" ) c.setRgb( 213 , 233 , 231 ); + else if ( block == "d" ) c.setRgb( 200,230,160 ); + else if ( block == "p" ) c.setRgb( 238,146,138 ); + else if ( block == "f" ) c.setRgb( 190 , 190 , 190 ); + c.dark(); + + PSEframe.at( number.toUInt() )->setPalette( QPalette( c ) ); } void PSEWidget::slotShowElement(QString number) diff --git a/noncore/apps/oxygen/psewidget.h b/noncore/apps/oxygen/psewidget.h index d8d2c5f..cfb629d 100644 --- a/noncore/apps/oxygen/psewidget.h +++ b/noncore/apps/oxygen/psewidget.h @@ -34,7 +34,6 @@ class PSEWidget : public QWidget QGridLayout *bottom_grid; OxydataWidget *oxyDW; - void inverseColor( QString ); QList PSEframe; private: @@ -45,6 +44,7 @@ class PSEWidget : public QWidget public slots: void slotShowElement(QString); + void inverseColor( QString ); }; -- cgit v0.9.0.2