개정판 38dbda17
issue #000: fixing trim line not finished yet
Change-Id: I26a838e85ed48874ec33cb0aa06aa0dd7749364b
DTI_PID/DTI_PID/ItemPropertyTableWidget.py | ||
---|---|---|
343 | 343 |
self.setItem(2, 1, widgetItem) |
344 | 344 |
self._lineTypeComboBox = QComboBox(self) |
345 | 345 |
self._lineTypeComboBox.tag = widgetItem |
346 |
appDocData = AppDocData.instance() |
|
347 | 346 |
for lineType in LineTypeConditions.items(): |
348 | 347 |
self._lineTypeComboBox.addItem(lineType.name) |
349 | 348 |
self.setCellWidget(2, 3, self._lineTypeComboBox) |
DTI_PID/DTI_PID/LineNoTracer.py | ||
---|---|---|
304 | 304 |
trimLineNo = QEngineeringTrimLineNoTextItem() |
305 | 305 |
trimLineNo.conns.append(orphanLines[0]) |
306 | 306 |
orphanLines[0].owner = trimLineNo |
307 |
orphanLines[0].linkedItem = trimLineNo |
|
307 |
#orphanLines[0].linkedItem = trimLineNo
|
|
308 | 308 |
|
309 | 309 |
connectedItems = self.find_primary_lines(trimLineNo) |
310 | 310 |
for item in connectedItems: |
... | ... | |
368 | 368 |
matches = [x for x in [visited[0], visited[-1]] if obj.is_connected(x)] |
369 | 369 |
if matches: |
370 | 370 |
next_connected = [x for x in lineMatches if obj.next_connected(x, matches[0])] |
371 |
if next_connected: lineMatches = next_connected |
|
371 |
if next_connected: |
|
372 |
lineMatches = next_connected |
|
373 |
else: |
|
374 |
lineMatches = [lineMatches[0]] |
|
372 | 375 |
|
373 | 376 |
symbolMatches = [x for x in self._symbols if (x.owner is None or x.owner == start.owner) and (x is not obj) and (x not in visited) and obj.is_connected(x, None)] |
374 | 377 |
#print(visited) |
DTI_PID/DTI_PID/MainWindow.py | ||
---|---|---|
58 | 58 |
from TextDataListDialog import QTextDataListDialog |
59 | 59 |
from DisplayColors import DisplayColors |
60 | 60 |
from DisplayColors import DisplayOptions |
61 |
import uuid |
|
61 | 62 |
|
62 | 63 |
class MainWindow(QMainWindow, MainWindow_UI.Ui_MainWindow, SingletonInstane): |
63 | 64 |
""" This is MainWindow class """ |
... | ... | |
2395 | 2396 |
|
2396 | 2397 |
for trimLineNo in root.iter('TRIM_LINE_NO'): |
2397 | 2398 |
line_no = QEngineeringTrimLineNoTextItem() |
2398 |
line_no.uid = trimLineNo.find('UID')
|
|
2399 |
line_no.uid = uuid.UUID(trimLineNo.find('UID').text, version=4)
|
|
2399 | 2400 |
|
2400 | 2401 |
run = trimLineNo.find('RUN') |
2401 | 2402 |
if run is not None: |
... | ... | |
2406 | 2407 |
uid = uidElement.text |
2407 | 2408 |
run_item = self.graphicsView.findItemByUid(uid) |
2408 | 2409 |
if run_item is not None: |
2409 |
#runItem.owner = item
|
|
2410 |
run_item.owner = line_no
|
|
2410 | 2411 |
line_run.items.append(run_item) |
2411 |
|
|
2412 | 2412 |
line_no.runs.append(line_run) |
2413 | 2413 |
line_no_tree_item = self.itemTreeWidget.addTreeItem(self.itemTreeWidget.root, line_no) |
2414 |
|
|
2414 | 2415 |
for run_item in line_run.items: |
2415 | 2416 |
if issubclass(type(run_item), SymbolSvgItem): self.itemTreeWidget.addTreeItem(line_no_tree_item, run_item) |
2417 |
|
|
2416 | 2418 |
docData.tracerLineNos.append(line_no) |
2417 | 2419 |
|
2418 | 2420 |
self.progress.setValue(self.progress.value() + 1) |
DTI_PID/DTI_PID/QtImageViewer.py | ||
---|---|---|
546 | 546 |
svg = self.createSymbolObject(svgFileName) |
547 | 547 |
self.matchSymbolToLine(svg, scenePos) |
548 | 548 |
|
549 |
if type(svg) is QEngineeringSpecBreakItem: |
|
550 |
self.command.specBreak_startPoint = [scenePos.x(), scenePos.y()]
|
|
551 |
self.command.isCopy = True |
|
552 |
self.command.isSpecBreak = True |
|
553 |
self.command.symbol = svg |
|
554 |
while 0 != svg.angle: |
|
555 |
svg.rotateSymbol() |
|
549 |
#if type(svg) is QEngineeringSpecBreakItem:
|
|
550 |
# self.command.specBreak_startPoint = [scenePos.x(), scenePos.y()]
|
|
551 |
# self.command.isCopy = True
|
|
552 |
# self.command.isSpecBreak = True
|
|
553 |
# self.command.symbol = svg
|
|
554 |
# while 0 != svg.angle:
|
|
555 |
# svg.rotateSymbol()
|
|
556 | 556 |
|
557 | 557 |
event.acceptProposedAction() |
558 | 558 |
|
내보내기 Unified diff