コード例 #1
0
void EditorTabWidget::unmarkExecutionPoint(const QString& filePath, int line)
{
  KTextEditor::MarkInterface* imark = documentMarkIf(filePath);
  if(!imark) return;
  #if (KDE_VERSION_MAJOR >= 3) &&  (KDE_VERSION_MINOR >= 3)
    imark->removeMark(line-1, KTextEditor::MarkInterface::Execution);
   #else
    imark->removeMark(line-1, KTextEditor::MarkInterface::markType05);
  #endif
}
コード例 #2
0
void EditorTabWidget::unmarkActiveBreakpoint(const QString& filePath, int line)
{
  KTextEditor::MarkInterface* imark = documentMarkIf(filePath);
  m_markGuard = true;
  if(!imark) return;
  #if (KDE_VERSION_MAJOR >= 3) &&  (KDE_VERSION_MINOR >= 3)
    imark->removeMark(line-1, KTextEditor::MarkInterface::BreakpointActive);
  #else
    imark->removeMark(line-1, KTextEditor::MarkInterface::markType02);
  #endif
  m_markGuard = false;
}
コード例 #3
0
// Set/clear a mark in a document
void DebuggerManager::setMark(const QString& filename, long line, bool set, int mark)
{
  if((!filename.isEmpty()) && ViewManager::ref()->isOpened(filename))
  {
    ::Document* qdoc = ViewManager::ref()->isOpened(filename)->document();
    if(qdoc)
    {
      disconnectBreakpointSignals(qdoc);

      KTextEditor::Document* doc = qdoc->doc();
      if(doc)
      {
        KTextEditor::MarkInterface *markIf = dynamic_cast<KTextEditor::MarkInterface*>(doc);
        if(markIf)
        {
          if(set)
            markIf->addMark(line, mark);
          else
            markIf->removeMark(line, mark);
        }
      }
      connectBreakpointSignals(qdoc);
    }
  }
}
コード例 #4
0
ファイル: qxsldbgdoc.cpp プロジェクト: serghei/kde3-kdewebdev
void QXsldbgDoc::clearMarks(bool allMarkTypes)
{
    if (locked)
	return;

    KTextEditor::MarkInterface *markIf = KTextEditor::markInterface(kDoc);
    if (markIf){
        if (!allMarkTypes){
            QPtrList<KTextEditor::Mark> marks = markIf->marks();
            while ( marks.current()) {
                markIf->removeMark(marks.current()->line, KTextEditor::MarkInterface::Execution);
                markIf->removeMark(marks.current()->line, KTextEditor::MarkInterface::BreakpointReached);
                marks.next();
            }
        }else {
            markIf->clearMarks();
        }
    }

}
コード例 #5
0
ファイル: qxsldbgdoc.cpp プロジェクト: serghei/kde3-kdewebdev
void QXsldbgDoc::enableBreakPoint(uint lineNumber, bool state)
{
    if (locked)
	return;

    KTextEditor::MarkInterface *markIf = KTextEditor::markInterface(kDoc);
    if (markIf){
	if (state){
	    markIf->setMark(lineNumber, KTextEditor::MarkInterface::BreakpointActive);
        }else{
	    markIf->removeMark(lineNumber, KTextEditor::MarkInterface::BreakpointDisabled);
        }
    }
}
コード例 #6
0
void EditorTabWidget::unmarkPreExecutionPoint(const QString& filePath, int line)
{
  KTextEditor::MarkInterface* imark = documentMarkIf(filePath);
  if(!imark) return;
  imark->removeMark(line-1, KTextEditor::MarkInterface::markType08);
}