本文整理匯總了C++中Breakpoint::setMovingCursor方法的典型用法代碼示例。如果您正苦於以下問題:C++ Breakpoint::setMovingCursor方法的具體用法?C++ Breakpoint::setMovingCursor怎麽用?C++ Breakpoint::setMovingCursor使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Breakpoint
的用法示例。
在下文中一共展示了Breakpoint::setMovingCursor方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。
示例1: markChanged
void BreakpointModel::markChanged(
KTextEditor::Document *document,
KTextEditor::Mark mark,
KTextEditor::MarkInterface::MarkChangeAction action)
{
int type = mark.type;
/* Is this a breakpoint mark, to begin with? */
if (!(type & AllBreakpointMarks)) return;
if (action == KTextEditor::MarkInterface::MarkAdded) {
Breakpoint *b = breakpoint(document->url(), mark.line);
if (b) {
//there was already a breakpoint, so delete instead of adding
b->setDeleted();
return;
}
Breakpoint *breakpoint = addCodeBreakpoint(document->url(), mark.line);
KTextEditor::MovingInterface *moving = qobject_cast<KTextEditor::MovingInterface*>(document);
if (moving) {
KTextEditor::MovingCursor* cursor = moving->newMovingCursor(KTextEditor::Cursor(mark.line, 0));
// can't use new signal/slot syntax here, MovingInterface is not a QObject
connect(document, SIGNAL(aboutToDeleteMovingInterfaceContent(KTextEditor::Document*)),
this, SLOT(aboutToDeleteMovingInterfaceContent(KTextEditor::Document*)), Qt::UniqueConnection);
breakpoint->setMovingCursor(cursor);
}
} else {