# Path: src/controllers/utils.py
# def registerContext(func):
#     def wrapper(*args, **kwargs):
# def registerObj(name, obj):
# def duration_to_string(value, default="00:00", i=1000):
# def openLocalUrl(url):


import os
import sys
import json
from PyQt5.QtCore import QObject, pyqtSignal, pyqtSlot, pyqtProperty
from PyQt5.QtGui import QCursor
from .utils import registerContext, contexts
from config.constants import ProjectPath, DownloadSongPath
from dwidgets import ModelMetaclass
                  ('shortcut_next', 'QString', 'Right'),
                  ('shortcut_volumnIncrease', 'QString', 'Up'),
                  ('shortcut_volumeDecrease', 'QString', 'Down'),
                  ('shortcut_playPause', 'QString', 'Space'),
                  ('shortcut_simpleFullMode', 'QString', 'F11'),
                  ('shortcut_miniFullMode', 'QString', 'F10'),
                  ('shortcut_hideShowWindow', 'QString', 'F5'),
                  ('shortcut_hideShowDesktopLRC', 'QString', 'F6'),
                  ('desktopLRC_fontType', int, 0),
                  ('fontType', list, ['A', 'B']),
                  ('desktopLRC_fontSize', int, 30),
                  ('desktopLRC_fontSize_minValue', int, 10),
                  ('desktopLRC_fontSize_maxValue', int, 100),
                  ('desktopLRC_fontItalic', int, 0),
                  ('fontItalic', list, ['C', 'D']),
                  ('desktopLRC_lineNumber', int, 1),
                  ('lineNumber', list, ['1', '2']),
                  ('desktopLRC_fontAlignment', int, 0),
                  ('fontAlignment', list, ['F', 'G']),
                  ('desktopLRC_background1', int, 0),
                  ('background1', list, ['green', 'red']),
                  ('desktopLRC_background2', int, 0),
                  ('background2', list, ['yellow', 'gray']),
                  ('desktopLRC_backgroundSize', int, 30),
                  ('desktopLRC_backgroundSize_minValue', int, 10),
                  ('desktopLRC_backgroundSize_maxValue', int, 100),
                  ('DownloadSongPath', 'QString', DownloadSongPath))

    __contextName__ = "ConfigWorker"


# Path: src/controllers/utils.py
# def registerContext(func):
#     def wrapper(*args, **kwargs):
# def registerObj(name, obj):
# def duration_to_string(value, default="00:00", i=1000):
# def openLocalUrl(url):


# Path: src/controllers/configworker.py
import os
import sys
import json
from PyQt5.QtCore import QObject, pyqtSignal, pyqtSlot, pyqtProperty
from PyQt5.QtGui import QCursor
from .utils import registerContext, contexts
from config.constants import ProjectPath, DownloadSongPath
from dwidgets import ModelMetaclass

                  ('shortcut_next', 'QString', 'Right'),
                  ('shortcut_volumnIncrease', 'QString', 'Up'),
                  ('shortcut_volumeDecrease', 'QString', 'Down'),
                  ('shortcut_playPause', 'QString', 'Space'),
                  ('shortcut_simpleFullMode', 'QString', 'F11'),
                  ('shortcut_miniFullMode', 'QString', 'F10'),
                  ('shortcut_hideShowWindow', 'QString', 'F5'),
                  ('shortcut_hideShowDesktopLRC', 'QString', 'F6'),
                  ('desktopLRC_fontType', int, 0),
                  ('fontType', list, ['A', 'B']),
                  ('desktopLRC_fontSize', int, 30),
                  ('desktopLRC_fontSize_minValue', int, 10),
                  ('desktopLRC_fontSize_maxValue', int, 100),
                  ('desktopLRC_fontItalic', int, 0),
                  ('fontItalic', list, ['C', 'D']),
                  ('desktopLRC_lineNumber', int, 1),
                  ('lineNumber', list, ['1', '2']),
                  ('desktopLRC_fontAlignment', int, 0),
                  ('fontAlignment', list, ['F', 'G']),
                  ('desktopLRC_background1', int, 0),
                  ('background1', list, ['green', 'red']),
                  ('desktopLRC_background2', int, 0),
                  ('background2', list, ['yellow', 'gray']),
                  ('desktopLRC_backgroundSize', int, 30),
                  ('desktopLRC_backgroundSize_minValue', int, 10),
                  ('desktopLRC_backgroundSize_maxValue', int, 100),
                  ('DownloadSongPath', 'QString', DownloadSongPath))

    __contextName__ = "ConfigWorker"


    @registerContext