-rw-r--r-- | noncore/apps/oxygen/psewidget.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/noncore/apps/oxygen/psewidget.cpp b/noncore/apps/oxygen/psewidget.cpp index 449afef..ba9b71a 100644 --- a/noncore/apps/oxygen/psewidget.cpp +++ b/noncore/apps/oxygen/psewidget.cpp | |||
@@ -4,48 +4,49 @@ | |||
4 | begin : September 2002 | 4 | begin : September 2002 |
5 | copyright : ( C ) 2002 by Carsten Niehaus | 5 | copyright : ( C ) 2002 by Carsten Niehaus |
6 | email : cniehaus@handhelds.org | 6 | email : cniehaus@handhelds.org |
7 | **************************************************************************/ | 7 | **************************************************************************/ |
8 | 8 | ||
9 | /*************************************************************************** | 9 | /*************************************************************************** |
10 | * * | 10 | * * |
11 | * This program is free software; you can redistribute it and/or modify * | 11 | * This program is free software; you can redistribute it and/or modify * |
12 | * it under the terms of the GNU General Public License as published by * | 12 | * it under the terms of the GNU General Public License as published by * |
13 | * the Free Software Foundation; either version 2 of the License, or * | 13 | * the Free Software Foundation; either version 2 of the License, or * |
14 | * ( at your option ) any later version. * | 14 | * ( at your option ) any later version. * |
15 | * * | 15 | * * |
16 | **************************************************************************/ | 16 | **************************************************************************/ |
17 | 17 | ||
18 | #include <qpe/config.h> | 18 | #include <qpe/config.h> |
19 | #include <qlayout.h> | 19 | #include <qlayout.h> |
20 | #include <qpe/qpeapplication.h> | ||
20 | #include <qlist.h> | 21 | #include <qlist.h> |
21 | #include "dataTable.h" | 22 | #include "dataTable.h" |
22 | #include "psewidget.h" | 23 | #include "psewidget.h" |
23 | #include "oxyframe.h" | 24 | #include "oxyframe.h" |
24 | 25 | ||
25 | 26 | ||
26 | PSEWidget::PSEWidget() : QWidget() | 27 | PSEWidget::PSEWidget() : QWidget() |
27 | { | 28 | { |
28 | this->setCaption( tr( "Periodic System" ) ); | 29 | this->setCaption( tr( "Periodic System" ) ); |
29 | 30 | ||
30 | QVBoxLayout *vlay = new QVBoxLayout( this ); | 31 | QVBoxLayout *vlay = new QVBoxLayout( this ); |
31 | 32 | ||
32 | QGridLayout *grid = new QGridLayout( 18,10 ); | 33 | QGridLayout *grid = new QGridLayout( 18,10 ); |
33 | int h=0, v=0; | 34 | int h=0, v=0; |
34 | 35 | ||
35 | Config configobj( "oxygendata" ); | 36 | Config configobj( QPEApplication::qpeDir() +"share/oxygen/oxygendata", Config::File ); |
36 | for( int n = 0 ; n < 118 ; n++ ) | 37 | for( int n = 0 ; n < 118 ; n++ ) |
37 | { | 38 | { |
38 | configobj.setGroup( QString::number( n+1 )); | 39 | configobj.setGroup( QString::number( n+1 )); |
39 | 40 | ||
40 | position( n+1,h,v ); | 41 | position( n+1,h,v ); |
41 | QList<OxyFrame> PSEframe; | 42 | QList<OxyFrame> PSEframe; |
42 | PSEframe.append( new OxyFrame( this , QString::number(n) ) ); | 43 | PSEframe.append( new OxyFrame( this , QString::number(n) ) ); |
43 | grid->addWidget( PSEframe.current() , v/40+1 , h/40 ); | 44 | grid->addWidget( PSEframe.current() , v/40+1 , h/40 ); |
44 | PSEframe.current()->setMinimumHeight( 11 ); | 45 | PSEframe.current()->setMinimumHeight( 11 ); |
45 | PSEframe.current()->setPalette( QPalette( PSEColor( configobj.readEntry( "Block" ) ) ) ); | 46 | PSEframe.current()->setPalette( QPalette( PSEColor( configobj.readEntry( "Block" ) ) ) ); |
46 | connect( PSEframe.current(), SIGNAL( num(QString) ), this, SLOT( slotShowElement(QString) )); | 47 | connect( PSEframe.current(), SIGNAL( num(QString) ), this, SLOT( slotShowElement(QString) )); |
47 | } | 48 | } |
48 | 49 | ||
49 | oxyDW = new OxydataWidget(this); | 50 | oxyDW = new OxydataWidget(this); |
50 | oxyDW->setElement( 0 ); | 51 | oxyDW->setElement( 0 ); |
51 | 52 | ||