# Path: boris/utilities.py
# def sorted_keys(d: dict) -> list:
#     """
#     return list of sorted keys of provided dictionary
# 
#     Args:
#         d (dict): dictionary
# 
#     Returns:
#          list: dictionary keys sorted numerically
#     """
#     return [str(x) for x in sorted([int(x) for x in d.keys()])]


from PyQt5.QtGui import *
from PyQt5.QtCore import *
from PyQt5.QtWidgets import *
from boris.config import *
from boris.utilities import sorted_keys
import re
  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 <http://www.gnu.org/licenses/>.

"""




class ModifiersList(QDialog):

    def __init__(self, code, modifiers_dict, currentModifier):

        super().__init__()
        self.setWindowTitle(programName)
        self.setWindowFlags(Qt.WindowStaysOnTopHint)

        self.modifiers_dict = dict(modifiers_dict)
        currentModifierList = currentModifier.split("|")

        V1layout = QVBoxLayout()
        label = QLabel()
        label.setText(f"Choose the modifier{'s' * (len(self.modifiers_dict) > 1)} for <b>{code}</b> behavior")
        V1layout.addWidget(label)

        Hlayout = QHBoxLayout()
        self.modifiersSetNumber = 0


# Path: boris/utilities.py
# def sorted_keys(d: dict) -> list:
#     """
#     return list of sorted keys of provided dictionary
# 
#     Args:
#         d (dict): dictionary
# 
#     Returns:
#          list: dictionary keys sorted numerically
#     """
#     return [str(x) for x in sorted([int(x) for x in d.keys()])]


# Path: boris/select_modifiers.py
from PyQt5.QtGui import *
from PyQt5.QtCore import *
from PyQt5.QtWidgets import *
from boris.config import *
from boris.utilities import sorted_keys
import re

  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 <http://www.gnu.org/licenses/>.

"""




class ModifiersList(QDialog):

    def __init__(self, code, modifiers_dict, currentModifier):

        super().__init__()
        self.setWindowTitle(programName)
        self.setWindowFlags(Qt.WindowStaysOnTopHint)

        self.modifiers_dict = dict(modifiers_dict)
        currentModifierList = currentModifier.split("|")

        V1layout = QVBoxLayout()
        label = QLabel()
        label.setText(f"Choose the modifier{'s' * (len(self.modifiers_dict) > 1)} for <b>{code}</b> behavior")
        V1layout.addWidget(label)

        Hlayout = QHBoxLayout()
        self.modifiersSetNumber = 0


        for idx in sorted_keys(modifiers_dict):