summaryrefslogtreecommitdiff
path: root/noncore/apps/oxygen/psewidget.cpp
Unidiff
Diffstat (limited to 'noncore/apps/oxygen/psewidget.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/oxygen/psewidget.cpp18
1 files changed, 15 insertions, 3 deletions
diff --git a/noncore/apps/oxygen/psewidget.cpp b/noncore/apps/oxygen/psewidget.cpp
index ab1467c..506e0cb 100644
--- a/noncore/apps/oxygen/psewidget.cpp
+++ b/noncore/apps/oxygen/psewidget.cpp
@@ -17,16 +17,18 @@
17#include "oxyframe.h" 17#include "oxyframe.h"
18 18
19 19
20Element::Element( const QString &name ) 20/*Element::Element( const QString &name )
21{ 21{
22} 22}*/
23 23
24 24
25PSEWidget::PSEWidget() : QWidget() 25PSEWidget::PSEWidget() : QWidget()
26{ 26{
27 this->setCaption( "Periodic System" ); 27 this->setCaption( "Periodic System" );
28 28
29 QGridLayout *grid = new QGridLayout( this, 18,10 ); 29 QVBoxLayout *vlay = new QVBoxLayout( this );
30
31 QGridLayout *grid = new QGridLayout( 18,10 );
30 int h=0, v=0; 32 int h=0, v=0;
31 for( int n = 0 ; n < 118 ; n++ ) 33 for( int n = 0 ; n < 118 ; n++ )
32 { 34 {
@@ -34,9 +36,19 @@ PSEWidget::PSEWidget() : QWidget()
34 QList<OxyFrame> PSEframe; 36 QList<OxyFrame> PSEframe;
35 PSEframe.append( new OxyFrame( this , QString::number( n ) ) ); 37 PSEframe.append( new OxyFrame( this , QString::number( n ) ) );
36 grid->addWidget( PSEframe.current() , v/40+1 , h/40 ); 38 grid->addWidget( PSEframe.current() , v/40+1 , h/40 );
39 PSEframe.current()->setMinimumHeight( 11 );
40 connect( PSEframe.current(), SIGNAL( clicked() ), this, SLOT( slotShowElement() ));
37 } 41 }
42
43 OxydataWidget *oxyDW = new OxydataWidget(this);
44 oxyDW->setElement( 1 );
45
46 vlay->addLayout( grid );
47 vlay->addWidget( oxyDW );
38} 48}
39 49
50void PSEWidget::slotShowElement(){ qDebug( "ja genau" );};
51
40void PSEWidget::position(int n, int& h, int& v) 52void PSEWidget::position(int n, int& h, int& v)
41{ 53{
42 //Hydrogen 54 //Hydrogen