2012-10-02 09:12:39 +02:00
|
|
|
/****************************************************************************
|
2008-12-02 12:01:29 +01:00
|
|
|
**
|
2014-01-07 13:27:11 +01:00
|
|
|
** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
|
2012-10-02 09:12:39 +02:00
|
|
|
** Contact: http://www.qt-project.org/legal
|
2008-12-02 12:01:29 +01:00
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
** This file is part of Qt Creator.
|
2008-12-02 12:01:29 +01:00
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
** Commercial License Usage
|
|
|
|
|
** Licensees holding valid commercial Qt licenses may use this file in
|
|
|
|
|
** accordance with the commercial license agreement provided with the
|
|
|
|
|
** Software or, alternatively, in accordance with the terms contained in
|
|
|
|
|
** a written agreement between you and Digia. For licensing terms and
|
|
|
|
|
** conditions see http://qt.digia.com/licensing. For further information
|
|
|
|
|
** use the contact form at http://qt.digia.com/contact-us.
|
2008-12-02 14:17:16 +01:00
|
|
|
**
|
2009-02-25 09:15:00 +01:00
|
|
|
** GNU Lesser General Public License Usage
|
2012-10-02 09:12:39 +02:00
|
|
|
** Alternatively, this file may be used under the terms of the GNU Lesser
|
|
|
|
|
** General Public License version 2.1 as published by the Free Software
|
|
|
|
|
** Foundation and appearing in the file LICENSE.LGPL included in the
|
|
|
|
|
** packaging of this file. Please review the following information to
|
|
|
|
|
** ensure the GNU Lesser General Public License version 2.1 requirements
|
|
|
|
|
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
|
|
|
|
**
|
|
|
|
|
** In addition, as a special exception, Digia gives you certain additional
|
|
|
|
|
** rights. These rights are described in the Digia Qt LGPL Exception
|
2010-12-17 16:01:08 +01:00
|
|
|
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
|
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
****************************************************************************/
|
2008-12-02 16:19:05 +01:00
|
|
|
|
2008-12-02 12:01:29 +01:00
|
|
|
#ifndef PROJECTWIZARDPAGE_H
|
|
|
|
|
#define PROJECTWIZARDPAGE_H
|
|
|
|
|
|
2014-07-14 15:56:21 +02:00
|
|
|
#include "projectnodes.h"
|
|
|
|
|
|
2014-07-11 14:42:23 +02:00
|
|
|
#include <coreplugin/generatedfile.h>
|
2014-07-14 15:56:21 +02:00
|
|
|
#include <coreplugin/iwizardfactory.h>
|
2014-07-11 14:42:23 +02:00
|
|
|
|
2014-09-18 15:20:06 +02:00
|
|
|
#include <utils/wizardpage.h>
|
2008-12-02 12:01:29 +01:00
|
|
|
|
2014-05-13 13:06:30 +02:00
|
|
|
QT_BEGIN_NAMESPACE
|
|
|
|
|
class QTreeView;
|
2014-05-14 07:34:36 +02:00
|
|
|
class QModelIndex;
|
2014-05-13 13:06:30 +02:00
|
|
|
QT_END_NAMESPACE
|
|
|
|
|
|
2014-07-11 14:42:23 +02:00
|
|
|
namespace Core { class IVersionControl; }
|
|
|
|
|
|
2008-12-02 12:01:29 +01:00
|
|
|
namespace ProjectExplorer {
|
|
|
|
|
namespace Internal {
|
2014-05-13 13:06:30 +02:00
|
|
|
class AddNewModel;
|
|
|
|
|
class AddNewTree;
|
2008-12-02 12:01:29 +01:00
|
|
|
|
2014-02-11 21:55:42 +02:00
|
|
|
namespace Ui { class WizardPage; }
|
2008-12-02 12:01:29 +01:00
|
|
|
|
2011-04-14 12:58:14 +02:00
|
|
|
// Documentation inside.
|
2014-09-18 15:20:06 +02:00
|
|
|
class ProjectWizardPage : public Utils::WizardPage
|
2011-07-13 18:02:35 +02:00
|
|
|
{
|
2008-12-02 12:01:29 +01:00
|
|
|
Q_OBJECT
|
2011-07-13 18:02:35 +02:00
|
|
|
|
2008-12-02 12:01:29 +01:00
|
|
|
public:
|
|
|
|
|
explicit ProjectWizardPage(QWidget *parent = 0);
|
|
|
|
|
virtual ~ProjectWizardPage();
|
|
|
|
|
|
2014-05-13 13:06:30 +02:00
|
|
|
FolderNode *currentNode() const;
|
2008-12-02 12:01:29 +01:00
|
|
|
|
2010-08-24 17:17:11 +02:00
|
|
|
void setNoneLabel(const QString &label);
|
2008-12-02 12:01:29 +01:00
|
|
|
|
2010-01-12 16:45:21 +01:00
|
|
|
int versionControlIndex() const;
|
|
|
|
|
void setVersionControlIndex(int);
|
2008-12-02 12:01:29 +01:00
|
|
|
|
2010-01-12 16:45:21 +01:00
|
|
|
// Returns the common path
|
2014-07-11 14:42:23 +02:00
|
|
|
void setFiles(const QStringList &files);
|
2008-12-02 12:01:29 +01:00
|
|
|
|
2014-07-11 14:42:23 +02:00
|
|
|
bool runVersionControl(const QList<Core::GeneratedFile> &files, QString *errorMessage);
|
|
|
|
|
|
2014-07-14 15:56:21 +02:00
|
|
|
void initializeProjectTree(ProjectExplorer::Node *context, const QStringList &paths,
|
|
|
|
|
Core::IWizardFactory::WizardKind kind,
|
|
|
|
|
ProjectExplorer::ProjectAction action);
|
|
|
|
|
|
2014-07-11 14:42:23 +02:00
|
|
|
public slots:
|
|
|
|
|
void initializeVersionControls();
|
|
|
|
|
|
2010-03-15 15:37:08 +01:00
|
|
|
private slots:
|
|
|
|
|
void slotProjectChanged(int);
|
2011-04-15 16:39:22 +02:00
|
|
|
void slotManageVcs();
|
2010-03-15 15:37:08 +01:00
|
|
|
|
2008-12-02 12:01:29 +01:00
|
|
|
private:
|
2014-07-14 15:56:21 +02:00
|
|
|
void setAdditionalInfo(const QString &text);
|
|
|
|
|
void setAddingSubProject(bool addingSubProject);
|
|
|
|
|
void setModel(AddNewModel *model);
|
|
|
|
|
void setBestNode(ProjectExplorer::Internal::AddNewTree *tree);
|
2014-07-11 14:42:23 +02:00
|
|
|
void setVersionControls(const QStringList &);
|
2013-05-25 01:47:26 +02:00
|
|
|
void setProjectToolTip(const QString &);
|
2014-05-13 13:06:30 +02:00
|
|
|
bool expandTree(const QModelIndex &root);
|
2010-03-15 15:37:08 +01:00
|
|
|
|
2008-12-02 12:01:29 +01:00
|
|
|
Ui::WizardPage *m_ui;
|
2010-03-15 15:37:08 +01:00
|
|
|
QStringList m_projectToolTips;
|
2014-05-13 13:06:30 +02:00
|
|
|
AddNewModel *m_model;
|
2014-07-11 14:42:23 +02:00
|
|
|
|
|
|
|
|
QList<Core::IVersionControl*> m_activeVersionControls;
|
|
|
|
|
QString m_commonDirectory;
|
|
|
|
|
bool m_repositoryExists;
|
2008-12-02 12:01:29 +01:00
|
|
|
};
|
|
|
|
|
|
2008-12-02 16:19:05 +01:00
|
|
|
} // namespace Internal
|
|
|
|
|
} // namespace ProjectExplorer
|
2008-12-02 12:01:29 +01:00
|
|
|
|
|
|
|
|
#endif // PROJECTWIZARDPAGE_H
|