-rw-r--r-- | noncore/apps/oxygen/calcdlg.ui | 220 | ||||
-rw-r--r-- | noncore/apps/oxygen/dataTable.cpp | 2 |
2 files changed, 121 insertions, 101 deletions
diff --git a/noncore/apps/oxygen/calcdlg.ui b/noncore/apps/oxygen/calcdlg.ui index 51bf334..60d312d 100644 --- a/noncore/apps/oxygen/calcdlg.ui +++ b/noncore/apps/oxygen/calcdlg.ui | |||
@@ -1,169 +1,187 @@ | |||
1 | <!DOCTYPE UI><UI> | 1 | <!DOCTYPE UI><UI> |
2 | <class>CalcDlg</class> | 2 | <class>CalcDlg</class> |
3 | <widget> | 3 | <widget> |
4 | <class>QWidget</class> | 4 | <class>QWidget</class> |
5 | <property stdset="1"> | 5 | <property stdset="1"> |
6 | <name>name</name> | 6 | <name>name</name> |
7 | <cstring>CalcDlg</cstring> | 7 | <cstring>CalcDlg</cstring> |
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>237</width> | 14 | <width>323</width> |
15 | <height>318</height> | 15 | <height>380</height> |
16 | </rect> | 16 | </rect> |
17 | </property> | 17 | </property> |
18 | <widget> | 18 | <property stdset="1"> |
19 | <class>QTabWidget</class> | 19 | <name>caption</name> |
20 | <string>CalcDlg</string> | ||
21 | </property> | ||
22 | <property> | ||
23 | <name>layoutMargin</name> | ||
24 | </property> | ||
25 | <property> | ||
26 | <name>layoutSpacing</name> | ||
27 | </property> | ||
28 | <grid> | ||
20 | <property stdset="1"> | 29 | <property stdset="1"> |
21 | <name>name</name> | 30 | <name>margin</name> |
22 | <cstring>TabWidget3</cstring> | 31 | <number>-1</number> |
23 | </property> | 32 | </property> |
24 | <property stdset="1"> | 33 | <property stdset="1"> |
25 | <name>geometry</name> | 34 | <name>spacing</name> |
26 | <rect> | 35 | <number>-1</number> |
27 | <x>0</x> | ||
28 | <y>0</y> | ||
29 | <width>240</width> | ||
30 | <height>320</height> | ||
31 | </rect> | ||
32 | </property> | 36 | </property> |
33 | <widget> | 37 | <widget row="0" column="0" > |
34 | <class>QWidget</class> | 38 | <class>QTabWidget</class> |
35 | <property stdset="1"> | 39 | <property stdset="1"> |
36 | <name>name</name> | 40 | <name>name</name> |
37 | <cstring>tab</cstring> | 41 | <cstring>TabWidget3</cstring> |
42 | </property> | ||
43 | <property> | ||
44 | <name>layoutMargin</name> | ||
45 | </property> | ||
46 | <property> | ||
47 | <name>layoutSpacing</name> | ||
38 | </property> | 48 | </property> |
39 | <attribute> | ||
40 | <name>title</name> | ||
41 | <string>Molecular Weight</string> | ||
42 | </attribute> | ||
43 | <widget> | 49 | <widget> |
44 | <class>QLayoutWidget</class> | 50 | <class>QWidget</class> |
45 | <property stdset="1"> | 51 | <property stdset="1"> |
46 | <name>name</name> | 52 | <name>name</name> |
47 | <cstring>Layout6</cstring> | 53 | <cstring>tab</cstring> |
48 | </property> | ||
49 | <property stdset="1"> | ||
50 | <name>geometry</name> | ||
51 | <rect> | ||
52 | <x>0</x> | ||
53 | <y>0</y> | ||
54 | <width>230</width> | ||
55 | <height>290</height> | ||
56 | </rect> | ||
57 | </property> | 54 | </property> |
55 | <attribute> | ||
56 | <name>title</name> | ||
57 | <string>Molecular Weight</string> | ||
58 | </attribute> | ||
58 | <vbox> | 59 | <vbox> |
59 | <property stdset="1"> | 60 | <property stdset="1"> |
60 | <name>margin</name> | 61 | <name>margin</name> |
61 | <number>0</number> | 62 | <number>-1</number> |
62 | </property> | 63 | </property> |
63 | <property stdset="1"> | 64 | <property stdset="1"> |
64 | <name>spacing</name> | 65 | <name>spacing</name> |
65 | <number>6</number> | 66 | <number>-1</number> |
66 | </property> | 67 | </property> |
67 | <widget> | 68 | <widget> |
68 | <class>QLabel</class> | ||
69 | <property stdset="1"> | ||
70 | <name>name</name> | ||
71 | <cstring>TextLabel2</cstring> | ||
72 | </property> | ||
73 | <property stdset="1"> | ||
74 | <name>text</name> | ||
75 | <string>Chemical Formula</string> | ||
76 | </property> | ||
77 | </widget> | ||
78 | <widget> | ||
79 | <class>QLineEdit</class> | ||
80 | <property stdset="1"> | ||
81 | <name>name</name> | ||
82 | <cstring>formula</cstring> | ||
83 | </property> | ||
84 | </widget> | ||
85 | <widget> | ||
86 | <class>QLayoutWidget</class> | 69 | <class>QLayoutWidget</class> |
87 | <property stdset="1"> | 70 | <property stdset="1"> |
88 | <name>name</name> | 71 | <name>name</name> |
89 | <cstring>Layout3</cstring> | 72 | <cstring>Layout6</cstring> |
90 | </property> | 73 | </property> |
91 | <hbox> | 74 | <vbox> |
92 | <property stdset="1"> | 75 | <property stdset="1"> |
93 | <name>margin</name> | 76 | <name>margin</name> |
94 | <number>0</number> | 77 | <number>0</number> |
95 | </property> | 78 | </property> |
96 | <property stdset="1"> | 79 | <property stdset="1"> |
97 | <name>spacing</name> | 80 | <name>spacing</name> |
98 | <number>6</number> | 81 | <number>6</number> |
99 | </property> | 82 | </property> |
100 | <widget> | 83 | <widget> |
101 | <class>QPushButton</class> | 84 | <class>QLabel</class> |
102 | <property stdset="1"> | 85 | <property stdset="1"> |
103 | <name>name</name> | 86 | <name>name</name> |
104 | <cstring>calculate</cstring> | 87 | <cstring>TextLabel2</cstring> |
105 | </property> | 88 | </property> |
106 | <property stdset="1"> | 89 | <property stdset="1"> |
107 | <name>text</name> | 90 | <name>text</name> |
108 | <string>Calculate</string> | 91 | <string>Chemical Formula</string> |
92 | </property> | ||
93 | </widget> | ||
94 | <widget> | ||
95 | <class>QLineEdit</class> | ||
96 | <property stdset="1"> | ||
97 | <name>name</name> | ||
98 | <cstring>formula</cstring> | ||
109 | </property> | 99 | </property> |
110 | </widget> | 100 | </widget> |
111 | <widget> | 101 | <widget> |
112 | <class>QPushButton</class> | 102 | <class>QLayoutWidget</class> |
113 | <property stdset="1"> | 103 | <property stdset="1"> |
114 | <name>name</name> | 104 | <name>name</name> |
115 | <cstring>clear_fields</cstring> | 105 | <cstring>Layout3</cstring> |
106 | </property> | ||
107 | <hbox> | ||
108 | <property stdset="1"> | ||
109 | <name>margin</name> | ||
110 | <number>0</number> | ||
111 | </property> | ||
112 | <property stdset="1"> | ||
113 | <name>spacing</name> | ||
114 | <number>6</number> | ||
115 | </property> | ||
116 | <widget> | ||
117 | <class>QPushButton</class> | ||
118 | <property stdset="1"> | ||
119 | <name>name</name> | ||
120 | <cstring>calculate</cstring> | ||
121 | </property> | ||
122 | <property stdset="1"> | ||
123 | <name>text</name> | ||
124 | <string>Calculate</string> | ||
125 | </property> | ||
126 | </widget> | ||
127 | <widget> | ||
128 | <class>QPushButton</class> | ||
129 | <property stdset="1"> | ||
130 | <name>name</name> | ||
131 | <cstring>clear_fields</cstring> | ||
132 | </property> | ||
133 | <property stdset="1"> | ||
134 | <name>text</name> | ||
135 | <string>Clear</string> | ||
136 | </property> | ||
137 | </widget> | ||
138 | </hbox> | ||
139 | </widget> | ||
140 | <widget> | ||
141 | <class>QLabel</class> | ||
142 | <property stdset="1"> | ||
143 | <name>name</name> | ||
144 | <cstring>TextLabel3</cstring> | ||
116 | </property> | 145 | </property> |
117 | <property stdset="1"> | 146 | <property stdset="1"> |
118 | <name>text</name> | 147 | <name>text</name> |
119 | <string>Clear</string> | 148 | <string>Molecular Weight (u):</string> |
120 | </property> | 149 | </property> |
121 | </widget> | 150 | </widget> |
122 | </hbox> | 151 | <widget> |
123 | </widget> | 152 | <class>QLineEdit</class> |
124 | <widget> | 153 | <property stdset="1"> |
125 | <class>QLabel</class> | 154 | <name>name</name> |
126 | <property stdset="1"> | 155 | <cstring>result</cstring> |
127 | <name>name</name> | 156 | </property> |
128 | <cstring>TextLabel3</cstring> | 157 | </widget> |
129 | </property> | 158 | <widget> |
130 | <property stdset="1"> | 159 | <class>QLabel</class> |
131 | <name>text</name> | 160 | <property stdset="1"> |
132 | <string>Molecular Weight (u):</string> | 161 | <name>name</name> |
133 | </property> | 162 | <cstring>TextLabel1</cstring> |
134 | </widget> | 163 | </property> |
135 | <widget> | 164 | <property stdset="1"> |
136 | <class>QLineEdit</class> | 165 | <name>text</name> |
137 | <property stdset="1"> | 166 | <string>Elemental Composition (%):</string> |
138 | <name>name</name> | 167 | </property> |
139 | <cstring>result</cstring> | 168 | </widget> |
140 | </property> | 169 | <widget> |
141 | </widget> | 170 | <class>QMultiLineEdit</class> |
142 | <widget> | 171 | <property stdset="1"> |
143 | <class>QLabel</class> | 172 | <name>name</name> |
144 | <property stdset="1"> | 173 | <cstring>anal_display</cstring> |
145 | <name>name</name> | 174 | </property> |
146 | <cstring>TextLabel1</cstring> | 175 | <property stdset="1"> |
147 | </property> | 176 | <name>readOnly</name> |
148 | <property stdset="1"> | 177 | <bool>true</bool> |
149 | <name>text</name> | 178 | </property> |
150 | <string>Elemental Composition (%):</string> | 179 | </widget> |
151 | </property> | 180 | </vbox> |
152 | </widget> | ||
153 | <widget> | ||
154 | <class>QMultiLineEdit</class> | ||
155 | <property stdset="1"> | ||
156 | <name>name</name> | ||
157 | <cstring>anal_display</cstring> | ||
158 | </property> | ||
159 | <property stdset="1"> | ||
160 | <name>readOnly</name> | ||
161 | <bool>true</bool> | ||
162 | </property> | ||
163 | </widget> | 181 | </widget> |
164 | </vbox> | 182 | </vbox> |
165 | </widget> | 183 | </widget> |
166 | </widget> | 184 | </widget> |
167 | </widget> | 185 | </grid> |
168 | </widget> | 186 | </widget> |
169 | </UI> | 187 | </UI> |
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 | |||
@@ -84,32 +84,34 @@ void OxydataWidget::setTable() const | |||
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 | } |