개정판 6f0d136d
issue #477: fix connector add
Change-Id: I6b0e5cc5f1e27961f5ac79541c7045d8178c8b74
DTI_PID/DTI_PID/LineNoTracer.py | ||
---|---|---|
869 | 869 |
else: |
870 | 870 |
remain_count_past = remain_count |
871 | 871 |
|
872 |
|
|
872 |
# third step : body connected run sort remain |
|
873 | 873 |
|
874 | 874 |
# trace special item |
875 | 875 |
worker.displayMessage.emit('Find line for special item...') |
DTI_PID/DTI_PID/MainWindow.py | ||
---|---|---|
611 | 611 |
if item.area == titleBlockProp[0]: |
612 | 612 |
titleBlockItems.append(item) |
613 | 613 |
|
614 |
db_items = [item for item in items if issubclass(type(item), QEngineeringAbstractItem) and type(item) is not QGraphicsBoundingBoxItem and type(item) is not QEngineeringErrorItem and type(item) is not QEngineeringLineNoTextItem] |
|
614 |
# unknown item is not saved now for performance |
|
615 |
db_items = [item for item in items if issubclass(type(item), QEngineeringAbstractItem) and type(item) is not QGraphicsBoundingBoxItem and type(item) is not QEngineeringErrorItem and type(item) is not QEngineeringLineNoTextItem and type(item) is not QEngineeringUnknownItem] |
|
615 | 616 |
db_items.extend([item for item in items if type(item) is QEngineeringLineNoTextItem]) |
616 | 617 |
db_items.extend([line for line in appDocData.tracerLineNos if type(line) is QEngineeringTrimLineNoTextItem]) |
617 | 618 |
db_items.extend(titleBlockItems) |
DTI_PID/DTI_PID/RecognitionDialog.py | ||
---|---|---|
518 | 518 |
toler = int(configs[0].value) if configs else 20 |
519 | 519 |
if app_doc_data.lines: |
520 | 520 |
# connect line to line |
521 |
configs = app_doc_data.getConfigs('Line Detector', 'Length to connect line') |
|
522 |
toler = int(configs[0].value) if configs else 20 |
|
523 | 521 |
try: |
524 | 522 |
for line in app_doc_data.lines: |
525 | 523 |
matches = [it for it in app_doc_data.lines if |
... | ... | |
556 | 554 |
# connect symbol to symbol |
557 | 555 |
try: |
558 | 556 |
for symbol in app_doc_data.symbols: |
559 |
matches = [it for it in app_doc_data.symbols if it is not symbol and symbol.is_connectable(it)] |
|
557 |
matches = [it for it in app_doc_data.symbols if it is not symbol and symbol.is_connectable(it, toler=toler)]
|
|
560 | 558 |
# print(str(symbol)) |
561 | 559 |
# print(matches) |
562 | 560 |
for match in matches: |
DTI_PID/DTI_PID/Shapes/EngineeringLineNoTextItem.py | ||
---|---|---|
622 | 622 |
|
623 | 623 |
app_doc_data = AppDocData.instance() |
624 | 624 |
cols = ['UID', 'Drawings_UID', 'Symbol_UID', 'X', 'Y', 'Width', 'Height', 'Rotation', 'Value', 'Connected'] |
625 |
rect = self.sceneBoundingRect() |
|
626 | 625 |
values = ['?', '?', "(select UID from Symbol where Name='Line NO' and SymbolType_UID=-1)", '?', '?', '?', '?', '?', '?', '?'] |
627 |
params = [(str(self.uid), str(app_doc_data.activeDrawing.UID), rect.x(), rect.y(), rect.width(), rect.height(), str(self.angle),\
|
|
626 |
params = [(str(self.uid), str(app_doc_data.activeDrawing.UID), self.loc[0], self.loc[1], self.size[0], self.size[1], str(self.angle),\
|
|
628 | 627 |
self.text(),\ |
629 | 628 |
str(self.conns[0]) if self.conns else None)] |
630 | 629 |
sql = 'insert into Components({}) values({})'.format(','.join(cols), ','.join(values)) |
DTI_PID/DTI_PID/SymbolEditorDialog.py | ||
---|---|---|
359 | 359 |
|
360 | 360 |
row = row + 1 |
361 | 361 |
|
362 |
self.ui.tableWidgetConnList.resizeColumnsToContents()
|
|
362 |
self.ui.tableWidgetConnList.resizeColumnsToContents() |
|
363 | 363 |
else: |
364 | 364 |
self.ui.minMatchPointLineEdit.setText('0') |
365 | 365 |
except Exception as ex: |
... | ... | |
830 | 830 |
self.ui.tableWidgetConnList.setCellWidget(rows, 2, symbol_idx_combobox) |
831 | 831 |
# up to here |
832 | 832 |
|
833 |
in_out_ComboBox = QComboBox(self.ui.tableWidgetConnList) |
|
834 |
in_out_ComboBox.addItems(['None', 'In', 'Out']) |
|
835 |
in_out_ComboBox.setCurrentText('None') |
|
836 |
self.ui.tableWidgetConnList.setCellWidget(rows, 3, in_out_ComboBox) |
|
837 |
|
|
838 |
break_ComboBox = QComboBox(self.ui.tableWidgetConnList) |
|
839 |
break_ComboBox.addItems(['O', 'X']) |
|
840 |
break_ComboBox.setCurrentText('X') |
|
841 |
self.ui.tableWidgetConnList.setCellWidget(rows, 4, break_ComboBox) |
|
842 |
|
|
833 | 843 |
self.conn_index += 1 |
844 |
|
|
845 |
self.ui.tableWidgetConnList.resizeColumnsToContents() |
|
834 | 846 |
|
835 | 847 |
''' |
836 | 848 |
@brief Original Point Tool Button Clicked |
내보내기 Unified diff