summaryrefslogtreecommitdiff
path: root/noncore/apps/oxygen
authorcniehaus <cniehaus>2002-12-26 16:27:41 (UTC)
committer cniehaus <cniehaus>2002-12-26 16:27:41 (UTC)
commit4ccadc49c02a7412fd82eeb98eba3c7cd7f5c05f (patch) (unidiff)
tree6bcf36b728b6c9db70c00ccf2c16f7b082581124 /noncore/apps/oxygen
parent6ba7eeea65ba60d022c0d9d041660ceffb2b76f6 (diff)
downloadopie-4ccadc49c02a7412fd82eeb98eba3c7cd7f5c05f.zip
opie-4ccadc49c02a7412fd82eeb98eba3c7cd7f5c05f.tar.gz
opie-4ccadc49c02a7412fd82eeb98eba3c7cd7f5c05f.tar.bz2
adding a nice feature: now the user sees which element he is looking at
Diffstat (limited to 'noncore/apps/oxygen') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/oxygen/calcdlg.ui4
-rw-r--r--noncore/apps/oxygen/psewidget.cpp24
-rw-r--r--noncore/apps/oxygen/psewidget.h2
3 files changed, 17 insertions, 13 deletions
diff --git a/noncore/apps/oxygen/calcdlg.ui b/noncore/apps/oxygen/calcdlg.ui
index c817a47..51bf334 100644
--- a/noncore/apps/oxygen/calcdlg.ui
+++ b/noncore/apps/oxygen/calcdlg.ui
@@ -17,6 +17,2 @@
17 </property> 17 </property>
18 <property stdset="1">
19 <name>caption</name>
20 <string>Form1</string>
21 </property>
22 <widget> 18 <widget>
diff --git a/noncore/apps/oxygen/psewidget.cpp b/noncore/apps/oxygen/psewidget.cpp
index d7126b9..d8e4086 100644
--- a/noncore/apps/oxygen/psewidget.cpp
+++ b/noncore/apps/oxygen/psewidget.cpp
@@ -29,2 +29,4 @@ PSEWidget::PSEWidget() : QWidget()
29 this->setCaption( tr( "Periodic System" ) ); 29 this->setCaption( tr( "Periodic System" ) );
30
31 lastElement=1;
30 32
@@ -67,3 +69,3 @@ QColor PSEWidget::PSEColor( QString block )
67 69
68void PSEWidget::inverseColor( QString number ) 70void PSEWidget::inverseColor( QString number)
69{ 71{
@@ -72,10 +74,14 @@ void PSEWidget::inverseColor( QString number )
72 QString block = configobj.readEntry( "Block" ); 74 QString block = configobj.readEntry( "Block" );
73 QColor c; 75 QColor c, d;
74 if ( block == "s" ) c.setRgb( 213 , 233 , 231 ); 76 c = PSEColor( block );
75 else if ( block == "d" ) c.setRgb( 200,230,160 ); 77 d = c.dark();
76 else if ( block == "p" ) c.setRgb( 238,146,138 ); 78
77 else if ( block == "f" ) c.setRgb( 190 , 190 , 190 ); 79 PSEframe.at( number.toUInt() )->setPalette( QPalette( d ) );
78 c.dark(); 80
79 81 configobj.setGroup( QString::number( lastElement+1 ) );
80 PSEframe.at( number.toUInt() )->setPalette( QPalette( c ) ); 82 block = configobj.readEntry( "Block" );
83 c = PSEColor( block );
84 PSEframe.at( lastElement )->setPalette( QPalette( c ) );
85
86 lastElement=number.toInt();
81} 87}
diff --git a/noncore/apps/oxygen/psewidget.h b/noncore/apps/oxygen/psewidget.h
index cfb629d..ddeab9d 100644
--- a/noncore/apps/oxygen/psewidget.h
+++ b/noncore/apps/oxygen/psewidget.h
@@ -38,2 +38,4 @@ class PSEWidget : public QWidget
38 38
39 int lastElement;
40
39 private: 41 private: