baseprojectwizarddialog.h 3.28 KB
Newer Older
hjk's avatar
hjk committed
1
/****************************************************************************
2
**
3
** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
hjk's avatar
hjk committed
4
** Contact: http://www.qt-project.org/legal
5
**
hjk's avatar
hjk committed
6
** This file is part of Qt Creator.
7
**
hjk's avatar
hjk committed
8 9 10 11 12 13 14
** 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.
15 16
**
** GNU Lesser General Public License Usage
hjk's avatar
hjk committed
17 18 19 20 21 22 23 24 25
** 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
con's avatar
con committed
26 27
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
hjk's avatar
hjk committed
28
****************************************************************************/
29 30 31 32 33

#ifndef BASEPROJECTWIZARDDIALOG_H
#define BASEPROJECTWIZARDDIALOG_H

#include "projectexplorer_export.h"
Tobias Hunger's avatar
Tobias Hunger committed
34 35

#include <coreplugin/basefilewizard.h>
36
#include <coreplugin/basefilewizardfactory.h>
37

38
namespace Utils { class ProjectIntroPage; }
39 40 41 42 43

namespace ProjectExplorer {

struct BaseProjectWizardDialogPrivate;

44
// Documentation inside.
Tobias Hunger's avatar
Tobias Hunger committed
45
class PROJECTEXPLORER_EXPORT BaseProjectWizardDialog : public Core::BaseFileWizard
46 47 48 49
{
    Q_OBJECT

protected:
Tobias Hunger's avatar
Tobias Hunger committed
50
    explicit BaseProjectWizardDialog(Utils::ProjectIntroPage *introPage, int introId,
51
                                     QWidget *parent, const Core::WizardDialogParameters &parameters);
52 53

public:
54
    explicit BaseProjectWizardDialog(QWidget *parent, const Core::WizardDialogParameters &parameters);
55

56 57
    virtual ~BaseProjectWizardDialog();

58
    QString projectName() const;
59 60 61
    QString path() const;

    // Generate a new project name (untitled<n>) in path.
62
    static QString uniqueProjectName(const QString &path);
63
    void addExtensionPages(const QList<QWizardPage *> &wizardPageList);
64 65 66 67

public slots:
    void setIntroDescription(const QString &d);
    void setPath(const QString &path);
68
    void setProjectName(const QString &name);
69 70 71
    void setProjectList(const QStringList &projectList);
    void setProjectDirectories(const QStringList &directories);
    void setForceSubProject(bool force);
72

73
signals:
74
    void projectParametersChanged(const QString &projectName, const QString &path);
75

76 77
protected:
    Utils::ProjectIntroPage *introPage() const;
78 79 80 81 82
    QString selectedPlatform() const;
    void setSelectedPlatform(const QString &platform);

    Core::FeatureSet requiredFeatures() const;
    void setRequiredFeatures(const Core::FeatureSet &featureSet);
83 84 85

private slots:
    void slotAccepted();
86
    void nextClicked();
87 88 89 90 91 92 93 94 95 96

private:
    void init();

    BaseProjectWizardDialogPrivate *d;
};

} // namespace ProjectExplorer

#endif // BASEPROJECTWIZARDDIALOG_H