summaryrefslogtreecommitdiff
path: root/noncore/apps/oxygen/psewidget.cpp
Unidiff
Diffstat (limited to 'noncore/apps/oxygen/psewidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/oxygen/psewidget.cpp2
1 files changed, 0 insertions, 2 deletions
diff --git a/noncore/apps/oxygen/psewidget.cpp b/noncore/apps/oxygen/psewidget.cpp
index be5185b..7f7ae0c 100644
--- a/noncore/apps/oxygen/psewidget.cpp
+++ b/noncore/apps/oxygen/psewidget.cpp
@@ -1,48 +1,46 @@
1/*************************************************************************** 1/***************************************************************************
2 application: : Oxygen 2 application: : Oxygen
3 3
4 begin : September 2002 4 begin : September 2002
5 copyright : ( C ) 2002, 2003 by Carsten Niehaus 5 copyright : ( C ) 2002, 2003 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 <qpe/qpeapplication.h>
21#include <qlist.h>
22#include "dataTable.h" 21#include "dataTable.h"
23#include "psewidget.h" 22#include "psewidget.h"
24#include "oxyframe.h"
25 23
26 24
27PSEWidget::PSEWidget(const QStringList &list) : QWidget() 25PSEWidget::PSEWidget(const QStringList &list) : QWidget()
28{ 26{
29 this->setCaption( tr( "Periodic System" ) ); 27 this->setCaption( tr( "Periodic System" ) );
30 28
31 lastElement=1; 29 lastElement=1;
32 names = list; 30 names = list;
33 31
34 QVBoxLayout *vlay = new QVBoxLayout( this ); 32 QVBoxLayout *vlay = new QVBoxLayout( this );
35 33
36 QGridLayout *grid = new QGridLayout( 18,10 ); 34 QGridLayout *grid = new QGridLayout( 18,10 );
37 int h=0, v=0; 35 int h=0, v=0;
38 36
39 Config configobj( QPEApplication::qpeDir() +"share/oxygen/oxygendata", Config::File ); 37 Config configobj( QPEApplication::qpeDir() +"share/oxygen/oxygendata", Config::File );
40 for( int n = 0 ; n < 109 ; n++ ) 38 for( int n = 0 ; n < 109 ; n++ )
41 { 39 {
42 configobj.setGroup( QString::number( n+1 )); 40 configobj.setGroup( QString::number( n+1 ));
43 41
44 position( n+1,h,v ); 42 position( n+1,h,v );
45 PSEframe.append( new OxyFrame( this , QString::number(n), configobj.readEntry( "Symbol" ) ) ); 43 PSEframe.append( new OxyFrame( this , QString::number(n), configobj.readEntry( "Symbol" ) ) );
46 grid->addWidget( PSEframe.current() , v/40+1 , h/40 ); 44 grid->addWidget( PSEframe.current() , v/40+1 , h/40 );
47 PSEframe.current()->setMinimumHeight( 11 ); 45 PSEframe.current()->setMinimumHeight( 11 );
48 PSEframe.current()->setPalette( QPalette( PSEColor( configobj.readEntry( "Block" ) ) ) ); 46 PSEframe.current()->setPalette( QPalette( PSEColor( configobj.readEntry( "Block" ) ) ) );