프로젝트

일반

사용자정보

개정판 8701ed58

ID8701ed58e9ab6d4811e23e82bb2d64f1f132d5fe
상위 2a490083
하위 0b466a04

함의성이(가) 약 5년 전에 추가함

issue #700: user mode added in license with 'DOFTECH'

Change-Id: I89f8243da099ec49a759ed8ca7c7fdd6b1aef03e

차이점 보기:

DTI_PID/DTI_PID/AppDocData.py
658 658

  
659 659
        configs = self.getAppConfigs('app', 'expiration')
660 660
        if not configs:
661
            configs = [Config('app', 'mode', 'advanced'), Config('app', 'error origin point', '51,72')]
661
            configs = self.getAppConfigs('app', 'license')
662
            if 'DOFTECH' in configs[0].value:
663
                configs = [Config('app', 'error origin point', '51,72')]
664
                self.deleteAppConfigs('app', 'mode')
665
            else:
666
                configs = [Config('app', 'mode', 'advanced'), Config('app', 'error origin point', '51,72')]
662 667
        else:
663 668
            configs = [Config('app', 'error origin point', '51,72')]
664 669
        self.saveAppConfigs(configs)
DTI_PID/DTI_PID/License.py
74 74
            configs = appDocData.getAppConfigs('app', 'license')
75 75
            configs2 = appDocData.getAppConfigs('app', 'expiration')
76 76
            if configs and 1 == len(configs):
77
                if 'DOFTECH' in configs[0].value:
78
                    configs[0].value = configs[0].value.replace('DOFTECH', '')
77 79
                decoded = QLicenseDialog.decode(QLicenseDialog.KEY, configs[0].value)
78 80
                if decoded.upper() == os.environ['COMPUTERNAME'].upper():
79 81
                    if configs2 and 1 == len(configs2):
DTI_PID/DTI_PID/MainWindow.py
267 267
            self.actionOCR_Training.triggered.connect(self.oCRTrainingClicked)
268 268
            self.actionSymbol_Training.triggered.connect(self.symbolTrainingClicked)
269 269
        else:
270
            self.actionOCR_Training.setVisible(False)
271
            self.actionSymbol_Training.setVisible(False)
270
            #self.actionOCR_Training.setVisible(False)
271
            #self.actionSymbol_Training.setVisible(False)
272
            self.menu_2.setEnabled(False) # Data
273
            self.menu_4.setEnabled(False) # Tool
274
            self.actionConfiguration.setVisible(False)
272 275
            self.pushButtonBatchRecognition.setVisible(False)
273 276
            self.pushButtonCreateSymbol.setVisible(False)
274 277
            self.pushButtonDetectSymbol.setVisible(False)
DTI_PID/DTI_PID/SymbolTreeWidget.py
50 50
        itemPosition = self.mapTo(self, position)
51 51
        item = self.itemAt(itemPosition)
52 52
        data = item.data(0, self.TREE_DATA_ROLE)
53

  
54
        advanced = False
55
        app_doc_data = AppDocData.instance()
56
        configs = app_doc_data.getAppConfigs('app', 'mode')
57
        if configs and 1 == len(configs) and 'advanced' == configs[0].value:
58
            advanced = True
59

  
53 60
        if data is not None and type(data) is symbol.SymbolBase:
54 61
            sym = self.getSymbolByItemName(item, 0)
55 62
            text = item.text(0)
......
61 68
                    level += 1
62 69
            if sym is not None:
63 70
                menu = QMenu()
64
                editSymbolAction = QAction(self.tr("Edit Symbol"))
65
                editSymbolAction.triggered.connect(lambda: self.editSymbolActionClickEvent(item, 0))
66
                menu.addAction(editSymbolAction)
67
                editDisplaySymbolAction = QAction(self.tr("Edit Symbol for Dispay"))
68
                editDisplaySymbolAction.triggered.connect(lambda: self.editDisplaySymbolActionClickEvent(item, 0))
69
                menu.addAction(editDisplaySymbolAction)
71
                if advanced:
72
                    editSymbolAction = QAction(self.tr("Edit Symbol"))
73
                    editSymbolAction.triggered.connect(lambda: self.editSymbolActionClickEvent(item, 0))
74
                    menu.addAction(editSymbolAction)
75
                    editDisplaySymbolAction = QAction(self.tr("Edit Symbol for Dispay"))
76
                    editDisplaySymbolAction.triggered.connect(lambda: self.editDisplaySymbolActionClickEvent(item, 0))
77
                    menu.addAction(editDisplaySymbolAction)
70 78
                displaySymbolAction = QAction(self.tr("Display Symbol"))
71 79
                displaySymbolAction.triggered.connect(lambda: self.displaySymbolActionClickEvent(item, 0))
72 80
                menu.addAction(displaySymbolAction)
73
                deleteSymbolAction = QAction(self.tr("Delete Symbol"))
74
                deleteSymbolAction.triggered.connect(lambda: self.deleteSymbolActionClickEvent(sym.getType(), text))
75
                menu.addAction(deleteSymbolAction)
81
                if advanced:
82
                    deleteSymbolAction = QAction(self.tr("Delete Symbol"))
83
                    deleteSymbolAction.triggered.connect(lambda: self.deleteSymbolActionClickEvent(sym.getType(), text))
84
                    menu.addAction(deleteSymbolAction)
76 85
                menu.exec_(self.viewport().mapToGlobal(position))
77 86
        else:
78
            menu = QMenu()
79
            editAttrAction = QAction(self.tr("Edit Attribute"))
80
            editAttrAction.triggered.connect(lambda: self.onEditAttrClicked(item, 0))
81
            menu.addAction(editAttrAction)
82
            menu.exec_(self.viewport().mapToGlobal(position))
87
            if advanced:
88
                menu = QMenu()
89
                editAttrAction = QAction(self.tr("Edit Attribute"))
90
                editAttrAction.triggered.connect(lambda: self.onEditAttrClicked(item, 0))
91
                menu.addAction(editAttrAction)
92
                menu.exec_(self.viewport().mapToGlobal(position))
83 93

  
84 94
    def editSymbolActionClickEvent(self, item, columNo):
85 95
        self.showSymbolEditorDialog(item, columNo)

내보내기 Unified diff

클립보드 이미지 추가 (최대 크기: 500 MB)