TextEditor: Factory cosmetics

Pimpl, add some convenience setters.

Change-Id: I525c080179fddab6fe2bd2270505fdbf33e56be2
Reviewed-by: David Schulz <david.schulz@digia.com>
This commit is contained in:
hjk
2014-10-15 00:36:39 +02:00
parent 9ee73a4fac
commit eacaf93a59
9 changed files with 126 additions and 103 deletions

View File

@@ -45,26 +45,6 @@ using namespace TextEditor;
namespace PythonEditor {
namespace Internal {
//
// PythonEditorWidget
//
class PythonEditorWidget : public TextEditorWidget
{
public:
PythonEditorWidget()
{
setParenthesesMatchingEnabled(true);
setMarksVisible(true);
setCodeFoldingSupported(true);
}
};
//
// PythonEditorFactory
//
PythonEditorFactory::PythonEditorFactory()
{
setId(Constants::C_PYTHONEDITOR_ID);
@@ -76,10 +56,12 @@ PythonEditorFactory::PythonEditorFactory()
| TextEditorActionHandler::UnCollapseAll);
setDocumentCreator([]() { return new TextDocument(Constants::C_PYTHONEDITOR_ID); });
setEditorWidgetCreator([]() { return new PythonEditorWidget; });
setIndenterCreator([]() { return new PythonIndenter; });
setSyntaxHighlighterCreator([]() { return new PythonHighlighter; });
setCommentStyle(Utils::CommentDefinition::HashStyle);
setParenthesesMatchingEnabled(true);
setMarksVisible(true);
setCodeFoldingSupported(true);
}
} // namespace Internal