diff options
author | hjk <hjk121@nokiamail.com> | 2013-09-20 15:12:44 +0200 |
---|---|---|
committer | hjk <hjk121@nokiamail.com> | 2013-09-24 09:57:32 +0200 |
commit | 49d0789e641e118dd412d3094e1f121f6ddfcb86 (patch) | |
tree | 8c19f6d76670e4c097edc44338b2b9813ebb0cb9 /src/plugins/glsleditor/glsleditorplugin.cpp | |
parent | aa32c2be87f7192e03f06b8b5223100354e269a6 (diff) |
Cleanup IWizard interface and users
Added 639 lines, removed 1391.
Change-Id: I15ec7dd056d4f7ad79c6dd6a4181007ad14f6a43
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Diffstat (limited to 'src/plugins/glsleditor/glsleditorplugin.cpp')
-rw-r--r-- | src/plugins/glsleditor/glsleditorplugin.cpp | 62 |
1 files changed, 36 insertions, 26 deletions
diff --git a/src/plugins/glsleditor/glsleditorplugin.cpp b/src/plugins/glsleditor/glsleditorplugin.cpp index f2a457b9fd5..43b30df3053 100644 --- a/src/plugins/glsleditor/glsleditorplugin.cpp +++ b/src/plugins/glsleditor/glsleditorplugin.cpp @@ -178,48 +178,58 @@ bool GLSLEditorPlugin::initialize(const QStringList & /*arguments*/, QString *er FileIconProvider::registerIconOverlayForMimeType(":/glsleditor/images/glslfile.png", Constants::GLSL_MIMETYPE_VERT_ES); FileIconProvider::registerIconOverlayForMimeType(":/glsleditor/images/glslfile.png", Constants::GLSL_MIMETYPE_FRAG_ES); - QObject *core = ICore::instance(); - BaseFileWizardParameters fragWizardParameters(IWizard::FileWizard); - fragWizardParameters.setCategory(QLatin1String(Constants::WIZARD_CATEGORY_GLSL)); - fragWizardParameters.setDisplayCategory(QCoreApplication::translate("GLSLEditor", Constants::WIZARD_TR_CATEGORY_GLSL)); - fragWizardParameters.setDescription + IWizard *wizard = new GLSLFileWizard(GLSLFileWizard::FragmentShaderES); + wizard->setWizardKind(IWizard::FileWizard); + wizard->setCategory(QLatin1String(Constants::WIZARD_CATEGORY_GLSL)); + wizard->setDisplayCategory(QCoreApplication::translate("GLSLEditor", Constants::WIZARD_TR_CATEGORY_GLSL)); + wizard->setDescription (tr("Creates a fragment shader in the OpenGL/ES 2.0 Shading " "Language (GLSL/ES). Fragment shaders generate the final " "pixel colors for triangles, points and lines rendered " "with OpenGL.")); - fragWizardParameters.setDisplayName(tr("Fragment Shader (OpenGL/ES 2.0)")); - fragWizardParameters.setId(QLatin1String("F.GLSL")); - addAutoReleasedObject(new GLSLFileWizard(fragWizardParameters, GLSLFileWizard::FragmentShaderES, core)); - - BaseFileWizardParameters vertWizardParameters(IWizard::FileWizard); - vertWizardParameters.setCategory(QLatin1String(Constants::WIZARD_CATEGORY_GLSL)); - vertWizardParameters.setDisplayCategory(QCoreApplication::translate("GLSLEditor", Constants::WIZARD_TR_CATEGORY_GLSL)); - vertWizardParameters.setDescription + wizard->setDisplayName(tr("Fragment Shader (OpenGL/ES 2.0)")); + wizard->setId(QLatin1String("F.GLSL")); + addAutoReleasedObject(wizard); + + wizard = new GLSLFileWizard(GLSLFileWizard::VertexShaderES); + wizard->setWizardKind(IWizard::FileWizard); + wizard->setCategory(QLatin1String(Constants::WIZARD_CATEGORY_GLSL)); + wizard->setDisplayCategory(QCoreApplication::translate("GLSLEditor", Constants::WIZARD_TR_CATEGORY_GLSL)); + wizard->setDescription (tr("Creates a vertex shader in the OpenGL/ES 2.0 Shading " "Language (GLSL/ES). Vertex shaders transform the " "positions, normals and texture co-ordinates of " "triangles, points and lines rendered with OpenGL.")); - vertWizardParameters.setDisplayName(tr("Vertex Shader (OpenGL/ES 2.0)")); - vertWizardParameters.setId(QLatin1String("G.GLSL")); - addAutoReleasedObject(new GLSLFileWizard(vertWizardParameters, GLSLFileWizard::VertexShaderES, core)); - - fragWizardParameters.setDescription + wizard->setDisplayName(tr("Vertex Shader (OpenGL/ES 2.0)")); + wizard->setId(QLatin1String("G.GLSL")); + addAutoReleasedObject(wizard); + + wizard = new GLSLFileWizard(GLSLFileWizard::FragmentShaderDesktop); + wizard->setWizardKind(IWizard::FileWizard); + wizard->setCategory(QLatin1String(Constants::WIZARD_CATEGORY_GLSL)); + wizard->setDisplayCategory(QCoreApplication::translate("GLSLEditor", Constants::WIZARD_TR_CATEGORY_GLSL)); + wizard->setDescription (tr("Creates a fragment shader in the Desktop OpenGL Shading " "Language (GLSL). Fragment shaders generate the final " "pixel colors for triangles, points and lines rendered " "with OpenGL.")); - fragWizardParameters.setDisplayName(tr("Fragment Shader (Desktop OpenGL)")); - fragWizardParameters.setId(QLatin1String("J.GLSL")); - addAutoReleasedObject(new GLSLFileWizard(fragWizardParameters, GLSLFileWizard::FragmentShaderDesktop, core)); - - vertWizardParameters.setDescription + wizard->setDisplayName(tr("Fragment Shader (Desktop OpenGL)")); + wizard->setId(QLatin1String("J.GLSL")); + addAutoReleasedObject(wizard); + + wizard = new GLSLFileWizard(GLSLFileWizard::VertexShaderDesktop); + wizard->setWizardKind(IWizard::FileWizard); + wizard->setCategory(QLatin1String(Constants::WIZARD_CATEGORY_GLSL)); + wizard->setDisplayCategory(QCoreApplication::translate("GLSLEditor", Constants::WIZARD_TR_CATEGORY_GLSL)); + wizard->setDescription (tr("Creates a vertex shader in the Desktop OpenGL Shading " "Language (GLSL). Vertex shaders transform the " "positions, normals and texture co-ordinates of " "triangles, points and lines rendered with OpenGL.")); - vertWizardParameters.setDisplayName(tr("Vertex Shader (Desktop OpenGL)")); - vertWizardParameters.setId(QLatin1String("K.GLSL")); - addAutoReleasedObject(new GLSLFileWizard(vertWizardParameters, GLSLFileWizard::VertexShaderDesktop, core)); + wizard->setDisplayName(tr("Vertex Shader (Desktop OpenGL)")); + wizard->setId(QLatin1String("K.GLSL")); + addAutoReleasedObject(wizard); + addAutoReleasedObject(new GLSLHighlighterFactory); return true; |