mirror of https://gitlab.com/pamhyr/pamhyr2
Geometry: Add missing file.
parent
a663dc482c
commit
e6178525d7
|
|
@ -0,0 +1,83 @@
|
||||||
|
# MeshingDialog.py -- Pamhyr
|
||||||
|
# Copyright (C) 2023 INRAE
|
||||||
|
#
|
||||||
|
# This program is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
from View.Tools.PamhyrWindow import PamhyrDialog
|
||||||
|
|
||||||
|
from PyQt5.QtGui import (
|
||||||
|
QKeySequence,
|
||||||
|
)
|
||||||
|
|
||||||
|
from PyQt5.QtCore import (
|
||||||
|
Qt, QVariant, QAbstractTableModel,
|
||||||
|
)
|
||||||
|
|
||||||
|
from PyQt5.QtWidgets import (
|
||||||
|
QDialogButtonBox, QComboBox, QUndoStack, QShortcut,
|
||||||
|
QDoubleSpinBox,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
class MeshingDialog(PamhyrDialog):
|
||||||
|
_pamhyr_ui = "MeshingOptions"
|
||||||
|
_pamhyr_name = "Meshing"
|
||||||
|
|
||||||
|
def __init__(self, parent=None):
|
||||||
|
super(MeshingDialog, self).__init__(
|
||||||
|
title=self._pamhyr_name,
|
||||||
|
options=[],
|
||||||
|
parent=parent
|
||||||
|
)
|
||||||
|
|
||||||
|
self._init_default_values()
|
||||||
|
|
||||||
|
def _init_default_values(self):
|
||||||
|
self._space_step = 50.0
|
||||||
|
self._lplan = False
|
||||||
|
self._linear = False
|
||||||
|
|
||||||
|
self.set_double_spin_box(
|
||||||
|
"doubleSpinBox_space_step",
|
||||||
|
self._space_step
|
||||||
|
)
|
||||||
|
|
||||||
|
self.set_check_box("checkBox_lplan", self._lplan)
|
||||||
|
self.set_check_box("checkBox_linear", self._linear)
|
||||||
|
|
||||||
|
@property
|
||||||
|
def space_step(self):
|
||||||
|
return self._space_step
|
||||||
|
|
||||||
|
@property
|
||||||
|
def lplan(self):
|
||||||
|
return self._lplan
|
||||||
|
|
||||||
|
@property
|
||||||
|
def linear(self):
|
||||||
|
return self._linear
|
||||||
|
|
||||||
|
def accept(self):
|
||||||
|
self._space_step = self.get_double_spin_box(
|
||||||
|
"doubleSpinBox_space_step",
|
||||||
|
)
|
||||||
|
self._lplan = self.get_check_box("checkBox_lplan")
|
||||||
|
self._linear = self.get_check_box("checkBox_linear")
|
||||||
|
|
||||||
|
super().accept()
|
||||||
|
|
||||||
|
def reject(self):
|
||||||
|
self.close()
|
||||||
Loading…
Reference in New Issue