From 65ba4e3610c94ba1de71a41dd6bf69662555e206 Mon Sep 17 00:00:00 2001 From: cniehaus Date: Thu, 19 Sep 2002 20:47:36 +0000 Subject: * codecleanup * adding some const * if you click on a "element" you will now really get the information * removed obsolete class --- (limited to 'noncore/apps/oxygen/psewidget.cpp') 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 @@ #include #include -#include #include -#include #include "dataTable.h" #include "psewidget.h" #include "oxyframe.h" -/*Element::Element( const QString &name ) -{ -}*/ - - PSEWidget::PSEWidget() : QWidget() { - this->setCaption( "Periodic System" ); + this->setCaption( tr( "Periodic System" ) ); QVBoxLayout *vlay = new QVBoxLayout( this ); @@ -34,20 +27,23 @@ PSEWidget::PSEWidget() : QWidget() { position( n+1,h,v ); QList PSEframe; - PSEframe.append( new OxyFrame( this , QString::number( n ) ) ); + PSEframe.append( new OxyFrame( this , QString::number(n) ) ); grid->addWidget( PSEframe.current() , v/40+1 , h/40 ); PSEframe.current()->setMinimumHeight( 11 ); - connect( PSEframe.current(), SIGNAL( clicked() ), this, SLOT( slotShowElement() )); + connect( PSEframe.current(), SIGNAL( num(QString) ), this, SLOT( slotShowElement(QString) )); } - OxydataWidget *oxyDW = new OxydataWidget(this); + oxyDW = new OxydataWidget(this); oxyDW->setElement( 1 ); vlay->addLayout( grid ); vlay->addWidget( oxyDW ); } -void PSEWidget::slotShowElement(){ qDebug( "ja genau" );}; +void PSEWidget::slotShowElement(QString number) +{ + oxyDW->setElement( number.toInt() ); +}; void PSEWidget::position(int n, int& h, int& v) { -- cgit v0.9.0.2