1
<?xml version="1.0" encoding="UTF-8"?>
3
<class>gasCalculator</class>
4
<widget class="QWidget" name="gasCalculator">
5
<property name="geometry">
13
<layout class="QVBoxLayout" name="verticalLayout_2">
15
<widget class="KTextEdit" name="ktextedit">
16
<property name="maximumSize">
18
<width>16777215</width>
22
<property name="readOnly">
25
<property name="html">
26
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
27
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
28
p, li { white-space: pre-wrap; }
29
</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;">
30
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'DejaVu Sans'; font-size:12pt; font-weight:600;">Change the quantities and observe the other quantities change dynamically.<br />Mass and moles are directly dependent for a given gas.</span></p></body></html></string>
35
<widget class="QGroupBox" name="groupBox">
36
<property name="title">
39
<layout class="QGridLayout" name="gridLayout">
40
<item row="1" column="0">
41
<widget class="QLabel" name="label_2">
42
<property name="text">
43
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
44
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
45
p, li { white-space: pre-wrap; }
46
</style></head><body style=" font-family:'DejaVu Sans'; font-size:9pt; font-weight:400; font-style:normal;">
47
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt; font-weight:600;">molar mass of the gas:</span></p></body></html></string>
49
<property name="alignment">
50
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
54
<item row="1" column="1">
55
<widget class="QDoubleSpinBox" name="molarMass">
56
<property name="toolTip">
57
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
58
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
59
p, li { white-space: pre-wrap; }
60
</style></head><body style=" font-family:'DejaVu Sans'; font-size:9pt; font-weight:400; font-style:normal;">
61
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt;">Specify the molar mass of the gas</span></p></body></html></string>
63
<property name="whatsThis">
64
<string>This box can be used to specify the molar mass of the gas, e.g. 2 for Hydrogen gas.</string>
66
<property name="decimals">
69
<property name="maximum">
70
<double>1000000000.000000000000000</double>
74
<item row="2" column="0">
75
<widget class="QLabel" name="label_25">
76
<property name="text">
77
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
78
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
79
p, li { white-space: pre-wrap; }
80
</style></head><body style=" font-family:'DejaVu Sans'; font-size:9pt; font-weight:400; font-style:normal;">
81
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt; font-weight:600;">moles:</span></p></body></html></string>
83
<property name="alignment">
84
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
88
<item row="2" column="1">
89
<widget class="QDoubleSpinBox" name="moles">
90
<property name="toolTip">
91
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
92
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
93
p, li { white-space: pre-wrap; }
94
</style></head><body style=" font-family:'DejaVu Sans'; font-size:9pt; font-weight:400; font-style:normal;">
95
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt;">Specify the number of moles of the gas</span></p></body></html></string>
97
<property name="whatsThis">
98
<string>This box can be used to specify the number of moles of the gas.
99
moles = mass / molar mass</string>
101
<property name="decimals">
104
<property name="maximum">
105
<double>1000000000.000000000000000</double>
109
<item row="3" column="0">
110
<widget class="QLabel" name="label_24">
111
<property name="text">
112
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
113
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
114
p, li { white-space: pre-wrap; }
115
</style></head><body style=" font-family:'DejaVu Sans'; font-size:9pt; font-weight:400; font-style:normal;">
116
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt; font-weight:600;">Mass:</span></p></body></html></string>
118
<property name="alignment">
119
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
123
<item row="3" column="1">
124
<widget class="QDoubleSpinBox" name="mass">
125
<property name="toolTip">
126
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
127
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
128
p, li { white-space: pre-wrap; }
129
</style></head><body style=" font-family:'DejaVu Sans'; font-size:9pt; font-weight:400; font-style:normal;">
130
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt;">Specify the Mass of the gas</span></p></body></html></string>
132
<property name="whatsThis">
133
<string>This box can be used to specify the mass of the gas.
134
Mass = moles * molar mass</string>
136
<property name="decimals">
139
<property name="maximum">
140
<double>1000000000.000000000000000</double>
144
<item row="3" column="2">
145
<widget class="QComboBox" name="mass_unit">
146
<property name="toolTip">
147
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
148
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
149
p, li { white-space: pre-wrap; }
150
</style></head><body style=" font-family:'DejaVu Sans'; font-size:9pt; font-weight:400; font-style:normal;">
151
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt;">Specify the unit of mass of the gas</span></p></body></html></string>
153
<property name="whatsThis">
154
<string>This box is used to change the units of mass.</string>
158
<item row="3" column="3">
159
<spacer name="horizontalSpacer">
160
<property name="orientation">
161
<enum>Qt::Horizontal</enum>
163
<property name="sizeHint" stdset="0">
171
<item row="4" column="0">
172
<widget class="QLabel" name="label_27">
173
<property name="text">
174
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
175
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
176
p, li { white-space: pre-wrap; }
177
</style></head><body style=" font-family:'DejaVu Sans'; font-size:9pt; font-weight:400; font-style:normal;">
178
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt; font-weight:600;">Pressure:</span></p></body></html></string>
180
<property name="alignment">
181
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
185
<item row="4" column="1">
186
<widget class="QDoubleSpinBox" name="pressure">
187
<property name="toolTip">
188
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
189
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
190
p, li { white-space: pre-wrap; }
191
</style></head><body style=" font-family:'DejaVu Sans'; font-size:9pt; font-weight:400; font-style:normal;">
192
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt;">Specify the Pressure of the gas</span></p></body></html></string>
194
<property name="whatsThis">
195
<string>This box can be used to change the pressure of the gas.</string>
197
<property name="decimals">
200
<property name="maximum">
201
<double>1000000000.000000000000000</double>
205
<item row="4" column="2">
206
<widget class="QComboBox" name="pressure_unit">
207
<property name="toolTip">
208
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
209
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
210
p, li { white-space: pre-wrap; }
211
</style></head><body style=" font-family:'DejaVu Sans'; font-size:9pt; font-weight:400; font-style:normal;">
212
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt;">Specify the units for pressure of the gas</span></p></body></html></string>
214
<property name="whatsThis">
215
<string>This box can be used to specify the units of pressure, e.g. atmospheres, bars, etc.</string>
219
<item row="5" column="0">
220
<widget class="QLabel" name="label_29">
221
<property name="text">
222
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
223
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
224
p, li { white-space: pre-wrap; }
225
</style></head><body style=" font-family:'DejaVu Sans'; font-size:9pt; font-weight:400; font-style:normal;">
226
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt; font-weight:600;">Temperature:</span></p></body></html></string>
228
<property name="alignment">
229
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
233
<item row="5" column="1">
234
<widget class="QDoubleSpinBox" name="temp">
235
<property name="toolTip">
236
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
237
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
238
p, li { white-space: pre-wrap; }
239
</style></head><body style=" font-family:'DejaVu Sans'; font-size:9pt; font-weight:400; font-style:normal;">
240
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt;">Specify the temperature of the gas</span></p></body></html></string>
242
<property name="whatsThis">
243
<string>This box can be used to specify the temperature of the gas.</string>
245
<property name="decimals">
248
<property name="maximum">
249
<double>1000000000.000000000000000</double>
253
<item row="5" column="2">
254
<widget class="QComboBox" name="temp_unit">
255
<property name="toolTip">
256
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
257
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
258
p, li { white-space: pre-wrap; }
259
</style></head><body style=" font-family:'DejaVu Sans'; font-size:9pt; font-weight:400; font-style:normal;">
260
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt;">Specify the units for the temperature of the gas</span></p></body></html></string>
262
<property name="whatsThis">
263
<string>This box can be used to specify the units of temperature, e.g. Kelvin, Celsius, etc.</string>
267
<item row="6" column="0">
268
<widget class="QLabel" name="label_26">
269
<property name="text">
270
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
271
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
272
p, li { white-space: pre-wrap; }
273
</style></head><body style=" font-family:'DejaVu Sans'; font-size:9pt; font-weight:400; font-style:normal;">
274
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt; font-weight:600;">Volume:</span></p></body></html></string>
276
<property name="alignment">
277
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
281
<item row="6" column="1">
282
<widget class="QDoubleSpinBox" name="volume">
283
<property name="toolTip">
284
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
285
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
286
p, li { white-space: pre-wrap; }
287
</style></head><body style=" font-family:'DejaVu Sans'; font-size:9pt; font-weight:400; font-style:normal;">
288
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt;">Specify the volume of the gas</span></p></body></html></string>
290
<property name="whatsThis">
291
<string>This box can be used to specify the volume of the gas.</string>
293
<property name="readOnly">
296
<property name="decimals">
299
<property name="maximum">
300
<double>1000000000.000000000000000</double>
304
<item row="6" column="2">
305
<widget class="QComboBox" name="volume_unit">
306
<property name="enabled">
309
<property name="toolTip">
310
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
311
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
312
p, li { white-space: pre-wrap; }
313
</style></head><body style=" font-family:'DejaVu Sans'; font-size:9pt; font-weight:400; font-style:normal;">
314
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt;">Specify the units for volume of the gas</span></p></body></html></string>
316
<property name="whatsThis">
317
<string>This box can be used to change the units of volume, e.g. liters.</string>
321
<item row="0" column="0">
322
<widget class="QLabel" name="label_3">
323
<property name="text">
324
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
325
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
326
p, li { white-space: pre-wrap; }
327
</style></head><body style=" font-family:'DejaVu Sans'; font-size:9pt; font-weight:400; font-style:normal;">
328
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt; font-weight:600;">Calculate:</span></p></body></html></string>
330
<property name="alignment">
331
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
335
<item row="0" column="1">
336
<widget class="QComboBox" name="mode">
337
<property name="currentIndex">
341
<property name="text">
342
<string>Moles / Mass</string>
346
<property name="text">
347
<string>Pressure</string>
351
<property name="text">
352
<string>Temperature</string>
356
<property name="text">
357
<string>Volume</string>
362
<item row="1" column="2">
363
<widget class="QLabel" name="label_4">
364
<property name="text">
365
<string>(g/mol)</string>
373
<widget class="QGroupBox" name="non_ideal">
374
<property name="title">
375
<string>Data for non-ideal gases</string>
377
<layout class="QVBoxLayout" name="verticalLayout">
379
<layout class="QGridLayout" name="gridLayout_4">
380
<item row="0" column="0">
381
<widget class="QLabel" name="label_30">
382
<property name="text">
383
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
384
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
385
p, li { white-space: pre-wrap; }
386
</style></head><body style=" font-family:'DejaVu Sans'; font-size:9pt; font-weight:400; font-style:normal;">
387
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt; font-weight:600;">Van der Waals constant 'b':</span></p></body></html></string>
389
<property name="alignment">
390
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
394
<item row="1" column="0">
395
<widget class="QLabel" name="label_28">
396
<property name="text">
397
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
398
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
399
p, li { white-space: pre-wrap; }
400
</style></head><body style=" font-family:'DejaVu Sans'; font-size:9pt; font-weight:400; font-style:normal;">
401
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt; font-weight:600;">Van der Waals constant 'a':</span></p></body></html></string>
403
<property name="alignment">
404
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
408
<item row="0" column="1">
409
<widget class="QDoubleSpinBox" name="b">
410
<property name="toolTip">
411
<string>Specify the units of the van der Waals constant 'b'</string>
413
<property name="whatsThis">
414
<string>This box can be used to specify the van der Waals constant 'b' for the gas. This is required only for a real gas. It can be marked as 0.0 for an ideal gas.</string>
416
<property name="decimals">
419
<property name="maximum">
420
<double>1000000000.000000000000000</double>
424
<item row="1" column="1">
425
<widget class="QDoubleSpinBox" name="a">
426
<property name="toolTip">
427
<string>Specify the units of the van der Waals constant 'a'</string>
429
<property name="whatsThis">
430
<string>This box can be used to specify the van der Waals constant 'a' for the gas. This is required only for a real gas. It can be marked as 0.0 for an ideal gas.</string>
432
<property name="decimals">
435
<property name="maximum">
436
<double>1000000000.000000000000000</double>
440
<item row="0" column="2">
441
<layout class="QHBoxLayout" name="horizontalLayout">
443
<widget class="QComboBox" name="b_unit">
444
<property name="toolTip">
445
<string>The units of the van der Waals constant 'b'</string>
447
<property name="whatsThis">
448
<string>This can be used to specify the units of the van der Waals constant 'b'.</string>
453
<widget class="QLabel" name="label">
454
<property name="text">
455
<string>per mole</string>
461
<item row="0" column="3">
462
<spacer name="horizontalSpacer_2">
463
<property name="orientation">
464
<enum>Qt::Horizontal</enum>
466
<property name="sizeHint" stdset="0">
474
<item row="1" column="2">
475
<widget class="QLabel" name="label_5">
476
<property name="text">
477
<string>liter^2 atmosphere/mol^2</string>
487
<widget class="QLabel" name="result">
488
<property name="text">
494
<widget class="QLabel" name="error">
495
<property name="text">
501
<layout class="QHBoxLayout" name="horizontalLayout_12">
503
<spacer name="horizontalSpacer_22">
504
<property name="orientation">
505
<enum>Qt::Horizontal</enum>
507
<property name="sizeHint" stdset="0">
516
<widget class="QPushButton" name="reset">
517
<property name="toolTip">
518
<string>Click to reset all values to initial values</string>
520
<property name="text">
521
<string>Reset</string>
531
<class>KTextEdit</class>
532
<extends>QTextEdit</extends>
533
<header>ktextedit.h</header>