1
# -*- coding: iso-8859-1 -*-
1
# -*- coding: utf-8 -*-
3
3
#-------------------------------------------------------------------------------
5
# This file is part of the Code_Saturne User Interface, element of the
6
# Code_Saturne CFD tool.
8
# Copyright (C) 1998-2009 EDF S.A., France
10
# contact: saturne-support@edf.fr
12
# The Code_Saturne User Interface is free software; you can redistribute it
13
# and/or modify it under the terms of the GNU General Public License
14
# as published by the Free Software Foundation; either version 2 of
15
# the License, or (at your option) any later version.
17
# The Code_Saturne User Interface is distributed in the hope that it will be
18
# useful, but WITHOUT ANY WARRANTY; without even the implied warranty
19
# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20
# GNU General Public License for more details.
22
# You should have received a copy of the GNU General Public License
23
# along with the Code_Saturne Kernel; if not, write to the
24
# Free Software Foundation, Inc.,
25
# 51 Franklin St, Fifth Floor,
26
# Boston, MA 02110-1301 USA
5
# This file is part of Code_Saturne, a general-purpose CFD tool.
7
# Copyright (C) 1998-2011 EDF S.A.
9
# This program is free software; you can redistribute it and/or modify it under
10
# the terms of the GNU General Public License as published by the Free Software
11
# Foundation; either version 2 of the License, or (at your option) any later
14
# This program is distributed in the hope that it will be useful, but WITHOUT
15
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
16
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
19
# You should have received a copy of the GNU General Public License along with
20
# this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
21
# Street, Fifth Floor, Boston, MA 02110-1301, USA.
28
23
#-------------------------------------------------------------------------------
45
40
from PyQt4.QtCore import *
46
41
from PyQt4.QtGui import *
54
43
#-------------------------------------------------------------------------------
55
44
# Application modules import
56
45
#-------------------------------------------------------------------------------
63
52
from Pages.LocalizationModel import LocalizationModel, Zone
64
53
from Pages.Boundary import Boundary
67
from QMeiEditorView import QMeiEditorView
55
from Pages.QMeiEditorView import QMeiEditorView
69
57
#-------------------------------------------------------------------------------
163
151
modelData = self.__comboModel.dicoV2M[str(text)]
164
152
# Enable/disable formula button.
165
isFormulaEnabled = _have_mei and modelData in ["fixed_velocity", "fixed_displacement"]
153
isFormulaEnabled = modelData in ["fixed_velocity", "fixed_displacement"]
166
154
self.pushButtonMobilBoundary.setEnabled(isFormulaEnabled)
167
155
setGreenColor(self.pushButtonMobilBoundary, isFormulaEnabled)
168
156
self.__boundary.setALEChoice(modelData)
176
164
self.__boundary = Boundary("mobile_boundary", b.getLabel(), self.__case)
177
165
modelData = self.__boundary.getALEChoice()
178
166
self.__comboModel.setItem(str_model=modelData)
179
isFormulaEnabled = _have_mei and modelData in ["fixed_velocity", "fixed_displacement"]
167
isFormulaEnabled = modelData in ["fixed_velocity", "fixed_displacement"]
180
168
self.pushButtonMobilBoundary.setEnabled(isFormulaEnabled)