author | cniehaus <cniehaus> | 2002-12-01 13:22:33 (UTC) |
---|---|---|
committer | cniehaus <cniehaus> | 2002-12-01 13:22:33 (UTC) |
commit | bd476ac2563bee270f79c8db995b8e1e08eec77f (patch) (side-by-side diff) | |
tree | eca7a45424bdcef8240012684cad605f45f43f84 /noncore/apps/oxygen/psewidget.cpp | |
parent | 5e82b4c17131cdc1b8be57e312f594d1a55520aa (diff) | |
download | opie-bd476ac2563bee270f79c8db995b8e1e08eec77f.zip opie-bd476ac2563bee270f79c8db995b8e1e08eec77f.tar.gz opie-bd476ac2563bee270f79c8db995b8e1e08eec77f.tar.bz2 |
perhaps tille finds some time for debugging this
Diffstat (limited to 'noncore/apps/oxygen/psewidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/oxygen/psewidget.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
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 @@ -41,12 +41,13 @@ PSEWidget::PSEWidget() : QWidget() position( n+1,h,v ); PSEframe.append( new OxyFrame( this , QString::number(n), configobj.readEntry( "Symbol" ) ) ); grid->addWidget( PSEframe.current() , v/40+1 , h/40 ); 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); oxyDW->setElement( 0 ); oxyDW->setLayout(); @@ -63,13 +64,23 @@ QColor PSEWidget::PSEColor( QString block ) else if ( block == "f" ) c.setRgb( 190 , 190 , 190 ); return c; }; 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) { oxyDW->setElement( number.toInt() ); }; |