Exemplo n.º 1
0
 def gui_write(outputEdit, msg_):
     # Slot for teed log output
     app = guitool_main.get_qtapp()
     # Write msg to text area
     outputEdit.moveCursor(QtGui.QTextCursor.End)
     # TODO: Find out how to do backspaces in textEdit
     msg = str(msg_)
     if msg.find('\b') != -1:
         msg = msg.replace('\b', '') + '\n'
     outputEdit.insertPlainText(msg)
     if app is not None:
         app.processEvents()
Exemplo n.º 2
0
 def gui_write(outputEdit, msg_):
     # Slot for teed log output
     app = guitool_main.get_qtapp()
     # Write msg to text area
     outputEdit.moveCursor(QtGui.QTextCursor.End)
     # TODO: Find out how to do backspaces in textEdit
     msg = str(msg_)
     if msg.find('\b') != -1:
         msg = msg.replace('\b', '') + '\n'
     outputEdit.insertPlainText(msg)
     if app is not None:
         app.processEvents()
Exemplo n.º 3
0
def copy_selection_to_clipboard(view):
    """ Copys selected grid to clipboard """
    if VERBOSE:
        print('[guitool] Copying selection to clipboard')
    copy_str = guitool_misc.get_view_selection_as_str(view)
    #copy_qstr = QtCore.Q__String(copy_str)
    copy_qstr = str(copy_str)
    clipboard = guitool_main.get_qtapp().clipboard()
    if VERBOSE:
        print(copy_str)
    clipboard.setText(copy_qstr)
    if VERBOSE:
        print('[guitool] finished copy')
Exemplo n.º 4
0
def copy_selection_to_clipboard(view):
    """ Copys selected grid to clipboard """
    if VERBOSE:
        print('[guitool] Copying selection to clipboard')
    copy_str = guitool_misc.get_view_selection_as_str(view)
    #copy_qstr = QtCore.Q__String(copy_str)
    copy_qstr = str(copy_str)
    clipboard = guitool_main.get_qtapp().clipboard()
    if VERBOSE:
        print(copy_str)
    clipboard.setText(copy_qstr)
    if VERBOSE:
        print('[guitool] finished copy')
Exemplo n.º 5
0
 def gui_flush(outputEdit):
     app = guitool_main.get_qtapp()
     if app is not None:
         app.processEvents()
Exemplo n.º 6
0
 def gui_flush(outputEdit):
     app = guitool_main.get_qtapp()
     if app is not None:
         app.processEvents()