# Path: apps/pw_multiScriptEditor/widgets/pythonSyntax/design.py
# def getColors(theme=False):
# def editorStyle(theme=None):
# def applyColorToEditorStyle(colors=None):
# 
# Path: apps/pw_multiScriptEditor/widgets/pythonSyntax/syntaxHighLighter.py
# class PythonHighlighterClass (QSyntaxHighlighter):
#     def __init__(self, document, colors=None):
#     def getStyle(self, color, bold=False):
#     def highlightBlock(self, text):
#     def match_multiline(self, text, delimiter, in_state, style):


from PySide.QtCore import *
from PySide.QtGui import *
from .pythonSyntax import design
from .pythonSyntax import syntaxHighLighter
from . import inputWidget
import themeEditor_UIs as ui
import settingsManager
import os
import icons_rcs

class themeEditorClass(QDialog, ui.Ui_themeEditor):
    def __init__(self, parent = None, desk=None):
        super(themeEditorClass, self).__init__(parent)
        self.setupUi(self)
        self.preview_twd = inputWidget.inputClass(self, desk)
        self.preview_ly.addWidget(self.preview_twd)
        self.preview_twd.setPlainText(defaultText)
        self.splitter.setSizes([200,300])
        self.s = settingsManager.scriptEditorClass()
        self.colors_lwd.itemDoubleClicked.connect(self.getNewColor)
        self.save_btn.clicked.connect(self.saveTheme)
        self.del_btn.clicked.connect(self.deleteTheme)
        self.themeList_cbb.currentIndexChanged.connect(self.updateColors)
        self.apply_btn.clicked.connect(self.apply)
        self.apply_btn.setText('Close')
        self.textSize_spb.valueChanged.connect(self.updateExample)

        self.fillUI()
        self.updateUI()
        self.updateColors()
        self.preview_twd.completer.updateCompleteList()


    def fillUI(self, restore=None):
        if restore is None:
            restore = self.themeList_cbb.currentText()
        settings = self.s.readSettings()

# Path: apps/pw_multiScriptEditor/widgets/pythonSyntax/design.py
# def getColors(theme=False):
# def editorStyle(theme=None):
# def applyColorToEditorStyle(colors=None):
# 
# Path: apps/pw_multiScriptEditor/widgets/pythonSyntax/syntaxHighLighter.py
# class PythonHighlighterClass (QSyntaxHighlighter):
#     def __init__(self, document, colors=None):
#     def getStyle(self, color, bold=False):
#     def highlightBlock(self, text):
#     def match_multiline(self, text, delimiter, in_state, style):


# Path: apps/pw_multiScriptEditor/widgets/themeEditor.py
from PySide.QtCore import *
from PySide.QtGui import *
from .pythonSyntax import design
from .pythonSyntax import syntaxHighLighter
from . import inputWidget
import themeEditor_UIs as ui
import settingsManager
import os
import icons_rcs


class themeEditorClass(QDialog, ui.Ui_themeEditor):
    def __init__(self, parent = None, desk=None):
        super(themeEditorClass, self).__init__(parent)
        self.setupUi(self)
        self.preview_twd = inputWidget.inputClass(self, desk)
        self.preview_ly.addWidget(self.preview_twd)
        self.preview_twd.setPlainText(defaultText)
        self.splitter.setSizes([200,300])
        self.s = settingsManager.scriptEditorClass()
        self.colors_lwd.itemDoubleClicked.connect(self.getNewColor)
        self.save_btn.clicked.connect(self.saveTheme)
        self.del_btn.clicked.connect(self.deleteTheme)
        self.themeList_cbb.currentIndexChanged.connect(self.updateColors)
        self.apply_btn.clicked.connect(self.apply)
        self.apply_btn.setText('Close')
        self.textSize_spb.valueChanged.connect(self.updateExample)

        self.fillUI()
        self.updateUI()
        self.updateColors()
        self.preview_twd.completer.updateCompleteList()


    def fillUI(self, restore=None):
        if restore is None:
            restore = self.themeList_cbb.currentText()
        settings = self.s.readSettings()

        self.themeList_cbb.clear()