summaryrefslogtreecommitdiff
path: root/noncore/apps/oxygen/dataTable.cpp
Unidiff
Diffstat (limited to 'noncore/apps/oxygen/dataTable.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/oxygen/dataTable.cpp35
1 files changed, 27 insertions, 8 deletions
diff --git a/noncore/apps/oxygen/dataTable.cpp b/noncore/apps/oxygen/dataTable.cpp
index ff01417..f034c45 100644
--- a/noncore/apps/oxygen/dataTable.cpp
+++ b/noncore/apps/oxygen/dataTable.cpp
@@ -61,2 +61,3 @@ void OxydataWidget::setElement( int el )
61 61
62
62 DataTable->setText( 0,1,configobj.readEntry( "Weight" ) ); 63 DataTable->setText( 0,1,configobj.readEntry( "Weight" ) );
@@ -70,2 +71,3 @@ void OxydataWidget::setElement( int el )
70 DataTable->setText( 8,1,configobj.readEntry( "MP" ) ); 71 DataTable->setText( 8,1,configobj.readEntry( "MP" ) );
72
71} 73}
@@ -83,2 +85,3 @@ void OxydataWidget::setTable() const
83 DataTable->setText( 8,0, tr( "Meltingpoint" ) ); 85 DataTable->setText( 8,0, tr( "Meltingpoint" ) );
86
84} 87}
@@ -86,4 +89,13 @@ void OxydataWidget::setTable() const
86OxydataTable::OxydataTable(int numRows, int numCols, QWidget *parent, 89OxydataTable::OxydataTable(int numRows, int numCols, QWidget *parent,
87 const char *name) : QTable(numRows, numRows, parent, name) 90 const char *name) : QTable(numRows, numCols,parent, name)
88{ 91{
92
93 for (int zeile = 0; zeile < numRows; zeile++)
94 for ( int spalte = 0; spalte < numCols; spalte++ )
95 {
96 OxydataQTI *testus = new OxydataQTI (this, OxydataQTI::Never, "hm" );
97 setItem(zeile, spalte, (QTableItem*)testus);
98 }
99
100
89 this->setShowGrid( false ); 101 this->setShowGrid( false );
@@ -96,9 +108,2 @@ OxydataTable::OxydataTable(int numRows, int numCols, QWidget *parent,
96 108
97int OxydataTable::alignment() const
98{
99 return AlignLeft | AlignVCenter;
100};
101
102
103
104void OxydataTable::paintCell( QPainter *p, int row, int col, const QRect &cr, bool selected) 109void OxydataTable::paintCell( QPainter *p, int row, int col, const QRect &cr, bool selected)
@@ -122 +127,15 @@ void OxydataTable::paintCell( QPainter *p, int row, int col, const QRect &cr, b
122} 127}
128
129OxydataQTI::OxydataQTI(QTable * table, EditType et, const QString & text )
130 : QTableItem ( table, et, text )
131{
132}
133
134int OxydataQTI::alignment() const
135{
136 if ( col()%2 )
137 {
138 return AlignRight | AlignVCenter;
139 }else return AlignLeft | AlignVCenter;
140};
141