-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathattribute_error.py
More file actions
38 lines (24 loc) · 1.01 KB
/
attribute_error.py
File metadata and controls
38 lines (24 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/usr/bin/python3
# -*- coding: utf-8 -*
from PyQt5.QtWidgets import QWidget
from allplan_manage import AttributeDatas
from tools import set_appearance_number
from ui_attribute_unknown import Ui_AttributeUnknown
class AttributeUnknown(QWidget):
def __init__(self, attribute_obj: AttributeDatas, value: str):
super().__init__()
# -----------------------------------------------
# Interface
# -----------------------------------------------
self.ui = Ui_AttributeUnknown()
self.ui.setupUi(self)
# ------------
if isinstance(attribute_obj, AttributeDatas):
self.ui.num_attrib.setText(attribute_obj.number)
# ------------
self.ui.name_attrib.setText(attribute_obj.name)
self.ui.name_attrib.setToolTip(attribute_obj.tooltips)
# ------------
set_appearance_number(self.ui.num_attrib)
self.ui.value_attrib.setText(value)
# ------------