개정판 6b450211
issue #000: add stream no from to set validation check
Change-Id: Ib3d5cbdf3230782dd6d3d053f7b5eb67fbc55534
DTI_PID/DTI_PID/AppDocData.py | ||
---|---|---|
140 | 140 |
@author humkyung |
141 | 141 |
@date 2018.09.06 |
142 | 142 |
''' |
143 |
|
|
144 | 143 |
def clear(self, past=None): |
145 | 144 |
from QEngineeringInstLineNoTextItem import QEngineeringInstLineNoTextItem |
146 | 145 |
|
... | ... | |
275 | 274 |
@author euisung |
276 | 275 |
@date 2018.10.16 |
277 | 276 |
''' |
278 |
|
|
279 | 277 |
def getTrainingFileList(self): |
280 | 278 |
try: |
281 | 279 |
project = AppDocData.instance().getCurrentProject() |
... | ... | |
311 | 309 |
@date 2018.06.27 |
312 | 310 |
@history 2018.06.29 Jeongwoo Change method to get template db path |
313 | 311 |
''' |
314 |
|
|
315 | 312 |
def getTemplateDbPath(self): |
316 | 313 |
path = os.path.join(os.getenv('ALLUSERSPROFILE'), 'Digital PID') |
317 | 314 |
templateDbPath = os.path.join(path, 'Template.db') |
... | ... | |
339 | 336 |
@author humkyung |
340 | 337 |
@date 2018.06.18 |
341 | 338 |
''' |
342 |
|
|
343 | 339 |
@property |
344 | 340 |
def colors(self): |
345 | 341 |
import random |
... | ... | |
368 | 364 |
@author humkyung |
369 | 365 |
@date 2018.06.18 |
370 | 366 |
''' |
371 |
|
|
372 | 367 |
@colors.setter |
373 | 368 |
def colors(self, value): |
374 | 369 |
self._colors = value |
... | ... | |
378 | 373 |
@author humkyung |
379 | 374 |
@date 2018.07.30 |
380 | 375 |
''' |
381 |
|
|
382 | 376 |
def setImgFilePath(self, path): |
383 | 377 |
self._imgFilePath = path |
384 | 378 |
self.imgName = os.path.splitext(os.path.basename(self._imgFilePath))[0] |
... | ... | |
418 | 412 |
@author humkyung |
419 | 413 |
@date 2018.06.28 |
420 | 414 |
''' |
421 |
|
|
422 | 415 |
@property |
423 | 416 |
def lineTypeConfigs(self): |
424 | 417 |
from PyQt5.QtCore import Qt |
... | ... | |
444 | 437 |
@author humkyung |
445 | 438 |
@date 2018.06.28 |
446 | 439 |
''' |
447 |
|
|
448 | 440 |
@lineTypeConfigs.setter |
449 | 441 |
def lineTypeConfigs(self, value): |
450 | 442 |
self._lineTypeConfigs = value |
... | ... | |
768 | 760 |
@author humkyung |
769 | 761 |
@date 2018.04.20 |
770 | 762 |
''' |
771 |
|
|
772 | 763 |
def loadAppStyle(self): |
773 | 764 |
style = 'Fusion' |
774 | 765 |
|
... | ... | |
804 | 795 |
@author humkyung |
805 | 796 |
@date 2018.04.20 |
806 | 797 |
''' |
807 |
|
|
808 | 798 |
def loadAppStyles(self): |
809 | 799 |
styles = [] |
810 | 800 |
|
... | ... | |
840 | 830 |
@brief Set current Project |
841 | 831 |
@history 2018.06.27 Jeongwoo If DB file is not, copy DB file from ProgramData |
842 | 832 |
''' |
843 |
|
|
844 | 833 |
def setCurrentProject(self, project): |
845 | 834 |
self.project = project |
846 | 835 |
project.make_sub_directories() |
... | ... | |
890 | 879 |
''' |
891 | 880 |
@brief Get current Project |
892 | 881 |
''' |
893 |
|
|
894 | 882 |
def getCurrentProject(self): |
895 | 883 |
return self.project |
896 | 884 |
|
... | ... | |
898 | 886 |
@brief return project database path |
899 | 887 |
@history humkyung 2018.04.19 return Project.db in Program Data folder instead of PROJECT_DB_PATH variable |
900 | 888 |
''' |
901 |
|
|
902 | 889 |
def getPrjDatabasePath(self): |
903 | 890 |
path = os.path.join(os.getenv('ALLUSERSPROFILE'), 'Digital PID') |
904 | 891 |
if not os.path.exists(path): os.makedirs(path) |
... | ... | |
1106 | 1093 |
@author humkyung |
1107 | 1094 |
@date 2018.04.09 |
1108 | 1095 |
''' |
1109 |
|
|
1110 | 1096 |
def getLinePropertiesByUID(self, UID): |
1111 | 1097 |
from SymbolAttr import SymbolAttr |
1112 | 1098 |
|
... | ... | |
1147 | 1133 |
@author humkyung |
1148 | 1134 |
@date 2018.06.27 |
1149 | 1135 |
''' |
1150 |
|
|
1151 | 1136 |
def getLineTypes(self): |
1152 | 1137 |
from LineTypeConditions import LineTypeConditions |
1153 | 1138 |
|
... | ... | |
1179 | 1164 |
@date 2018.04.06 |
1180 | 1165 |
@history humkyung 2018.04.19 use getPrjDatabasePath function instead of PROJECT_DB_PATH variable |
1181 | 1166 |
''' |
1182 |
|
|
1183 | 1167 |
def insertProjectInfo(self, desc, prj_unit, dir): |
1184 | 1168 |
prjDatabaseFilePath = self.getPrjDatabasePath() |
1185 | 1169 |
conn = sqlite3.connect(prjDatabaseFilePath) |
... | ... | |
1228 | 1212 |
@date 2018.04.06 |
1229 | 1213 |
@history humkyung 2018.04.19 use getPrjDatabasePath function instead of PROJECT_DB_PATH variable |
1230 | 1214 |
''' |
1231 |
|
|
1232 | 1215 |
def updateProjectUpdatedDate(self, project): |
1233 | 1216 |
prjDatabaseFilePath = self.getPrjDatabasePath() |
1234 | 1217 |
conn = sqlite3.connect(prjDatabaseFilePath) |
... | ... | |
1259 | 1242 |
@brief get project list from database |
1260 | 1243 |
@history humkyung 2018.04.18 add only project which's project exists |
1261 | 1244 |
''' |
1262 |
|
|
1263 | 1245 |
def getProjectList(self): |
1264 | 1246 |
from Project import Project |
1265 | 1247 |
|
... | ... | |
1293 | 1275 |
@brief get sliding window size |
1294 | 1276 |
@author humkyung |
1295 | 1277 |
''' |
1296 |
|
|
1297 | 1278 |
def getSlidingWindowSize(self): |
1298 | 1279 |
res = [25, 20] |
1299 | 1280 |
try: |
... | ... | |
1315 | 1296 |
@author humkyung |
1316 | 1297 |
@date 2018.04.16 |
1317 | 1298 |
''' |
1318 |
|
|
1319 | 1299 |
def getLineNoConfiguration(self): |
1320 | 1300 |
res = None |
1321 | 1301 |
|
... | ... | |
1350 | 1330 |
@author humkyung |
1351 | 1331 |
@history euisung 2018.11.20 (0,0),(0,0) process add |
1352 | 1332 |
''' |
1353 |
|
|
1354 | 1333 |
def getAreaList(self, size=False): |
1355 | 1334 |
from Area import Area |
1356 | 1335 |
|
... | ... | |
1381 | 1360 |
@author humkyung |
1382 | 1361 |
@date 2018.04.07 |
1383 | 1362 |
''' |
1384 |
|
|
1385 | 1363 |
def getArea(self, name): |
1386 | 1364 |
areas = self.getAreaList(size=True) |
1387 | 1365 |
matches = [area for area in areas if area.name == name] |
... | ... | |
1456 | 1434 |
@history humkyung 2018.07.03 replace ' with " if value has ' |
1457 | 1435 |
kyouho 2018.07.09 change query method |
1458 | 1436 |
''' |
1459 |
|
|
1460 | 1437 |
def saveConfigs(self, configs): |
1461 | 1438 |
with self.project.database.connect() as conn: |
1462 | 1439 |
try: |
... | ... | |
1618 | 1595 |
@history humkyung 2018.05.18 round area coordinate and dimension before saving |
1619 | 1596 |
@history euisung 2018.11.20 add self._area reset process |
1620 | 1597 |
''' |
1621 |
|
|
1622 | 1598 |
def setAreaList(self, areas): |
1623 | 1599 |
for area in areas: |
1624 | 1600 |
matches = [x for x in self._areas if x.name == area.name] |
... | ... | |
1683 | 1659 |
@date 18.04.06 |
1684 | 1660 |
@history . |
1685 | 1661 |
''' |
1686 |
|
|
1687 | 1662 |
def getSymbolNameListByType(self, type): |
1688 | 1663 |
symbolNametList = [] |
1689 | 1664 |
|
... | ... | |
1707 | 1682 |
''' |
1708 | 1683 |
@brief delete added symbol data |
1709 | 1684 |
''' |
1710 |
|
|
1711 | 1685 |
def deleteSymbol(self, fileName): |
1712 | 1686 |
ret = False |
1713 | 1687 |
|
... | ... | |
1805 | 1779 |
@brief get symbol name list |
1806 | 1780 |
@history 18.04.24 Jeongwoo Add isExceptDetect Field |
1807 | 1781 |
''' |
1808 |
|
|
1809 | 1782 |
def getSymbolListByType(self, field_name=None, param=None): |
1810 | 1783 |
ret = [] |
1811 | 1784 |
|
... | ... | |
1852 | 1825 |
kyouho 2018.07.04 forCheckLineNumber get only inch or metric |
1853 | 1826 |
kyouho 2018.07.16 edit query order by code |
1854 | 1827 |
''' |
1855 |
|
|
1856 | 1828 |
def getNomialPipeSizeData(self, forCheckLineNumber=False, orderStr="MetricStr"): |
1857 | 1829 |
res = [] |
1858 | 1830 |
configs = self.getConfigs('Line No', 'Size Unit') |
... | ... | |
1899 | 1871 |
@author kyouho |
1900 | 1872 |
@date 2018.07.16 |
1901 | 1873 |
''' |
1902 |
|
|
1903 | 1874 |
def insertNomialPipeSize(self, pipeSizes): |
1904 | 1875 |
conn = self.project.database.connect() |
1905 | 1876 |
with conn: |
... | ... | |
1927 | 1898 |
@author kyouho |
1928 | 1899 |
@date 2018.07.16 |
1929 | 1900 |
''' |
1930 |
|
|
1931 | 1901 |
def deleteNomialPipeSize(self): |
1932 | 1902 |
conn = self.project.database.connect() |
1933 | 1903 |
with conn: |
... | ... | |
1946 | 1916 |
@author kyouho |
1947 | 1917 |
@date 2018.07.09 |
1948 | 1918 |
''' |
1949 |
|
|
1950 | 1919 |
def convertInchToMetric(self, inch): |
1951 | 1920 |
result = '' |
1952 | 1921 |
conn = self.project.database.connect() |
... | ... | |
1974 | 1943 |
@author kyouho |
1975 | 1944 |
@date 2018.07.03 |
1976 | 1945 |
''' |
1977 |
|
|
1978 | 1946 |
def getMaxColorUID(self): |
1979 | 1947 |
result = 0 |
1980 | 1948 |
|
... | ... | |
2001 | 1969 |
@author kyouho |
2002 | 1970 |
@date 2018.07.09 |
2003 | 1971 |
''' |
2004 |
|
|
2005 | 1972 |
def setPropertyColor(self, _color): |
2006 | 1973 |
conn = self.project.database.connect() |
2007 | 1974 |
with conn: |
... | ... | |
2024 | 1991 |
@author kyouho |
2025 | 1992 |
@date 2018.07.09 |
2026 | 1993 |
''' |
2027 |
|
|
2028 | 1994 |
def deletePropertyColor(self, property): |
2029 | 1995 |
conn = self.project.database.connect() |
2030 | 1996 |
with conn: |
... | ... | |
2048 | 2014 |
@date 2018.07.03 |
2049 | 2015 |
@history kyouho 2018.07.04 kyouho 2018.07.04 forCheckLineNumber get only code |
2050 | 2016 |
''' |
2051 |
|
|
2052 | 2017 |
def getFluidCodeData(self, forCheckLineNumber=False): |
2053 | 2018 |
from FluidCodeData import FluidCodeData |
2054 | 2019 |
result = [] |
... | ... | |
2080 | 2045 |
@author kyouho |
2081 | 2046 |
@date 2018.07.18 |
2082 | 2047 |
''' |
2083 |
|
|
2084 | 2048 |
def checkAttribute(self, attr): |
2085 | 2049 |
conn = self.project.database.connect() |
2086 | 2050 |
with conn: |
... | ... | |
2367 | 2331 |
@date 2018.08.17 |
2368 | 2332 |
@history humkyung 2018.10.13 load expression |
2369 | 2333 |
''' |
2370 |
|
|
2371 | 2334 |
def getSymbolAttributeByUID(self, UID): |
2372 | 2335 |
from SymbolAttr import SymbolAttr |
2373 | 2336 |
|
... | ... | |
2951 | 2914 |
@author kyouho |
2952 | 2915 |
@date 2018.08.17 |
2953 | 2916 |
''' |
2954 |
|
|
2955 | 2917 |
def getSymbolTypeId(self, symbolType): |
2956 | 2918 |
result = [] |
2957 | 2919 |
|
... | ... | |
2981 | 2943 |
@author kyouho |
2982 | 2944 |
@date 2018.07.10 |
2983 | 2945 |
''' |
2984 |
|
|
2985 | 2946 |
def getCodeTable(self, property, forCheckLineNumber=False, symbol_attribute_uid=None, custom_table_uid=None, custom=False, \ |
2986 | 2947 |
inst_table_uid=None, inst=False): |
2987 | 2948 |
result = [] |
... | ... | |
3309 | 3270 |
@author humkyung |
3310 | 3271 |
@date 2019.08.10 |
3311 | 3272 |
''' |
3312 |
|
|
3313 | 3273 |
def get_special_item_types(self): |
3314 | 3274 |
conn = self.project.database.connect() |
3315 | 3275 |
with conn: |
... | ... | |
3332 | 3292 |
@author humkyung |
3333 | 3293 |
@date 2019.08.10 |
3334 | 3294 |
''' |
3335 |
|
|
3336 | 3295 |
def save_special_item_types(self, datas): |
3337 | 3296 |
import uuid |
3338 | 3297 |
|
... | ... | |
3457 | 3416 |
@author kyouho |
3458 | 3417 |
@date 2018.07.12 |
3459 | 3418 |
''' |
3460 |
|
|
3461 | 3419 |
def deleteCommonCodeData(self, datas): |
3462 | 3420 |
try: |
3463 | 3421 |
conn = self.project.database.connect() |
... | ... | |
3490 | 3448 |
@author kyouho |
3491 | 3449 |
@date 2018.08.16 |
3492 | 3450 |
''' |
3493 |
|
|
3494 | 3451 |
def deleteDataList(self, tableName, UID): |
3495 | 3452 |
conn = self.project.database.connect() |
3496 | 3453 |
with conn: |
... | ... | |
3538 | 3495 |
@author kyouho |
3539 | 3496 |
@date 2018.08.13 |
3540 | 3497 |
''' |
3541 |
|
|
3542 | 3498 |
def getLineDocumentNameList(self): |
3543 | 3499 |
result = [] |
3544 | 3500 |
|
... | ... | |
3566 | 3522 |
@author kyouho |
3567 | 3523 |
@date 2018.08.13 |
3568 | 3524 |
''' |
3569 |
|
|
3570 | 3525 |
def get_line_data_list(self, drawings=None): |
3571 | 3526 |
result = [] |
3572 | 3527 |
|
... | ... | |
3649 | 3604 |
@author kyouho |
3650 | 3605 |
@date 2018.08.13 |
3651 | 3606 |
''' |
3652 |
|
|
3653 | 3607 |
def setLineDataList(self, dataLists): |
3654 | 3608 |
conn = self.project.database.connect() |
3655 | 3609 |
with conn: |
... | ... | |
3701 | 3655 |
@author kyouho |
3702 | 3656 |
@date 2018.08.13 |
3703 | 3657 |
''' |
3704 |
|
|
3705 | 3658 |
def deleteLineDataList_LineNo(self, removeUID): |
3706 | 3659 |
conn = self.project.database.connect() |
3707 | 3660 |
with conn: |
... | ... | |
3728 | 3681 |
@author kyouho |
3729 | 3682 |
@date 2018.08.14 |
3730 | 3683 |
''' |
3731 |
|
|
3732 | 3684 |
def deleteEquipDataList(self, removeUID): |
3733 | 3685 |
conn = self.project.database.connect() |
3734 | 3686 |
with conn: |
... | ... | |
3754 | 3706 |
@author kyouho |
3755 | 3707 |
@date 2018.08.14 |
3756 | 3708 |
''' |
3757 |
|
|
3758 | 3709 |
def deleteInstDataList(self, removeUID): |
3759 | 3710 |
conn = self.project.database.connect() |
3760 | 3711 |
with conn: |
... | ... | |
3780 | 3731 |
@author kyouho |
3781 | 3732 |
@date 2018.10.10 |
3782 | 3733 |
''' |
3783 |
|
|
3784 | 3734 |
def deleteNoteDataList(self, removeUID): |
3785 | 3735 |
conn = self.project.database.connect() |
3786 | 3736 |
with conn: |
... | ... | |
4189 | 4139 |
@author humkyung |
4190 | 4140 |
@date 2018.05.03 |
4191 | 4141 |
''' |
4192 |
|
|
4193 | 4142 |
def setEquipmentDataList(self, dataList): |
4194 | 4143 |
conn = self.project.database.connect() |
4195 | 4144 |
with conn: |
... | ... | |
4217 | 4166 |
@author kyoyho |
4218 | 4167 |
@date 2018.08.14 |
4219 | 4168 |
''' |
4220 |
|
|
4221 | 4169 |
def setInstrumentDataList(self, dataList): |
4222 | 4170 |
conn = self.project.database.connect() |
4223 | 4171 |
with conn: |
... | ... | |
4322 | 4270 |
''' |
4323 | 4271 |
@brief get IsOriginDetect ComboBox Items |
4324 | 4272 |
''' |
4325 |
|
|
4326 | 4273 |
def getIsOriginDetectComboBoxItems(self): |
4327 | 4274 |
return [("원본 도면", 0), ("텍스트 제거 도면", 1)] |
4328 | 4275 |
|
4329 | 4276 |
''' |
4330 | 4277 |
@brief get IsOriginDetect ComboBox Items |
4331 | 4278 |
''' |
4332 |
|
|
4333 | 4279 |
def getOcrOptionComboBoxItems(self): |
4334 | 4280 |
return [("OCR 미적용", 0), ("일반 심볼", 1), ("Instrument 계통", 2)] |
4335 | 4281 |
|
... | ... | |
4339 | 4285 |
@date 18.04.20 |
4340 | 4286 |
@history 18.05.08 Jeongwoo type index changed |
4341 | 4287 |
''' |
4342 |
|
|
4343 | 4288 |
def getSymbolTypeList(self): |
4344 | 4289 |
symbolTypeList = [] |
4345 | 4290 |
|
... | ... | |
4385 | 4330 |
@author Jeongwoo |
4386 | 4331 |
@date 2018.05.09 |
4387 | 4332 |
''' |
4388 |
|
|
4389 | 4333 |
def isEquipmentType(self, type): |
4390 | 4334 |
category = self.getSymbolCategoryByType(type) |
4391 | 4335 |
return category is not None and category == 'Equipment' |
... | ... | |
4396 | 4340 |
@date 18.04.06 |
4397 | 4341 |
@history Seperate SymbolTypeList and "None" |
4398 | 4342 |
''' |
4399 |
|
|
4400 | 4343 |
def getSymbolTypeComboBoxItems(self): |
4401 | 4344 |
symbolTypeList = [symbol_type for symbol_type in self.getSymbolTypeList() if symbol_type[1]] |
4402 | 4345 |
symbolTypeList.insert(0, ('None', 'None', 'None')) |
... | ... | |
4406 | 4349 |
''' |
4407 | 4350 |
@brief get Base Symbol ComboBox Items |
4408 | 4351 |
''' |
4409 |
|
|
4410 | 4352 |
def getBaseSymbolComboBoxItems(self, type=None): |
4411 | 4353 |
bsymbolNameList = self.getSymbolNameListByType(type) |
4412 | 4354 |
bsymbolNameList.sort() |
... | ... | |
4416 | 4358 |
''' |
4417 | 4359 |
@brief get Additional Symbol ComboBox Items |
4418 | 4360 |
''' |
4419 |
|
|
4420 | 4361 |
def getAdditionalSymbolComboBoxItems(self): |
4421 | 4362 |
asymbolNameList = self.getSymbolNameList() |
4422 | 4363 |
asymbolNameList.sort() |
... | ... | |
4426 | 4367 |
''' |
4427 | 4368 |
@brief get Additional Symbol's default direction ComboBox Items |
4428 | 4369 |
''' |
4429 |
|
|
4430 | 4370 |
def getDefaultSymbolDirectionComboBoxItems(self): |
4431 | 4371 |
return [("UP", 0), ("DOWN", 2), ("LEFT", 3), ("RIGHT", 1)] |
4432 | 4372 |
|
... | ... | |
4435 | 4375 |
@author humkyung |
4436 | 4376 |
@date 2018.07.07 |
4437 | 4377 |
''' |
4438 |
|
|
4439 | 4378 |
@property |
4440 | 4379 |
def activeDrawing(self): |
4441 | 4380 |
return self._activeDrawing |
... | ... | |
4445 | 4384 |
@author humkyung |
4446 | 4385 |
@date 2018.07.07 |
4447 | 4386 |
''' |
4448 |
|
|
4449 | 4387 |
@activeDrawing.setter |
4450 | 4388 |
def activeDrawing(self, value): |
4451 | 4389 |
if self._activeDrawing: |
... | ... | |
4484 | 4422 |
@author humkyung |
4485 | 4423 |
@date 2018.11.19 |
4486 | 4424 |
''' |
4487 |
|
|
4488 | 4425 |
@property |
4489 | 4426 |
def OCRData(self): |
4490 | 4427 |
if self._OCRData is None: |
... | ... | |
4498 | 4435 |
@author humkyung |
4499 | 4436 |
@date 2018.11.19 |
4500 | 4437 |
''' |
4501 |
|
|
4502 | 4438 |
@OCRData.setter |
4503 | 4439 |
def OCRData(self, value): |
4504 | 4440 |
self._OCRData = value |
DTI_PID/DTI_PID/StreamlineDialog.py | ||
---|---|---|
146 | 146 |
|
147 | 147 |
model= HmbModel() |
148 | 148 |
header = ['UID', 'Stream No'] |
149 |
stream_nos = [] |
|
149 | 150 |
|
150 | 151 |
for hmb in hmbs: |
151 | 152 |
UID = hmb.uid |
... | ... | |
158 | 159 |
items.append(QStandardItem(data.value)) |
159 | 160 |
model.appendRow(items) |
160 | 161 |
|
162 |
stream_nos.append(STREAM_NO) |
|
163 |
|
|
161 | 164 |
model.setHorizontalHeaderLabels(header) |
162 | 165 |
|
163 | 166 |
self.ui.tableViewStreamNo.setModel(model) |
... | ... | |
166 | 169 |
for col in range(self.ui.tableViewStreamNo.model().columnCount()): |
167 | 170 |
self.ui.tableViewStreamNo.setColumnHidden(col, col != 1) # hide all columns except index is 1 |
168 | 171 |
|
172 |
for index in range(len(stream_nos)): |
|
173 |
self.on_selection_changed(None, stream_no=stream_nos[index], row=index) |
|
174 |
|
|
169 | 175 |
def caseChanged(self, text): |
170 | 176 |
box = self.sender() |
171 | 177 |
row, column = self._case_combobox[box] |
... | ... | |
182 | 188 |
row = self.ui.tableViewStreamNo.selectionModel().currentIndex().row() |
183 | 189 |
self.ui.tableViewStreamNo.model().item(row, 1)._new = True |
184 | 190 |
|
185 |
def on_selection_changed(self, selection): |
|
191 |
def on_selection_changed(self, selection, stream_no=None, row=None):
|
|
186 | 192 |
"""show stream line from, to related to selected hmb""" |
187 | 193 |
|
188 |
if selection.indexes(): |
|
189 |
row = selection.indexes()[0].row() |
|
190 |
stream_no = self.ui.tableViewStreamNo.model().item(row, 1).text() |
|
194 |
if (selection and selection.indexes()) or stream_no: |
|
195 |
if selection and selection.indexes(): |
|
196 |
row = selection.indexes()[0].row() |
|
197 |
stream_no = self.ui.tableViewStreamNo.model().item(row, 1).text() |
|
198 |
else: |
|
199 |
row = row |
|
200 |
stream_no = stream_no |
|
191 | 201 |
|
192 | 202 |
app_doc_data = AppDocData.instance() |
193 | 203 |
|
... | ... | |
343 | 353 |
from Commands.SelectCompCommand import SelectCompCommand |
344 | 354 |
|
345 | 355 |
def on_success_select_comp(selected): |
356 |
uid = str(selected.uid) |
|
357 |
for stream_no, model in self._from_to_models.items(): |
|
358 |
for row in range(model.rowCount()): |
|
359 |
from_ = model.item(row, 1) |
|
360 |
from_uid = from_.data(Qt.UserRole) |
|
361 |
to_ = model.item(row, 2) |
|
362 |
to_uid = to_.data(Qt.UserRole) |
|
363 |
|
|
364 |
if uid == from_uid or uid == to_uid: |
|
365 |
QMessageBox.warning(self, self.tr("Notice"), self.tr('The item has already been used. Stream No: ') + stream_no) |
|
366 |
return |
|
367 |
|
|
346 | 368 |
current = self.ui.tableViewFromTo.selectionModel().currentIndex() |
347 | 369 |
row = current.row() |
348 | 370 |
column = current.column() |
내보내기 Unified diff