Commit e6178525 authored by Pierre-Antoine Rouby's avatar Pierre-Antoine Rouby
Browse files

Geometry: Add missing file.

Showing with 83 additions and 0 deletions
+83 -0
# 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()
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment