Diffstat (limited to 'noncore/apps/oxygen/dataTable.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/oxygen/dataTable.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/noncore/apps/oxygen/dataTable.cpp b/noncore/apps/oxygen/dataTable.cpp index 48e2b20..798230a 100644 --- a/noncore/apps/oxygen/dataTable.cpp +++ b/noncore/apps/oxygen/dataTable.cpp | |||
@@ -76,48 +76,50 @@ void OxydataWidget::setTable() const | |||
76 | DataTable->setText( 0,0, tr( "Weight" ) ); | 76 | DataTable->setText( 0,0, tr( "Weight" ) ); |
77 | DataTable->setText( 1,0, tr( "Block" )) ; | 77 | DataTable->setText( 1,0, tr( "Block" )) ; |
78 | DataTable->setText( 2,0, tr( "Group" )) ; | 78 | DataTable->setText( 2,0, tr( "Group" )) ; |
79 | DataTable->setText( 3,0, tr( "Electronegativity" )) ; | 79 | DataTable->setText( 3,0, tr( "Electronegativity" )) ; |
80 | DataTable->setText( 4,0, tr( "Atomic radius" )) ; | 80 | DataTable->setText( 4,0, tr( "Atomic radius" )) ; |
81 | DataTable->setText( 5,0, tr( "Ionization Energy" )) ; | 81 | DataTable->setText( 5,0, tr( "Ionization Energy" )) ; |
82 | DataTable->setText( 6,0, tr( "Density" )) ; | 82 | DataTable->setText( 6,0, tr( "Density" )) ; |
83 | DataTable->setText( 7,0, tr( "Boiling point" ) ); | 83 | DataTable->setText( 7,0, tr( "Boiling point" ) ); |
84 | DataTable->setText( 8,0, tr( "Melting point" ) ); | 84 | DataTable->setText( 8,0, tr( "Melting point" ) ); |
85 | } | 85 | } |
86 | 86 | ||
87 | void OxydataWidget::setLayout() | 87 | void OxydataWidget::setLayout() |
88 | { | 88 | { |
89 | #warning this is not working and I have no idea why! | 89 | #warning this is not working and I have no idea why! |
90 | // DataTable->setColumnWidth ( 0 , this->width()/2 ); | 90 | // DataTable->setColumnWidth ( 0 , this->width()/2 ); |
91 | // DataTable->setColumnWidth ( 1 , this->width()/2 ); | 91 | // DataTable->setColumnWidth ( 1 , this->width()/2 ); |
92 | 92 | ||
93 | //X DataTable->setColumnWidth ( 0 , 110 ); | 93 | //X DataTable->setColumnWidth ( 0 , 110 ); |
94 | //X DataTable->setColumnWidth ( 1 , 110 ); | 94 | //X DataTable->setColumnWidth ( 1 , 110 ); |
95 | } | 95 | } |
96 | 96 | ||
97 | OxydataTable::OxydataTable(int numRows, int numCols, QWidget *parent, | 97 | OxydataTable::OxydataTable(int numRows, int numCols, QWidget *parent, |
98 | const char *name) : QTable(numRows, numCols,parent, name) | 98 | const char *name) : QTable(numRows, numCols,parent, name) |
99 | { | 99 | { |
100 | setColumnStretchable( 0, true ); | ||
101 | setColumnStretchable( 1, true ); | ||
100 | 102 | ||
101 | for (int zeile = 0; zeile < numRows; zeile++) | 103 | for (int zeile = 0; zeile < numRows; zeile++) |
102 | for ( int spalte = 0; spalte < numCols; spalte++ ) | 104 | for ( int spalte = 0; spalte < numCols; spalte++ ) |
103 | { | 105 | { |
104 | OxydataQTI *testus = new OxydataQTI (this, OxydataQTI::Never, "hm" ); | 106 | OxydataQTI *testus = new OxydataQTI (this, OxydataQTI::Never, "hm" ); |
105 | setItem(zeile, spalte, (QTableItem*)testus); | 107 | setItem(zeile, spalte, (QTableItem*)testus); |
106 | } | 108 | } |
107 | 109 | ||
108 | 110 | ||
109 | this->setShowGrid( false ); | 111 | this->setShowGrid( false ); |
110 | this->setHScrollBarMode(QScrollView::AlwaysOff); | 112 | this->setHScrollBarMode(QScrollView::AlwaysOff); |
111 | this->horizontalHeader()->hide(); | 113 | this->horizontalHeader()->hide(); |
112 | this->verticalHeader()->hide(); | 114 | this->verticalHeader()->hide(); |
113 | this->setTopMargin( 0 ); | 115 | this->setTopMargin( 0 ); |
114 | this->setLeftMargin( 0 ); | 116 | this->setLeftMargin( 0 ); |
115 | } | 117 | } |
116 | 118 | ||
117 | void OxydataTable::paintCell( QPainter *p, int row, int col, const QRect &cr, bool selected) | 119 | void OxydataTable::paintCell( QPainter *p, int row, int col, const QRect &cr, bool selected) |
118 | { | 120 | { |
119 | if ( cr.width() == 0 || cr.height() == 0 ) | 121 | if ( cr.width() == 0 || cr.height() == 0 ) |
120 | return; | 122 | return; |
121 | selected = FALSE; | 123 | selected = FALSE; |
122 | 124 | ||
123 | QTableItem *itm = item( row, col ); | 125 | QTableItem *itm = item( row, col ); |