Skip to content
Snippets Groups Projects
Commit ace99d2d authored by Anders H. Rebner's avatar Anders H. Rebner
Browse files

#141 Ryddet opp i enums

parent 2960cecd
No related branches found
No related tags found
1 merge request!79#141 Opprydding enums
Pipeline #83718 passed with stages
in 2 minutes and 19 seconds
......@@ -2,6 +2,13 @@
from enum import Enum
class ModuleType(Enum):
"""Enumerate with types of modules."""
MAIN_MODULE = 0
ATTACHMENT_MODULE = 1
class CodebookSort(Enum):
"""Enumerate with ways to sort codebook."""
......
......@@ -31,13 +31,6 @@ from soitool.serialize_export_import_soi import (
)
class ModuleType(Enum):
"""Enumerate with types of modules."""
MAIN_MODULE = 0
ATTACHMENT_MODULE = 1
class ExportMedium(Enum):
"""Enumerate with mediums possible for export."""
......
......@@ -5,9 +5,9 @@ from PySide2.QtWidgets import (
QListWidgetItem,
QAbstractItemView,
)
from soitool.soi import ModuleType
from soitool.dialog_wrappers import exec_warning_dialog
from soitool.soi import SOI
from soitool.enumerates import ModuleType
class ModuleList(QListWidget):
......
"""Includes datastructure used to represent a SOI."""
from enum import Enum
from datetime import datetime
from PySide2.QtCore import QPoint
from rectpack import (
......@@ -13,6 +12,7 @@ from rectpack import (
)
from soitool.modules.module_base import set_module_pos
# Functions to sort modules by different criteria
......@@ -124,13 +124,6 @@ class ModuleNameTaken(Exception):
"""Module name is already taken by an existing module."""
class ModuleType(Enum):
"""Enumerate with types of modules."""
MAIN_MODULE = 0
ATTACHMENT_MODULE = 1
class SOI:
"""Datastructure for SOI.
......
......@@ -12,7 +12,8 @@ from PySide2.QtWidgets import (
QDialog,
)
from PySide2 import QtCore
from soitool.soi import SOI, ModuleType, ModuleNameTaken
from soitool.enumerates import ModuleType
from soitool.soi import SOI, ModuleNameTaken
from soitool.module_list import ModuleList
from soitool.inline_editable_soi_view import InlineEditableSOIView
from soitool.setup_settings import Setup
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment