mirror of https://gitlab.com/pamhyr/pamhyr2
38 lines
1.1 KiB
Python
38 lines
1.1 KiB
Python
# Saved.py -- Pamhyr model status class
|
|
# 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 -*-
|
|
|
|
import logging
|
|
|
|
logger = logging.getLogger()
|
|
|
|
class SavedStatus(object):
|
|
def __init__(self):
|
|
super(SavedStatus, self).__init__()
|
|
self._saved = True
|
|
|
|
def is_saved(self):
|
|
return self._saved
|
|
|
|
def save(self):
|
|
logger.debug("model status set as saved")
|
|
self._saved = True
|
|
|
|
def modified(self):
|
|
# logger.debug("model status set as modified")
|
|
self._saved = False
|