Coverage for src / ezqt_app / domain / ports / settings_service.py: 100.00%

3 statements  

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

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

2# DOMAIN.PORTS.SETTINGS_SERVICE - Settings service port 

3# Project: ezqt_app 

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

5 

6"""Protocol definitions for settings services.""" 

7 

8from __future__ import annotations 

9 

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

11# IMPORTS 

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

13# Standard library imports 

14from typing import Protocol 

15 

16# Local imports 

17from ...domain.models.settings import AppSettingsModel, GuiSettingsModel 

18 

19 

20# /////////////////////////////////////////////////////////////// 

21# PROTOCOLS 

22# /////////////////////////////////////////////////////////////// 

23class SettingsServiceProtocol(Protocol): 

24 """Technical contract for mutable application settings state.""" 

25 

26 @property 

27 def app(self) -> AppSettingsModel: 

28 """Return mutable application settings.""" 

29 ... 

30 

31 @property 

32 def gui(self) -> GuiSettingsModel: 

33 """Return mutable GUI settings.""" 

34 ... 

35 

36 def set_app_name(self, name: str) -> None: 

37 """Set application name.""" 

38 ... 

39 

40 def set_app_description(self, description: str) -> None: 

41 """Set application description.""" 

42 ... 

43 

44 def set_custom_title_bar_enabled(self, enabled: bool) -> None: 

45 """Enable or disable custom title bar.""" 

46 ... 

47 

48 def set_app_min_size(self, width: int, height: int) -> None: 

49 """Set minimum window size as (width, height) integers.""" 

50 ... 

51 

52 def set_app_dimensions(self, width: int, height: int) -> None: 

53 """Set default window dimensions.""" 

54 ... 

55 

56 def set_debug_enabled(self, enabled: bool) -> None: 

57 """Enable or disable debug console output.""" 

58 ... 

59 

60 def set_theme(self, theme: str) -> None: 

61 """Set active theme.""" 

62 ... 

63 

64 def set_menu_widths(self, shrinked: int, extended: int) -> None: 

65 """Set menu panel widths.""" 

66 ... 

67 

68 def set_settings_panel_width(self, width: int) -> None: 

69 """Set settings panel width.""" 

70 ... 

71 

72 def set_time_animation(self, duration: int) -> None: 

73 """Set animation duration in milliseconds.""" 

74 ...