예제 #1
0
/**
 * Set the marker state
 * @param enabled :: If true then the progress arrow is enabled
 */
void ScriptEditor::setMarkerState(bool enabled) {
    if (enabled) {
        setMarkerBackgroundColor(QColor("gray"), m_progressArrowKey);
        markerAdd(0, m_progressArrowKey);
    } else {
        markerDeleteAll();
    }
}
예제 #2
0
void Editor::mousePressEvent ( QMouseEvent * event )
{
	QsciScintilla::mousePressEvent(event);
	long res = this->SendScintilla(SCI_GETCARETLINEBACK, 0);
	if (res != 0x00222018) {
		setCaretLineBackgroundColor(caretLineBackColor);//QColor(24, 32, 34));
	}
	markerDeleteAll();
}
예제 #3
0
void SonicPiScintilla::setLineErrorMarker(int lineNumber){

  markerDeleteAll(-1);
  markerAdd(lineNumber, 8);

  // Perhaps consider a more manual way of returning this functionality:
  // int currlinenum, index;
  // getCursorPosition(&currlinenum, &index);
  // if (lineNumber != currlinenum) {
  //   setCursorPosition(lineNumber, 0);
  // }

}
예제 #4
0
/**
 * Update the arrow marker to point to the correct line and colour it depending
 * on the error state
 * @param lineno :: The line to place the marker at. A negative number will
 * clear all markers
 * @param error :: If true, the marker will turn red
 */
void ScriptEditor::updateProgressMarker(int lineno, bool error) {
    m_currentExecLine = lineno;
    if (error) {
        setMarkerBackgroundColor(g_error_colour, m_progressArrowKey);
    } else {
        setMarkerBackgroundColor(g_success_colour, m_progressArrowKey);
    }
    markerDeleteAll();
    // Check the lineno actually exists, -1 means delete
    if (lineno <= 0 || lineno > this->lines())
        return;

    ensureLineVisible(lineno);
    markerAdd(m_currentExecLine - 1, m_progressArrowKey);
}
예제 #5
0
void SonicPiScintilla::clearLineMarkers(){
  markerDeleteAll(-1);
}
예제 #6
0
 void QSourceCodeWidget::UnmarkAll( int markerID ){
     markerDeleteAll( markerID );
 }
예제 #7
0
void DocumentEditor::removeAllBookmarks() {
	markerDeleteAll(MARKER_BOOK);
	_bookmarks.clear();
}