From 8b7363e22c3d8ba53baf14e6eb31ea3958b43e9c Mon Sep 17 00:00:00 2001 From: tille Date: Sun, 17 Nov 2002 17:41:36 +0000 Subject: added atom symbols in table --- (limited to 'noncore/apps/oxygen') diff --git a/noncore/apps/oxygen/oxyframe.cpp b/noncore/apps/oxygen/oxyframe.cpp index c61c8e5..2ce40e7 100644 --- a/noncore/apps/oxygen/oxyframe.cpp +++ b/noncore/apps/oxygen/oxyframe.cpp @@ -19,13 +19,21 @@ #include #include "oxyframe.h" -OxyFrame::OxyFrame(QWidget *parent, const char *name) : QFrame(parent,name) +OxyFrame::OxyFrame(QWidget *parent, const char *name, QString symbol ) + : QLabel(parent,name) { N = name; this->setFrameStyle( QFrame::Box ); this->setLineWidth( 0 ); this->setMidLineWidth( 1 ); this->setFrameShadow( QFrame::Sunken ); + setMinimumSize(6,6); + setScaledContents( true ); + QFont font; + font.setWeight(QFont::Light); + font.setPixelSize(3); + setFont( font ); + setText( symbol ); } void OxyFrame::mousePressEvent ( QMouseEvent * e ){ diff --git a/noncore/apps/oxygen/oxyframe.h b/noncore/apps/oxygen/oxyframe.h index 4543504..9736ea9 100644 --- a/noncore/apps/oxygen/oxyframe.h +++ b/noncore/apps/oxygen/oxyframe.h @@ -18,14 +18,14 @@ #define _OXYFRAME_H -#include +#include -class OxyFrame : public QFrame +class OxyFrame : public QLabel { Q_OBJECT public: - OxyFrame( QWidget *parent=0, const char *name=0); + OxyFrame( QWidget *parent=0, const char *name=0, QString symbol="" ); void mousePressEvent( QMouseEvent *); diff --git a/noncore/apps/oxygen/psewidget.cpp b/noncore/apps/oxygen/psewidget.cpp index 18b41c3..d742e9c 100644 --- a/noncore/apps/oxygen/psewidget.cpp +++ b/noncore/apps/oxygen/psewidget.cpp @@ -40,7 +40,7 @@ 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), configobj.readEntry( "Symbol" ) ) ); grid->addWidget( PSEframe.current() , v/40+1 , h/40 ); PSEframe.current()->setMinimumHeight( 11 ); PSEframe.current()->setPalette( QPalette( PSEColor( configobj.readEntry( "Block" ) ) ) ); -- cgit v0.9.0.2