summaryrefslogtreecommitdiff
path: root/noncore/apps/oxygen
authorcniehaus <cniehaus>2002-09-30 13:05:45 (UTC)
committer cniehaus <cniehaus>2002-09-30 13:05:45 (UTC)
commitb753c264b7acd26aba9f5a73c1fa0a7deb0b73a3 (patch) (unidiff)
treea5579c7242791b2602a764a781051c7f9a298be1 /noncore/apps/oxygen
parentece83520d6bf5c481275a3d4a8e792749119fa08 (diff)
downloadopie-b753c264b7acd26aba9f5a73c1fa0a7deb0b73a3.zip
opie-b753c264b7acd26aba9f5a73c1fa0a7deb0b73a3.tar.gz
opie-b753c264b7acd26aba9f5a73c1fa0a7deb0b73a3.tar.bz2
fixed one typo
I tried to fix the layouting problem but I give up. /me is to lame
Diffstat (limited to 'noncore/apps/oxygen') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/oxygen/calcdlg.ui4
-rw-r--r--noncore/apps/oxygen/dataTable.cpp10
-rw-r--r--noncore/apps/oxygen/dataTable.h3
-rw-r--r--noncore/apps/oxygen/datawidgetui.cpp1
-rw-r--r--noncore/apps/oxygen/psewidget.cpp1
5 files changed, 15 insertions, 4 deletions
diff --git a/noncore/apps/oxygen/calcdlg.ui b/noncore/apps/oxygen/calcdlg.ui
index a8ed170..c817a47 100644
--- a/noncore/apps/oxygen/calcdlg.ui
+++ b/noncore/apps/oxygen/calcdlg.ui
@@ -8,13 +8,13 @@
8 </property> 8 </property>
9 <property stdset="1"> 9 <property stdset="1">
10 <name>geometry</name> 10 <name>geometry</name>
11 <rect> 11 <rect>
12 <x>0</x> 12 <x>0</x>
13 <y>0</y> 13 <y>0</y>
14 <width>241</width> 14 <width>237</width>
15 <height>318</height> 15 <height>318</height>
16 </rect> 16 </rect>
17 </property> 17 </property>
18 <property stdset="1"> 18 <property stdset="1">
19 <name>caption</name> 19 <name>caption</name>
20 <string>Form1</string> 20 <string>Form1</string>
@@ -73,13 +73,13 @@
73 <property stdset="1"> 73 <property stdset="1">
74 <name>name</name> 74 <name>name</name>
75 <cstring>TextLabel2</cstring> 75 <cstring>TextLabel2</cstring>
76 </property> 76 </property>
77 <property stdset="1"> 77 <property stdset="1">
78 <name>text</name> 78 <name>text</name>
79 <string>chemical Formula</string> 79 <string>Chemical Formula</string>
80 </property> 80 </property>
81 </widget> 81 </widget>
82 <widget> 82 <widget>
83 <class>QLineEdit</class> 83 <class>QLineEdit</class>
84 <property stdset="1"> 84 <property stdset="1">
85 <name>name</name> 85 <name>name</name>
diff --git a/noncore/apps/oxygen/dataTable.cpp b/noncore/apps/oxygen/dataTable.cpp
index 98d3bd8..82b425e 100644
--- a/noncore/apps/oxygen/dataTable.cpp
+++ b/noncore/apps/oxygen/dataTable.cpp
@@ -40,13 +40,12 @@ OxydataWidget::OxydataWidget(QWidget *parent) : QWidget(parent)
40 QFont bf; 40 QFont bf;
41 bf.setBold( true ); 41 bf.setBold( true );
42 bf.setPointSize( bf.pointSize()+2 ); 42 bf.setPointSize( bf.pointSize()+2 );
43 middle->setFont( bf ); 43 middle->setFont( bf );
44 44
45 DataTable = new OxydataTable( 9,2, this ); 45 DataTable = new OxydataTable( 9,2, this );
46 //DataTable->setColumnWidth ( 1 , ( parent->width())-10 );
47 setTable(); 46 setTable();
48 47
49 qgrid->addWidget( hbox,0,0 ); 48 qgrid->addWidget( hbox,0,0 );
50 qgrid->addWidget( DataTable,1,0 ); 49 qgrid->addWidget( DataTable,1,0 );
51} 50}
52 51
@@ -80,13 +79,22 @@ void OxydataWidget::setTable() const
80 DataTable->setText( 3,0, tr( "Electronegativity" )) ; 79 DataTable->setText( 3,0, tr( "Electronegativity" )) ;
81 DataTable->setText( 4,0, tr( "Atomic radius" )) ; 80 DataTable->setText( 4,0, tr( "Atomic radius" )) ;
82 DataTable->setText( 5,0, tr( "Ionizationenergie" )) ; 81 DataTable->setText( 5,0, tr( "Ionizationenergie" )) ;
83 DataTable->setText( 6,0, tr( "Density" )) ; 82 DataTable->setText( 6,0, tr( "Density" )) ;
84 DataTable->setText( 7,0, tr( "Boilingpoint" ) ); 83 DataTable->setText( 7,0, tr( "Boilingpoint" ) );
85 DataTable->setText( 8,0, tr( "Meltingpoint" ) ); 84 DataTable->setText( 8,0, tr( "Meltingpoint" ) );
85}
86
87void OxydataWidget::setLayout()
88{
89#warning this is not working and I have no idea why!
90// DataTable->setColumnWidth ( 0 , this->width()/2 );
91// DataTable->setColumnWidth ( 1 , this->width()/2 );
86 92
93 DataTable->setColumnWidth ( 0 , 110 );
94 DataTable->setColumnWidth ( 1 , 110 );
87} 95}
88 96
89OxydataTable::OxydataTable(int numRows, int numCols, QWidget *parent, 97OxydataTable::OxydataTable(int numRows, int numCols, QWidget *parent,
90 const char *name) : QTable(numRows, numCols,parent, name) 98 const char *name) : QTable(numRows, numCols,parent, name)
91{ 99{
92 100
diff --git a/noncore/apps/oxygen/dataTable.h b/noncore/apps/oxygen/dataTable.h
index a4a3b18..f2eb71d 100644
--- a/noncore/apps/oxygen/dataTable.h
+++ b/noncore/apps/oxygen/dataTable.h
@@ -31,16 +31,17 @@ class OxydataWidget : public QWidget
31 Q_OBJECT 31 Q_OBJECT
32 32
33 public: 33 public:
34 OxydataWidget(QWidget *parent=0); 34 OxydataWidget(QWidget *parent=0);
35 35
36 QLabel *left, *middle, *right; 36 QLabel *left, *middle, *right;
37 void setLayout();
37 38
38 private: 39 private:
39 OxydataTable *DataTable;
40 void setTable() const; 40 void setTable() const;
41 OxydataTable *DataTable;
41 42
42 public slots: 43 public slots:
43 void setElement( int ); 44 void setElement( int );
44}; 45};
45 46
46/* 47/*
diff --git a/noncore/apps/oxygen/datawidgetui.cpp b/noncore/apps/oxygen/datawidgetui.cpp
index c7afa32..99c4fd7 100644
--- a/noncore/apps/oxygen/datawidgetui.cpp
+++ b/noncore/apps/oxygen/datawidgetui.cpp
@@ -42,11 +42,12 @@ dataWidgetUI::dataWidgetUI() : QWidget()
42 dataCombo->insertItem( QString::number( i )+" - "+foo ); 42 dataCombo->insertItem( QString::number( i )+" - "+foo );
43 } 43 }
44 44
45 OxydataWidget *oxyDW = new OxydataWidget(this); 45 OxydataWidget *oxyDW = new OxydataWidget(this);
46 connect ( dataCombo, SIGNAL( activated(int) ), oxyDW, SLOT( setElement(int) ) ); 46 connect ( dataCombo, SIGNAL( activated(int) ), oxyDW, SLOT( setElement(int) ) );
47 oxyDW->setElement( 0 ); 47 oxyDW->setElement( 0 );
48 oxyDW->setLayout();
48 49
49 qgrid->addWidget( dataCombo, 0,0); 50 qgrid->addWidget( dataCombo, 0,0);
50 qgrid->addWidget( oxyDW , 1,0 ); 51 qgrid->addWidget( oxyDW , 1,0 );
51} 52}
52 53
diff --git a/noncore/apps/oxygen/psewidget.cpp b/noncore/apps/oxygen/psewidget.cpp
index ba9b71a..18b41c3 100644
--- a/noncore/apps/oxygen/psewidget.cpp
+++ b/noncore/apps/oxygen/psewidget.cpp
@@ -46,12 +46,13 @@ PSEWidget::PSEWidget() : QWidget()
46 PSEframe.current()->setPalette( QPalette( PSEColor( configobj.readEntry( "Block" ) ) ) ); 46 PSEframe.current()->setPalette( QPalette( PSEColor( configobj.readEntry( "Block" ) ) ) );
47 connect( PSEframe.current(), SIGNAL( num(QString) ), this, SLOT( slotShowElement(QString) )); 47 connect( PSEframe.current(), SIGNAL( num(QString) ), this, SLOT( slotShowElement(QString) ));
48 } 48 }
49 49
50 oxyDW = new OxydataWidget(this); 50 oxyDW = new OxydataWidget(this);
51 oxyDW->setElement( 0 ); 51 oxyDW->setElement( 0 );
52 oxyDW->setLayout();
52 53
53 vlay->addLayout( grid ); 54 vlay->addLayout( grid );
54 vlay->addWidget( oxyDW ); 55 vlay->addWidget( oxyDW );
55} 56}
56 57
57QColor PSEWidget::PSEColor( QString block ) 58QColor PSEWidget::PSEColor( QString block )