프로젝트

일반

사용자정보

개정판 d79359ab

IDd79359abbd21b21f2824585c2b72e4e930963a91
상위 1e8ea226
하위 8c278f25

함의성이(가) 4년 이상 전에 추가함

issue #1366: big symbol

Change-Id: I48abfadb92a5fa109ed1471fe53c431fcebf837f

차이점 보기:

DTI_PID/DTI_PID/AppWebService.py
173 173
            App.mainWnd().addMessage.emit(MessageType.Error, message)
174 174
            return False
175 175

  
176
    def request_execute_training(self, name, classes):
176
    def request_execute_training(self, name, classes, bigs):
177 177
        try:
178 178
            if not self.test_connection():
179 179
                return []
180 180

  
181 181
            training_model = '/training/training_model'
182 182

  
183
            data = { 'name':name, 'classes':classes }
183
            data = { 'name':name, 'classes':classes, 'bigs':bigs }
184 184

  
185 185
            response = requests.post(self._url + training_model, data=json.dumps(data))
186 186
            count = response.json()['count']
DTI_PID/DTI_PID/ReplaceSymbolDialog.py
52 52

  
53 53
        rowCount = self.ui.tableWidgetPreset.rowCount()
54 54
        self.ui.tableWidgetPreset.setRowCount(rowCount + 1)
55

  
55 56
        item = QTableWidgetItem()
56 57
        item.setFlags(Qt.ItemIsUserCheckable | Qt.ItemIsEnabled)
57 58
        item.setCheckState(Qt.Unchecked)
58 59
        self.ui.tableWidgetPreset.setItem(rowCount, 0, item)
60

  
61
        item = QTableWidgetItem(find_symbol)
62
        item.setFlags(Qt.ItemIsEnabled)
59 63
        self.ui.tableWidgetPreset.setItem(rowCount, 1, QTableWidgetItem(find_symbol))
60
        self.ui.tableWidgetPreset.setItem(rowCount, 2, QTableWidgetItem(replace_symbol))
61
        self.ui.tableWidgetPreset.setItem(rowCount, 3, QTableWidgetItem('replace' if self.ui.radioButtonReplace.isChecked() else 'insert'))
62
        self.ui.tableWidgetPreset.setItem(rowCount, 3, QTableWidgetItem(condition.replace('radioButton', '')))
64

  
65
        item = QTableWidgetItem(replace_symbol)
66
        item.setFlags(Qt.ItemIsEnabled)
67
        self.ui.tableWidgetPreset.setItem(rowCount, 2, item)
68

  
69
        item = QTableWidgetItem('replace' if self.ui.radioButtonReplace.isChecked() else 'insert')
70
        item.setFlags(Qt.ItemIsEnabled)
71
        self.ui.tableWidgetPreset.setItem(rowCount, 3, item)
72
        
73
        item = QTableWidgetItem(condition.replace('radioButton', ''))
74
        item.setFlags(Qt.ItemIsEnabled)
75
        self.ui.tableWidgetPreset.setItem(rowCount, 4, item)
63 76

  
64 77
    def init_symbol_list(self):
65 78
        app_doc_data = AppDocData.instance()
DTI_PID/DTI_PID/TrainingSymbolImageListDialog.py
91 91
        project = app_doc_data.getCurrentProject()
92 92

  
93 93
        classes = []
94
        for label in self.labelList:
95
            classes.append(label[0])
94
        bigs = []
95
        #for label in self.labelList:
96
        #    classes.append(label[0])
97
        symbol_list = app_doc_data.getTargetSymbolList(all=True)
98
        for symbol in symbol_list:
99
            classes.append(symbol.getName())
100
            if symbol.getWidth() > 450 or symbol.getHeight() > 450:
101
                bigs.append(symbol.getName())
96 102

  
97 103
        app_web_service = AppWebService()
98
        res = app_web_service.request_execute_training(project.name, classes)
104
        res = app_web_service.request_execute_training(project.name, classes, bigs)
99 105
        if res:
100 106
            QMessageBox.about(self, self.tr("Notice"), self.tr('Successfully requested. '))
101 107
    

내보내기 Unified diff

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