2022-08-19 15:59:36 +02:00
|
|
|
// Copyright (C) 2016 The Qt Company Ltd.
|
|
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0
|
2008-12-02 16:19:05 +01:00
|
|
|
|
2016-02-02 18:26:51 +01:00
|
|
|
#pragma once
|
2008-12-02 12:01:29 +01:00
|
|
|
|
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>
|
2016-06-24 09:36:42 +02:00
|
|
|
#include <utils/treemodel.h>
|
2008-12-02 12:01:29 +01:00
|
|
|
|
2014-05-13 13:06:30 +02:00
|
|
|
QT_BEGIN_NAMESPACE
|
2022-08-18 15:42:54 +02:00
|
|
|
class QComboBox;
|
|
|
|
|
class QLabel;
|
|
|
|
|
class QPushButton;
|
2014-05-14 07:34:36 +02:00
|
|
|
class QModelIndex;
|
2014-05-13 13:06:30 +02:00
|
|
|
QT_END_NAMESPACE
|
|
|
|
|
|
2022-08-18 15:42:54 +02:00
|
|
|
namespace Utils { class TreeViewComboBox; }
|
2014-07-11 14:42:23 +02:00
|
|
|
namespace Core { class IVersionControl; }
|
|
|
|
|
|
2008-12-02 12:01:29 +01:00
|
|
|
namespace ProjectExplorer {
|
|
|
|
|
namespace Internal {
|
2015-01-07 23:59:29 +01:00
|
|
|
|
2014-05-13 13:06:30 +02:00
|
|
|
class AddNewTree;
|
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:
|
2016-04-13 15:52:14 +02:00
|
|
|
explicit ProjectWizardPage(QWidget *parent = nullptr);
|
2016-02-02 18:26:51 +01:00
|
|
|
~ProjectWizardPage() override;
|
2008-12-02 12:01:29 +01:00
|
|
|
|
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);
|
2014-11-10 13:54:01 +01:00
|
|
|
Core::IVersionControl *currentVersionControl();
|
2008-12-02 12:01:29 +01:00
|
|
|
|
2010-01-12 16:45:21 +01:00
|
|
|
// Returns the common path
|
2022-06-17 17:10:51 +02:00
|
|
|
void setFiles(const Utils::FilePaths &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);
|
|
|
|
|
|
2021-08-09 14:03:54 +02:00
|
|
|
void initializeProjectTree(Node *context, const Utils::FilePaths &paths,
|
2014-07-14 15:56:21 +02:00
|
|
|
Core::IWizardFactory::WizardKind kind,
|
2014-10-13 22:37:28 +03:00
|
|
|
ProjectAction action);
|
2014-07-14 15:56:21 +02:00
|
|
|
|
2016-06-01 23:03:46 +03:00
|
|
|
void initializeVersionControls();
|
|
|
|
|
void setProjectUiVisible(bool visible);
|
|
|
|
|
|
2014-09-29 16:06:24 +02:00
|
|
|
signals:
|
|
|
|
|
void projectNodeChanged();
|
2014-11-10 13:54:01 +01:00
|
|
|
void versionControlChanged(int);
|
2014-09-29 16:06:24 +02:00
|
|
|
|
2016-01-29 16:38:37 +02:00
|
|
|
private:
|
2014-11-10 13:54:01 +01:00
|
|
|
void projectChanged(int);
|
|
|
|
|
void manageVcs();
|
2015-06-30 14:14:16 +02:00
|
|
|
void hideVersionControlUiElements();
|
2010-03-15 15:37:08 +01:00
|
|
|
|
2014-07-14 15:56:21 +02:00
|
|
|
void setAdditionalInfo(const QString &text);
|
|
|
|
|
void setAddingSubProject(bool addingSubProject);
|
|
|
|
|
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
|
|
|
|
|
|
|
|
QStringList m_projectToolTips;
|
2017-03-17 12:26:00 +01:00
|
|
|
Utils::TreeModel<> m_model;
|
2014-07-11 14:42:23 +02:00
|
|
|
|
|
|
|
|
QList<Core::IVersionControl*> m_activeVersionControls;
|
2022-06-17 17:10:51 +02:00
|
|
|
Utils::FilePath m_commonDirectory;
|
2016-04-13 15:52:14 +02:00
|
|
|
bool m_repositoryExists = false;
|
2022-08-18 15:42:54 +02:00
|
|
|
|
|
|
|
|
QLabel *m_projectLabel;
|
|
|
|
|
Utils::TreeViewComboBox *m_projectComboBox;
|
|
|
|
|
QLabel *m_additionalInfo;
|
|
|
|
|
QLabel *m_addToVersionControlLabel;
|
|
|
|
|
QComboBox *m_addToVersionControlComboBox;
|
|
|
|
|
QPushButton *m_vcsManageButton;
|
|
|
|
|
QLabel *m_filesLabel;
|
2008-12-02 12:01:29 +01:00
|
|
|
};
|
|
|
|
|
|
2008-12-02 16:19:05 +01:00
|
|
|
} // namespace Internal
|
|
|
|
|
} // namespace ProjectExplorer
|