[ui] add new patterns to load images in viewer2D

This commit is contained in:
broods 2023-04-12 18:16:19 +02:00
parent 2f36b2a8bb
commit 731440eaa1
2 changed files with 30 additions and 11 deletions

View file

@ -49,6 +49,12 @@ class FilepathHelper(QObject):
""" Returns the extension (.ext) of a pathname """
return os.path.splitext(self.asStr(path))[-1]
@Slot(str, result=str)
@Slot(QUrl, result=str)
def removeExtension(self, path):
""" Returns the pathname without its extension (.ext)"""
return os.path.splitext(self.asStr(path))[0]
@Slot(str, result=bool)
@Slot(QUrl, result=bool)
def isFile(self, path):