프로젝트

일반

사용자정보

개정판 61470ed3

ID61470ed3d2212268095a7e778af7ffcd2ecec882
상위 c921ff13
하위 89d42a81

송근호이(가) 약 3년 전에 추가함

issue #000 Export_To_PAP.py 수정

1.Combobox에 Calculation Case 기능 적용 완료.

Change-Id: I575433f28a4f7299d23762f517894baeae86c73b

차이점 보기:

HYTOS/HYTOS/Export_To_PAP.py
118 118
        self.ui.buttonBox.button(QDialogButtonBox.Ok).setText("Update")
119 119
        self.ui.buttonBox.button(QDialogButtonBox.Cancel).setIcon(QtGui.QIcon(':/images/Cancel.svg'))
120 120
        self.ui.btnSave.clicked.connect(self.onSavePapUpdateInfomation)
121
        self.ui.btnSetCalculationCase.clicked.connect(self.onSettingCalculationCase)
121 122
        self.ui.comboBox_select_PAP_Project.currentIndexChanged.connect(self.connect_api)
122 123
        self.load_movie = QMovie(":/images/loader.gif")
123 124
        self.close_movie = QMovie(":/images/close.png")
124 125
        self.done_movie = QMovie(":/images/done.png")
125 126
        app_doc_data = AppDocData.instance()
127
        self.calculation_calse = ["Maximum Flowrate Case", "Normal Flowrate Case", "Minimum Flowrate Case"]
126 128
        self.project_list = []
127 129
        self.papInfomation = app_doc_data.getPAPInfomations()
128 130
        self.papInfomationItem = app_doc_data.getPAPInfomationItems()
......
189 191
            self.papInfomation = app_doc_data.getPAPInfomations()
190 192
            self.papInfomationItem = app_doc_data.getPAPInfomationItems()
191 193

  
194
    def onSettingCalculationCase(self):
195
        if self.ui.comboBox_Calculation_Case.currentText() in self.calculation_calse:
196
            pumpDatacase = ""
197
            compressorDatacase = ""
198
            controlValveDatacase = ""
199
            if self.ui.comboBox_Calculation_Case.currentText() == "Maximum Flowrate Case":
200
                pumpDatacase = "Rated Flow Case"
201
                compressorDatacase = "Design Case"
202
                controlValveDatacase = "Maximum Flowrate Case"
203
            elif self.ui.comboBox_Calculation_Case.currentText() == "Normal Flowrate Case":
204
                pumpDatacase = "N/A"
205
                compressorDatacase = "N/A"
206
                controlValveDatacase = "Normal Flowrate Case"
207
            elif self.ui.comboBox_Calculation_Case.currentText() == "Minimum Flowrate Case":
208
                pumpDatacase = "N/A"
209
                compressorDatacase = "N/A"
210
                controlValveDatacase = "Minimum Flowrate Case"
211

  
212
            if self.ui.tableView_upload_item_list.model().rowCount() > 0:
213
                for row in range(self.ui.tableView_upload_item_list.model().rowCount()):
214
                    type_index = self.ui.tableView_upload_item_list.model().index(row, 1)
215
                    type_data = self.ui.tableView_upload_item_list.model().data(type_index, Qt.DisplayRole)
216
                    datacase_index = self.ui.tableView_upload_item_list.model().index(row, 3)
217
                    if type_data.upper() == 'Valve'.upper():
218
                        self.ui.tableView_upload_item_list.model().setData(datacase_index, str(controlValveDatacase), Qt.DisplayRole)
219
                    elif type_data.upper() == 'Compressor'.upper():
220
                        self.ui.tableView_upload_item_list.model().setData(datacase_index, str(compressorDatacase), Qt.DisplayRole)
221
                    elif type_data.upper() == 'Pump'.upper():
222
                        self.ui.tableView_upload_item_list.model().setData(datacase_index, str(pumpDatacase), Qt.DisplayRole)
223

  
192 224
    def data_load(self):
193
        self.calculation_calse = ["Maximum Flowrate Case", "Normal Flowrate Case", "Minimum Flowrate Case"]
225
        self.ui.comboBox_Calculation_Case.clear()
194 226
        self.ui.comboBox_Calculation_Case.addItems(self.calculation_calse)
195 227
        self.graphicsView = App.mainWnd().graphicsView
196 228
        items = [item for item in self.graphicsView.scene.items() if type(item) is SymbolSvgItem]
......
269 301
        url = app_doc_data.API_HOST + end_point
270 302
        headers = {'Content-Type': 'application/json', 'charset': 'UTF-8', 'Accept': '*/*'}
271 303
        self.project_list.clear()
304
        self.ui.comboBox_select_PAP_Project.clear()
272 305
        try:
273 306
            if method == 'GET':
274 307
                response = requests.get(url, headers=headers)

내보내기 Unified diff

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