5 from python_qt_binding.QtCore
import Qt
6 from python_qt_binding.QtGui
import QHBoxLayout, QGroupBox, QTextEdit, QDoubleSpinBox, QColor
11 spin_box = QDoubleSpinBox()
12 spin_box.setValue(default_val)
13 spin_box.setRange(range_min, range_max)
14 spin_box.setDecimals(decimals)
15 spin_box.setSingleStep(single_step)
22 box_layout = QHBoxLayout()
23 box_layout.addLayout(layout)
25 group_box = QGroupBox()
27 group_box.setStyleSheet(
"QGroupBox { border: 1px solid gray; border-radius: 4px; margin-top: 0.5em; } QGroupBox::title { subcontrol-origin: margin; left: 10px; padding: 0 3px 0 3px; }")
28 group_box.setTitle(text)
29 group_box.setLayout(box_layout)
31 parent.addWidget(group_box)
36 box_layout = QHBoxLayout()
37 box_layout.addWidget(widget)
39 group_box = QGroupBox()
41 group_box.setStyleSheet(
"QGroupBox { border: 1px solid gray; border-radius: 4px; margin-top: 0.5em; } QGroupBox::title { subcontrol-origin: margin; left: 10px; padding: 0 3px 0 3px; }")
42 group_box.setTitle(text)
43 group_box.setLayout(box_layout)
45 parent.addWidget(group_box)
50 text_edit.setTextColor(color)
56 if error_status.error != 0:
59 if error_status.warning != 0:
60 output_message(text_edit, error_status.warning_msg, QColor(255, 165, 0))