merge new pull requests from FlatCAM->master

implement  executing of tasks  inside worker thread
cleanups, reimplement  Isolate/New/OpenGerber as OOP style Shell commands
disable edit  during shell execution,  show   some  progress
add ability for breakpoints in other threads and only if available
add X11 safe flag, not sure what happen on windows
This commit is contained in:
Kamil Sopko
2016-03-24 23:06:44 +01:00
parent 980638630d
commit e96ee1af29
19 changed files with 651 additions and 50 deletions

View File

@@ -4,7 +4,7 @@ Shows intput and output text. Allows to enter commands. Supports history.
"""
import cgi
from PyQt4 import QtCore
from PyQt4.QtCore import pyqtSignal
from PyQt4.QtGui import QColor, QKeySequence, QLineEdit, QPalette, \
QSizePolicy, QTextCursor, QTextEdit, \
@@ -113,6 +113,32 @@ class TermWidget(QWidget):
self._edit.setFocus()
def open_proccessing(self, detail=None):
"""
Open processing and disable using shell commands again until all commands are finished
:return:
"""
self._edit.setTextColor(QtCore.Qt.white)
self._edit.setTextBackgroundColor(QtCore.Qt.darkGreen)
if detail is None:
self._edit.setPlainText("...proccessing...")
else:
self._edit.setPlainText("...proccessing... [%s]" % detail)
self._edit.setDisabled(True)
def close_proccessing(self):
"""
Close processing and enable using shell commands again
:return:
"""
self._edit.setTextColor(QtCore.Qt.black)
self._edit.setTextBackgroundColor(QtCore.Qt.white)
self._edit.setPlainText('')
self._edit.setDisabled(False)
def _append_to_browser(self, style, text):
"""
Convert text to HTML for inserting it to browser