projects
/
bertos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use QDoubleSpinBox instead of QSpinBox for the long variables
[bertos.git]
/
wizard
/
BModulePage.py
diff --git
a/wizard/BModulePage.py
b/wizard/BModulePage.py
index 83a2375f6d5814a73e01a1cb4671003491ce0111..02a743741c6b751081b3659460be149c575655a5 100644
(file)
--- a/
wizard/BModulePage.py
+++ b/
wizard/BModulePage.py
@@
-100,15
+100,19
@@
class BModulePage(BWizardPage):
self._controlGroup.addControl(index, comboBox)
else:
## int, long or undefined type property
self._controlGroup.addControl(index, comboBox)
else:
## int, long or undefined type property
- spinBox = QSpinBox()
+ spinBox = None
+ if bertos_utils.isLong(configurations[property]) or bertos_utils.isUnsignedLong(configurations[property]):
+ spinBox = QDoubleSpinBox()
+ spinBox.setDecimals(0)
+ else:
+ spinBox = QSpinBox()
self.pageContent.propertyTable.setCellWidget(index, 1, spinBox)
self.pageContent.propertyTable.setCellWidget(index, 1, spinBox)
- if bertos_utils.isInt(configurations[property]):
- minimum = -32768
- maximmum = 32767
- suff = ""
- elif bertos_utils.isLong(configurations[property]):
- minimum = -2147483648L
- maximum = 2147483647L
+ minimum = -32768
+ maximum = 32767
+ suff = ""
+ if bertos_utils.isLong(configurations[property]):
+ minimum = -2147483648
+ maximum = 2147483647
suff = "L"
elif bertos_utils.isUnsigned(configurations[property]):
minimum = 0
suff = "L"
elif bertos_utils.isUnsigned(configurations[property]):
minimum = 0
@@
-116,7
+120,7
@@
class BModulePage(BWizardPage):
suff = "U"
elif bertos_utils.isUnsignedLong(configurations[property]):
minimum = 0
suff = "U"
elif bertos_utils.isUnsignedLong(configurations[property]):
minimum = 0
- maximum = 4294967295
L
+ maximum = 4294967295
suff = "UL"
if "min" in configurations[property]["informations"].keys():
minimum = int(configurations[property]["informations"]["min"])
suff = "UL"
if "min" in configurations[property]["informations"].keys():
minimum = int(configurations[property]["informations"]["min"])