개정판 819f1454
symbol registration on going
Change-Id: I1fa2cb3d30e3d8b1a382f7477ad5373e7a7da294
DTI_PID/DTI_PID/ImportTextFromCADDialog.py | ||
---|---|---|
292 | 292 |
|
293 | 293 |
self.ui.toolButtonCAD.clicked.connect(self.on_add_cad_click) |
294 | 294 |
self.ui.pushButtonSave.clicked.connect(self.on_save_mappings) |
295 |
self.ui.pushButtonImport.clicked.connect(self.on_import_autocad)
|
|
295 |
self.ui.pushButtonImport.clicked.connect(self.importClicked)
|
|
296 | 296 |
self.ui.pushButtonClose.clicked.connect(self.close) |
297 | 297 |
self.ui.pushButtonAuto.clicked.connect(self.autoCalOffset) |
298 | 298 |
self.ui.checkBoxAuto.stateChanged.connect(self.autoStateChanged) |
299 |
self.ui.checkBoxLegend.stateChanged.connect(self.legendStateChanged) |
|
299 | 300 |
|
300 | 301 |
configs = app_doc_data.getConfigs('Cad State', 'Auto') |
301 | 302 |
self.ui.checkBoxAuto.setChecked(bool(int((configs[0].value)))) if 1 == len(configs) else \ |
302 | 303 |
self.ui.checkBoxAuto.setChecked(True) |
303 | 304 |
|
305 |
def importClicked(self): |
|
306 |
if self.ui.checkBoxLegend.isChecked(): |
|
307 |
pass |
|
308 |
else: |
|
309 |
self.on_import_autocad() |
|
310 |
|
|
311 |
def legendStateChanged(self, checkState): |
|
312 |
if checkState is int(Qt.Checked): |
|
313 |
self.ui.checkBoxLine.setEnabled(False) |
|
314 |
self.ui.checkBoxSymbol.setEnabled(False) |
|
315 |
self.ui.checkBoxText.setEnabled(False) |
|
316 |
elif checkState is int(Qt.Unchecked): |
|
317 |
self.ui.checkBoxLine.setEnabled(True) |
|
318 |
self.ui.checkBoxSymbol.setEnabled(True) |
|
319 |
self.ui.checkBoxText.setEnabled(True) |
|
320 |
|
|
304 | 321 |
def autoStateChanged(self, checkState): |
305 | 322 |
if checkState is int(Qt.Checked): |
306 | 323 |
self.ui.spinBoxX.setEnabled(False) |
... | ... | |
343 | 360 |
matches_1 = [item for item in App.mainWnd().graphicsView.items() if issubclass(type(item), QEngineeringTextItem) and item.text() == find_text_1] |
344 | 361 |
matches_2 = [item for item in App.mainWnd().graphicsView.items() if issubclass(type(item), QEngineeringTextItem) and item.text() == find_text_2] |
345 | 362 |
if not matches_1 or not matches_2: |
363 |
QMessageBox.information(self, self.tr('Information'), self.tr('There is no search text items.')) |
|
346 | 364 |
return |
347 | 365 |
|
348 | 366 |
text_item_1 = matches_1[0] |
DTI_PID/DTI_PID/ImportTextFromCAD_UI.py | ||
---|---|---|
57 | 57 |
self.checkBoxSymbol = QtWidgets.QCheckBox(ImportTextFromCADDialog) |
58 | 58 |
self.checkBoxSymbol.setObjectName("checkBoxSymbol") |
59 | 59 |
self.horizontalLayout_2.addWidget(self.checkBoxSymbol) |
60 |
self.checkBoxLegend = QtWidgets.QCheckBox(ImportTextFromCADDialog) |
|
61 |
self.checkBoxLegend.setObjectName("checkBoxLegend") |
|
62 |
self.horizontalLayout_2.addWidget(self.checkBoxLegend) |
|
60 | 63 |
self.gridLayout.addLayout(self.horizontalLayout_2, 12, 0, 1, 2) |
61 | 64 |
self.label_2 = QtWidgets.QLabel(ImportTextFromCADDialog) |
62 | 65 |
self.label_2.setMinimumSize(QtCore.QSize(50, 0)) |
... | ... | |
219 | 222 |
self.checkBoxLine.setText(_translate("ImportTextFromCADDialog", "Line")) |
220 | 223 |
self.checkBoxText.setText(_translate("ImportTextFromCADDialog", "Text")) |
221 | 224 |
self.checkBoxSymbol.setText(_translate("ImportTextFromCADDialog", "Symbol")) |
225 |
self.checkBoxLegend.setText(_translate("ImportTextFromCADDialog", "Legend")) |
|
222 | 226 |
self.label_2.setText(_translate("ImportTextFromCADDialog", "AutoCAD Files : ")) |
223 | 227 |
self.label_5.setText(_translate("ImportTextFromCADDialog", "Search Text 2(Line No.) :")) |
224 | 228 |
self.pushButtonClose.setText(_translate("ImportTextFromCADDialog", "Close")) |
DTI_PID/DTI_PID/UI/ImportTextFromCAD.ui | ||
---|---|---|
111 | 111 |
</property> |
112 | 112 |
</widget> |
113 | 113 |
</item> |
114 |
<item> |
|
115 |
<widget class="QCheckBox" name="checkBoxLegend"> |
|
116 |
<property name="text"> |
|
117 |
<string>Legend</string> |
|
118 |
</property> |
|
119 |
</widget> |
|
120 |
</item> |
|
114 | 121 |
</layout> |
115 | 122 |
</item> |
116 | 123 |
<item row="0" column="0"> |
내보내기 Unified diff