本文整理汇总了C++中core::EditorManager::openEditor方法的典型用法代码示例。如果您正苦于以下问题:C++ EditorManager::openEditor方法的具体用法?C++ EditorManager::openEditor怎么用?C++ EditorManager::openEditor使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类core::EditorManager
的用法示例。
在下文中一共展示了EditorManager::openEditor方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
Core::IFile *
SequenceEditorFactory::open(const QString& filename )
{
Core::EditorManager * em = Core::EditorManager::instance();
Core::IEditor * iface = em->openEditor( filename, kind_ );
return iface ? iface->file() : 0;
}
示例2: kind
Core::IFile *DocumentEditorFactory::open(const QString &fileName)
{
Core::EditorManager *em = Core::EditorManager::instance();
Core::IEditor *iface = em->openEditor(fileName, kind());
return iface ? iface->file() : 0;
}
示例3:
Core::IFile *ProjectFilesFactory::open(const QString &fileName)
{
Core::EditorManager *editorManager = Core::EditorManager::instance();
if (Core::IEditor *editor = editorManager->openEditor(fileName, id()))
return editor->file();
return 0;
}
示例4: gotoSourceLocation
void QmlProfilerTool::gotoSourceLocation(const QString &fileUrl, int lineNumber)
{
if (lineNumber < 0 || fileUrl.isEmpty())
return;
#if 0
const QString fileName = QUrl(fileUrl).toLocalFile();
const QString projectFileName = d->m_projectFinder.findFile(fileName);
Core::EditorManager *editorManager = Core::EditorManager::instance();
Core::IEditor *editor = editorManager->openEditor(projectFileName);
TextEditor::ITextEditor *textEditor = qobject_cast<TextEditor::ITextEditor*>(editor);
if (textEditor) {
editorManager->addCurrentPositionToNavigationHistory();
textEditor->gotoLine(lineNumber);
textEditor->widget()->setFocus();
}
#endif
}
示例5: accept
void BaseFileFilter::accept(Locator::FilterEntry selection) const
{
Core::EditorManager *em = Core::EditorManager::instance();
em->openEditor(selection.internalData.toString(), QString(), Core::EditorManager::ModeSwitch);
}
示例6: accept
void BaseFileFilter::accept(QuickOpen::FilterEntry selection) const
{
Core::EditorManager *em = Core::EditorManager::instance();
em->openEditor(selection.internalData.toString());
em->ensureEditorManagerVisible();
}