프로젝트

일반

사용자정보

개정판 637ddfd2

ID637ddfd28b88f8859c4ed497e8efe4938f82b1ec
상위 c617f683
하위 39128c17, a0a99bca

김연진이(가) 약 5년 전에 추가함

issue #1048 : 화면/메뉴/툴바

Change-Id: Ib25c0c4956dfb981918f995a6628879b2e42cbaf

차이점 보기:

HYTOS/HYTOS/Configuration_UI.py
1132 1132
        self.gridLayout_15.addWidget(self.tabWidget, 1, 0, 1, 1)
1133 1133

  
1134 1134
        self.retranslateUi(ConfigurationDialog)
1135
        self.tabWidget.setCurrentIndex(2)
1135
        self.tabWidget.setCurrentIndex(0)
1136 1136
        self.buttonBox.accepted.connect(ConfigurationDialog.accept)
1137 1137
        self.buttonBox.rejected.connect(ConfigurationDialog.reject)
1138 1138
        QtCore.QMetaObject.connectSlotsByName(ConfigurationDialog)
HYTOS/HYTOS/MainWindow.py
1289 1289
                self.loop_comps_hy(loops, units)
1290 1290
                self.loop_cv_hy(loops, units)
1291 1291

  
1292

  
1293

  
1292 1294
        except Exception as ex:
1293 1295
            message = 'error occurred({}) in {}:{}'.format(repr(ex), sys.exc_info()[-1].tb_frame.f_code.co_filename,
1294 1296
                                                           sys.exc_info()[-1].tb_lineno)
......
1324 1326
                for row in range(len(loops[col].items)):
1325 1327
                    if loops[col].items[row] in loops[col].pressures:
1326 1328
                        item = QTableWidgetItem(str(loops[col].pressures[loops[col].items[row]]))
1329
                        item.setTextAlignment(Qt.AlignRight | Qt.AlignVCenter)
1327 1330
                        if not loops[col].pressures[loops[col].items[row]]: item.setBackground(Qt.red)
1328 1331
                        self.tableWidgetLoop.setItem(row, col * 4 + 1, item)
1329 1332

  
1330 1333
                    if loops[col].items[row] in loops[col].pressure_drops:
1331 1334
                        item = QTableWidgetItem(str(loops[col].pressure_drops[loops[col].items[row]]))
1335
                        item.setTextAlignment(Qt.AlignRight | Qt.AlignVCenter)
1332 1336
                        if not loops[col].pressure_drops[loops[col].items[row]]: item.setBackground(Qt.red)
1333 1337
                        self.tableWidgetLoop.setItem(row, col * 4 + 2, item)
1334 1338

  
1335 1339
                    if loops[col].items[row] in loops[col].density_elevations:
1336 1340
                        item = QTableWidgetItem(str(loops[col].density_elevations[loops[col].items[row]]))
1341
                        item.setTextAlignment(Qt.AlignRight | Qt.AlignVCenter)
1337 1342
                        if not loops[col].density_elevations[loops[col].items[row]]: item.setBackground(Qt.red)
1338 1343
                        self.tableWidgetLoop.setItem(row, col * 4 + 3, item)
1339 1344

  
HYTOS/HYTOS/StreamDataDialog.py
1235 1235

  
1236 1236
            drawing = AppDocData.instance().activeDrawing
1237 1237
            if drawing:
1238
                for hmb in drawing.hmbTable._hmbs:
1239
                    if hmb.components_uid == self.item.uid:
1240

  
1241
                        self.ui.groupBox_StreamNo.setTitle('Stream No. : {}'.format(hmb.stream_no))
1242

  
1243
                        if hmb.phase_type:
1244
                            index = self.ui.comboBox_PhaseType.findData(hmb.phase_type)
1245
                            if index > -1:
1246
                                self.ui.comboBox_PhaseType.setCurrentIndex(index)
1247
                        if hmb.flowrate_mass:
1248
                            self.ui.lineEdit_Flowrate_Mass_Liquid.setText(str(hmb.flowrate_mass))
1249
                            self.ui.lineEdit_Flowrate_Mass_Vapor.setText(str(hmb.flowrate_mass))
1250
                        if hmb.flowrate_volume:
1251
                            self.ui.lineEdit_Flowrate_Volume.setText(str(hmb.flowrate_volume))
1252
                        if hmb.viscosity:
1253
                            self.ui.lineEdit_Viscosity_Liquid.setText(str(hmb.viscosity))
1254
                            self.ui.lineEdit_Viscosity_Vapor.setText(str(hmb.viscosity))
1255

  
1256
                        if hmb.specific_heat_ratio:
1257
                            self.ui.lineEdit_Specific_Heat_Ratio.setText(str(hmb.specific_heat_ratio))
1258
                        if hmb.molecular_weight:
1259
                            self.ui.lineEdit_Molecular_Weight.setText(str(hmb.molecular_weight))
1260
                        if hmb.temperature:
1261
                            self.ui.lineEdit_Temperature.setText(str(hmb.temperature))
1262
                        if hmb.compress_factor:
1263
                            self.ui.lineEdit_Compress_Factor.setText(str(hmb.compress_factor))
1264

  
1265
                        if hmb.density:
1266
                            self.ui.lineEdit_Density.setText(str(hmb.density))
1267
                        if hmb.limitation_velocity:
1268
                            self.ui.lineEdit_Limitation_Velocity.setText(str(hmb.limitation_velocity))
1269
                        if hmb.limitation_pressure_drop:
1270
                            self.ui.lineEdit_Limitation_Pressure_Drop.setText(str(hmb.limitation_pressure_drop))
1271
                        if hmb.nominal_pipe_size:
1272
                            self.ui.comboBox_Nominal_Pipe_Size.setCurrentText(str(hmb.nominal_pipe_size))
1273
                        if hmb.schedule_no:
1274
                            self.ui.comboBox_Schedule_No.setCurrentText(str(hmb.schedule_no))
1275
                        if hmb.roughness:
1276
                            self.ui.lineEdit_Roughness.setText(str(hmb.roughness))
1277
                        if hmb.straight_length:
1278
                            self.ui.lineEdit_Straight_Length.setText(str(hmb.straight_length))
1279
                        if hmb.equivalent_length_input:
1280
                            self.ui.lineEdit_Equivalent_Length_Input.setText(str(hmb.equivalent_length_input))
1281
                        if hmb.fitting_length:
1282
                            self.ui.lineEdit_Fitting_Length.setText(str(hmb.fitting_length))
1283
                        if hmb.fitting_K:
1284
                            self.ui.lineEdit_Fitting_K.setText(str(hmb.fitting_K))
1285
                        if hmb.equivalent_length_cal:
1286
                            self.ui.lineEdit_Equivalent_Length_Cal.setText(str(hmb.equivalent_length_cal))
1287
                        if hmb.vapor_flowrate_mass:
1288
                            self.ui.lineEdit_Mixed_Flowrate_Mass_Vapor.setText(str(hmb.vapor_flowrate_mass))
1289
                        if hmb.vapor_density:
1290
                            self.ui.lineEdit_Mixed_Density_Vapor.setText(str(hmb.vapor_density))
1291
                        if hmb.vapor_viscosity:
1292
                            self.ui.lineEdit_Mixed_Viscosity_Vapor.setText(str(hmb.vapor_viscosity))
1293
                        if hmb.vapor_pressure:
1294
                            self.ui.lineEdit_Mixed_Pressure_Vapor.setText(str(hmb.vapor_pressure))
1295
                        if hmb.vapor_temperature:
1296
                            self.ui.lineEdit_Mixed_Temperature_Vapor.setText(str(hmb.vapor_temperature))
1297
                        if hmb.vapor_molecular_weight:
1298
                            self.ui.lineEdit_Mixed_Molecular_Weight_Vapor.setText(str(hmb.vapor_molecular_weight))
1299
                        if hmb.vapor_compress_factor:
1300
                            self.ui.lineEdit_Mixed_Compress_Factor_Vapor.setText(str(hmb.vapor_compress_factor))
1301
                        if hmb.liquid_flowrate_mass:
1302
                            self.ui.lineEdit_Mixed_Flowrate_Mass_Liquid.setText(str(hmb.liquid_flowrate_mass))
1303
                        if hmb.liquid_density:
1304
                            self.ui.lineEdit_Mixed_Density_Liquid.setText(str(hmb.liquid_density))
1305
                        if hmb.liquid_viscosity:
1306
                            self.ui.lineEdit_Mixed_Viscosity_Liquid.setText(str(hmb.liquid_viscosity))
1307
                        break
1238
                matches = [hmb for hmb in drawing.hmbTable._hmbs if hmb.components_uid == self.item.uid]
1239
                if matches:
1240
                    self.ui.groupBox_StreamNo.setTitle('Stream No. : {}'.format(matches[0].stream_no))
1241

  
1242
                    if matches[0].phase_type:
1243
                        index = self.ui.comboBox_PhaseType.findData(matches[0].phase_type)
1244
                        if index > -1:
1245
                            self.ui.comboBox_PhaseType.setCurrentIndex(index)
1246
                    if matches[0].flowrate_mass:
1247
                        self.ui.lineEdit_Flowrate_Mass_Liquid.setText(str(matches[0].flowrate_mass))
1248
                        self.ui.lineEdit_Flowrate_Mass_Vapor.setText(str(matches[0].flowrate_mass))
1249
                    if matches[0].flowrate_volume:
1250
                        self.ui.lineEdit_Flowrate_Volume.setText(str(matches[0].flowrate_volume))
1251
                    if matches[0].viscosity:
1252
                        self.ui.lineEdit_Viscosity_Liquid.setText(str(matches[0].viscosity))
1253
                        self.ui.lineEdit_Viscosity_Vapor.setText(str(matches[0].viscosity))
1254

  
1255
                    if matches[0].specific_heat_ratio:
1256
                        self.ui.lineEdit_Specific_Heat_Ratio.setText(str(matches[0].specific_heat_ratio))
1257
                    if matches[0].molecular_weight:
1258
                        self.ui.lineEdit_Molecular_Weight.setText(str(matches[0].molecular_weight))
1259
                    if matches[0].temperature:
1260
                        self.ui.lineEdit_Temperature.setText(str(matches[0].temperature))
1261
                    if matches[0].compress_factor:
1262
                        self.ui.lineEdit_Compress_Factor.setText(str(matches[0].compress_factor))
1263

  
1264
                    if matches[0].density:
1265
                        self.ui.lineEdit_Density.setText(str(matches[0].density))
1266
                    if matches[0].limitation_velocity:
1267
                        self.ui.lineEdit_Limitation_Velocity.setText(str(matches[0].limitation_velocity))
1268
                    if matches[0].limitation_pressure_drop:
1269
                        self.ui.lineEdit_Limitation_Pressure_Drop.setText(str(matches[0].limitation_pressure_drop))
1270
                    if matches[0].nominal_pipe_size:
1271
                        self.ui.comboBox_Nominal_Pipe_Size.setCurrentText(str(matches[0].nominal_pipe_size))
1272
                    if matches[0].schedule_no:
1273
                        self.ui.comboBox_Schedule_No.setCurrentText(str(matches[0].schedule_no))
1274
                    if matches[0].roughness:
1275
                        self.ui.lineEdit_Roughness.setText(str(matches[0].roughness))
1276
                    if matches[0].straight_length:
1277
                        self.ui.lineEdit_Straight_Length.setText(str(matches[0].straight_length))
1278
                    if matches[0].equivalent_length_input:
1279
                        self.ui.lineEdit_Equivalent_Length_Input.setText(str(matches[0].equivalent_length_input))
1280
                    if matches[0].fitting_length:
1281
                        self.ui.lineEdit_Fitting_Length.setText(str(matches[0].fitting_length))
1282
                    if matches[0].fitting_K:
1283
                        self.ui.lineEdit_Fitting_K.setText(str(matches[0].fitting_K))
1284
                    if matches[0].equivalent_length_cal:
1285
                        self.ui.lineEdit_Equivalent_Length_Cal.setText(str(matches[0].equivalent_length_cal))
1286
                    if matches[0].vapor_flowrate_mass:
1287
                        self.ui.lineEdit_Mixed_Flowrate_Mass_Vapor.setText(str(matches[0].vapor_flowrate_mass))
1288
                    if matches[0].vapor_density:
1289
                        self.ui.lineEdit_Mixed_Density_Vapor.setText(str(matches[0].vapor_density))
1290
                    if matches[0].vapor_viscosity:
1291
                        self.ui.lineEdit_Mixed_Viscosity_Vapor.setText(str(matches[0].vapor_viscosity))
1292
                    if matches[0].vapor_pressure:
1293
                        self.ui.lineEdit_Mixed_Pressure_Vapor.setText(str(matches[0].vapor_pressure))
1294
                    if matches[0].vapor_temperature:
1295
                        self.ui.lineEdit_Mixed_Temperature_Vapor.setText(str(matches[0].vapor_temperature))
1296
                    if matches[0].vapor_molecular_weight:
1297
                        self.ui.lineEdit_Mixed_Molecular_Weight_Vapor.setText(str(matches[0].vapor_molecular_weight))
1298
                    if matches[0].vapor_compress_factor:
1299
                        self.ui.lineEdit_Mixed_Compress_Factor_Vapor.setText(str(matches[0].vapor_compress_factor))
1300
                    if matches[0].liquid_flowrate_mass:
1301
                        self.ui.lineEdit_Mixed_Flowrate_Mass_Liquid.setText(str(matches[0].liquid_flowrate_mass))
1302
                    if matches[0].liquid_density:
1303
                        self.ui.lineEdit_Mixed_Density_Liquid.setText(str(matches[0].liquid_density))
1304
                    if matches[0].liquid_viscosity:
1305
                        self.ui.lineEdit_Mixed_Viscosity_Liquid.setText(str(matches[0].liquid_viscosity))
1308 1306

  
1309 1307
        except Exception as ex:
1310 1308
            from App import App
HYTOS/HYTOS/SymbolEditorDialog.py
164 164
        category = self.ui.categoryComboBox.itemText(index)
165 165

  
166 166
        self.initSymbolTypeComboBoxItems(category) 
167
        self.set_svg_file_path()
167 168

  
169
    def set_svg_file_path(self):
170
        svg_file_path = 'C:\ProgramData\HYTOS\svg\{}\{}\{}.svg'.format(self.ui.categoryComboBox.currentText(), self.ui.typeComboBox.currentText(), self.ui.nameComboBox.currentText())
168 171

  
172
        self.ui.lineEditSvgFilePath.setText(svg_file_path)
169 173
    def onTypeChanged(self, index):
170 174
        typeUID = self.ui.typeComboBox.itemData(index)
171 175

  
172
        self.initSymbolNameComboBoxItems(typeUID) 
176
        self.initSymbolNameComboBoxItems(typeUID)
177
        self.set_svg_file_path()
173 178

  
174 179
    def onNameChanged(self, index):
175 180
        from AppDocData import AppDocData
......
179 184

  
180 185
        self.setImage()
181 186
        self.initContents()
187
        self.set_svg_file_path()
182 188

  
183 189
    def setImage(self):
184 190
        path = os.path.join(os.getenv('ALLUSERSPROFILE'), App.NAME)
......
354 360
    def showDialog(self):
355 361
        self.setWindowFlags(self.windowFlags() & ~QtCore.Qt.WindowContextHelpButtonHint)
356 362
        self.exec_()
363

  
357 364
        return (self.isAccepted, False, self.offsetX, self.offsetY, self.newSym)
358 365
    
359 366
    '''
HYTOS/HYTOS/UI/Configuration.ui
36 36
   <item row="1" column="0">
37 37
    <widget class="QTabWidget" name="tabWidget">
38 38
     <property name="currentIndex">
39
      <number>2</number>
39
      <number>0</number>
40 40
     </property>
41 41
     <widget class="QWidget" name="Infomation">
42 42
      <attribute name="title">

내보내기 Unified diff

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