screenshots button

This commit is contained in:
Vinicius Moreira
2019-10-10 12:37:43 -03:00
parent 64a23a11be
commit 6023075b65
19 changed files with 295 additions and 8 deletions

View File

@@ -247,3 +247,10 @@ class SoftwareManager(ABC):
@abstractmethod
def launch(self, pkg: SoftwarePackage):
pass
@abstractmethod
def get_screenshots(self, pkg: SoftwarePackage) -> List[str]:
"""
:return: screenshot urls for the given package
"""
pass

View File

@@ -169,6 +169,12 @@ class SoftwarePackage(ABC):
"""
pass
def has_screenshots(self) -> bool:
"""
:return: if there are screenshots to be displayed
"""
return not self.installed
def __str__(self):
return '{} (id={}, name={})'.format(self.__class__.__name__, self.id, self.name)