프로젝트

일반

사용자정보

개정판 8d4946fe

ID8d4946fee4100e2814a89219d05249383e48b10e
상위 6211dd0a
하위 4758c583, 4e8abb67

함의성이(가) 5년 이상 전에 추가함

issue #000: fix item table contents

Change-Id: Iea18997f95640731cad8b0de4be451da50cb41a7

차이점 보기:

DTI_PID/DTI_PID/ConnectAttrDialog.py
118 118
        import timeit
119 119
        from LineNoTracer import connectAttrImpl
120 120

  
121
        self.ui.buttonBox.setDisabled(True)
121
        try:
122
            self.ui.buttonBox.setDisabled(True)
122 123

  
123
        # 1 - create Worker and Thread inside the Form
124
        self.obj = Worker()  # no parent!
125
        self.obj.graphicsView = self.graphicsView
126
        self.thread = QThread()  # no parent!
124
            # 1 - create Worker and Thread inside the Form
125
            self.obj = Worker()  # no parent!
126
            self.obj.graphicsView = self.graphicsView
127
            self.thread = QThread()  # no parent!
127 128

  
128
        # 2 - Move the Worker object to the Thread object
129
        self.obj.moveToThread(self.thread)
129
            # 2 - Move the Worker object to the Thread object
130
            self.obj.moveToThread(self.thread)
130 131

  
131
        # 3 - Connect Worker Signals to the Thread slots
132
        self.obj.finished.connect(self.thread.quit)
133
        self.obj.displayMessage.connect(self.addListItem)
134
        self.obj.updateProgress.connect(self.updateProgress)
132
            # 3 - Connect Worker Signals to the Thread slots
133
            self.obj.finished.connect(self.thread.quit)
134
            self.obj.displayMessage.connect(self.addListItem)
135
            self.obj.updateProgress.connect(self.updateProgress)
135 136

  
136
        # 4 - Connect Thread started signal to Worker operational slot method
137
        self.thread.started.connect(self.obj.procCounter)
137
            # 4 - Connect Thread started signal to Worker operational slot method
138
            self.thread.started.connect(self.obj.procCounter)
138 139
        
139
        # 5 - Thread finished signal will close the app if you want!
140
        self.thread.finished.connect(self.dlgExit)
140
            # 5 - Thread finished signal will close the app if you want!
141
            self.thread.finished.connect(self.dlgExit)
141 142

  
142
        # 6 - Start the thread
143
        self.thread.start()
143
            # 6 - Start the thread
144
            self.thread.start()
144 145

  
145
        self.tmStart = timeit.default_timer()
146
            self.tmStart = timeit.default_timer()
147
        except Exception as ex:
148
            from App import App 
149
            message = 'error occured({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, sys.exc_info()[-1].tb_lineno)
150
            App.mainWnd().addMessage.emit(MessageType.Error, message)
146 151

  
147 152
    '''
148 153
        @brief      set buttonbox's enabled flag
DTI_PID/DTI_PID/ItemPropertyTableWidget.py
231 231
            self.setHorizontalHeaderLabels(['Name', 'Value'])
232 232
            self.horizontalHeaderItem(0).setSizeHint(QSize(25, 25))
233 233
            if type(item) is QEngineeringSpecBreakItem:
234
                self.setRowCount(8)
235

  
234
                self.setRowCount(7)
236 235
                self.setItem(0, 0, QTableWidgetItem("UID"))
237 236
                self.setItem(1, 0, QTableWidgetItem("심볼명"))
238 237
                self.setItem(2, 0, QTableWidgetItem("타입"))
239 238
                self.setItem(3, 0, QTableWidgetItem("각도"))
240 239
                self.setItem(4, 0, QTableWidgetItem("원점"))
241 240
                self.setItem(5, 0, QTableWidgetItem("OWNER"))
242
                self.setItem(7, 0, QTableWidgetItem("Set Specs"))
241
                self.setItem(6, 0, QTableWidgetItem("Set Specs"))
243 242
            elif type(item) is QEngineeringErrorItem:
244
                self.setRowCount(8)
245

  
243
                self.setRowCount(7)
246 244
                self.setItem(0, 0, QTableWidgetItem("UID"))
247 245
                self.setItem(1, 0, QTableWidgetItem("심볼명"))
248 246
                self.setItem(2, 0, QTableWidgetItem("타입"))
249 247
                self.setItem(3, 0, QTableWidgetItem("각도"))
250 248
                self.setItem(4, 0, QTableWidgetItem("원점"))
251 249
                self.setItem(5, 0, QTableWidgetItem("OWNER"))
252
                self.setItem(7, 0, QTableWidgetItem("Message"))
250
                self.setItem(6, 0, QTableWidgetItem("Message"))
253 251
            elif issubclass(type(item), SymbolSvgItem):
254 252
                self.setRowCount(6)
255
                
256 253
                self.setItem(0, 0, QTableWidgetItem("UID"))
257 254
                self.setItem(1, 0, QTableWidgetItem("심볼명"))
258 255
                self.setItem(2, 0, QTableWidgetItem("타입"))
......
260 257
                self.setItem(4, 0, QTableWidgetItem("원점"))
261 258
                self.setItem(5, 0, QTableWidgetItem("OWNER"))
262 259
            elif type(item) is QEngineeringNoteItem:
263
                self.setRowCount(1)
260
                self.setRowCount(2)
264 261
                self.setItem(0, 0, QTableWidgetItem("노트번호"))
265 262
                self.setItem(1, 0, QTableWidgetItem("설명"))
266 263
            elif type(item) is QEngineeringLineNoTextItem:
......
268 265
                self.setItem(0, 0, QTableWidgetItem("UID"))
269 266
            elif type(item) is QEngineeringLineItem:
270 267
                self.setRowCount(5)
271

  
272 268
                self.setItem(0, 0, QTableWidgetItem('UID'))
273 269
                self.setItem(1, 0, QTableWidgetItem('OWNER'))
274 270
                widgetItem = QTableWidgetItem("타입")
......
461 457
                owner_item.setData(Qt.UserRole, attr)
462 458
                self.setItem(5, 1, owner_item)
463 459
                
464
                row = self.rowCount() 
465
                self.show_item_properties(self._item)
460
                if type(self._item) is not  QEngineeringSpecBreakItem and type(self._item) is not QEngineeringErrorItem:
461
                    self.show_item_properties(self._item)
466 462

  
467 463
                if type(self._item) is QEngineeringSpecBreakItem:
464
                    row = self.rowCount()
468 465
                    setSpecsItem = QTableWidgetItem('Open')
469 466
                    icon = QtGui.QIcon()
470 467
                    icon.addPixmap(QtGui.QPixmap(":/newPrefix/doubleclick.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
471 468
                    setSpecsItem.setIcon(icon)
472
                    self.setItem(row, 1, setSpecsItem)
473
                    row = row + 1
469
                    self.setItem(row - 1, 1, setSpecsItem)
474 470

  
475 471
                if type(self._item) is QEngineeringErrorItem:
476 472
                    errType = 'None'
......
480 476
                        errType = 'symbol'
481 477
                    self.setItem(2, 1, QTableWidgetItem(errType))
482 478
                    self.setItem(5, 1, QTableWidgetItem(self._item.parent.uid))
483
                    self.setItem(7, 1, QTableWidgetItem(self._item.msg))
479
                    self.setItem(6, 1, QTableWidgetItem(self._item.msg))
484 480

  
485 481
                self.show_item_attributes(self._item)
486 482
                self.show_item_connectors(self._item)

내보내기 Unified diff

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