コード例 #1
0
Core::IEditor *ProFileEditor::duplicate(QWidget *parent)
{
    ProFileEditorWidget *ret = new ProFileEditorWidget(parent, qobject_cast<ProFileEditorWidget*>(editorWidget())->factory(),
                                           qobject_cast<ProFileEditorWidget*>(editorWidget())->actionHandler());
    ret->duplicateFrom(editorWidget());
    TextEditor::TextEditorSettings::instance()->initializeEditor(ret);
    return ret->editor();
}
コード例 #2
0
Core::IEditor *ProFileEditorFactory::createEditor(QWidget *parent)
{
    ProFileEditorWidget *editor = new ProFileEditorWidget(parent, this, m_actionHandler);
    TextEditor::TextEditorSettings::instance()->initializeEditor(editor);
    return editor->editor();
}