Commit 06abd3b5 authored by Kai Koehne's avatar Kai Koehne
Browse files

Renaming Qml wizards

Unify names to QmlProjectApplicationWizard & QmlProjectImportWizard
parent 2440bfc5
......@@ -27,7 +27,7 @@
**
**************************************************************************/
#include "qmlnewprojectwizard.h"
#include "qmlprojectapplicationwizard.h"
#include "qmlprojectconstants.h"
......@@ -40,21 +40,21 @@
namespace QmlProjectManager {
namespace Internal {
QmlNewProjectWizardDialog::QmlNewProjectWizardDialog(QWidget *parent) :
QmlProjectApplicationWizardDialog::QmlProjectApplicationWizardDialog(QWidget *parent) :
ProjectExplorer::BaseProjectWizardDialog(parent)
{
setWindowTitle(tr("New QML Project"));
setIntroDescription(tr("This wizard generates a QML application project."));
}
QmlNewProjectWizard::QmlNewProjectWizard()
QmlProjectApplicationWizard::QmlProjectApplicationWizard()
: Core::BaseFileWizard(parameters())
{ }
QmlNewProjectWizard::~QmlNewProjectWizard()
QmlProjectApplicationWizard::~QmlProjectApplicationWizard()
{ }
Core::BaseFileWizardParameters QmlNewProjectWizard::parameters()
Core::BaseFileWizardParameters QmlProjectApplicationWizard::parameters()
{
Core::BaseFileWizardParameters parameters(ProjectWizard);
parameters.setIcon(QIcon(QLatin1String(":/wizards/images/console.png")));
......@@ -67,14 +67,14 @@ Core::BaseFileWizardParameters QmlNewProjectWizard::parameters()
return parameters;
}
QWizard *QmlNewProjectWizard::createWizardDialog(QWidget *parent,
QWizard *QmlProjectApplicationWizard::createWizardDialog(QWidget *parent,
const QString &defaultPath,
const WizardPageList &extensionPages) const
{
QmlNewProjectWizardDialog *wizard = new QmlNewProjectWizardDialog(parent);
QmlProjectApplicationWizardDialog *wizard = new QmlProjectApplicationWizardDialog(parent);
wizard->setPath(defaultPath);
wizard->setProjectName(QmlNewProjectWizardDialog::uniqueProjectName(defaultPath));
wizard->setProjectName(QmlProjectApplicationWizardDialog::uniqueProjectName(defaultPath));
foreach (QWizardPage *p, extensionPages)
wizard->addPage(p);
......@@ -82,12 +82,12 @@ QWizard *QmlNewProjectWizard::createWizardDialog(QWidget *parent,
return wizard;
}
Core::GeneratedFiles QmlNewProjectWizard::generateFiles(const QWizard *w,
Core::GeneratedFiles QmlProjectApplicationWizard::generateFiles(const QWizard *w,
QString *errorMessage) const
{
Q_UNUSED(errorMessage)
const QmlNewProjectWizardDialog *wizard = qobject_cast<const QmlNewProjectWizardDialog *>(w);
const QmlProjectApplicationWizardDialog *wizard = qobject_cast<const QmlProjectApplicationWizardDialog *>(w);
const QString projectName = wizard->projectName();
const QString projectPath = wizard->path() + QLatin1Char('/') + projectName;
......@@ -154,7 +154,7 @@ Core::GeneratedFiles QmlNewProjectWizard::generateFiles(const QWizard *w,
return files;
}
bool QmlNewProjectWizard::postGenerateFiles(const Core::GeneratedFiles &l, QString *errorMessage)
bool QmlProjectApplicationWizard::postGenerateFiles(const Core::GeneratedFiles &l, QString *errorMessage)
{
// Post-Generate: Open the project
const QString proFileName = l.back().path();
......
......@@ -27,8 +27,8 @@
**
**************************************************************************/
#ifndef QMLNEWPROJECTWIZARD_H
#define QMLNEWPROJECTWIZARD_H
#ifndef QMLPROJECTAPPLICATIONWIZARD_H
#define QMLPROJECTAPPLICATIONWIZARD_H
#include <coreplugin/basefilewizard.h>
#include <projectexplorer/baseprojectwizarddialog.h>
......@@ -44,20 +44,20 @@ class ProjectIntroPage;
namespace QmlProjectManager {
namespace Internal {
class QmlNewProjectWizardDialog : public ProjectExplorer::BaseProjectWizardDialog
class QmlProjectApplicationWizardDialog : public ProjectExplorer::BaseProjectWizardDialog
{
Q_OBJECT
public:
explicit QmlNewProjectWizardDialog(QWidget *parent = 0);
explicit QmlProjectApplicationWizardDialog(QWidget *parent = 0);
};
class QmlNewProjectWizard : public Core::BaseFileWizard
class QmlProjectApplicationWizard : public Core::BaseFileWizard
{
Q_OBJECT
public:
QmlNewProjectWizard();
virtual ~QmlNewProjectWizard();
QmlProjectApplicationWizard();
virtual ~QmlProjectApplicationWizard();
static Core::BaseFileWizardParameters parameters();
......@@ -75,4 +75,4 @@ protected:
} // end of namespace Internal
} // end of namespace QmlProjectManager
#endif // QMLNEWPROJECTWIZARD_H
#endif // QMLPROJECTAPPLICATIONWIZARD_H
......@@ -27,7 +27,7 @@
**
**************************************************************************/
#include "qmlprojectwizard.h"
#include "qmlprojectimportwizard.h"
#include "qmlprojectconstants.h"
......@@ -50,10 +50,10 @@ namespace QmlProjectManager {
namespace Internal {
//////////////////////////////////////////////////////////////////////////////
// QmlProjectWizardDialog
// QmlProjectImportWizardDialog
//////////////////////////////////////////////////////////////////////////////
QmlProjectWizardDialog::QmlProjectWizardDialog(QWidget *parent)
QmlProjectImportWizardDialog::QmlProjectImportWizardDialog(QWidget *parent)
: QWizard(parent)
{
setWindowTitle(tr("Import of QML Project"));
......@@ -67,32 +67,36 @@ QmlProjectWizardDialog::QmlProjectWizardDialog(QWidget *parent)
addPage(m_firstPage);
}
QmlProjectWizardDialog::~QmlProjectWizardDialog()
QmlProjectImportWizardDialog::~QmlProjectImportWizardDialog()
{ }
QString QmlProjectWizardDialog::path() const
QString QmlProjectImportWizardDialog::path() const
{
return m_firstPage->path();
}
void QmlProjectWizardDialog::setPath(const QString &path)
void QmlProjectImportWizardDialog::setPath(const QString &path)
{
m_firstPage->setPath(path);
}
QString QmlProjectWizardDialog::projectName() const
QString QmlProjectImportWizardDialog::projectName() const
{
return m_firstPage->fileName();
}
QmlProjectWizard::QmlProjectWizard()
//////////////////////////////////////////////////////////////////////////////
// QmlProjectImportWizard
//////////////////////////////////////////////////////////////////////////////
QmlProjectImportWizard::QmlProjectImportWizard()
: Core::BaseFileWizard(parameters())
{ }
QmlProjectWizard::~QmlProjectWizard()
QmlProjectImportWizard::~QmlProjectImportWizard()
{ }
Core::BaseFileWizardParameters QmlProjectWizard::parameters()
Core::BaseFileWizardParameters QmlProjectImportWizard::parameters()
{
Core::BaseFileWizardParameters parameters(ProjectWizard);
parameters.setIcon(QIcon(QLatin1String(":/wizards/images/console.png")));
......@@ -105,11 +109,11 @@ Core::BaseFileWizardParameters QmlProjectWizard::parameters()
return parameters;
}
QWizard *QmlProjectWizard::createWizardDialog(QWidget *parent,
QWizard *QmlProjectImportWizard::createWizardDialog(QWidget *parent,
const QString &defaultPath,
const WizardPageList &extensionPages) const
{
QmlProjectWizardDialog *wizard = new QmlProjectWizardDialog(parent);
QmlProjectImportWizardDialog *wizard = new QmlProjectImportWizardDialog(parent);
setupWizard(wizard);
wizard->setPath(defaultPath);
......@@ -120,12 +124,12 @@ QWizard *QmlProjectWizard::createWizardDialog(QWidget *parent,
return wizard;
}
Core::GeneratedFiles QmlProjectWizard::generateFiles(const QWizard *w,
Core::GeneratedFiles QmlProjectImportWizard::generateFiles(const QWizard *w,
QString *errorMessage) const
{
Q_UNUSED(errorMessage)
const QmlProjectWizardDialog *wizard = qobject_cast<const QmlProjectWizardDialog *>(w);
const QmlProjectImportWizardDialog *wizard = qobject_cast<const QmlProjectImportWizardDialog *>(w);
const QString projectPath = wizard->path();
const QDir dir(projectPath);
const QString projectName = wizard->projectName();
......@@ -166,7 +170,7 @@ Core::GeneratedFiles QmlProjectWizard::generateFiles(const QWizard *w,
return files;
}
bool QmlProjectWizard::postGenerateFiles(const Core::GeneratedFiles &l, QString *errorMessage)
bool QmlProjectImportWizard::postGenerateFiles(const Core::GeneratedFiles &l, QString *errorMessage)
{
// Post-Generate: Open the project
const QString proFileName = l.back().path();
......
......@@ -27,8 +27,8 @@
**
**************************************************************************/
#ifndef QMLPROJECTWIZARD_H
#define QMLPROJECTWIZARD_H
#ifndef QMLPROJECTIMPORTWIZARD_H
#define QMLPROJECTIMPORTWIZARD_H
#include <coreplugin/basefilewizard.h>
......@@ -48,13 +48,13 @@ class FileWizardPage;
namespace QmlProjectManager {
namespace Internal {
class QmlProjectWizardDialog : public QWizard
class QmlProjectImportWizardDialog : public QWizard
{
Q_OBJECT
public:
QmlProjectWizardDialog(QWidget *parent = 0);
virtual ~QmlProjectWizardDialog();
QmlProjectImportWizardDialog(QWidget *parent = 0);
virtual ~QmlProjectImportWizardDialog();
QString path() const;
void setPath(const QString &path);
......@@ -65,13 +65,13 @@ private:
Utils::FileWizardPage *m_firstPage;
};
class QmlProjectWizard : public Core::BaseFileWizard
class QmlProjectImportWizard : public Core::BaseFileWizard
{
Q_OBJECT
public:
QmlProjectWizard();
virtual ~QmlProjectWizard();
QmlProjectImportWizard();
virtual ~QmlProjectImportWizard();
static Core::BaseFileWizardParameters parameters();
......@@ -89,4 +89,4 @@ protected:
} // end of namespace Internal
} // end of namespace QmlProjectManager
#endif // QMLPROJECTWIZARD_H
#endif // QMLPROJECTIMPORTWIZARD_H
......@@ -13,12 +13,12 @@ HEADERS += qmlproject.h \
qmlprojectmanager.h \
qmlprojectconstants.h \
qmlprojectnodes.h \
qmlprojectwizard.h \
qmlprojectimportwizard.h \
qmlprojectfile.h \
qmlprojectruncontrol.h \
qmlprojectrunconfiguration.h \
qmlprojectrunconfigurationfactory.h \
qmlnewprojectwizard.h \
qmlprojectapplicationwizard.h \
qmltaskmanager.h \
qmlprojectmanager_global.h \
qmlprojectmanagerconstants.h \
......@@ -27,12 +27,12 @@ SOURCES += qmlproject.cpp \
qmlprojectplugin.cpp \
qmlprojectmanager.cpp \
qmlprojectnodes.cpp \
qmlprojectwizard.cpp \
qmlprojectimportwizard.cpp \
qmlprojectfile.cpp \
qmlprojectruncontrol.cpp \
qmlprojectrunconfiguration.cpp \
qmlprojectrunconfigurationfactory.cpp \
qmlnewprojectwizard.cpp \
qmlprojectapplicationwizard.cpp \
qmltaskmanager.cpp \
qmlprojecttarget.cpp
RESOURCES += qmlproject.qrc
......
......@@ -29,8 +29,8 @@
#include "qmlprojectplugin.h"
#include "qmlprojectmanager.h"
#include "qmlprojectwizard.h"
#include "qmlnewprojectwizard.h"
#include "qmlprojectimportwizard.h"
#include "qmlprojectapplicationwizard.h"
#include "qmlprojectconstants.h"
#include "qmlproject.h"
#include "qmlprojectrunconfigurationfactory.h"
......@@ -79,8 +79,8 @@ bool QmlProjectPlugin::initialize(const QStringList &, QString *errorMessage)
addAutoReleasedObject(manager);
addAutoReleasedObject(new Internal::QmlProjectRunConfigurationFactory);
addAutoReleasedObject(new Internal::QmlRunControlFactory);
addAutoReleasedObject(new QmlNewProjectWizard);
addAutoReleasedObject(new QmlProjectWizard);
addAutoReleasedObject(new QmlProjectApplicationWizard);
addAutoReleasedObject(new QmlProjectImportWizard);
return true;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment