개정판 92f30bc0
issue #481: add tab
Change-Id: I697e7d34c19efe7169fda15a86e8e34e1473fb2d
DTI_PID/DTI_PID/MainWindow_UI.py | ||
---|---|---|
149 | 149 |
self.dockWidgetContents_3.setObjectName("dockWidgetContents_3") |
150 | 150 |
self.gridLayout_5 = QtWidgets.QGridLayout(self.dockWidgetContents_3) |
151 | 151 |
self.gridLayout_5.setObjectName("gridLayout_5") |
152 |
self.verticalLayout_2 = QtWidgets.QVBoxLayout() |
|
153 |
self.verticalLayout_2.setObjectName("verticalLayout_2") |
|
154 |
self.horizontalLayout = QtWidgets.QHBoxLayout() |
|
155 |
self.horizontalLayout.setObjectName("horizontalLayout") |
|
152 |
self.tabWidget_2 = QtWidgets.QTabWidget(self.dockWidgetContents_3) |
|
153 |
self.tabWidget_2.setObjectName("tabWidget_2") |
|
154 |
self.tabTerminal = QtWidgets.QWidget() |
|
155 |
self.tabTerminal.setObjectName("tabTerminal") |
|
156 |
self.gridLayout_12 = QtWidgets.QGridLayout(self.tabTerminal) |
|
157 |
self.gridLayout_12.setObjectName("gridLayout_12") |
|
158 |
self.verticalLayout_3 = QtWidgets.QVBoxLayout() |
|
159 |
self.verticalLayout_3.setObjectName("verticalLayout_3") |
|
160 |
self.horizontalLayout_5 = QtWidgets.QHBoxLayout() |
|
161 |
self.horizontalLayout_5.setObjectName("horizontalLayout_5") |
|
156 | 162 |
spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) |
157 |
self.horizontalLayout.addItem(spacerItem1) |
|
158 |
self.pushButtonClearLog = QtWidgets.QPushButton(self.dockWidgetContents_3)
|
|
163 |
self.horizontalLayout_5.addItem(spacerItem1)
|
|
164 |
self.pushButtonClearLog = QtWidgets.QPushButton(self.tabTerminal)
|
|
159 | 165 |
self.pushButtonClearLog.setMaximumSize(QtCore.QSize(32, 16777215)) |
160 | 166 |
self.pushButtonClearLog.setObjectName("pushButtonClearLog") |
161 |
self.horizontalLayout.addWidget(self.pushButtonClearLog, 0, QtCore.Qt.AlignRight) |
|
162 |
self.verticalLayout_2.addLayout(self.horizontalLayout)
|
|
163 |
self.listWidgetLog = QtWidgets.QListWidget(self.dockWidgetContents_3)
|
|
167 |
self.horizontalLayout_5.addWidget(self.pushButtonClearLog, 0, QtCore.Qt.AlignRight)
|
|
168 |
self.verticalLayout_3.addLayout(self.horizontalLayout_5)
|
|
169 |
self.listWidgetLog = QtWidgets.QListWidget(self.tabTerminal)
|
|
164 | 170 |
self.listWidgetLog.setObjectName("listWidgetLog") |
165 |
self.verticalLayout_2.addWidget(self.listWidgetLog) |
|
166 |
self.horizontalLayout_2 = QtWidgets.QHBoxLayout() |
|
167 |
self.horizontalLayout_2.setObjectName("horizontalLayout_2") |
|
168 |
self.verticalLayout_2.addLayout(self.horizontalLayout_2) |
|
169 |
self.gridLayout_5.addLayout(self.verticalLayout_2, 0, 0, 1, 1) |
|
171 |
self.verticalLayout_3.addWidget(self.listWidgetLog) |
|
172 |
self.horizontalLayout_6 = QtWidgets.QHBoxLayout() |
|
173 |
self.horizontalLayout_6.setObjectName("horizontalLayout_6") |
|
174 |
self.verticalLayout_3.addLayout(self.horizontalLayout_6) |
|
175 |
self.gridLayout_12.addLayout(self.verticalLayout_3, 0, 0, 1, 1) |
|
176 |
self.tabWidget_2.addTab(self.tabTerminal, "") |
|
177 |
self.tabInconsistency = QtWidgets.QWidget() |
|
178 |
self.tabInconsistency.setObjectName("tabInconsistency") |
|
179 |
self.tabWidget_2.addTab(self.tabInconsistency, "") |
|
180 |
self.gridLayout_5.addWidget(self.tabWidget_2, 0, 0, 1, 1) |
|
170 | 181 |
self.dockWidgetOutputWnd.setWidget(self.dockWidgetContents_3) |
171 | 182 |
MainWindow.addDockWidget(QtCore.Qt.DockWidgetArea(8), self.dockWidgetOutputWnd) |
172 | 183 |
self.actionOpen = QtWidgets.QAction(MainWindow) |
... | ... | |
436 | 447 | |
437 | 448 |
self.retranslateUi(MainWindow) |
438 | 449 |
self.tabWidget.setCurrentIndex(0) |
439 |
self.tabWidgetItemExplorer.setCurrentIndex(1) |
|
450 |
self.tabWidgetItemExplorer.setCurrentIndex(0) |
|
451 |
self.tabWidget_2.setCurrentIndex(0) |
|
440 | 452 |
QtCore.QMetaObject.connectSlotsByName(MainWindow) |
441 | 453 | |
442 | 454 |
def retranslateUi(self, MainWindow): |
... | ... | |
464 | 476 |
self.dockWidgetOutputWnd.setWindowTitle(_translate("MainWindow", "Output Window")) |
465 | 477 |
self.pushButtonClearLog.setToolTip(_translate("MainWindow", "Clear")) |
466 | 478 |
self.pushButtonClearLog.setText(_translate("MainWindow", "X")) |
479 |
self.tabWidget_2.setTabText(self.tabWidget_2.indexOf(self.tabTerminal), _translate("MainWindow", "Terminal")) |
|
480 |
self.tabWidget_2.setTabText(self.tabWidget_2.indexOf(self.tabInconsistency), _translate("MainWindow", "Inconsistency")) |
|
467 | 481 |
self.actionOpen.setText(_translate("MainWindow", "Open")) |
468 | 482 |
self.actionOpen.setToolTip(_translate("MainWindow", "Open(Ctrl + O)")) |
469 | 483 |
self.actionOpen.setShortcut(_translate("MainWindow", "Ctrl+O")) |
DTI_PID/DTI_PID/Shapes/EngineeringErrorItem.py | ||
---|---|---|
33 | 33 |
def setPosition(self, loc, origin): |
34 | 34 |
transform = QTransform() |
35 | 35 |
transform.translate(loc[0] - origin[0], loc[1] - origin[1]) |
36 |
self.setTransform(transform) |
|
36 |
self.origin = origin |
|
37 |
self.loc = loc |
|
38 |
self.setTransform(transform) |
|
39 |
|
|
40 |
def toXml(self): |
|
41 |
# do not save |
|
42 |
return None |
DTI_PID/DTI_PID/Shapes/EngineeringLineItem.py | ||
---|---|---|
845 | 845 |
error.setPosition(connector.connectPoint, [51, 72]) |
846 | 846 |
error.parent = self |
847 | 847 |
error.setToolTip('disconnected') |
848 |
error.area = 'Drawing' |
|
848 | 849 |
errors.append(error) |
849 | 850 |
|
850 | 851 |
return errors |
DTI_PID/DTI_PID/UI/MainWindow.ui | ||
---|---|---|
225 | 225 |
<item row="0" column="0"> |
226 | 226 |
<widget class="QTabWidget" name="tabWidgetItemExplorer"> |
227 | 227 |
<property name="currentIndex"> |
228 |
<number>1</number>
|
|
228 |
<number>0</number>
|
|
229 | 229 |
</property> |
230 | 230 |
<widget class="QWidget" name="tabItemProperty"> |
231 | 231 |
<attribute name="title"> |
... | ... | |
356 | 356 |
<widget class="QWidget" name="dockWidgetContents_3"> |
357 | 357 |
<layout class="QGridLayout" name="gridLayout_5"> |
358 | 358 |
<item row="0" column="0"> |
359 |
<layout class="QVBoxLayout" name="verticalLayout_2"> |
|
360 |
<item> |
|
361 |
<layout class="QHBoxLayout" name="horizontalLayout"> |
|
362 |
<item> |
|
363 |
<spacer name="horizontalSpacer"> |
|
364 |
<property name="orientation"> |
|
365 |
<enum>Qt::Horizontal</enum> |
|
366 |
</property> |
|
367 |
<property name="sizeHint" stdset="0"> |
|
368 |
<size> |
|
369 |
<width>40</width> |
|
370 |
<height>20</height> |
|
371 |
</size> |
|
372 |
</property> |
|
373 |
</spacer> |
|
374 |
</item> |
|
375 |
<item alignment="Qt::AlignRight"> |
|
376 |
<widget class="QPushButton" name="pushButtonClearLog"> |
|
377 |
<property name="maximumSize"> |
|
378 |
<size> |
|
379 |
<width>32</width> |
|
380 |
<height>16777215</height> |
|
381 |
</size> |
|
382 |
</property> |
|
383 |
<property name="toolTip"> |
|
384 |
<string>Clear</string> |
|
385 |
</property> |
|
386 |
<property name="text"> |
|
387 |
<string>X</string> |
|
388 |
</property> |
|
389 |
</widget> |
|
359 |
<widget class="QTabWidget" name="tabWidget_2"> |
|
360 |
<property name="currentIndex"> |
|
361 |
<number>0</number> |
|
362 |
</property> |
|
363 |
<widget class="QWidget" name="tabTerminal"> |
|
364 |
<attribute name="title"> |
|
365 |
<string>Terminal</string> |
|
366 |
</attribute> |
|
367 |
<layout class="QGridLayout" name="gridLayout_12"> |
|
368 |
<item row="0" column="0"> |
|
369 |
<layout class="QVBoxLayout" name="verticalLayout_3"> |
|
370 |
<item> |
|
371 |
<layout class="QHBoxLayout" name="horizontalLayout_5"> |
|
372 |
<item> |
|
373 |
<spacer name="horizontalSpacer_3"> |
|
374 |
<property name="orientation"> |
|
375 |
<enum>Qt::Horizontal</enum> |
|
376 |
</property> |
|
377 |
<property name="sizeHint" stdset="0"> |
|
378 |
<size> |
|
379 |
<width>40</width> |
|
380 |
<height>20</height> |
|
381 |
</size> |
|
382 |
</property> |
|
383 |
</spacer> |
|
384 |
</item> |
|
385 |
<item alignment="Qt::AlignRight"> |
|
386 |
<widget class="QPushButton" name="pushButtonClearLog"> |
|
387 |
<property name="maximumSize"> |
|
388 |
<size> |
|
389 |
<width>32</width> |
|
390 |
<height>16777215</height> |
|
391 |
</size> |
|
392 |
</property> |
|
393 |
<property name="toolTip"> |
|
394 |
<string>Clear</string> |
|
395 |
</property> |
|
396 |
<property name="text"> |
|
397 |
<string>X</string> |
|
398 |
</property> |
|
399 |
</widget> |
|
400 |
</item> |
|
401 |
</layout> |
|
402 |
</item> |
|
403 |
<item> |
|
404 |
<widget class="QListWidget" name="listWidgetLog"/> |
|
405 |
</item> |
|
406 |
<item> |
|
407 |
<layout class="QHBoxLayout" name="horizontalLayout_6"/> |
|
408 |
</item> |
|
409 |
</layout> |
|
390 | 410 |
</item> |
391 | 411 |
</layout> |
392 |
</item> |
|
393 |
<item> |
|
394 |
<widget class="QListWidget" name="listWidgetLog"/> |
|
395 |
</item> |
|
396 |
<item> |
|
397 |
<layout class="QHBoxLayout" name="horizontalLayout_2"/> |
|
398 |
</item> |
|
399 |
</layout> |
|
412 |
</widget> |
|
413 |
<widget class="QWidget" name="tabInconsistency"> |
|
414 |
<attribute name="title"> |
|
415 |
<string>Inconsistency</string> |
|
416 |
</attribute> |
|
417 |
</widget> |
|
418 |
</widget> |
|
400 | 419 |
</item> |
401 | 420 |
</layout> |
402 | 421 |
</widget> |
DTI_PID/DTI_PID/XmlGenerator.py | ||
---|---|---|
401 | 401 |
for item in items: |
402 | 402 |
if issubclass(type(item), SymbolSvgItem): |
403 | 403 |
symbolNode = item.toXml() |
404 |
if symbolNode is None: continue |
|
404 | 405 |
if type(symbolNode) is str: |
405 | 406 |
resultDic["Symbol Item"][1].append(symbolNode) |
406 | 407 |
else: |
내보내기 Unified diff