summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/oxygen/psewidget.cpp6
-rw-r--r--noncore/apps/oxygen/psewidget.h6
2 files changed, 11 insertions, 1 deletions
diff --git a/noncore/apps/oxygen/psewidget.cpp b/noncore/apps/oxygen/psewidget.cpp
index 2fd61bc..eb4093b 100644
--- a/noncore/apps/oxygen/psewidget.cpp
+++ b/noncore/apps/oxygen/psewidget.cpp
@@ -36,13 +36,12 @@ PSEWidget::PSEWidget() : QWidget()
36 Config configobj( QPEApplication::qpeDir() +"share/oxygen/oxygendata", Config::File ); 36 Config configobj( QPEApplication::qpeDir() +"share/oxygen/oxygendata", Config::File );
37 for( int n = 0 ; n < 109 ; n++ ) 37 for( int n = 0 ; n < 109 ; n++ )
38 { 38 {
39 configobj.setGroup( QString::number( n+1 )); 39 configobj.setGroup( QString::number( n+1 ));
40 40
41 position( n+1,h,v ); 41 position( n+1,h,v );
42 QList<OxyFrame> PSEframe;
43 PSEframe.append( new OxyFrame( this , QString::number(n), configobj.readEntry( "Symbol" ) ) ); 42 PSEframe.append( new OxyFrame( this , QString::number(n), configobj.readEntry( "Symbol" ) ) );
44 grid->addWidget( PSEframe.current() , v/40+1 , h/40 ); 43 grid->addWidget( PSEframe.current() , v/40+1 , h/40 );
45 PSEframe.current()->setMinimumHeight( 11 ); 44 PSEframe.current()->setMinimumHeight( 11 );
46 PSEframe.current()->setPalette( QPalette( PSEColor( configobj.readEntry( "Block" ) ) ) ); 45 PSEframe.current()->setPalette( QPalette( PSEColor( configobj.readEntry( "Block" ) ) ) );
47 connect( PSEframe.current(), SIGNAL( num(QString) ), this, SLOT( slotShowElement(QString) )); 46 connect( PSEframe.current(), SIGNAL( num(QString) ), this, SLOT( slotShowElement(QString) ));
48 } 47 }
@@ -62,12 +61,17 @@ QColor PSEWidget::PSEColor( QString block )
62 else if ( block == "d" ) c.setRgb( 200,230,160 ); 61 else if ( block == "d" ) c.setRgb( 200,230,160 );
63 else if ( block == "p" ) c.setRgb( 238,146,138 ); 62 else if ( block == "p" ) c.setRgb( 238,146,138 );
64 else if ( block == "f" ) c.setRgb( 190 , 190 , 190 ); 63 else if ( block == "f" ) c.setRgb( 190 , 190 , 190 );
65 return c; 64 return c;
66}; 65};
67 66
67void PSEWidget::inverseColor( QString number )
68{
69 //foo
70}
71
68void PSEWidget::slotShowElement(QString number) 72void PSEWidget::slotShowElement(QString number)
69{ 73{
70 oxyDW->setElement( number.toInt() ); 74 oxyDW->setElement( number.toInt() );
71}; 75};
72 76
73void PSEWidget::position(int n, int& h, int& v) 77void PSEWidget::position(int n, int& h, int& v)
diff --git a/noncore/apps/oxygen/psewidget.h b/noncore/apps/oxygen/psewidget.h
index fdf838e..d8d2c5f 100644
--- a/noncore/apps/oxygen/psewidget.h
+++ b/noncore/apps/oxygen/psewidget.h
@@ -15,25 +15,31 @@
15 * * 15 * *
16 **************************************************************************/ 16 **************************************************************************/
17#ifndef _PSEWIDGET_H 17#ifndef _PSEWIDGET_H
18#define _PSEWIDGET_H 18#define _PSEWIDGET_H
19 19
20#include <qwidget.h> 20#include <qwidget.h>
21#include <qlist.h>
22#include "oxyframe.h"
21 23
22class QGridLayout; 24class QGridLayout;
23class OxydataWidget; 25class OxydataWidget;
26class PSEframe;
24 27
25class PSEWidget : public QWidget 28class PSEWidget : public QWidget
26{ 29{
27 Q_OBJECT 30 Q_OBJECT
28 31
29 public: 32 public:
30 PSEWidget(); 33 PSEWidget();
31 QGridLayout *bottom_grid; 34 QGridLayout *bottom_grid;
32 OxydataWidget *oxyDW; 35 OxydataWidget *oxyDW;
33 36
37 void inverseColor( QString );
38 QList<OxyFrame> PSEframe;
39
34 private: 40 private:
35 QGridLayout *maingrid; 41 QGridLayout *maingrid;
36 42
37 void position( int, int&, int& ); 43 void position( int, int&, int& );
38 QColor PSEColor( QString ); 44 QColor PSEColor( QString );
39 45