Module settings

Module settings 

Source
Expand description

§Settings Module

§Purpose

Provides a user-friendly interface for managing JSON library file versions in KiThe. This module acts as a high-level wrapper around the LibraryManager, offering GUI-friendly display names and simplified operations for library version management.

§Key Features

  • Display Name Mapping: Maps user-friendly names to internal library keys
  • Batch Operations: Supports updating multiple libraries simultaneously
  • Configuration Sync: Automatically syncs with the underlying LibraryManager
  • Error Handling: Provides string-based error messages suitable for GUI display

§Usage Pattern

use KiThe::settings::Settings;

let mut settings = Settings::new();
settings.set_library_version("Substance Base", "substance_base_v3.json")?;
settings.reset_to_defaults()?;

§Library Mappings

Display NameInternal KeyDefault File
“Substance Base”“substance_base”substance_base_v2.json
“All Keys Substance”“all_keys_substance”all_keys_substance.json
“Reactbase”“reactbase”Reactbase.json
“Dict Reaction”“dict_reaction”dict_reaction.json

Structs§

Settings
User-friendly settings interface for managing library versions.