Beispiel #1
0
    def __init__(self, app):
        QDockWidget.__init__(self)
        self.setObjectName('debug')
        cfgfile = open('%sconfig/debug.cfg' % CWD)
        self.config = Config(cfgfile)
        self.exceptions = []
        self.app = app
        self.api = app.api
        widget = QTabWidget()
        log = QWidget()
        try:
            todo = WinterEditor(self.app, CWD + 'TODO', lexer='Plain')
        except IOError:
            todo = False
        self.errorList = self.WinterErrorList(self)
        widget.addTab(log, 'Log')
        widget.addTab(self.errorList, 'Errors')
        if todo:
            widget.addTab(todo, 'ToDo')
        layout = QVBoxLayout(log)
        self.debugLine = self.WinterDebugLine(self)
        self.debugList = QListWidget()
        self.debugList.setObjectName('debugList')
        layout.addWidget(self.debugLine)
        layout.addWidget(self.debugList)
        log.setLayout(layout)
        self.setWidget(widget)

        self.app.addDockWidget(Qt.BottomDockWidgetArea, self)
        self.hide()

        if os.path.isfile(CWD + 'config/debug.qss'):
            self.setStyleSheet(open(CWD + 'config/debug.qss', 'r').read())
Beispiel #2
0
 def __init__(self, parent, panel):
     self.parent = parent
     self.panel = panel
     filename = panel.tree.currentPage.path + '/__page.css'
     self.editor = WinterEditor(parent, filename, lexer='CSS')
     self.editor.onSave = lambda: self.onSave()
     self.editor.tb.hide()
     #            self.editor.editor.setLexer()
     FocusProxy.__init__(self, self.editor)
     l = QVBoxLayout()
     l.addWidget(self.editor)
     self.setLayout(l)