개정판 506c5823
issue #000 : 테스트 코드 삭제
Change-Id: Ie2a7972ac858f16cd07410b3d53326c92f4b7512
HYTOS/HYTOS/ConfigurationDialog.py | ||
---|---|---|
13 | 13 |
from AppDocData import Color |
14 | 14 |
import Configuration_UI |
15 | 15 |
|
16 |
|
|
17 |
|
|
18 | 16 |
class QConfigurationDialog(QDialog): |
19 | 17 |
|
20 | 18 |
def __init__(self, parent): |
... | ... | |
23 | 21 |
self.ui = Configuration_UI.Ui_ConfigurationDialog() |
24 | 22 |
self.ui.setupUi(self) |
25 | 23 |
|
26 |
self.load_data() |
|
27 |
|
|
28 |
|
|
29 |
def load_data(self): |
|
30 |
|
|
31 |
grouptitles = [1, 2, 3,'testing'] |
|
32 |
|
|
33 |
rows = [ |
|
34 |
{'text': 'Row1', 'value': 1, 'group': 1}, |
|
35 |
{'text': 'Row2', 'value': 2, 'group': 1}, |
|
36 |
{'text': 'Row3', 'value': 3, 'group': 1}, |
|
37 |
{'text': 'Row4', 'value': 4, 'group': 2}, |
|
38 |
{'text': 'Row5', 'value': 5, 'group': 2}, |
|
39 |
{'text': 'Row6', 'value': 6, 'group': 3}, |
|
40 |
{'text': 'Row7', 'value': 7, 'group': 3}, |
|
41 |
{'text': 'Row8', 'value': 8, 'group': 3}, |
|
42 |
{'text': 'Row9', 'value': 9, 'group': 2}, |
|
43 |
{'text': 'Row10', 'value': 10, 'group': 'testing'} |
|
44 |
] |
|
45 |
|
|
46 |
for t in grouptitles: |
|
47 |
item = QListWidgetItem('Group {}'.format(t)) |
|
48 |
#item.setData(33, 'header') |
|
49 |
#item.setData(34, t) |
|
50 |
#item.setFlags(QtCore.Qt.ItemIsEnabled | QtCore.Qt.ItemIsSelectable) |
|
51 |
self.ui.listWidget_Symbol.addItem(item) |
|
52 |
for row in rows: |
|
53 |
if row['group'] == t: |
|
54 |
|
|
55 |
icon = QIcon('D:\Projects\HYTOS+\HYTOS_Projects\Sample\svg\Equipment - [ Pressurized ]\Column\Dual Packed.svg') |
|
56 |
item = QListWidgetItem(icon, 'Dual Packed') |
|
57 |
|
|
58 |
#item = QListWidgetItem(row['text']) |
|
59 |
#item.setData(33, row['value']) |
|
60 |
#item.setData(34, row['group']) |
|
61 |
|
|
62 |
self.ui.listWidget_Symbol.addItem(item) |
|
63 |
else: |
|
64 |
pass |
|
65 |
|
|
66 |
|
|
67 |
return |
|
68 |
icon = QIcon('D:/Projects/HYTOS+/HYTOS_Projects/Sample\\svg/Equipment - [ Pressure Drop ]/Air Fin Cooler/Air Fin Cooler.svg') |
|
69 |
item1 = QListWidgetItem(icon, 'Air Fin Cooler') |
|
70 |
self.ui.listWidget_Symbol.addItem(item1) |
|
71 |
|
|
72 |
icon = QIcon('D:\Projects\HYTOS+\HYTOS_Projects\Sample\svg\Equipment - [ Pressurized ]\Column\Dual Packed.svg') |
|
73 |
item2 = QListWidgetItem(icon, 'Dual Packed') |
|
74 |
self.ui.listWidget_Symbol.addItem(item2) |
|
75 |
|
|
76 |
|
|
77 | 24 |
def accept(self): |
78 | 25 |
|
79 | 26 |
QDialog.accept(self) |
내보내기 Unified diff