当前位置: 首页>>代码示例>>C++>>正文


C++ EditorManager::openEditor方法代码示例

本文整理汇总了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;
}
开发者ID:HiroyukiSeki,项目名称:qtplatz,代码行数:7,代码来源:sequenceeditorfactory.cpp

示例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;
}
开发者ID:pitservise,项目名称:ananas-creator,代码行数:7,代码来源:documenteditorplugin.cpp

示例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;
}
开发者ID:renatofilho,项目名称:QtCreator,代码行数:9,代码来源:genericprojectfileseditor.cpp

示例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
}
开发者ID:steveire,项目名称:GammaRay,代码行数:20,代码来源:qmlprofilertool.cpp

示例5: accept

void BaseFileFilter::accept(Locator::FilterEntry selection) const
{
    Core::EditorManager *em = Core::EditorManager::instance();
    em->openEditor(selection.internalData.toString(), QString(), Core::EditorManager::ModeSwitch);
}
开发者ID:anchowee,项目名称:QtCreator,代码行数:5,代码来源:basefilefilter.cpp

示例6: accept

void BaseFileFilter::accept(QuickOpen::FilterEntry selection) const
{
    Core::EditorManager *em = Core::EditorManager::instance();
    em->openEditor(selection.internalData.toString());
    em->ensureEditorManagerVisible();
}
开发者ID:pitservise,项目名称:ananas-creator,代码行数:6,代码来源:basefilefilter.cpp


注:本文中的core::EditorManager::openEditor方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。