-rw-r--r-- | noncore/apps/oxygen/psewidget.cpp | 13 | ||||
-rw-r--r-- | noncore/apps/oxygen/psewidget.h | 2 |
2 files changed, 13 insertions, 2 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 | |||
@@ -44,6 +44,7 @@ PSEWidget::PSEWidget() : QWidget() | |||
44 | PSEframe.current()->setMinimumHeight( 11 ); | 44 | PSEframe.current()->setMinimumHeight( 11 ); |
45 | PSEframe.current()->setPalette( QPalette( PSEColor( configobj.readEntry( "Block" ) ) ) ); | 45 | PSEframe.current()->setPalette( QPalette( PSEColor( configobj.readEntry( "Block" ) ) ) ); |
46 | connect( PSEframe.current(), SIGNAL( num(QString) ), this, SLOT( slotShowElement(QString) )); | 46 | connect( PSEframe.current(), SIGNAL( num(QString) ), this, SLOT( slotShowElement(QString) )); |
47 | connect( PSEframe.current(), SIGNAL( num(QString) ), this, SLOT( inverseColor(QString) )); | ||
47 | } | 48 | } |
48 | 49 | ||
49 | oxyDW = new OxydataWidget(this); | 50 | oxyDW = new OxydataWidget(this); |
@@ -66,7 +67,17 @@ QColor PSEWidget::PSEColor( QString block ) | |||
66 | 67 | ||
67 | void PSEWidget::inverseColor( QString number ) | 68 | void PSEWidget::inverseColor( QString number ) |
68 | { | 69 | { |
69 | //foo | 70 | Config configobj( QPEApplication::qpeDir() +"share/oxygen/oxygendata", Config::File ); |
71 | configobj.setGroup( number ); | ||
72 | QString block = configobj.readEntry( "Block" ); | ||
73 | QColor c; | ||
74 | if ( block == "s" ) c.setRgb( 213 , 233 , 231 ); | ||
75 | else if ( block == "d" ) c.setRgb( 200,230,160 ); | ||
76 | else if ( block == "p" ) c.setRgb( 238,146,138 ); | ||
77 | else if ( block == "f" ) c.setRgb( 190 , 190 , 190 ); | ||
78 | c.dark(); | ||
79 | |||
80 | PSEframe.at( number.toUInt() )->setPalette( QPalette( c ) ); | ||
70 | } | 81 | } |
71 | 82 | ||
72 | void PSEWidget::slotShowElement(QString number) | 83 | 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 | |||
34 | QGridLayout *bottom_grid; | 34 | QGridLayout *bottom_grid; |
35 | OxydataWidget *oxyDW; | 35 | OxydataWidget *oxyDW; |
36 | 36 | ||
37 | void inverseColor( QString ); | ||
38 | QList<OxyFrame> PSEframe; | 37 | QList<OxyFrame> PSEframe; |
39 | 38 | ||
40 | private: | 39 | private: |
@@ -45,6 +44,7 @@ class PSEWidget : public QWidget | |||
45 | 44 | ||
46 | public slots: | 45 | public slots: |
47 | void slotShowElement(QString); | 46 | void slotShowElement(QString); |
47 | void inverseColor( QString ); | ||
48 | 48 | ||
49 | }; | 49 | }; |
50 | 50 | ||