diff --git a/Ofmea_logo.png b/Ofmea_logo.png new file mode 100644 index 0000000..5189e7a Binary files /dev/null and b/Ofmea_logo.png differ diff --git a/__pycache__/data_handler.cpython-310.pyc b/__pycache__/data_handler.cpython-310.pyc new file mode 100644 index 0000000..b7b7591 Binary files /dev/null and b/__pycache__/data_handler.cpython-310.pyc differ diff --git a/__pycache__/logger.cpython-310.pyc b/__pycache__/logger.cpython-310.pyc new file mode 100644 index 0000000..ae758aa Binary files /dev/null and b/__pycache__/logger.cpython-310.pyc differ diff --git a/__pycache__/main_app.cpython-310.pyc b/__pycache__/main_app.cpython-310.pyc new file mode 100644 index 0000000..8462a05 Binary files /dev/null and b/__pycache__/main_app.cpython-310.pyc differ diff --git a/__pycache__/menu_contents.cpython-310.pyc b/__pycache__/menu_contents.cpython-310.pyc new file mode 100644 index 0000000..bb9512f Binary files /dev/null and b/__pycache__/menu_contents.cpython-310.pyc differ diff --git a/__pycache__/table_contents.cpython-310.pyc b/__pycache__/table_contents.cpython-310.pyc new file mode 100644 index 0000000..e8582de Binary files /dev/null and b/__pycache__/table_contents.cpython-310.pyc differ diff --git a/build.py b/build.py new file mode 100644 index 0000000..6b94316 --- /dev/null +++ b/build.py @@ -0,0 +1,11 @@ +# build.py +import sys +import PyInstaller.__main__ + +# Increase recursion limit +sys.setrecursionlimit(5000) + +# Call PyInstaller with the .spec file +PyInstaller.__main__.run([ + 'fmea_app.spec', # if you want a windowed app without the console +]) diff --git a/data_handler.py b/data_handler.py new file mode 100644 index 0000000..2a667c6 --- /dev/null +++ b/data_handler.py @@ -0,0 +1,61 @@ +import json +import xml.etree.ElementTree as ET +import sqlite3 + +def load_txt(filename): + with open(filename, 'r') as file: + data = [line.strip().split('\t') for line in file.readlines()] + return data + +def save_txt(filename, data): + with open(filename, 'w') as file: + for row in data: + file.write('\t'.join(row) + '\n') + +def load_json(filename): + with open(filename, 'r') as file: + data = json.load(file) + return data + +def save_json(filename, data): + with open(filename, 'w') as file: + json.dump(data, file, indent=4) + +def load_xml(filename): + tree = ET.parse(filename) + root = tree.getroot() + data = [[cell.text for cell in row] for row in root.findall('row')] + return data + +def save_xml(filename, data): + root = ET.Element('data') + for row in data: + row_elem = ET.SubElement(root, 'row') + for cell in row: + cell_elem = ET.SubElement(row_elem, 'cell') + cell_elem.text = cell + tree = ET.ElementTree(root) + tree.write(filename) + +def load_sql(filename): + conn = sqlite3.connect(filename) + cursor = conn.cursor() + cursor.execute("SELECT * FROM fmea") + data = cursor.fetchall() + conn.close() + return data + +def save_sql(filename, data): + conn = sqlite3.connect(filename) + cursor = conn.cursor() + cursor.execute('''CREATE TABLE IF NOT EXISTS fmea + (operation_sequence TEXT, part_or_product TEXT, characteristics TEXT, failure_mode TEXT, + effect_of_failure TEXT, severity INTEGER, classification TEXT, cause_of_failure TEXT, + controls_prevention TEXT, occurrence INTEGER, controls_detection TEXT, detection INTEGER, + rpn INTEGER, recommended_action TEXT, responsibility TEXT, completion_date TEXT, + actions_taken TEXT, severity_a INTEGER, occurrence_a INTEGER, detection_a INTEGER, rpn_a INTEGER)''') + cursor.executemany('INSERT INTO fmea VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)', data) + conn.commit() + conn.close() + + diff --git a/fmea_app.py b/fmea_app.py new file mode 100644 index 0000000..5e850b9 --- /dev/null +++ b/fmea_app.py @@ -0,0 +1,222 @@ +import tkinter as tk +from tkinter import ttk, filedialog, messagebox +import sqlite3 +import os +import importlib +from PIL import Image, ImageTk +import menu_contents +import table_contents +import data_handler +import logger + +class FMEAApp(tk.Tk): + def __init__(self): + super().__init__() + self.base_width = 600 + self.base_height = int(self.base_width * 0.75) # Example ratio (4:3) + self.geometry(f"{self.base_width}x{self.base_height}") + self.minsize(self.base_width, self.base_height) + + self.current_file = None + self.undo_stack = [] + self.redo_stack = [] + + # Create a container for the screen manager + container = tk.Frame(self) + container.pack(side="top", fill="both", expand=True) + + self.frames = {} + self.create_top_app_bar() + + self.load_screens(container) + self.show_frame("HomeScreen") + menu_contents.create_menu(self) + self.init_db() + + logger.app_logger.info("FMEA Application initialized") + + def create_top_app_bar(self): + top_app_bar = tk.Frame(self, bg="lightgrey", height=50) + top_app_bar.pack(side="top", fill="x") + + # Create buttons with icons + buttons_info = [ + ("media/topbar/back_arrow.png", self.show_home), + ("media/topbar/new_file.png", self.open_file), + ("media/topbar/save.png", self.save_file_as), + ("media/topbar/undo.png", self.undo), + ("media/topbar/next.png", self.next_screen), + ("media/topbar/previous.png", self.previous_screen)] + + for icon_path, command in buttons_info: + image = Image.open(icon_path) + image = image.resize((30, 30), Image.ANTIALIAS) + icon = ImageTk.PhotoImage(image) + button = tk.Button(top_app_bar, image=icon, command=command) + button.image = icon # Keep a reference to avoid garbage collection + button.pack(side="left", padx=2, pady=2) + + def load_screens(self, container): + screens_dir = 'screens' + for filename in os.listdir(screens_dir): + if filename.endswith(".py") and filename != "__init__.py": + module_name = filename[:-3] + module = importlib.import_module(f"{screens_dir}.{module_name}") + class_name = ''.join([part.capitalize() for part in module_name.split('_')]) + screen_class = getattr(module, class_name) + frame = screen_class(parent=container, controller=self) + self.frames[class_name] = frame + frame.grid(row=0, column=0, sticky="nsew") + + def show_frame(self, page_name): + frame = self.frames[page_name] + frame.tkraise() + + def show_home(self): + self.show_frame("HomeScreen") + + def next_screen(self): + current_frame = self._current_frame() + next_frame = (current_frame + 1) % len(self.frames) + frame_name = list(self.frames.keys())[next_frame] + self.show_frame(frame_name) + + def previous_screen(self): + current_frame = self._current_frame() + previous_frame = (current_frame - 1) % len(self.frames) + frame_name = list(self.frames.keys())[previous_frame] + self.show_frame(frame_name) + + def _current_frame(self): + for idx, frame in enumerate(self.frames.values()): + if frame.winfo_ismapped(): + return idx + return 0 + + def open_file(self): + filetypes = (("All files", "*.*"), ("Text files", "*.txt"), ("JSON files", "*.json"), ("XML files", "*.xml"), ("SQLite files", "*.sql")) + filename = filedialog.askopenfilename(title="Open file", filetypes=filetypes) + if filename: + try: + if filename.endswith('.txt'): + data = data_handler.load_txt(filename) + elif filename.endswith('.json'): + data = data_handler.load_json(filename) + elif filename.endswith('.xml'): + data = data_handler.load_xml(filename) + elif filename.endswith('.sql'): + data = data_handler.load_sql(filename) + table_contents.load_data_to_tree(self, data) + self.current_file = filename # Set the current file + logger.info_logger.info(f"File opened: {filename}") + except Exception as e: + logger.error_logger.error(f"Failed to open file: {filename}, Error: {e}") + + def save_file(self): + if self.current_file: + try: + data = table_contents.get_table_data(self) + if self.current_file.endswith('.txt'): + data_handler.save_txt(self.current_file, data) + elif self.current_file.endswith('.json'): + data_handler.save_json(self.current_file, data) + elif self.current_file.endswith('.xml'): + data_handler.save_xml(self.current_file, data) + elif self.current_file.endswith('.sql'): + data_handler.save_sql(self.current_file, data) + logger.info_logger.info(f"File saved: {self.current_file}") + except Exception as e: + logger.error_logger.error(f"Failed to save file: {self.current_file}, Error: {e}") + else: + self.save_file_as() + + def save_file_as(self): + filetypes = (("All files", "*.*"), ("Text files", "*.txt"), ("JSON files", "*.json"), ("XML files", "*.xml"), ("SQLite files", "*.sql")) + filename = filedialog.asksaveasfilename(title="Save file", filetypes=filetypes, defaultextension=".txt") + if filename: + try: + data = table_contents.get_table_data(self) + if filename.endswith('.txt'): + data_handler.save_txt(filename, data) + elif filename.endswith('.json'): + data_handler.save_json(filename, data) + elif filename.endswith('.xml'): + data_handler.save_xml(filename, data) + elif filename.endswith('.sql'): + data_handler.save_sql(filename, data) + self.current_file = filename # Set the current file + logger.info_logger.info(f"File saved: {filename}") + except Exception as e: + logger.error_logger.error(f"Failed to save file: {filename}, Error: {e}") + + def close_file(self): + self.tree.delete(*self.tree.get_children()) + self.current_file = None # Clear the current file + messagebox.showinfo("Info", "File closed successfully.") + logger.info_logger.info("File closed") + + def undo(self): + if self.undo_stack: + last_action = self.undo_stack.pop() + row_id, column, previous_value = last_action + self.redo_stack.append((row_id, column, self.tree.set(row_id, column))) + self.tree.set(row_id, column, previous_value) + table_contents.update_rpn(self, row_id) + logger.debug_logger.debug("Undo performed") + + def redo(self): + if self.redo_stack: + last_undo = self.redo_stack.pop() + row_id, column, previous_value = last_undo + self.undo_stack.append((row_id, column, self.tree.set(row_id, column))) + self.tree.set(row_id, column, previous_value) + table_contents.update_rpn(self, row_id) + logger.debug_logger.debug("Redo performed") + + def connect_db(self): + menu_contents.connect_db(self) + + def init_db(self): + self.conn = sqlite3.connect(":memory:") + self.cursor = self.conn.cursor() + self.cursor.execute('''CREATE TABLE IF NOT EXISTS fmea + (operation_sequence TEXT, part_or_product TEXT, characteristics TEXT, failure_mode TEXT, + effect_of_failure TEXT, severity INTEGER, classification TEXT, cause_of_failure TEXT, + controls_prevention TEXT, occurrence INTEGER, controls_detection TEXT, detection INTEGER, + rpn INTEGER, recommended_action TEXT, responsibility TEXT, completion_date TEXT, + actions_taken TEXT, severity_a INTEGER, occurrence_a INTEGER, detection_a INTEGER, rpn_a INTEGER)''') + self.conn.commit() + logger.info_logger.info("Database initialized") + + def get_data_from_tree(self): + return table_contents.get_table_data(self) + + def add_sub_row(self, parent_id, values): + table_contents.insert_row(self, values, tags=self.tree.item(parent_id, "tags")) + + def create_default_table(self): + default_data = [ + ["1", "Part A", "Characteristic 1", "Failure Mode 1", "Effect 1", "5", "", "Cause 1", "Control 1", "3", "Detection 1", "2", "30", "Action 1", "Person A", "2024-01-01", "Action Taken 1", "4", "2", "2", "16"], + ["2", "Part B", "Characteristic 2", "Failure Mode 2", "Effect 2", "4", "", "Cause 2", "Control 2", "4", "Detection 2", "3", "48", "Action 2", "Person B", "2024-01-02", "Action Taken 2", "3", "3", "3", "27"] + ] + + self.tree.delete(*self.tree.get_children()) + for i, row in enumerate(default_data): + tag = 'evenrow' if i % 2 == 0 else 'oddrow' + row_id = table_contents.insert_row(self, row, tags=(tag,)) + table_contents.update_rpn(self, row_id) + + messagebox.showinfo("Info", "Default table created successfully.") + logger.info_logger.info("Default table created") + + def update_cell(self, row_id, col, value): + previous_value = self.tree.set(row_id, col) + self.undo_stack.append((row_id, col, previous_value)) + self.tree.set(row_id, col, value) + table_contents.update_rpn(self, row_id) + logger.debug_logger.debug(f"Cell updated: row_id={row_id}, col={col}, value={value}") + + +if __name__ == "__main__": + app = FMEAApp() + app.mainloop() diff --git a/fmea_app.spec b/fmea_app.spec new file mode 100644 index 0000000..b464b40 --- /dev/null +++ b/fmea_app.spec @@ -0,0 +1,58 @@ +# fmea_app.spec +# -*- mode: python ; coding: utf-8 -*- + +block_cipher = None + +a = Analysis( + ['main_app.py'], + pathex=['.'], # Add any paths where your modules are located + binaries=[], + datas=[ + ('media/topbar/back_arrow.png', '.'), # Add paths to your icon files + ('media/topbar/new_file.png', '.'), + ('media/topbar/save.png', '.'), + ('media/topbar/load.png', '.'), + ('media/topbar/undo.png', '.'), + ('media/topbar/previous.png', '.'), + ('media/topbar/next.png', '.'), + ], + hiddenimports=['PIL', 'PIL._imagingtk'], # Add any hidden imports here + hookspath=[], + runtime_hooks=[], + excludes=[], + win_no_prefer_redirects=False, + win_private_assemblies=False, + cipher=block_cipher, + noarchive=False, +) + +pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher) + +exe = EXE( + pyz, + a.scripts, + a.binaries, + a.zipfiles, + a.datas, + [], + name='FMEAApp', + debug=False, + bootloader_ignore_signals=False, + strip=False, + upx=True, + upx_exclude=[], + runtime_tmpdir=None, + console=False, # Change to True if you want to see console output + icon='Ofmea_logo.png' # Add path to your app icon if you have one +) + +coll = COLLECT( + exe, + a.binaries, + a.zipfiles, + a.datas, + strip=False, + upx=True, + upx_exclude=[], + name='FMEAApp', +) diff --git a/logger.py b/logger.py new file mode 100644 index 0000000..69a1251 --- /dev/null +++ b/logger.py @@ -0,0 +1,54 @@ +import logging +import os + +# Create a logs directory if it doesn't exist +if not os.path.exists('logs'): + os.makedirs('logs') + +# Configure logging +logging.basicConfig( + level=logging.DEBUG, + format='%(asctime)s - %(name)s - %(levelname)s - %(message)s', + handlers=[ + logging.FileHandler('logs/app.log'), # General log file + logging.FileHandler('logs/error.log', mode='w'), # Error log file + logging.FileHandler('logs/warning.log', mode='w'), # Warning log file + logging.FileHandler('logs/info.log', mode='w'), # Info log file + logging.FileHandler('logs/debug.log', mode='w'), # Debug log file + logging.StreamHandler() # Output to console + ] +) + +# Create loggers for different levels +app_logger = logging.getLogger('app') +error_logger = logging.getLogger('error') +warning_logger = logging.getLogger('warning') +info_logger = logging.getLogger('info') +debug_logger = logging.getLogger('debug') + +# Set specific levels for each logger +app_logger.setLevel(logging.DEBUG) +error_logger.setLevel(logging.ERROR) +warning_logger.setLevel(logging.WARNING) +info_logger.setLevel(logging.INFO) +debug_logger.setLevel(logging.DEBUG) + +# Add specific handlers to each logger +app_log_handler = logging.FileHandler('logs/app.log') +error_log_handler = logging.FileHandler('logs/error.log') +warning_log_handler = logging.FileHandler('logs/warning.log') +info_log_handler = logging.FileHandler('logs/info.log') +debug_log_handler = logging.FileHandler('logs/debug.log') + +app_logger.addHandler(app_log_handler) +error_logger.addHandler(error_log_handler) +warning_logger.addHandler(warning_log_handler) +info_logger.addHandler(info_log_handler) +debug_logger.addHandler(debug_log_handler) + +# Example usage of loggers +app_logger.info("Application started") +error_logger.error("This is an error message") +warning_logger.warning("This is a warning message") +info_logger.info("This is an informational message") +debug_logger.debug("This is a debug message") diff --git a/logs.log b/logs.log new file mode 100644 index 0000000..86e051e --- /dev/null +++ b/logs.log @@ -0,0 +1,79 @@ +2024-06-04 13:33:10,991:WARNING: +'cuml' is a soft dependency and not included in the pycaret installation. Please run: `pip install cuml` to install. +2024-06-04 13:33:10,991:WARNING: +'cuml' is a soft dependency and not included in the pycaret installation. Please run: `pip install cuml` to install. +2024-06-04 13:33:10,991:WARNING: +'cuml' is a soft dependency and not included in the pycaret installation. Please run: `pip install cuml` to install. +2024-06-04 13:33:10,991:WARNING: +'cuml' is a soft dependency and not included in the pycaret installation. Please run: `pip install cuml` to install. +2024-06-04 13:33:11,179:ERROR: +'fugue' is a soft dependency and not included in the pycaret installation. Please run: `pip install fugue` to install. +Alternately, you can install this by running `pip install pycaret[parallel]` +NoneType: None +2024-06-04 13:33:11,482:WARNING: +'prophet' is a soft dependency and not included in the pycaret installation. Please run: `pip install prophet` to install. +2024-06-04 13:33:33,518:WARNING::914: ImportWarning: + +_SixMetaPathImporter.find_spec() not found; falling back to find_module() + + +2024-06-04 13:33:33,547:WARNING:C:\Users\janez\Documents\org\apps\virt\lib\site-packages\torch\distributed\_shard\checkpoint\__init__.py:8: DeprecationWarning: + +torch.distributed._shard.checkpoint will be deprecated, use torch.distributed.checkpoint instead + + +2024-06-04 13:33:33,552:WARNING:C:\Users\janez\Documents\org\apps\virt\lib\site-packages\torch\distributed\_sharded_tensor\__init__.py:8: DeprecationWarning: + +torch.distributed._sharded_tensor will be deprecated, use torch.distributed._shard.sharded_tensor instead + + +2024-06-04 13:33:33,556:WARNING:C:\Users\janez\Documents\org\apps\virt\lib\site-packages\torch\distributed\_sharding_spec\__init__.py:8: DeprecationWarning: + +torch.distributed._sharding_spec will be deprecated, use torch.distributed._shard.sharding_spec instead + + +2024-06-04 13:33:37,765:WARNING:C:\Users\janez\Documents\org\apps\virt\lib\site-packages\torchaudio\backend\utils.py:74: UserWarning: + +No audio backend is available. + + +2024-06-04 13:33:37,912:WARNING:C:\Users\janez\Documents\org\apps\virt\lib\site-packages\torchvision\transforms\_functional_pil.py:242: DeprecationWarning: + +BILINEAR is deprecated and will be removed in Pillow 10 (2023-07-01). Use Resampling.BILINEAR instead. + + +2024-06-04 13:33:37,912:WARNING:C:\Users\janez\Documents\org\apps\virt\lib\site-packages\torchvision\transforms\_functional_pil.py:286: DeprecationWarning: + +NEAREST is deprecated and will be removed in Pillow 10 (2023-07-01). Use Resampling.NEAREST or Dither.NONE instead. + + +2024-06-04 13:33:37,912:WARNING:C:\Users\janez\Documents\org\apps\virt\lib\site-packages\torchvision\transforms\_functional_pil.py:319: DeprecationWarning: + +BICUBIC is deprecated and will be removed in Pillow 10 (2023-07-01). Use Resampling.BICUBIC instead. + + +2024-06-04 13:33:38,064:WARNING:C:\Users\janez\Documents\org\apps\virt\lib\site-packages\torchvision\datapoints\__init__.py:12: UserWarning: + +The torchvision.datapoints and torchvision.transforms.v2 namespaces are still Beta. While we do not expect major breaking changes, some APIs may still change according to user feedback. Please submit any feedback you may have in this issue: https://github.com/pytorch/vision/issues/6753, and you can also check out https://github.com/pytorch/vision/issues/7319 to learn more about the APIs that we suspect might involve future changes. You can silence this warning by calling torchvision.disable_beta_transforms_warning(). + + +2024-06-04 13:33:38,115:WARNING:C:\Users\janez\Documents\org\apps\virt\lib\site-packages\torchvision\transforms\v2\__init__.py:54: UserWarning: + +The torchvision.datapoints and torchvision.transforms.v2 namespaces are still Beta. While we do not expect major breaking changes, some APIs may still change according to user feedback. Please submit any feedback you may have in this issue: https://github.com/pytorch/vision/issues/6753, and you can also check out https://github.com/pytorch/vision/issues/7319 to learn more about the APIs that we suspect might involve future changes. You can silence this warning by calling torchvision.disable_beta_transforms_warning(). + + +2024-06-04 13:33:38,346:WARNING::914: ImportWarning: + +_SixMetaPathImporter.find_spec() not found; falling back to find_module() + + +2024-06-04 13:33:38,867:WARNING::914: ImportWarning: + +_SixMetaPathImporter.find_spec() not found; falling back to find_module() + + +2024-06-04 13:33:38,869:WARNING::914: ImportWarning: + +_SixMetaPathImporter.find_spec() not found; falling back to find_module() + + diff --git a/logs/app.log b/logs/app.log new file mode 100644 index 0000000..14625dc --- /dev/null +++ b/logs/app.log @@ -0,0 +1,382 @@ +Application started +2024-06-03 12:21:24,677 - app - INFO - Application started +2024-06-03 12:21:24,677 - error - ERROR - This is an error message +2024-06-03 12:21:24,677 - warning - WARNING - This is a warning message +2024-06-03 12:21:24,678 - info - INFO - This is an informational message +2024-06-03 12:21:24,678 - debug - DEBUG - This is a debug message +2024-06-03 12:21:25,098 - info - INFO - Database initialized +FMEA Application initialized +2024-06-03 12:21:25,099 - app - INFO - FMEA Application initialized +2024-06-03 12:21:38,773 - info - INFO - Default table created +2024-06-03 12:21:44,159 - info - INFO - File closed +2024-06-03 12:21:54,967 - error - ERROR - Failed to open file: C:/Users/janez/Documents/org/apps/betas/openeqms/v02/open_eqms/open_fmea/Xfmea/test.xml, Error: wrong # args: should be ".!entry49 insert index text" +2024-06-03 12:22:13,808 - info - INFO - Insert Table function called +2024-06-03 12:22:27,889 - info - INFO - File closed +Application started +2024-06-03 12:35:32,831 - app - INFO - Application started +2024-06-03 12:35:32,832 - error - ERROR - This is an error message +2024-06-03 12:35:32,832 - warning - WARNING - This is a warning message +2024-06-03 12:35:32,832 - info - INFO - This is an informational message +2024-06-03 12:35:32,832 - debug - DEBUG - This is a debug message +2024-06-03 12:35:33,299 - info - INFO - Database initialized +FMEA Application initialized +2024-06-03 12:35:33,301 - app - INFO - FMEA Application initialized +2024-06-03 12:35:44,965 - info - INFO - File opened: C:/Users/janez/Documents/org/apps/betas/openeqms/v02/open_eqms/open_fmea/Xfmea/test.xml +2024-06-03 12:38:12,265 - info - INFO - File saved: C:/Users/janez/Documents/org/apps/betas/openeqms/v02/open_eqms/open_fmea/Xfmea/test.xml +2024-06-03 12:38:17,190 - info - INFO - File closed +Application started +2024-06-03 13:35:24,965 - app - INFO - Application started +2024-06-03 13:35:24,965 - error - ERROR - This is an error message +2024-06-03 13:35:24,967 - warning - WARNING - This is a warning message +2024-06-03 13:35:24,967 - info - INFO - This is an informational message +2024-06-03 13:35:24,967 - debug - DEBUG - This is a debug message +2024-06-03 13:35:25,425 - info - INFO - Database initialized +FMEA Application initialized +2024-06-03 13:35:25,426 - app - INFO - FMEA Application initialized +2024-06-03 13:35:34,466 - info - INFO - File opened: C:/Users/janez/Documents/org/apps/betas/openeqms/v02/open_eqms/open_fmea/Xfmea/test.xml +2024-06-03 13:36:09,691 - info - INFO - File saved: C:/Users/janez/Documents/org/apps/betas/openeqms/v02/open_eqms/open_fmea/Xfmea/test.xml +2024-06-03 13:36:15,272 - info - INFO - File closed +Application started +2024-06-03 18:23:56,797 - app - INFO - Application started +2024-06-03 18:23:56,797 - error - ERROR - This is an error message +2024-06-03 18:23:56,797 - warning - WARNING - This is a warning message +2024-06-03 18:23:56,797 - info - INFO - This is an informational message +2024-06-03 18:23:56,797 - debug - DEBUG - This is a debug message +2024-06-03 18:23:57,304 - info - INFO - Database initialized +FMEA Application initialized +2024-06-03 18:23:57,304 - app - INFO - FMEA Application initialized +Application started +2024-06-03 18:33:25,882 - app - INFO - Application started +2024-06-03 18:33:25,897 - error - ERROR - This is an error message +2024-06-03 18:33:25,897 - warning - WARNING - This is a warning message +2024-06-03 18:33:25,897 - info - INFO - This is an informational message +2024-06-03 18:33:25,897 - debug - DEBUG - This is a debug message +2024-06-03 18:33:26,295 - info - INFO - Database initialized +FMEA Application initialized +2024-06-03 18:33:26,295 - app - INFO - FMEA Application initialized +2024-06-03 18:33:51,744 - info - INFO - File closed +Application started +2024-06-03 18:43:43,904 - app - INFO - Application started +2024-06-03 18:43:43,904 - error - ERROR - This is an error message +2024-06-03 18:43:43,904 - warning - WARNING - This is a warning message +2024-06-03 18:43:43,904 - info - INFO - This is an informational message +2024-06-03 18:43:43,904 - debug - DEBUG - This is a debug message +2024-06-03 18:43:44,313 - info - INFO - Database initialized +FMEA Application initialized +2024-06-03 18:43:44,313 - app - INFO - FMEA Application initialized +2024-06-03 18:43:51,553 - error - ERROR - Failed to open file: C:/Users/janez/Documents/org/apps/betas/openeqms/v02/open_eqms/open_fmea/Xfmea/test.xml, Error: wrong # args: should be ".!treeview set item ?column ?value??" +2024-06-03 18:44:35,990 - info - INFO - Toggled toolbar visibility +2024-06-03 18:44:46,256 - info - INFO - File closed +2024-06-03 18:45:13,706 - info - INFO - File closed +Application started +2024-06-03 18:51:34,114 - app - INFO - Application started +2024-06-03 18:51:34,114 - error - ERROR - This is an error message +2024-06-03 18:51:34,114 - warning - WARNING - This is a warning message +2024-06-03 18:51:34,114 - info - INFO - This is an informational message +2024-06-03 18:51:34,114 - debug - DEBUG - This is a debug message +2024-06-03 18:51:34,201 - info - INFO - Database initialized +FMEA Application initialized +2024-06-03 18:51:34,201 - app - INFO - FMEA Application initialized +2024-06-03 18:51:40,113 - info - INFO - Default table created +2024-06-03 18:51:56,965 - debug - DEBUG - Undo performed +2024-06-03 18:52:06,725 - debug - DEBUG - Undo performed +Application started +2024-06-03 18:54:04,533 - app - INFO - Application started +2024-06-03 18:54:04,533 - error - ERROR - This is an error message +2024-06-03 18:54:04,540 - warning - WARNING - This is a warning message +2024-06-03 18:54:04,540 - info - INFO - This is an informational message +2024-06-03 18:54:04,540 - debug - DEBUG - This is a debug message +2024-06-03 18:54:04,623 - info - INFO - Database initialized +FMEA Application initialized +2024-06-03 18:54:04,624 - app - INFO - FMEA Application initialized +2024-06-03 18:54:13,387 - info - INFO - File opened: C:/Users/janez/Documents/org/apps/betas/openeqms/v02/open_eqms/open_fmea/Xfmea/test.xml +2024-06-03 18:54:44,498 - info - INFO - File closed +Application started +2024-06-03 18:57:38,891 - app - INFO - Application started +2024-06-03 18:57:38,891 - error - ERROR - This is an error message +2024-06-03 18:57:38,891 - warning - WARNING - This is a warning message +2024-06-03 18:57:38,891 - info - INFO - This is an informational message +2024-06-03 18:57:38,891 - debug - DEBUG - This is a debug message +2024-06-03 18:57:38,976 - info - INFO - Database initialized +FMEA Application initialized +2024-06-03 18:57:38,977 - app - INFO - FMEA Application initialized +2024-06-03 18:57:45,669 - info - INFO - Default table created +2024-06-03 18:58:06,424 - error - ERROR - Failed to save file: C:/Users/janez/Documents/org/apps/betas/openeqms/v02/open_eqms/open_fmea/Xfmea/test2.xml, Error: cannot serialize 30 (type int) +2024-06-03 18:58:29,819 - debug - DEBUG - Undo performed +2024-06-03 18:58:44,282 - error - ERROR - Failed to save file: C:/Users/janez/Documents/org/apps/betas/openeqms/v02/open_eqms/open_fmea/Xfmea/test2.xml, Error: cannot serialize 30 (type int) +2024-06-03 18:58:56,716 - error - ERROR - Failed to save file: C:/Users/janez/Documents/org/apps/betas/openeqms/v02/open_eqms/open_fmea/Xfmea/test2.txt, Error: sequence item 12: expected str instance, int found +2024-06-03 18:59:08,405 - info - INFO - File closed +Application started +2024-06-03 22:11:09,096 - app - INFO - Application started +2024-06-03 22:11:09,096 - error - ERROR - This is an error message +2024-06-03 22:11:09,096 - warning - WARNING - This is a warning message +2024-06-03 22:11:09,096 - info - INFO - This is an informational message +2024-06-03 22:11:09,096 - debug - DEBUG - This is a debug message +2024-06-03 22:11:09,225 - info - INFO - Database initialized +FMEA Application initialized +2024-06-03 22:11:09,225 - app - INFO - FMEA Application initialized +2024-06-03 22:11:18,339 - info - INFO - Default table created +2024-06-03 22:11:34,929 - error - ERROR - Failed to save file: C:/Users/janez/Documents/org/apps/betas/openeqms/v02/open_eqms/open_fmea/Xfmea/test2.xml, Error: cannot serialize 30 (type int) +2024-06-03 22:12:06,274 - info - INFO - File closed +Application started +2024-06-03 22:16:29,995 - app - INFO - Application started +2024-06-03 22:16:29,995 - error - ERROR - This is an error message +2024-06-03 22:16:29,995 - warning - WARNING - This is a warning message +2024-06-03 22:16:29,995 - info - INFO - This is an informational message +2024-06-03 22:16:29,995 - debug - DEBUG - This is a debug message +Application started +2024-06-04 11:07:50,805 - app - INFO - Application started +2024-06-04 11:07:50,805 - error - ERROR - This is an error message +2024-06-04 11:07:50,805 - warning - WARNING - This is a warning message +2024-06-04 11:07:50,805 - info - INFO - This is an informational message +2024-06-04 11:07:50,805 - debug - DEBUG - This is a debug message +Application started +2024-06-04 11:08:18,449 - app - INFO - Application started +2024-06-04 11:08:18,449 - error - ERROR - This is an error message +2024-06-04 11:08:18,449 - warning - WARNING - This is a warning message +2024-06-04 11:08:18,452 - info - INFO - This is an informational message +2024-06-04 11:08:18,452 - debug - DEBUG - This is a debug message +Application started +2024-06-04 11:22:53,040 - app - INFO - Application started +2024-06-04 11:22:53,040 - error - ERROR - This is an error message +2024-06-04 11:22:53,040 - warning - WARNING - This is a warning message +2024-06-04 11:22:53,040 - info - INFO - This is an informational message +2024-06-04 11:22:53,040 - debug - DEBUG - This is a debug message +2024-06-04 11:22:53,204 - PIL.PngImagePlugin - DEBUG - STREAM b'IHDR' 16 13 +2024-06-04 11:22:53,204 - PIL.PngImagePlugin - DEBUG - STREAM b'pHYs' 41 9 +2024-06-04 11:22:53,204 - PIL.PngImagePlugin - DEBUG - STREAM b'IDAT' 62 989 +Application started +2024-06-04 11:23:10,236 - app - INFO - Application started +2024-06-04 11:23:10,236 - error - ERROR - This is an error message +2024-06-04 11:23:10,236 - warning - WARNING - This is a warning message +2024-06-04 11:23:10,236 - info - INFO - This is an informational message +2024-06-04 11:23:10,236 - debug - DEBUG - This is a debug message +2024-06-04 11:23:10,352 - PIL.PngImagePlugin - DEBUG - STREAM b'IHDR' 16 13 +2024-06-04 11:23:10,352 - PIL.PngImagePlugin - DEBUG - STREAM b'pHYs' 41 9 +2024-06-04 11:23:10,353 - PIL.PngImagePlugin - DEBUG - STREAM b'IDAT' 62 989 +2024-06-04 11:23:10,368 - PIL.PngImagePlugin - DEBUG - STREAM b'IHDR' 16 13 +2024-06-04 11:23:10,369 - PIL.PngImagePlugin - DEBUG - STREAM b'pHYs' 41 9 +2024-06-04 11:23:10,369 - PIL.PngImagePlugin - DEBUG - STREAM b'IDAT' 62 159 +2024-06-04 11:23:10,371 - PIL.PngImagePlugin - DEBUG - STREAM b'IHDR' 16 13 +2024-06-04 11:23:10,371 - PIL.PngImagePlugin - DEBUG - STREAM b'pHYs' 41 9 +2024-06-04 11:23:10,371 - PIL.PngImagePlugin - DEBUG - STREAM b'IDAT' 62 1141 +2024-06-04 11:23:10,373 - PIL.PngImagePlugin - DEBUG - STREAM b'IHDR' 16 13 +2024-06-04 11:23:10,375 - PIL.PngImagePlugin - DEBUG - STREAM b'pHYs' 41 9 +2024-06-04 11:23:10,375 - PIL.PngImagePlugin - DEBUG - STREAM b'IDAT' 62 405 +2024-06-04 11:23:10,376 - PIL.PngImagePlugin - DEBUG - STREAM b'IHDR' 16 13 +2024-06-04 11:23:10,376 - PIL.PngImagePlugin - DEBUG - STREAM b'pHYs' 41 9 +2024-06-04 11:23:10,377 - PIL.PngImagePlugin - DEBUG - STREAM b'IDAT' 62 324 +2024-06-04 11:23:10,378 - PIL.PngImagePlugin - DEBUG - STREAM b'IHDR' 16 13 +2024-06-04 11:23:10,378 - PIL.PngImagePlugin - DEBUG - STREAM b'pHYs' 41 9 +2024-06-04 11:23:10,379 - PIL.PngImagePlugin - DEBUG - STREAM b'IDAT' 62 347 +2024-06-04 11:23:10,399 - info - INFO - Database initialized +FMEA Application initialized +2024-06-04 11:23:10,399 - app - INFO - FMEA Application initialized +2024-06-04 11:23:16,673 - info - INFO - Toggled toolbar visibility +Application started +2024-06-04 11:26:59,624 - app - INFO - Application started +2024-06-04 11:26:59,624 - error - ERROR - This is an error message +2024-06-04 11:26:59,624 - warning - WARNING - This is a warning message +2024-06-04 11:26:59,624 - info - INFO - This is an informational message +2024-06-04 11:26:59,624 - debug - DEBUG - This is a debug message +Application started +2024-06-04 11:38:30,547 - app - INFO - Application started +2024-06-04 11:38:30,547 - error - ERROR - This is an error message +2024-06-04 11:38:30,547 - warning - WARNING - This is a warning message +2024-06-04 11:38:30,547 - info - INFO - This is an informational message +2024-06-04 11:38:30,547 - debug - DEBUG - This is a debug message +Application started +2024-06-04 11:41:17,259 - app - INFO - Application started +2024-06-04 11:41:17,259 - error - ERROR - This is an error message +2024-06-04 11:41:17,259 - warning - WARNING - This is a warning message +2024-06-04 11:41:17,259 - info - INFO - This is an informational message +2024-06-04 11:41:17,259 - debug - DEBUG - This is a debug message +2024-06-04 11:41:17,370 - PIL.PngImagePlugin - DEBUG - STREAM b'IHDR' 16 13 +2024-06-04 11:41:17,371 - PIL.PngImagePlugin - DEBUG - STREAM b'pHYs' 41 9 +2024-06-04 11:41:17,371 - PIL.PngImagePlugin - DEBUG - STREAM b'IDAT' 62 989 +2024-06-04 11:41:17,388 - PIL.PngImagePlugin - DEBUG - STREAM b'IHDR' 16 13 +2024-06-04 11:41:17,389 - PIL.PngImagePlugin - DEBUG - STREAM b'pHYs' 41 9 +2024-06-04 11:41:17,389 - PIL.PngImagePlugin - DEBUG - STREAM b'IDAT' 62 159 +2024-06-04 11:41:17,391 - PIL.PngImagePlugin - DEBUG - STREAM b'IHDR' 16 13 +2024-06-04 11:41:17,391 - PIL.PngImagePlugin - DEBUG - STREAM b'pHYs' 41 9 +2024-06-04 11:41:17,391 - PIL.PngImagePlugin - DEBUG - STREAM b'IDAT' 62 1141 +2024-06-04 11:41:17,393 - PIL.PngImagePlugin - DEBUG - STREAM b'IHDR' 16 13 +2024-06-04 11:41:17,393 - PIL.PngImagePlugin - DEBUG - STREAM b'pHYs' 41 9 +2024-06-04 11:41:17,393 - PIL.PngImagePlugin - DEBUG - STREAM b'IDAT' 62 405 +2024-06-04 11:41:17,395 - PIL.PngImagePlugin - DEBUG - STREAM b'IHDR' 16 13 +2024-06-04 11:41:17,395 - PIL.PngImagePlugin - DEBUG - STREAM b'pHYs' 41 9 +2024-06-04 11:41:17,395 - PIL.PngImagePlugin - DEBUG - STREAM b'IDAT' 62 324 +2024-06-04 11:41:17,397 - PIL.PngImagePlugin - DEBUG - STREAM b'IHDR' 16 13 +2024-06-04 11:41:17,397 - PIL.PngImagePlugin - DEBUG - STREAM b'pHYs' 41 9 +2024-06-04 11:41:17,397 - PIL.PngImagePlugin - DEBUG - STREAM b'IDAT' 62 347 +2024-06-04 11:41:17,409 - info - INFO - Database initialized +FMEA Application initialized +2024-06-04 11:41:17,410 - app - INFO - FMEA Application initialized +Application started +2024-06-04 11:43:50,304 - app - INFO - Application started +2024-06-04 11:43:50,304 - error - ERROR - This is an error message +2024-06-04 11:43:50,304 - warning - WARNING - This is a warning message +2024-06-04 11:43:50,304 - info - INFO - This is an informational message +2024-06-04 11:43:50,304 - debug - DEBUG - This is a debug message +2024-06-04 11:43:50,417 - PIL.PngImagePlugin - DEBUG - STREAM b'IHDR' 16 13 +2024-06-04 11:43:50,417 - PIL.PngImagePlugin - DEBUG - STREAM b'pHYs' 41 9 +2024-06-04 11:43:50,418 - PIL.PngImagePlugin - DEBUG - STREAM b'IDAT' 62 989 +2024-06-04 11:43:50,432 - PIL.PngImagePlugin - DEBUG - STREAM b'IHDR' 16 13 +2024-06-04 11:43:50,433 - PIL.PngImagePlugin - DEBUG - STREAM b'pHYs' 41 9 +2024-06-04 11:43:50,433 - PIL.PngImagePlugin - DEBUG - STREAM b'IDAT' 62 159 +2024-06-04 11:43:50,435 - PIL.PngImagePlugin - DEBUG - STREAM b'IHDR' 16 13 +2024-06-04 11:43:50,435 - PIL.PngImagePlugin - DEBUG - STREAM b'pHYs' 41 9 +2024-06-04 11:43:50,435 - PIL.PngImagePlugin - DEBUG - STREAM b'IDAT' 62 1141 +2024-06-04 11:43:50,437 - PIL.PngImagePlugin - DEBUG - STREAM b'IHDR' 16 13 +2024-06-04 11:43:50,437 - PIL.PngImagePlugin - DEBUG - STREAM b'pHYs' 41 9 +2024-06-04 11:43:50,438 - PIL.PngImagePlugin - DEBUG - STREAM b'IDAT' 62 405 +2024-06-04 11:43:50,439 - PIL.PngImagePlugin - DEBUG - STREAM b'IHDR' 16 13 +2024-06-04 11:43:50,439 - PIL.PngImagePlugin - DEBUG - STREAM b'pHYs' 41 9 +2024-06-04 11:43:50,440 - PIL.PngImagePlugin - DEBUG - STREAM b'IDAT' 62 324 +2024-06-04 11:43:50,442 - PIL.PngImagePlugin - DEBUG - STREAM b'IHDR' 16 13 +2024-06-04 11:43:50,442 - PIL.PngImagePlugin - DEBUG - STREAM b'pHYs' 41 9 +2024-06-04 11:43:50,442 - PIL.PngImagePlugin - DEBUG - STREAM b'IDAT' 62 347 +Application started +2024-06-04 11:44:28,920 - app - INFO - Application started +2024-06-04 11:44:28,936 - error - ERROR - This is an error message +2024-06-04 11:44:28,936 - warning - WARNING - This is a warning message +2024-06-04 11:44:28,936 - info - INFO - This is an informational message +2024-06-04 11:44:28,936 - debug - DEBUG - This is a debug message +2024-06-04 11:44:29,037 - PIL.PngImagePlugin - DEBUG - STREAM b'IHDR' 16 13 +2024-06-04 11:44:29,038 - PIL.PngImagePlugin - DEBUG - STREAM b'pHYs' 41 9 +2024-06-04 11:44:29,038 - PIL.PngImagePlugin - DEBUG - STREAM b'IDAT' 62 989 +2024-06-04 11:44:29,052 - PIL.PngImagePlugin - DEBUG - STREAM b'IHDR' 16 13 +2024-06-04 11:44:29,052 - PIL.PngImagePlugin - DEBUG - STREAM b'pHYs' 41 9 +2024-06-04 11:44:29,052 - PIL.PngImagePlugin - DEBUG - STREAM b'IDAT' 62 159 +2024-06-04 11:44:29,054 - PIL.PngImagePlugin - DEBUG - STREAM b'IHDR' 16 13 +2024-06-04 11:44:29,054 - PIL.PngImagePlugin - DEBUG - STREAM b'pHYs' 41 9 +2024-06-04 11:44:29,054 - PIL.PngImagePlugin - DEBUG - STREAM b'IDAT' 62 1141 +2024-06-04 11:44:29,057 - PIL.PngImagePlugin - DEBUG - STREAM b'IHDR' 16 13 +2024-06-04 11:44:29,057 - PIL.PngImagePlugin - DEBUG - STREAM b'pHYs' 41 9 +2024-06-04 11:44:29,058 - PIL.PngImagePlugin - DEBUG - STREAM b'IDAT' 62 405 +2024-06-04 11:44:29,059 - PIL.PngImagePlugin - DEBUG - STREAM b'IHDR' 16 13 +2024-06-04 11:44:29,059 - PIL.PngImagePlugin - DEBUG - STREAM b'pHYs' 41 9 +2024-06-04 11:44:29,059 - PIL.PngImagePlugin - DEBUG - STREAM b'IDAT' 62 324 +2024-06-04 11:44:29,061 - PIL.PngImagePlugin - DEBUG - STREAM b'IHDR' 16 13 +2024-06-04 11:44:29,061 - PIL.PngImagePlugin - DEBUG - STREAM b'pHYs' 41 9 +2024-06-04 11:44:29,061 - PIL.PngImagePlugin - DEBUG - STREAM b'IDAT' 62 347 +2024-06-04 11:44:29,086 - info - INFO - Database initialized +FMEA Application initialized +2024-06-04 11:44:29,092 - app - INFO - FMEA Application initialized +Application started +2024-06-04 12:14:19,952 - app - INFO - Application started +2024-06-04 12:14:19,952 - error - ERROR - This is an error message +2024-06-04 12:14:19,953 - warning - WARNING - This is a warning message +2024-06-04 12:14:19,953 - info - INFO - This is an informational message +2024-06-04 12:14:19,953 - debug - DEBUG - This is a debug message +Application started +2024-06-04 12:14:42,292 - app - INFO - Application started +2024-06-04 12:14:42,292 - error - ERROR - This is an error message +2024-06-04 12:14:42,292 - warning - WARNING - This is a warning message +2024-06-04 12:14:42,308 - info - INFO - This is an informational message +2024-06-04 12:14:42,308 - debug - DEBUG - This is a debug message +Application started +2024-06-04 12:14:56,195 - app - INFO - Application started +2024-06-04 12:14:56,195 - error - ERROR - This is an error message +2024-06-04 12:14:56,195 - warning - WARNING - This is a warning message +2024-06-04 12:14:56,195 - info - INFO - This is an informational message +2024-06-04 12:14:56,195 - debug - DEBUG - This is a debug message +Application started +2024-06-04 12:15:26,401 - app - INFO - Application started +2024-06-04 12:15:26,401 - error - ERROR - This is an error message +2024-06-04 12:15:26,401 - warning - WARNING - This is a warning message +2024-06-04 12:15:26,401 - info - INFO - This is an informational message +2024-06-04 12:15:26,401 - debug - DEBUG - This is a debug message +Application started +2024-06-04 13:24:55,071 - app - INFO - Application started +2024-06-04 13:24:55,071 - error - ERROR - This is an error message +2024-06-04 13:24:55,071 - warning - WARNING - This is a warning message +2024-06-04 13:24:55,071 - info - INFO - This is an informational message +2024-06-04 13:24:55,071 - debug - DEBUG - This is a debug message +Application started +2024-06-04 13:25:58,196 - app - INFO - Application started +2024-06-04 13:25:58,201 - error - ERROR - This is an error message +2024-06-04 13:25:58,201 - warning - WARNING - This is a warning message +2024-06-04 13:25:58,202 - info - INFO - This is an informational message +2024-06-04 13:25:58,202 - debug - DEBUG - This is a debug message +Application started +2024-06-04 13:26:23,626 - app - INFO - Application started +2024-06-04 13:26:23,636 - error - ERROR - This is an error message +2024-06-04 13:26:23,636 - warning - WARNING - This is a warning message +2024-06-04 13:26:23,636 - info - INFO - This is an informational message +2024-06-04 13:26:23,637 - debug - DEBUG - This is a debug message +2024-06-04 13:26:23,772 - PIL.PngImagePlugin - DEBUG - STREAM b'IHDR' 16 13 +2024-06-04 13:26:23,772 - PIL.PngImagePlugin - DEBUG - STREAM b'pHYs' 41 9 +2024-06-04 13:26:23,773 - PIL.PngImagePlugin - DEBUG - STREAM b'IDAT' 62 989 +2024-06-04 13:26:23,791 - PIL.PngImagePlugin - DEBUG - STREAM b'IHDR' 16 13 +2024-06-04 13:26:23,791 - PIL.PngImagePlugin - DEBUG - STREAM b'pHYs' 41 9 +2024-06-04 13:26:23,792 - PIL.PngImagePlugin - DEBUG - STREAM b'IDAT' 62 159 +2024-06-04 13:26:23,794 - PIL.PngImagePlugin - DEBUG - STREAM b'IHDR' 16 13 +2024-06-04 13:26:23,795 - PIL.PngImagePlugin - DEBUG - STREAM b'pHYs' 41 9 +2024-06-04 13:26:23,795 - PIL.PngImagePlugin - DEBUG - STREAM b'IDAT' 62 1141 +2024-06-04 13:26:23,796 - PIL.PngImagePlugin - DEBUG - STREAM b'IHDR' 16 13 +2024-06-04 13:26:23,796 - PIL.PngImagePlugin - DEBUG - STREAM b'pHYs' 41 9 +2024-06-04 13:26:23,796 - PIL.PngImagePlugin - DEBUG - STREAM b'IDAT' 62 745 +2024-06-04 13:26:23,799 - PIL.PngImagePlugin - DEBUG - STREAM b'IHDR' 16 13 +2024-06-04 13:26:23,799 - PIL.PngImagePlugin - DEBUG - STREAM b'pHYs' 41 9 +2024-06-04 13:26:23,799 - PIL.PngImagePlugin - DEBUG - STREAM b'IDAT' 62 405 +2024-06-04 13:26:23,799 - PIL.PngImagePlugin - DEBUG - STREAM b'IHDR' 16 13 +2024-06-04 13:26:23,799 - PIL.PngImagePlugin - DEBUG - STREAM b'pHYs' 41 9 +2024-06-04 13:26:23,802 - PIL.PngImagePlugin - DEBUG - STREAM b'IDAT' 62 347 +2024-06-04 13:26:23,804 - PIL.PngImagePlugin - DEBUG - STREAM b'IHDR' 16 13 +2024-06-04 13:26:23,804 - PIL.PngImagePlugin - DEBUG - STREAM b'pHYs' 41 9 +2024-06-04 13:26:23,804 - PIL.PngImagePlugin - DEBUG - STREAM b'IDAT' 62 324 +2024-06-04 13:26:23,830 - info - INFO - Database initialized +FMEA Application initialized +2024-06-04 13:26:23,832 - app - INFO - FMEA Application initialized +Application started +2024-06-05 06:46:24,919 - app - INFO - Application started +2024-06-05 06:46:24,919 - error - ERROR - This is an error message +2024-06-05 06:46:24,919 - warning - WARNING - This is a warning message +2024-06-05 06:46:24,919 - info - INFO - This is an informational message +2024-06-05 06:46:24,919 - debug - DEBUG - This is a debug message +Application started +2024-06-05 06:47:57,283 - app - INFO - Application started +2024-06-05 06:47:57,283 - error - ERROR - This is an error message +2024-06-05 06:47:57,283 - warning - WARNING - This is a warning message +2024-06-05 06:47:57,283 - info - INFO - This is an informational message +2024-06-05 06:47:57,283 - debug - DEBUG - This is a debug message +2024-06-05 06:47:57,429 - info - INFO - Database initialized +FMEA Application initialized +2024-06-05 06:47:57,430 - app - INFO - FMEA Application initialized +Application started +2024-06-05 06:50:37,691 - app - INFO - Application started +2024-06-05 06:50:37,691 - error - ERROR - This is an error message +2024-06-05 06:50:37,691 - warning - WARNING - This is a warning message +2024-06-05 06:50:37,691 - info - INFO - This is an informational message +2024-06-05 06:50:37,691 - debug - DEBUG - This is a debug message +2024-06-05 06:50:37,761 - info - INFO - Database initialized +FMEA Application initialized +2024-06-05 06:50:37,762 - app - INFO - FMEA Application initialized +Application started +2024-06-05 06:52:18,920 - app - INFO - Application started +2024-06-05 06:52:18,922 - error - ERROR - This is an error message +2024-06-05 06:52:18,922 - warning - WARNING - This is a warning message +2024-06-05 06:52:18,922 - info - INFO - This is an informational message +2024-06-05 06:52:18,923 - debug - DEBUG - This is a debug message +2024-06-05 06:52:18,993 - PIL.PngImagePlugin - DEBUG - STREAM b'IHDR' 16 13 +2024-06-05 06:52:18,993 - PIL.PngImagePlugin - DEBUG - STREAM b'pHYs' 41 9 +2024-06-05 06:52:18,993 - PIL.PngImagePlugin - DEBUG - STREAM b'IDAT' 62 989 +2024-06-05 06:52:19,011 - PIL.PngImagePlugin - DEBUG - STREAM b'IHDR' 16 13 +2024-06-05 06:52:19,011 - PIL.PngImagePlugin - DEBUG - STREAM b'pHYs' 41 9 +2024-06-05 06:52:19,011 - PIL.PngImagePlugin - DEBUG - STREAM b'IDAT' 62 159 +2024-06-05 06:52:19,013 - PIL.PngImagePlugin - DEBUG - STREAM b'IHDR' 16 13 +2024-06-05 06:52:19,013 - PIL.PngImagePlugin - DEBUG - STREAM b'pHYs' 41 9 +2024-06-05 06:52:19,014 - PIL.PngImagePlugin - DEBUG - STREAM b'IDAT' 62 1141 +2024-06-05 06:52:19,016 - PIL.PngImagePlugin - DEBUG - STREAM b'IHDR' 16 13 +2024-06-05 06:52:19,016 - PIL.PngImagePlugin - DEBUG - STREAM b'pHYs' 41 9 +2024-06-05 06:52:19,016 - PIL.PngImagePlugin - DEBUG - STREAM b'IDAT' 62 405 +2024-06-05 06:52:19,017 - PIL.PngImagePlugin - DEBUG - STREAM b'IHDR' 16 13 +2024-06-05 06:52:19,018 - PIL.PngImagePlugin - DEBUG - STREAM b'pHYs' 41 9 +2024-06-05 06:52:19,018 - PIL.PngImagePlugin - DEBUG - STREAM b'IDAT' 62 324 +2024-06-05 06:52:19,018 - PIL.PngImagePlugin - DEBUG - STREAM b'IHDR' 16 13 +2024-06-05 06:52:19,018 - PIL.PngImagePlugin - DEBUG - STREAM b'pHYs' 41 9 +2024-06-05 06:52:19,018 - PIL.PngImagePlugin - DEBUG - STREAM b'IDAT' 62 347 +2024-06-05 06:52:19,032 - info - INFO - Database initialized +FMEA Application initialized +2024-06-05 06:52:19,033 - app - INFO - FMEA Application initialized diff --git a/logs/debug.log b/logs/debug.log new file mode 100644 index 0000000..673f284 --- /dev/null +++ b/logs/debug.log @@ -0,0 +1,25 @@ +2024-06-05 06:52:18,920 - app - INFO - Application started +2024-06-05 06:52:18,922 - error - ERROR - This is an error message +2024-06-05 06:52:18,922 - warning - WARNING - This is a warning message +2024-06-05 06:52:18,922 - info - INFO - This is an informational message +2024-06-05 06:52:18,923 - debug - DEBUG - This is a debug message +2024-06-05 06:52:18,993 - PIL.PngImagePlugin - DEBUG - STREAM b'IHDR' 16 13 +2024-06-05 06:52:18,993 - PIL.PngImagePlugin - DEBUG - STREAM b'pHYs' 41 9 +2024-06-05 06:52:18,993 - PIL.PngImagePlugin - DEBUG - STREAM b'IDAT' 62 989 +2024-06-05 06:52:19,011 - PIL.PngImagePlugin - DEBUG - STREAM b'IHDR' 16 13 +2024-06-05 06:52:19,011 - PIL.PngImagePlugin - DEBUG - STREAM b'pHYs' 41 9 +2024-06-05 06:52:19,011 - PIL.PngImagePlugin - DEBUG - STREAM b'IDAT' 62 159 +2024-06-05 06:52:19,013 - PIL.PngImagePlugin - DEBUG - STREAM b'IHDR' 16 13 +2024-06-05 06:52:19,013 - PIL.PngImagePlugin - DEBUG - STREAM b'pHYs' 41 9 +2024-06-05 06:52:19,014 - PIL.PngImagePlugin - DEBUG - STREAM b'IDAT' 62 1141 +2024-06-05 06:52:19,016 - PIL.PngImagePlugin - DEBUG - STREAM b'IHDR' 16 13 +2024-06-05 06:52:19,016 - PIL.PngImagePlugin - DEBUG - STREAM b'pHYs' 41 9 +2024-06-05 06:52:19,016 - PIL.PngImagePlugin - DEBUG - STREAM b'IDAT' 62 405 +2024-06-05 06:52:19,017 - PIL.PngImagePlugin - DEBUG - STREAM b'IHDR' 16 13 +2024-06-05 06:52:19,018 - PIL.PngImagePlugin - DEBUG - STREAM b'pHYs' 41 9 +2024-06-05 06:52:19,018 - PIL.PngImagePlugin - DEBUG - STREAM b'IDAT' 62 324 +2024-06-05 06:52:19,018 - PIL.PngImagePlugin - DEBUG - STREAM b'IHDR' 16 13 +2024-06-05 06:52:19,018 - PIL.PngImagePlugin - DEBUG - STREAM b'pHYs' 41 9 +2024-06-05 06:52:19,018 - PIL.PngImagePlugin - DEBUG - STREAM b'IDAT' 62 347 +2024-06-05 06:52:19,032 - info - INFO - Database initialized +2024-06-05 06:52:19,033 - app - INFO - FMEA Application initialized diff --git a/logs/error.log b/logs/error.log new file mode 100644 index 0000000..673f284 --- /dev/null +++ b/logs/error.log @@ -0,0 +1,25 @@ +2024-06-05 06:52:18,920 - app - INFO - Application started +2024-06-05 06:52:18,922 - error - ERROR - This is an error message +2024-06-05 06:52:18,922 - warning - WARNING - This is a warning message +2024-06-05 06:52:18,922 - info - INFO - This is an informational message +2024-06-05 06:52:18,923 - debug - DEBUG - This is a debug message +2024-06-05 06:52:18,993 - PIL.PngImagePlugin - DEBUG - STREAM b'IHDR' 16 13 +2024-06-05 06:52:18,993 - PIL.PngImagePlugin - DEBUG - STREAM b'pHYs' 41 9 +2024-06-05 06:52:18,993 - PIL.PngImagePlugin - DEBUG - STREAM b'IDAT' 62 989 +2024-06-05 06:52:19,011 - PIL.PngImagePlugin - DEBUG - STREAM b'IHDR' 16 13 +2024-06-05 06:52:19,011 - PIL.PngImagePlugin - DEBUG - STREAM b'pHYs' 41 9 +2024-06-05 06:52:19,011 - PIL.PngImagePlugin - DEBUG - STREAM b'IDAT' 62 159 +2024-06-05 06:52:19,013 - PIL.PngImagePlugin - DEBUG - STREAM b'IHDR' 16 13 +2024-06-05 06:52:19,013 - PIL.PngImagePlugin - DEBUG - STREAM b'pHYs' 41 9 +2024-06-05 06:52:19,014 - PIL.PngImagePlugin - DEBUG - STREAM b'IDAT' 62 1141 +2024-06-05 06:52:19,016 - PIL.PngImagePlugin - DEBUG - STREAM b'IHDR' 16 13 +2024-06-05 06:52:19,016 - PIL.PngImagePlugin - DEBUG - STREAM b'pHYs' 41 9 +2024-06-05 06:52:19,016 - PIL.PngImagePlugin - DEBUG - STREAM b'IDAT' 62 405 +2024-06-05 06:52:19,017 - PIL.PngImagePlugin - DEBUG - STREAM b'IHDR' 16 13 +2024-06-05 06:52:19,018 - PIL.PngImagePlugin - DEBUG - STREAM b'pHYs' 41 9 +2024-06-05 06:52:19,018 - PIL.PngImagePlugin - DEBUG - STREAM b'IDAT' 62 324 +2024-06-05 06:52:19,018 - PIL.PngImagePlugin - DEBUG - STREAM b'IHDR' 16 13 +2024-06-05 06:52:19,018 - PIL.PngImagePlugin - DEBUG - STREAM b'pHYs' 41 9 +2024-06-05 06:52:19,018 - PIL.PngImagePlugin - DEBUG - STREAM b'IDAT' 62 347 +2024-06-05 06:52:19,032 - info - INFO - Database initialized +2024-06-05 06:52:19,033 - app - INFO - FMEA Application initialized diff --git a/logs/info.log b/logs/info.log new file mode 100644 index 0000000..673f284 --- /dev/null +++ b/logs/info.log @@ -0,0 +1,25 @@ +2024-06-05 06:52:18,920 - app - INFO - Application started +2024-06-05 06:52:18,922 - error - ERROR - This is an error message +2024-06-05 06:52:18,922 - warning - WARNING - This is a warning message +2024-06-05 06:52:18,922 - info - INFO - This is an informational message +2024-06-05 06:52:18,923 - debug - DEBUG - This is a debug message +2024-06-05 06:52:18,993 - PIL.PngImagePlugin - DEBUG - STREAM b'IHDR' 16 13 +2024-06-05 06:52:18,993 - PIL.PngImagePlugin - DEBUG - STREAM b'pHYs' 41 9 +2024-06-05 06:52:18,993 - PIL.PngImagePlugin - DEBUG - STREAM b'IDAT' 62 989 +2024-06-05 06:52:19,011 - PIL.PngImagePlugin - DEBUG - STREAM b'IHDR' 16 13 +2024-06-05 06:52:19,011 - PIL.PngImagePlugin - DEBUG - STREAM b'pHYs' 41 9 +2024-06-05 06:52:19,011 - PIL.PngImagePlugin - DEBUG - STREAM b'IDAT' 62 159 +2024-06-05 06:52:19,013 - PIL.PngImagePlugin - DEBUG - STREAM b'IHDR' 16 13 +2024-06-05 06:52:19,013 - PIL.PngImagePlugin - DEBUG - STREAM b'pHYs' 41 9 +2024-06-05 06:52:19,014 - PIL.PngImagePlugin - DEBUG - STREAM b'IDAT' 62 1141 +2024-06-05 06:52:19,016 - PIL.PngImagePlugin - DEBUG - STREAM b'IHDR' 16 13 +2024-06-05 06:52:19,016 - PIL.PngImagePlugin - DEBUG - STREAM b'pHYs' 41 9 +2024-06-05 06:52:19,016 - PIL.PngImagePlugin - DEBUG - STREAM b'IDAT' 62 405 +2024-06-05 06:52:19,017 - PIL.PngImagePlugin - DEBUG - STREAM b'IHDR' 16 13 +2024-06-05 06:52:19,018 - PIL.PngImagePlugin - DEBUG - STREAM b'pHYs' 41 9 +2024-06-05 06:52:19,018 - PIL.PngImagePlugin - DEBUG - STREAM b'IDAT' 62 324 +2024-06-05 06:52:19,018 - PIL.PngImagePlugin - DEBUG - STREAM b'IHDR' 16 13 +2024-06-05 06:52:19,018 - PIL.PngImagePlugin - DEBUG - STREAM b'pHYs' 41 9 +2024-06-05 06:52:19,018 - PIL.PngImagePlugin - DEBUG - STREAM b'IDAT' 62 347 +2024-06-05 06:52:19,032 - info - INFO - Database initialized +2024-06-05 06:52:19,033 - app - INFO - FMEA Application initialized diff --git a/logs/warning.log b/logs/warning.log new file mode 100644 index 0000000..673f284 --- /dev/null +++ b/logs/warning.log @@ -0,0 +1,25 @@ +2024-06-05 06:52:18,920 - app - INFO - Application started +2024-06-05 06:52:18,922 - error - ERROR - This is an error message +2024-06-05 06:52:18,922 - warning - WARNING - This is a warning message +2024-06-05 06:52:18,922 - info - INFO - This is an informational message +2024-06-05 06:52:18,923 - debug - DEBUG - This is a debug message +2024-06-05 06:52:18,993 - PIL.PngImagePlugin - DEBUG - STREAM b'IHDR' 16 13 +2024-06-05 06:52:18,993 - PIL.PngImagePlugin - DEBUG - STREAM b'pHYs' 41 9 +2024-06-05 06:52:18,993 - PIL.PngImagePlugin - DEBUG - STREAM b'IDAT' 62 989 +2024-06-05 06:52:19,011 - PIL.PngImagePlugin - DEBUG - STREAM b'IHDR' 16 13 +2024-06-05 06:52:19,011 - PIL.PngImagePlugin - DEBUG - STREAM b'pHYs' 41 9 +2024-06-05 06:52:19,011 - PIL.PngImagePlugin - DEBUG - STREAM b'IDAT' 62 159 +2024-06-05 06:52:19,013 - PIL.PngImagePlugin - DEBUG - STREAM b'IHDR' 16 13 +2024-06-05 06:52:19,013 - PIL.PngImagePlugin - DEBUG - STREAM b'pHYs' 41 9 +2024-06-05 06:52:19,014 - PIL.PngImagePlugin - DEBUG - STREAM b'IDAT' 62 1141 +2024-06-05 06:52:19,016 - PIL.PngImagePlugin - DEBUG - STREAM b'IHDR' 16 13 +2024-06-05 06:52:19,016 - PIL.PngImagePlugin - DEBUG - STREAM b'pHYs' 41 9 +2024-06-05 06:52:19,016 - PIL.PngImagePlugin - DEBUG - STREAM b'IDAT' 62 405 +2024-06-05 06:52:19,017 - PIL.PngImagePlugin - DEBUG - STREAM b'IHDR' 16 13 +2024-06-05 06:52:19,018 - PIL.PngImagePlugin - DEBUG - STREAM b'pHYs' 41 9 +2024-06-05 06:52:19,018 - PIL.PngImagePlugin - DEBUG - STREAM b'IDAT' 62 324 +2024-06-05 06:52:19,018 - PIL.PngImagePlugin - DEBUG - STREAM b'IHDR' 16 13 +2024-06-05 06:52:19,018 - PIL.PngImagePlugin - DEBUG - STREAM b'pHYs' 41 9 +2024-06-05 06:52:19,018 - PIL.PngImagePlugin - DEBUG - STREAM b'IDAT' 62 347 +2024-06-05 06:52:19,032 - info - INFO - Database initialized +2024-06-05 06:52:19,033 - app - INFO - FMEA Application initialized diff --git a/main_app.spec b/main_app.spec new file mode 100644 index 0000000..12233cb --- /dev/null +++ b/main_app.spec @@ -0,0 +1,43 @@ +# -*- mode: python ; coding: utf-8 -*- + + +a = Analysis( + ['main_app.py'], + pathex=[], + binaries=[], + datas=[], + hiddenimports=[], + hookspath=[], + hooksconfig={}, + runtime_hooks=[], + excludes=[], + noarchive=True, +) +pyz = PYZ(a.pure) + +exe = EXE( + pyz, + a.scripts, + [('v', None, 'OPTION')], + exclude_binaries=True, + name='main_app', + debug=True, + bootloader_ignore_signals=False, + strip=False, + upx=True, + console=True, + disable_windowed_traceback=False, + argv_emulation=False, + target_arch=None, + codesign_identity=None, + entitlements_file=None, +) +coll = COLLECT( + exe, + a.binaries, + a.datas, + strip=False, + upx=True, + upx_exclude=[], + name='main_app', +) diff --git a/media/topbar/back_arrow.png b/media/topbar/back_arrow.png new file mode 100644 index 0000000..3aa49c9 Binary files /dev/null and b/media/topbar/back_arrow.png differ diff --git a/media/topbar/flag.png b/media/topbar/flag.png new file mode 100644 index 0000000..b8bf680 Binary files /dev/null and b/media/topbar/flag.png differ diff --git a/media/topbar/icons8-add-graph-report-48.png b/media/topbar/icons8-add-graph-report-48.png new file mode 100644 index 0000000..bd98dc8 Binary files /dev/null and b/media/topbar/icons8-add-graph-report-48.png differ diff --git a/media/topbar/icons8-alarm-48.png b/media/topbar/icons8-alarm-48.png new file mode 100644 index 0000000..fe8b929 Binary files /dev/null and b/media/topbar/icons8-alarm-48.png differ diff --git a/media/topbar/icons8-engineering-48.png b/media/topbar/icons8-engineering-48.png new file mode 100644 index 0000000..41bbc02 Binary files /dev/null and b/media/topbar/icons8-engineering-48.png differ diff --git a/media/topbar/icons8-micrometer-50.png b/media/topbar/icons8-micrometer-50.png new file mode 100644 index 0000000..a2e07b1 Binary files /dev/null and b/media/topbar/icons8-micrometer-50.png differ diff --git a/media/topbar/load.png b/media/topbar/load.png new file mode 100644 index 0000000..3275c7f Binary files /dev/null and b/media/topbar/load.png differ diff --git a/media/topbar/new_file.png b/media/topbar/new_file.png new file mode 100644 index 0000000..9897ee0 Binary files /dev/null and b/media/topbar/new_file.png differ diff --git a/media/topbar/next.png b/media/topbar/next.png new file mode 100644 index 0000000..7c69403 Binary files /dev/null and b/media/topbar/next.png differ diff --git a/media/topbar/previous.png b/media/topbar/previous.png new file mode 100644 index 0000000..8856781 Binary files /dev/null and b/media/topbar/previous.png differ diff --git a/media/topbar/save.png b/media/topbar/save.png new file mode 100644 index 0000000..b551de1 Binary files /dev/null and b/media/topbar/save.png differ diff --git a/media/topbar/undo.png b/media/topbar/undo.png new file mode 100644 index 0000000..a668aa2 Binary files /dev/null and b/media/topbar/undo.png differ diff --git a/menu_contents.py b/menu_contents.py new file mode 100644 index 0000000..637a62b --- /dev/null +++ b/menu_contents.py @@ -0,0 +1,209 @@ +import tkinter as tk +from tkinter import filedialog, messagebox, simpledialog +from textblob import TextBlob +import logger + +def create_menu(app): + menu = tk.Menu(app) + app.config(menu=menu) + + # File Menu + file_menu = tk.Menu(menu, tearoff=0) + menu.add_cascade(label="File", menu=file_menu) + file_menu.add_command(label="New", command=app.create_default_table) + file_menu.add_command(label="Open", command=app.open_file) + file_menu.add_command(label="Save", command=app.save_file) + file_menu.add_command(label="Save As", command=app.save_file_as) + file_menu.add_separator() + file_menu.add_command(label="Close", command=app.close_file) + file_menu.add_command(label="Exit", command=app.quit) + + # Edit Menu + edit_menu = tk.Menu(menu, tearoff=0) + menu.add_cascade(label="Edit", menu=edit_menu) + edit_menu.add_command(label="Undo", command=app.undo) + edit_menu.add_command(label="Redo", command=app.redo) + edit_menu.add_separator() + edit_menu.add_command(label="Cut", command=lambda: cut(app)) + edit_menu.add_command(label="Copy", command=lambda: copy(app)) + edit_menu.add_command(label="Paste", command=lambda: paste(app)) + edit_menu.add_command(label="Delete", command=lambda: delete(app)) + edit_menu.add_separator() + edit_menu.add_command(label="Select All", command=lambda: select_all(app)) + + # View Menu + view_menu = tk.Menu(menu, tearoff=0) + menu.add_cascade(label="View", menu=view_menu) + view_menu.add_command(label="Zoom In", command=lambda: zoom_in(app)) + view_menu.add_command(label="Zoom Out", command=lambda: zoom_out(app)) + view_menu.add_command(label="Full Screen", command=lambda: toggle_full_screen(app)) + view_menu.add_separator() + view_menu.add_command(label="Show Toolbars", command=lambda: show_toolbars(app)) + + # Insert Menu + insert_menu = tk.Menu(menu, tearoff=0) + menu.add_cascade(label="Insert", menu=insert_menu) + insert_menu.add_command(label="Insert Image", command=lambda: insert_image(app)) + insert_menu.add_command(label="Insert Table", command=lambda: insert_table(app)) + insert_menu.add_command(label="Insert Chart", command=lambda: insert_chart(app)) + insert_menu.add_command(label="Insert Hyperlink", command=lambda: insert_hyperlink(app)) + + # Format Menu + format_menu = tk.Menu(menu, tearoff=0) + menu.add_cascade(label="Format", menu=format_menu) + format_menu.add_command(label="Font", command=lambda: change_font(app)) + format_menu.add_command(label="Paragraph", command=lambda: adjust_paragraph(app)) + format_menu.add_command(label="Style", command=lambda: apply_style(app)) + + # Tools Menu + tools_menu = tk.Menu(menu, tearoff=0) + menu.add_cascade(label="Tools", menu=tools_menu) + tools_menu.add_command(label="Spell Check", command=lambda: spell_check(app)) + tools_menu.add_command(label="Word Count", command=lambda: word_count(app)) + tools_menu.add_command(label="Preferences", command=lambda: open_preferences(app)) + + # Help Menu + help_menu = tk.Menu(menu, tearoff=0) + menu.add_cascade(label="Help", menu=help_menu) + help_menu.add_command(label="Help Contents", command=lambda: open_help(app)) + help_menu.add_command(label="About", command=lambda: show_about(app)) + help_menu.add_command(label="Check for Updates", command=lambda: check_updates(app)) + help_menu.add_command(label="Feedback", command=lambda: provide_feedback(app)) + +def connect_db(app): + logger.info_logger.info("Connected to XFMEA Database (simulated)") + messagebox.showinfo("Info", "Connected to XFMEA Database (simulated).") + +def cut(app): + selected_item = app.tree.selection() + if selected_item: + app.clipboard_clear() + app.clipboard_append(" ".join(app.tree.item(selected_item[0])['values'])) + app.tree.delete(selected_item) + logger.info_logger.info(f"Cut item: {selected_item}") + +def copy(app): + selected_item = app.tree.selection() + if selected_item: + app.clipboard_clear() + app.clipboard_append(" ".join(app.tree.item(selected_item[0])['values'])) + logger.info_logger.info(f"Copied item: {selected_item}") + +def paste(app): + clipboard_data = app.clipboard_get().split() + table_contents.insert_row(app, clipboard_data, tags=('oddrow',)) + logger.info_logger.info(f"Pasted item: {clipboard_data}") + +def delete(app): + selected_item = app.tree.selection() + if selected_item: + app.tree.delete(selected_item) + logger.info_logger.info(f"Deleted item: {selected_item}") + +def select_all(app): + for item in app.tree.get_children(): + app.tree.selection_add(item) + logger.info_logger.info("Selected all items") + +def zoom_in(app): + current_font = app.tree.cget("font") + font_name, font_size = current_font.rsplit(" ", 1) + font_size = int(font_size) + 2 + new_font = f"{font_name} {font_size}" + app.tree.configure(font=new_font) + logger.info_logger.info("Zoomed in") + +def zoom_out(app): + current_font = app.tree.cget("font") + font_name, font_size = current_font.rsplit(" ", 1) + font_size = int(font_size) - 2 + new_font = f"{font_name} {font_size}" + app.tree.configure(font=new_font) + logger.info_logger.info("Zoomed out") + +def toggle_full_screen(app): + app.attributes("-fullscreen", not app.attributes("-fullscreen")) + logger.info_logger.info("Toggled full screen") + +def show_toolbars(app): + if hasattr(app, 'toolbar'): + app.toolbar.pack_forget() if app.toolbar.winfo_ismapped() else app.toolbar.pack(side="top", fill="x") + logger.info_logger.info("Toggled toolbar visibility") + +def insert_image(app): + file_path = filedialog.askopenfilename(title="Insert Image", filetypes=(("Image Files", "*.png;*.jpg;*.jpeg;*.gif"), ("All Files", "*.*"))) + if file_path: + messagebox.showinfo("Info", f"Image inserted: {file_path}") + logger.info_logger.info(f"Inserted image: {file_path}") + +def insert_table(app): + messagebox.showinfo("Info", "Insert Table function is not implemented yet.") + logger.info_logger.info("Insert Table function called") + +def insert_chart(app): + messagebox.showinfo("Info", "Insert Chart function is not implemented yet.") + logger.info_logger.info("Insert Chart function called") + +def insert_hyperlink(app): + url = simpledialog.askstring("Insert Hyperlink", "Enter the URL:") + if url: + messagebox.showinfo("Info", f"Hyperlink inserted: {url}") + logger.info_logger.info(f"Inserted hyperlink: {url}") + +def change_font(app): + font = simpledialog.askstring("Change Font", "Enter the font (e.g., Arial 12):") + if font: + app.tree.configure(font=font) + logger.info_logger.info(f"Changed font to: {font}") + +def adjust_paragraph(app): + alignment = simpledialog.askstring("Adjust Paragraph", "Enter the alignment (left, center, right):") + if alignment: + messagebox.showinfo("Info", f"Paragraph alignment set to: {alignment}") + logger.info_logger.info(f"Adjusted paragraph alignment to: {alignment}") + +def apply_style(app): + style = simpledialog.askstring("Apply Style", "Enter the style (e.g., Bold, Italic):") + if style: + messagebox.showinfo("Info", f"Style applied: {style}") + logger.info_logger.info(f"Applied style: {style}") + +def spell_check(app): + text = "\n".join(" ".join(app.tree.item(item)['values']) for item in app.tree.get_children()) + blob = TextBlob(text) + misspelled = [word for word in blob.words if not word.correct()] + if misspelled: + messagebox.showinfo("Spell Check", f"Misspelled words: {', '.join(misspelled)}") + logger.warning_logger.warning(f"Spell check found misspelled words: {', '.join(misspelled)}") + else: + messagebox.showinfo("Spell Check", "No misspellings found.") + logger.info_logger.info("Spell check found no misspellings") + +def word_count(app): + text = "\n".join(" ".join(app.tree.item(item)['values']) for item in app.tree.get_children()) + blob = TextBlob(text) + word_count = len(blob.words) + messagebox.showinfo("Word Count", f"Word count: {word_count}") + logger.info_logger.info(f"Word count: {word_count}") + +def open_preferences(app): + messagebox.showinfo("Info", "Open Preferences function is not implemented yet.") + logger.info_logger.info("Open Preferences function called") + +def open_help(app): + messagebox.showinfo("Info", "Open Help function is not implemented yet.") + logger.info_logger.info("Open Help function called") + +def show_about(app): + messagebox.showinfo("Info", "FMEA Application\nVersion 1.0\n© 2024") + logger.info_logger.info("Show About function called") + +def check_updates(app): + messagebox.showinfo("Info", "Check for Updates function is not implemented yet.") + logger.info_logger.info("Check for Updates function called") + +def provide_feedback(app): + feedback = simpledialog.askstring("Provide Feedback", "Enter your feedback:") + if feedback: + messagebox.showinfo("Info", "Thank you for your feedback!") + logger.info_logger.info(f"Feedback received: {feedback}") diff --git a/screens/__pycache__/home_screen.cpython-310.pyc b/screens/__pycache__/home_screen.cpython-310.pyc new file mode 100644 index 0000000..8e4f9a8 Binary files /dev/null and b/screens/__pycache__/home_screen.cpython-310.pyc differ diff --git a/screens/__pycache__/table_screen1.cpython-310.pyc b/screens/__pycache__/table_screen1.cpython-310.pyc new file mode 100644 index 0000000..ec9b45e Binary files /dev/null and b/screens/__pycache__/table_screen1.cpython-310.pyc differ diff --git a/screens/__pycache__/table_screen2.cpython-310.pyc b/screens/__pycache__/table_screen2.cpython-310.pyc new file mode 100644 index 0000000..406fbf7 Binary files /dev/null and b/screens/__pycache__/table_screen2.cpython-310.pyc differ diff --git a/screens/home_screen.py b/screens/home_screen.py new file mode 100644 index 0000000..db5dfa9 --- /dev/null +++ b/screens/home_screen.py @@ -0,0 +1,8 @@ +import tkinter as tk + +class HomeScreen(tk.Frame): + def __init__(self, parent, controller): + super().__init__(parent) + self.controller = controller + label = tk.Label(self, text="Welcome to the FMEA Application") + label.pack(side="top", fill="x", pady=10) diff --git a/screens/table_screen1.py b/screens/table_screen1.py new file mode 100644 index 0000000..8d09503 --- /dev/null +++ b/screens/table_screen1.py @@ -0,0 +1,8 @@ +import tkinter as tk +import table_contents + +class TableScreen1(tk.Frame): + def __init__(self, parent, controller): + super().__init__(parent) + self.controller = controller + table_contents.create_table(self) diff --git a/screens/table_screen2.py b/screens/table_screen2.py new file mode 100644 index 0000000..173a9db --- /dev/null +++ b/screens/table_screen2.py @@ -0,0 +1,8 @@ +import tkinter as tk +import table_contents + +class TableScreen2(tk.Frame): + def __init__(self, parent, controller): + super().__init__(parent) + self.controller = controller + table_contents.create_table(self) diff --git a/table_contents.py b/table_contents.py new file mode 100644 index 0000000..3b8e8a1 --- /dev/null +++ b/table_contents.py @@ -0,0 +1,158 @@ +import tkinter as tk +from tkinter import ttk + +def create_table(app): + columns = [ + "Operation Sequence", "Part or Product", "Characteristics", "Failure Mode", + "Effect of Failure", "Severity", "Classification", "Cause of Failure", + "Controls Prevention", "Occurrence", "Controls Detection", "Detection", + "RPN", "Recommended Action", "Responsibility", "Completion Date", + "Actions Taken", "Severity A", "Occurrence A", "Detection A", "RPN A" + ] + + app.tree = ttk.Treeview(app, columns=columns, show='headings') + app.tree.pack(expand=True, fill='both') + + for col in columns: + app.tree.heading(col, text=col) + app.tree.column(col, anchor='w', width=120) + + app.tree.tag_configure('oddrow', background='white') + app.tree.tag_configure('evenrow', background='lightgray') + app.tree.tag_configure('rpn_low', background='green') + app.tree.tag_configure('rpn_medium', background='yellow') + app.tree.tag_configure('rpn_high', background='red') + + app.entry = None # This will hold the Entry widget for editing cells + app.combo = None # This will hold the Combobox widget for specific columns + app.tree.bind('', lambda event: edit_cell(app, event)) + + add_scrollbars(app) + +def add_scrollbars(app): + vsb = ttk.Scrollbar(app, orient="vertical", command=app.tree.yview) + vsb.pack(side='right', fill='y') + app.tree.configure(yscrollcommand=vsb.set) + + hsb = ttk.Scrollbar(app, orient="horizontal", command=app.tree.xview) + hsb.pack(side='bottom', fill='x') + app.tree.configure(xscrollcommand=hsb.set) + +def insert_row(app, values=None, tags=()): + values = values or [""] * len(app.tree["columns"]) + row_id = app.tree.insert('', 'end', values=values, tags=tags) + update_rpn(app, row_id) + return row_id + +def get_table_data(app): + data = [] + for row_id in app.tree.get_children(): + row = [] + for col in app.tree["columns"]: + row.append(app.tree.set(row_id, col)) + data.append(row) + return data + +def load_data_to_tree(app, data): + app.tree.delete(*app.tree.get_children()) + for i, row in enumerate(data): + tag = 'evenrow' if i % 2 == 0 else 'oddrow' + row_id = insert_row(app, row, tags=(tag,)) + update_rpn(app, row_id) + +def edit_cell(app, event): + region = app.tree.identify("region", event.x, event.y) + if region != "cell": + return + + row_id = app.tree.identify_row(event.y) + column = app.tree.identify_column(event.x) + col_num = int(column[1:]) - 1 + + x, y, width, height = app.tree.bbox(row_id, column) + value = app.tree.set(row_id, column) + + specific_columns = ["Severity", "Occurrence", "Detection", "Severity A", "Occurrence A", "Detection A"] + + if app.tree.heading(column)['text'] in specific_columns: + app.combo = ttk.Combobox(app, values=[str(i) for i in range(1, 11)], state='readonly') + app.combo.place(x=x, y=y, width=width, height=height) + app.combo.set(value) + app.combo.focus() + + def save_edit(event): + previous_value = app.tree.set(row_id, column) + app.tree.set(row_id, column, app.combo.get()) + app.combo.destroy() + app.combo = None + app.undo_stack.append((row_id, column, previous_value)) + update_rpn(app, row_id) + + app.combo.bind('<>', save_edit) + app.combo.bind('', save_edit) + else: + app.entry = tk.Entry(app, width=width) + app.entry.place(x=x, y=y, width=width, height=height) + app.entry.insert(0, value) + app.entry.focus() + + def save_edit(event): + previous_value = app.tree.set(row_id, column) + app.tree.set(row_id, column, app.entry.get()) + app.entry.destroy() + app.entry = None + app.undo_stack.append((row_id, column, previous_value)) + update_rpn(app, row_id) + + app.entry.bind('', save_edit) + app.entry.bind('', save_edit) + +def update_rpn(app, row_id): + def get_rpn_color_tag(value): + if value <= 20: + return 'rpn_low' + elif value <= 45: + return 'rpn_medium' + else: + return 'rpn_high' + + try: + severity = int(app.tree.set(row_id, "Severity")) + occurrence = int(app.tree.set(row_id, "Occurrence")) + detection = int(app.tree.set(row_id, "Detection")) + rpn = severity * occurrence * detection + app.tree.set(row_id, "RPN", rpn) + color_tag = get_rpn_color_tag(rpn) + tags = list(app.tree.item(row_id, 'tags')) + tags = [t for t in tags if not t.startswith('rpn_')] # Remove old rpn tags + tags.append(color_tag) + app.tree.item(row_id, tags=tuple(tags)) + app.tree.tag_configure('rpn_low', background='green') + app.tree.tag_configure('rpn_medium', background='yellow') + app.tree.tag_configure('rpn_high', background='red') + except ValueError: + app.tree.set(row_id, "RPN", "") + tags = list(app.tree.item(row_id, 'tags')) + tags = [t for t in tags if not t.startswith('rpn_')] + app.tree.item(row_id, tags=tuple(tags)) + + try: + severity_a = int(app.tree.set(row_id, "Severity A")) + occurrence_a = int(app.tree.set(row_id, "Occurrence A")) + detection_a = int(app.tree.set(row_id, "Detection A")) + rpn_a = severity_a * occurrence_a * detection_a + app.tree.set(row_id, "RPN A", rpn_a) + color_tag_a = get_rpn_color_tag(rpn_a) + tags = list(app.tree.item(row_id, 'tags')) + tags = [t for t in tags if not t.startswith('rpn_')] + tags.append(color_tag_a) + app.tree.item(row_id, tags=tuple(tags)) + app.tree.tag_configure('rpn_low', background='green') + app.tree.tag_configure('rpn_medium', background='yellow') + app.tree.tag_configure('rpn_high', background='red') + except ValueError: + app.tree.set(row_id, "RPN A", "") + tags = list(app.tree.item(row_id, 'tags')) + tags = [t for t in tags if not t.startswith('rpn_')] + app.tree.item(row_id, tags=tuple(tags)) +