프로젝트

일반

사용자정보

개정판 41162b7d

ID41162b7d1e4d4a7ca2a258b7d8d730a4e6db7530
상위 d65bda20
하위 2bf902bb, 239fd8c5

함의성이(가) 약 4년 전에 추가함

issue #1465: on going

Change-Id: Iadab103905c6a16433d2152799b7a16b88da6516

차이점 보기:

DTI_PID/DTI_PID/AppDocData.py
2698 2698
                cursor = conn.cursor()
2699 2699
                """delete stream line which has stream number is given data"""
2700 2700
                sql = "delete from HMB_From_To where Stream_No_UID=?"
2701
                params = (stream_line_list[0][3],)
2701
                params = (stream_line_list[0],)
2702 2702
                cursor.execute(sql, params)
2703 2703
                """up to here"""
2704 2704

  
2705
                for stream_line in stream_line_list:
2705
                for stream_line in stream_line_list[1]:
2706 2706
                    sql = f"insert into HMB_From_To(UID,[Drawing_UID],[From_Component_UID],[To_Component_UID],[Stream_No_UID]) values" \
2707 2707
                          f"(?,?,?,?,?)"
2708 2708
                    params = (str(uuid.uuid4()), stream_line[0], stream_line[1], stream_line[2], stream_line[3])
DTI_PID/DTI_PID/AppRibbon.py
181 181
            pane.ui.toolButtonOCRTraining.clicked.connect(main_wnd.oCRTrainingClicked)
182 182
            pane.ui.toolButtonSymbolTraining.clicked.connect(main_wnd.symbolTrainingClicked)
183 183
            pane.ui.toolButtonMakeLabelData.clicked.connect(main_wnd.on_make_label_data)
184
            pane.ui.toolButtonLineList.clicked.connect(main_wnd.on_line_list)
184 185
            cSection.addCustomWidget(pane)
185 186
        except Exception as ex:
186 187
            message = f"error occurred({repr(ex)}) in {sys.exc_info()[-1].tb_frame.f_code.co_filename}:" \
DTI_PID/DTI_PID/LineNoList_UI.py
1
# -*- coding: utf-8 -*-
2

  
3
# Form implementation generated from reading ui file './UI/LineNoList.ui'
4
#
5
# Created by: PyQt5 UI code generator 5.11.3
6
#
7
# WARNING! All changes made in this file will be lost!
8

  
9
from PyQt5 import QtCore, QtGui, QtWidgets
10

  
11
class Ui_LineListTable(object):
12
    def setupUi(self, LineListTable):
13
        LineListTable.setObjectName("LineListTable")
14
        LineListTable.resize(555, 384)
15
        font = QtGui.QFont()
16
        font.setFamily("맑은 고딕")
17
        LineListTable.setFont(font)
18
        icon = QtGui.QIcon()
19
        icon.addPixmap(QtGui.QPixmap(":/newPrefix/codetable.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
20
        LineListTable.setWindowIcon(icon)
21
        self.gridLayout = QtWidgets.QGridLayout(LineListTable)
22
        self.gridLayout.setObjectName("gridLayout")
23
        self.horizontalLayout = QtWidgets.QHBoxLayout()
24
        self.horizontalLayout.setObjectName("horizontalLayout")
25
        self.line = QtWidgets.QFrame(LineListTable)
26
        self.line.setFrameShape(QtWidgets.QFrame.VLine)
27
        self.line.setFrameShadow(QtWidgets.QFrame.Sunken)
28
        self.line.setObjectName("line")
29
        self.horizontalLayout.addWidget(self.line)
30
        self.buttonBox = QtWidgets.QDialogButtonBox(LineListTable)
31
        self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Close|QtWidgets.QDialogButtonBox.Save)
32
        self.buttonBox.setObjectName("buttonBox")
33
        self.horizontalLayout.addWidget(self.buttonBox)
34
        self.gridLayout.addLayout(self.horizontalLayout, 2, 0, 1, 1)
35
        self.groupBoxTitleBlock = QtWidgets.QGroupBox(LineListTable)
36
        self.groupBoxTitleBlock.setObjectName("groupBoxTitleBlock")
37
        self.gridLayout_4 = QtWidgets.QGridLayout(self.groupBoxTitleBlock)
38
        self.gridLayout_4.setObjectName("gridLayout_4")
39
        self.verticalLayout_3 = QtWidgets.QVBoxLayout()
40
        self.verticalLayout_3.setObjectName("verticalLayout_3")
41
        self.horizontalLayout_4 = QtWidgets.QHBoxLayout()
42
        self.horizontalLayout_4.setObjectName("horizontalLayout_4")
43
        self.tableWidgetLineList = QtWidgets.QTableWidget(self.groupBoxTitleBlock)
44
        self.tableWidgetLineList.setColumnCount(2)
45
        self.tableWidgetLineList.setObjectName("tableWidgetLineList")
46
        self.tableWidgetLineList.setRowCount(0)
47
        self.horizontalLayout_4.addWidget(self.tableWidgetLineList)
48
        self.verticalLayout_3.addLayout(self.horizontalLayout_4)
49
        self.gridLayout_4.addLayout(self.verticalLayout_3, 0, 0, 1, 1)
50
        self.gridLayout.addWidget(self.groupBoxTitleBlock, 1, 0, 1, 1)
51

  
52
        self.retranslateUi(LineListTable)
53
        QtCore.QMetaObject.connectSlotsByName(LineListTable)
54

  
55
    def retranslateUi(self, LineListTable):
56
        _translate = QtCore.QCoreApplication.translate
57
        LineListTable.setWindowTitle(_translate("LineListTable", "Line List Export"))
58
        self.groupBoxTitleBlock.setTitle(_translate("LineListTable", "Line List"))
59

  
60
import MainWindow_rc
61

  
62
if __name__ == "__main__":
63
    import sys
64
    app = QtWidgets.QApplication(sys.argv)
65
    LineListTable = QtWidgets.QDialog()
66
    ui = Ui_LineListTable()
67
    ui.setupUi(LineListTable)
68
    LineListTable.show()
69
    sys.exit(app.exec_())
70

  
DTI_PID/DTI_PID/MainWindow.py
1872 1872
            QApplication.restoreOverrideCursor()
1873 1873
            QApplication.restoreOverrideCursor()
1874 1874

  
1875
    def on_line_list(self):
1876
        """ line list export dialog """
1877
        from LineListDialog import LineListDialog
1878

  
1879
        if not self.graphicsView.hasImage():
1880
            self.showImageSelectionMessageBox()
1881
            return
1882

  
1883
        dialog = LineListDialog(self)
1884
        dialog.showDialog()
1885

  
1875 1886
    def on_make_label_data(self):
1876 1887
        """ make label data from symbol info """
1877 1888
        from xml.etree.ElementTree import Element, SubElement, dump, ElementTree, parse
DTI_PID/DTI_PID/Shapes/QEngineeringOPCItem.py
115 115
                        attr.owner = self
116 116
            '''
117 117

  
118
            attrs = sorted(list(self.getAttributes().keys()), key=lambda param: int(param.AttrAt))
118
            attrs = sorted([_attr for _attr in list(self.getAttributes().keys()) if _attr.AttributeType == 'Text Item'], \
119
                            key=lambda param: int(param.AttrAt))
119 120
            attr_num = len(attrs)
120 121

  
121 122
            configs = AppDocData.instance().getConfigs('Range', 'Detection Ratio')
DTI_PID/DTI_PID/StreamlineDialog.py
250 250

  
251 251
            from_to_data.append((drawing_uid, from_uid, to_uid, stream_no_uid))
252 252

  
253
        AppDocData.save_stream_line_data(from_to_data)
253
        AppDocData.save_stream_line_data([stream_no_uid, from_to_data])
254 254

  
255 255
    def accept(self):
256 256
        QDialog.accept(self)
DTI_PID/DTI_PID/UI/Data.ui
6 6
   <rect>
7 7
    <x>0</x>
8 8
    <y>0</y>
9
    <width>802</width>
9
    <width>865</width>
10 10
    <height>70</height>
11 11
   </rect>
12 12
  </property>
......
34 34
     <property name="spacing">
35 35
      <number>0</number>
36 36
     </property>
37
     <item row="0" column="2">
38
      <widget class="Line" name="line">
37
     <item row="0" column="1">
38
      <widget class="QToolButton" name="toolButtonEngInfoList">
39
       <property name="text">
40
        <string>Engineering Info.
41
List</string>
42
       </property>
43
       <property name="icon">
44
        <iconset resource="../res/MainWindow.qrc">
45
         <normaloff>:/newPrefix/EngineeringInfoList.svg</normaloff>:/newPrefix/EngineeringInfoList.svg</iconset>
46
       </property>
47
       <property name="iconSize">
48
        <size>
49
         <width>32</width>
50
         <height>32</height>
51
        </size>
52
       </property>
53
       <property name="toolButtonStyle">
54
        <enum>Qt::ToolButtonTextUnderIcon</enum>
55
       </property>
56
       <property name="autoRaise">
57
        <bool>true</bool>
58
       </property>
59
      </widget>
60
     </item>
61
     <item row="0" column="6">
62
      <widget class="Line" name="line_2">
39 63
       <property name="orientation">
40 64
        <enum>Qt::Vertical</enum>
41 65
       </property>
42 66
      </widget>
43 67
     </item>
44
     <item row="0" column="7">
45
      <widget class="QToolButton" name="toolButtonCustomCodeTable">
68
     <item row="0" column="4">
69
      <widget class="QToolButton" name="toolButtonSpecialItemTypes">
46 70
       <property name="text">
47
        <string>Custom
48
Code Table</string>
71
        <string>Special Item
72
</string>
49 73
       </property>
50 74
       <property name="icon">
51 75
        <iconset resource="../res/MainWindow.qrc">
52
         <normaloff>:/newPrefix/table_32px.svg</normaloff>:/newPrefix/table_32px.svg</iconset>
76
         <normaloff>:/newPrefix/Special.svg</normaloff>:/newPrefix/Special.svg</iconset>
53 77
       </property>
54 78
       <property name="iconSize">
55 79
        <size>
......
65 89
       </property>
66 90
      </widget>
67 91
     </item>
68
     <item row="0" column="8">
69
      <widget class="QToolButton" name="toolButtonReplaceCodeTable">
92
     <item row="0" column="12">
93
      <widget class="QToolButton" name="toolButtonGlobalValidation">
70 94
       <property name="text">
71
        <string>Replace
72
Code Table</string>
95
        <string>Global
96
Validation</string>
73 97
       </property>
74 98
       <property name="icon">
75 99
        <iconset resource="../res/MainWindow.qrc">
76
         <normaloff>:/newPrefix/table_32px.svg</normaloff>:/newPrefix/table_32px.svg</iconset>
100
         <normaloff>:/newPrefix/Validation.svg</normaloff>:/newPrefix/Validation.svg</iconset>
77 101
       </property>
78 102
       <property name="iconSize">
79 103
        <size>
......
89 113
       </property>
90 114
      </widget>
91 115
     </item>
92
     <item row="0" column="10">
93
      <widget class="Line" name="line_3">
94
       <property name="orientation">
95
        <enum>Qt::Vertical</enum>
96
       </property>
97
      </widget>
98
     </item>
99
     <item row="0" column="13">
100
      <widget class="QToolButton" name="toolButtonOCRTraining">
116
     <item row="0" column="16">
117
      <widget class="QToolButton" name="toolButtonMakeLabelData">
101 118
       <property name="text">
102
        <string>OCR
103
Training</string>
119
        <string>Make
120
Label Data</string>
104 121
       </property>
105 122
       <property name="icon">
106 123
        <iconset resource="../res/MainWindow.qrc">
107
         <normaloff>:/newPrefix/OCR.svg</normaloff>:/newPrefix/OCR.svg</iconset>
124
         <normaloff>:/newPrefix/Training.svg</normaloff>:/newPrefix/Training.svg</iconset>
108 125
       </property>
109 126
       <property name="iconSize">
110 127
        <size>
......
120 137
       </property>
121 138
      </widget>
122 139
     </item>
123
     <item row="0" column="12">
124
      <widget class="Line" name="line_4">
125
       <property name="orientation">
126
        <enum>Qt::Vertical</enum>
127
       </property>
128
      </widget>
129
     </item>
130
     <item row="0" column="3">
131
      <widget class="QToolButton" name="toolButtonSpecialItemTypes">
140
     <item row="0" column="9">
141
      <widget class="QToolButton" name="toolButtonReplaceCodeTable">
132 142
       <property name="text">
133
        <string>Special Item
134
</string>
143
        <string>Replace
144
Code Table</string>
135 145
       </property>
136 146
       <property name="icon">
137 147
        <iconset resource="../res/MainWindow.qrc">
138
         <normaloff>:/newPrefix/Special.svg</normaloff>:/newPrefix/Special.svg</iconset>
148
         <normaloff>:/newPrefix/table_32px.svg</normaloff>:/newPrefix/table_32px.svg</iconset>
139 149
       </property>
140 150
       <property name="iconSize">
141 151
        <size>
......
151 161
       </property>
152 162
      </widget>
153 163
     </item>
154
     <item row="0" column="0">
155
      <widget class="QToolButton" name="toolButtonHMBData">
164
     <item row="0" column="8">
165
      <widget class="QToolButton" name="toolButtonCustomCodeTable">
156 166
       <property name="text">
157
        <string>HMB
158
</string>
167
        <string>Custom
168
Code Table</string>
159 169
       </property>
160 170
       <property name="icon">
161 171
        <iconset resource="../res/MainWindow.qrc">
162
         <normaloff>:/newPrefix/Database.svg</normaloff>:/newPrefix/Database.svg</iconset>
172
         <normaloff>:/newPrefix/table_32px.svg</normaloff>:/newPrefix/table_32px.svg</iconset>
163 173
       </property>
164 174
       <property name="iconSize">
165 175
        <size>
......
175 185
       </property>
176 186
      </widget>
177 187
     </item>
178
     <item row="0" column="1">
179
      <widget class="QToolButton" name="toolButtonEngInfoList">
188
     <item row="0" column="0">
189
      <widget class="QToolButton" name="toolButtonHMBData">
180 190
       <property name="text">
181
        <string>Engineering Info.
182
List</string>
191
        <string>HMB
192
</string>
183 193
       </property>
184 194
       <property name="icon">
185 195
        <iconset resource="../res/MainWindow.qrc">
186
         <normaloff>:/newPrefix/EngineeringInfoList.svg</normaloff>:/newPrefix/EngineeringInfoList.svg</iconset>
196
         <normaloff>:/newPrefix/Database.svg</normaloff>:/newPrefix/Database.svg</iconset>
187 197
       </property>
188 198
       <property name="iconSize">
189 199
        <size>
......
199 209
       </property>
200 210
      </widget>
201 211
     </item>
202
     <item row="0" column="4">
212
     <item row="0" column="3">
213
      <widget class="Line" name="line">
214
       <property name="orientation">
215
        <enum>Qt::Vertical</enum>
216
       </property>
217
      </widget>
218
     </item>
219
     <item row="0" column="5">
203 220
      <widget class="QToolButton" name="toolButtonOPCRelation">
204 221
       <property name="text">
205 222
        <string>OPC
......
223 240
       </property>
224 241
      </widget>
225 242
     </item>
226
     <item row="0" column="14">
243
     <item row="0" column="15">
227 244
      <widget class="QToolButton" name="toolButtonSymbolTraining">
228 245
       <property name="text">
229 246
        <string>Symbol
......
247 264
       </property>
248 265
      </widget>
249 266
     </item>
250
     <item row="0" column="11">
251
      <widget class="QToolButton" name="toolButtonGlobalValidation">
267
     <item row="0" column="7">
268
      <widget class="QToolButton" name="toolButtonCodeTable">
252 269
       <property name="text">
253
        <string>Global
254
Validation</string>
270
        <string>Code Table
271
</string>
255 272
       </property>
256 273
       <property name="icon">
257 274
        <iconset resource="../res/MainWindow.qrc">
258
         <normaloff>:/newPrefix/Validation.svg</normaloff>:/newPrefix/Validation.svg</iconset>
275
         <normaloff>:/newPrefix/table_32px.svg</normaloff>:/newPrefix/table_32px.svg</iconset>
259 276
       </property>
260 277
       <property name="iconSize">
261 278
        <size>
......
271 288
       </property>
272 289
      </widget>
273 290
     </item>
274
     <item row="0" column="6">
275
      <widget class="QToolButton" name="toolButtonCodeTable">
291
     <item row="0" column="13">
292
      <widget class="Line" name="line_4">
293
       <property name="orientation">
294
        <enum>Qt::Vertical</enum>
295
       </property>
296
      </widget>
297
     </item>
298
     <item row="0" column="11">
299
      <widget class="Line" name="line_3">
300
       <property name="orientation">
301
        <enum>Qt::Vertical</enum>
302
       </property>
303
      </widget>
304
     </item>
305
     <item row="0" column="14">
306
      <widget class="QToolButton" name="toolButtonOCRTraining">
276 307
       <property name="text">
277
        <string>Code Table
278
</string>
308
        <string>OCR
309
Training</string>
279 310
       </property>
280 311
       <property name="icon">
281 312
        <iconset resource="../res/MainWindow.qrc">
282
         <normaloff>:/newPrefix/table_32px.svg</normaloff>:/newPrefix/table_32px.svg</iconset>
313
         <normaloff>:/newPrefix/OCR.svg</normaloff>:/newPrefix/OCR.svg</iconset>
283 314
       </property>
284 315
       <property name="iconSize">
285 316
        <size>
......
295 326
       </property>
296 327
      </widget>
297 328
     </item>
298
     <item row="0" column="5">
299
      <widget class="Line" name="line_2">
300
       <property name="orientation">
301
        <enum>Qt::Vertical</enum>
302
       </property>
303
      </widget>
304
     </item>
305
     <item row="0" column="15">
306
      <widget class="QToolButton" name="toolButtonMakeLabelData">
329
     <item row="0" column="2">
330
      <widget class="QToolButton" name="toolButtonLineList">
307 331
       <property name="text">
308
        <string>Make
309
Label Data</string>
332
        <string>Line List
333
</string>
310 334
       </property>
311 335
       <property name="icon">
312 336
        <iconset resource="../res/MainWindow.qrc">
313
         <normaloff>:/newPrefix/Training.svg</normaloff>:/newPrefix/Training.svg</iconset>
337
         <normaloff>:/newPrefix/EngineeringInfoList.svg</normaloff>:/newPrefix/EngineeringInfoList.svg</iconset>
314 338
       </property>
315 339
       <property name="iconSize">
316 340
        <size>
DTI_PID/DTI_PID/UI/LineNoList.ui
1
<?xml version="1.0" encoding="UTF-8"?>
2
<ui version="4.0">
3
 <class>LineListTable</class>
4
 <widget class="QDialog" name="LineListTable">
5
  <property name="geometry">
6
   <rect>
7
    <x>0</x>
8
    <y>0</y>
9
    <width>555</width>
10
    <height>384</height>
11
   </rect>
12
  </property>
13
  <property name="font">
14
   <font>
15
    <family>맑은 고딕</family>
16
   </font>
17
  </property>
18
  <property name="windowTitle">
19
   <string>Line List Export</string>
20
  </property>
21
  <property name="windowIcon">
22
   <iconset resource="../res/MainWindow.qrc">
23
    <normaloff>:/newPrefix/codetable.png</normaloff>:/newPrefix/codetable.png</iconset>
24
  </property>
25
  <layout class="QGridLayout" name="gridLayout">
26
   <item row="2" column="0">
27
    <layout class="QHBoxLayout" name="horizontalLayout">
28
     <item>
29
      <widget class="Line" name="line">
30
       <property name="orientation">
31
        <enum>Qt::Vertical</enum>
32
       </property>
33
      </widget>
34
     </item>
35
     <item>
36
      <widget class="QDialogButtonBox" name="buttonBox">
37
       <property name="standardButtons">
38
        <set>QDialogButtonBox::Close|QDialogButtonBox::Save</set>
39
       </property>
40
      </widget>
41
     </item>
42
    </layout>
43
   </item>
44
   <item row="1" column="0">
45
    <widget class="QGroupBox" name="groupBoxTitleBlock">
46
     <property name="title">
47
      <string>Line List</string>
48
     </property>
49
     <layout class="QGridLayout" name="gridLayout_4">
50
      <item row="0" column="0">
51
       <layout class="QVBoxLayout" name="verticalLayout_3">
52
        <item>
53
         <layout class="QHBoxLayout" name="horizontalLayout_4">
54
          <item>
55
           <widget class="QTableWidget" name="tableWidgetLineList">
56
            <property name="columnCount">
57
             <number>2</number>
58
            </property>
59
            <column/>
60
            <column/>
61
           </widget>
62
          </item>
63
         </layout>
64
        </item>
65
       </layout>
66
      </item>
67
     </layout>
68
    </widget>
69
   </item>
70
  </layout>
71
 </widget>
72
 <resources>
73
  <include location="../res/MainWindow.qrc"/>
74
 </resources>
75
 <connections/>
76
</ui>

내보내기 Unified diff

클립보드 이미지 추가 (최대 크기: 500 MB)