code release

This commit is contained in:
iperov 2021-07-23 17:34:49 +04:00
commit a902f11f74
354 changed files with 826570 additions and 1 deletions

View file

@ -0,0 +1,50 @@
from pathlib import Path
from PyQt6.QtCore import *
from PyQt6.QtGui import *
from xlib.qt.gui.from_file import QXImage_from_file
class QXImageDB:
cached = {}
def _get(filename : str, color=None):
if isinstance(color, QColor):
key = (filename, color.getRgb() )
else:
key = (filename, color)
result = QXImageDB.cached.get(key, None)
if result is None:
result = QXImageDB.cached[key] = QXImage_from_file ( Path(__file__).parent / 'images' / filename, color )
return result
def add_circle_outline(color='black'): return QXImageDB._get('add-circle-outline.png', color)
def close_outline(color='black'): return QXImageDB._get('close-outline.png', color)
def eye_outline(color='black'): return QXImageDB._get('eye-outline.png', color)
def folder_open_outline(color='black'): return QXImageDB._get('folder-open-outline.png', color)
def open_outline(color='black'): return QXImageDB._get('open-outline.png', color)
def information_circle_outline(color='black'): return QXImageDB._get('information-circle-outline.png', color)
def play_circle_outline(color='black'): return QXImageDB._get('play-circle-outline.png', color)
def play_back_circle_outline(color='black'): return QXImageDB._get('play-back-circle-outline.png', color)
def play_forward_circle_outline(color='black'): return QXImageDB._get('play-forward-circle-outline.png', color)
def play_skip_back_circle_outline(color='black'): return QXImageDB._get('play-skip-back-circle-outline.png', color)
def play_skip_forward_circle_outline(color='black'): return QXImageDB._get('play-skip-forward-circle-outline.png', color)
def pause_circle_outline(color='black'): return QXImageDB._get('pause-circle-outline.png', color)
def power_outline(color='black'): return QXImageDB._get('power-outline.png', color)
def reload_outline(color='black'): return QXImageDB._get('reload-outline.png', color)
def settings_outline(color='black'): return QXImageDB._get('settings-outline.png', color)
def settings_reset_outline(color='black'): return QXImageDB._get('settings-reset-outline.png', color)
def warning_outline(color='black'): return QXImageDB._get('warning-outline.png', color)
def app_icon(): return QXImageDB._get('app_icon.png', None)
def logo_barclay_stone(): return QXImageDB._get('logo_barclay_stone.png', None)
def logo_exmo(): return QXImageDB._get('logo_exmo.png', None)
def splash_deepfacelive(): return QXImageDB._get('splash_deepfacelive.png', None)

View file

@ -0,0 +1,21 @@
from pathlib import Path
from PyQt6.QtCore import *
from PyQt6.QtGui import *
from xlib import path as lib_path
from xlib.qt.gui.from_file import QXImage_from_file
from xlib.qt.gui.QXImageSequence import QXImageSequence
class QXImageSequenceDB:
cached = {}
def _get(dir_path : Path, fps, color=None):
key = (dir_path, fps, color)
result = QXImageSequenceDB.cached.get(key, None)
if result is None:
image_paths = lib_path.get_files_paths(dir_path)
result = QXImageSequenceDB.cached[key] = QXImageSequence(frames=[QXImage_from_file (image_path, color) for image_path in image_paths], fps=fps)
return result
def icon_loading(color=None) -> QXImageSequence: return QXImageSequenceDB._get(Path(__file__).parent / 'sequences' / 'icon_loading', fps=30, color=color)

View file

@ -0,0 +1,2 @@
from .QXImageDB import QXImageDB
from .QXImageSequenceDB import QXImageSequenceDB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 193 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 634 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 630 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 630 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 625 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 625 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 632 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 629 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 613 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 630 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 628 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 624 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 623 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 626 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 629 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 629 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 636 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 630 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 621 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 623 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 629 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 623 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 625 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 613 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 625 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 631 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 631 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 625 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 635 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 630 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 628 B