Coverage for src / ezqt_app / domain / models / settings.py: 100.00%

23 statements  

« prev     ^ index     » next       coverage.py v7.13.5, created at 2026-03-26 07:07 +0000

1# /////////////////////////////////////////////////////////////// 

2# DOMAIN.MODELS.SETTINGS - Settings state models 

3# Project: ezqt_app 

4# /////////////////////////////////////////////////////////////// 

5 

6"""Pure domain models for mutable application settings state.""" 

7 

8from __future__ import annotations 

9 

10# /////////////////////////////////////////////////////////////// 

11# IMPORTS 

12# /////////////////////////////////////////////////////////////// 

13# Standard library imports 

14from dataclasses import dataclass, field 

15 

16 

17# /////////////////////////////////////////////////////////////// 

18# DATACLASSES 

19# /////////////////////////////////////////////////////////////// 

20@dataclass(slots=True) 

21class AppSettingsModel: 

22 """Mutable application settings values.""" 

23 

24 NAME: str = "MyApplication" 

25 DESCRIPTION: str = "MyDescription" 

26 ENABLE_CUSTOM_TITLE_BAR: bool = True 

27 APP_MIN_SIZE: tuple[int, int] = (940, 560) 

28 APP_WIDTH: int = 1280 

29 APP_HEIGHT: int = 720 

30 DEBUG: bool = False 

31 

32 

33@dataclass(slots=True) 

34class GuiSettingsModel: 

35 """Mutable GUI settings values.""" 

36 

37 THEME_PRESET: str = "blue-gray" 

38 THEME: str = "dark" 

39 MENU_PANEL_SHRINKED_WIDTH: int = 60 

40 MENU_PANEL_EXTENDED_WIDTH: int = 240 

41 SETTINGS_PANEL_WIDTH: int = 240 

42 TIME_ANIMATION: int = 400 

43 

44 

45@dataclass(slots=True) 

46class SettingsStateModel: 

47 """Mutable aggregate application settings state.""" 

48 

49 app: AppSettingsModel = field(default_factory=AppSettingsModel) 

50 gui: GuiSettingsModel = field(default_factory=GuiSettingsModel)