author | cniehaus <cniehaus> | 2002-09-19 20:47:36 (UTC) |
---|---|---|
committer | cniehaus <cniehaus> | 2002-09-19 20:47:36 (UTC) |
commit | 65ba4e3610c94ba1de71a41dd6bf69662555e206 (patch) (unidiff) | |
tree | 696c3d7317a3c5a13f14160d9281fe4e889cf5bc /noncore/apps/oxygen/psewidget.cpp | |
parent | f4162d2283ebf0327645e0ac66b539cf87565d0b (diff) | |
download | opie-65ba4e3610c94ba1de71a41dd6bf69662555e206.zip opie-65ba4e3610c94ba1de71a41dd6bf69662555e206.tar.gz opie-65ba4e3610c94ba1de71a41dd6bf69662555e206.tar.bz2 |
* codecleanup
* adding some const
* if you click on a "element" you will now really get the information
* removed obsolete class
Diffstat (limited to 'noncore/apps/oxygen/psewidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/oxygen/psewidget.cpp | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/noncore/apps/oxygen/psewidget.cpp b/noncore/apps/oxygen/psewidget.cpp index 506e0cb..f7725e3 100644 --- a/noncore/apps/oxygen/psewidget.cpp +++ b/noncore/apps/oxygen/psewidget.cpp | |||
@@ -9,22 +9,15 @@ | |||
9 | 9 | ||
10 | #include <qpe/config.h> | 10 | #include <qpe/config.h> |
11 | #include <qlayout.h> | 11 | #include <qlayout.h> |
12 | #include <qlabel.h> | ||
13 | #include <qlist.h> | 12 | #include <qlist.h> |
14 | #include <qvbox.h> | ||
15 | #include "dataTable.h" | 13 | #include "dataTable.h" |
16 | #include "psewidget.h" | 14 | #include "psewidget.h" |
17 | #include "oxyframe.h" | 15 | #include "oxyframe.h" |
18 | 16 | ||
19 | 17 | ||
20 | /*Element::Element( const QString &name ) | ||
21 | { | ||
22 | }*/ | ||
23 | |||
24 | |||
25 | PSEWidget::PSEWidget() : QWidget() | 18 | PSEWidget::PSEWidget() : QWidget() |
26 | { | 19 | { |
27 | this->setCaption( "Periodic System" ); | 20 | this->setCaption( tr( "Periodic System" ) ); |
28 | 21 | ||
29 | QVBoxLayout *vlay = new QVBoxLayout( this ); | 22 | QVBoxLayout *vlay = new QVBoxLayout( this ); |
30 | 23 | ||
@@ -34,20 +27,23 @@ PSEWidget::PSEWidget() : QWidget() | |||
34 | { | 27 | { |
35 | position( n+1,h,v ); | 28 | position( n+1,h,v ); |
36 | QList<OxyFrame> PSEframe; | 29 | QList<OxyFrame> PSEframe; |
37 | PSEframe.append( new OxyFrame( this , QString::number( n ) ) ); | 30 | PSEframe.append( new OxyFrame( this , QString::number(n) ) ); |
38 | grid->addWidget( PSEframe.current() , v/40+1 , h/40 ); | 31 | grid->addWidget( PSEframe.current() , v/40+1 , h/40 ); |
39 | PSEframe.current()->setMinimumHeight( 11 ); | 32 | PSEframe.current()->setMinimumHeight( 11 ); |
40 | connect( PSEframe.current(), SIGNAL( clicked() ), this, SLOT( slotShowElement() )); | 33 | connect( PSEframe.current(), SIGNAL( num(QString) ), this, SLOT( slotShowElement(QString) )); |
41 | } | 34 | } |
42 | 35 | ||
43 | OxydataWidget *oxyDW = new OxydataWidget(this); | 36 | oxyDW = new OxydataWidget(this); |
44 | oxyDW->setElement( 1 ); | 37 | oxyDW->setElement( 1 ); |
45 | 38 | ||
46 | vlay->addLayout( grid ); | 39 | vlay->addLayout( grid ); |
47 | vlay->addWidget( oxyDW ); | 40 | vlay->addWidget( oxyDW ); |
48 | } | 41 | } |
49 | 42 | ||
50 | void PSEWidget::slotShowElement(){ qDebug( "ja genau" );}; | 43 | void PSEWidget::slotShowElement(QString number) |
44 | { | ||
45 | oxyDW->setElement( number.toInt() ); | ||
46 | }; | ||
51 | 47 | ||
52 | void PSEWidget::position(int n, int& h, int& v) | 48 | void PSEWidget::position(int n, int& h, int& v) |
53 | { | 49 | { |