refactor: update GPhotoCamera configuration methods for consistency

This commit is contained in:
2025-09-21 22:01:46 +02:00
parent abc07fd08d
commit 373e01310e
2 changed files with 19 additions and 4 deletions

View File

@@ -1,5 +1,4 @@
from abc import ABC, abstractmethod
from PySide6.QtCore import Signal
class BaseCamera(ABC):
@@ -17,6 +16,22 @@ class BaseCamera(ABC):
@abstractmethod
def get_frame(self):
raise NotImplementedError
@abstractmethod
def get_config_by_id(self, id: int) -> dict:
raise NotImplementedError
@abstractmethod
def get_config_by_name(self, name: str) -> dict:
raise NotImplementedError
@abstractmethod
def set_config_by_id(self, id: int, value: str):
raise NotImplementedError
@abstractmethod
def set_config_by_name(self, name: str, value: str):
raise NotImplementedError
def get_error_msg(self):
return str(self.error_msg)