forked from qt-creator/qt-creator
Vcs: Add method to create a Wizard to the WizardFactory and use it
Implement it in all VCS that support this type of wizard Change-Id: I78b0e4a37e6bf6b25d8cee4b1e96bcc76188047a Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -48,6 +48,11 @@ CheckoutWizardFactory::CheckoutWizardFactory()
|
||||
setDisplayName(tr("CVS Checkout"));
|
||||
}
|
||||
|
||||
VcsBase::BaseCheckoutWizard *CheckoutWizardFactory::create(const QList<QWizardPage *> ¶meterPages, QWidget *parent) const
|
||||
{
|
||||
return new CheckoutWizard(parameterPages, parent);
|
||||
}
|
||||
|
||||
QList<QWizardPage*> CheckoutWizardFactory::createParameterPages(const QString &path)
|
||||
{
|
||||
QList<QWizardPage*> rc;
|
||||
@@ -81,5 +86,13 @@ VcsBase::Command *CheckoutWizardFactory::createCommand(const QList<QWizardPage*>
|
||||
return command;
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
// CheckoutWizard:
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
CheckoutWizard::CheckoutWizard(const QList<QWizardPage *> ¶meterPages, QWidget *parent) :
|
||||
VcsBase::BaseCheckoutWizard(parameterPages, parent)
|
||||
{ }
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Cvs
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
#define CHECKOUTWIZARD_H
|
||||
|
||||
#include <vcsbase/basecheckoutwizardfactory.h>
|
||||
#include <vcsbase/basecheckoutwizard.h>
|
||||
|
||||
namespace Cvs {
|
||||
namespace Internal {
|
||||
@@ -42,6 +43,8 @@ class CheckoutWizardFactory : public VcsBase::BaseCheckoutWizardFactory
|
||||
public:
|
||||
CheckoutWizardFactory();
|
||||
|
||||
VcsBase::BaseCheckoutWizard *create(const QList<QWizardPage *> ¶meterPages, QWidget *parent = 0) const;
|
||||
|
||||
private:
|
||||
// BaseCheckoutWizard
|
||||
QList<QWizardPage*> createParameterPages(const QString &path);
|
||||
@@ -49,6 +52,14 @@ private:
|
||||
QString *checkoutPath);
|
||||
};
|
||||
|
||||
class CheckoutWizard : public VcsBase::BaseCheckoutWizard
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
CheckoutWizard(const QList<QWizardPage *> ¶meterPages, QWidget *parent = 0);
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Cvs
|
||||
|
||||
|
||||
Reference in New Issue
Block a user