本文整理汇总了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 {