OSDN Git Service

Get rid of virtual generatedProjectFilePath()
[qt-creator-jp/qt-creator-jp.git] / src / plugins / projectexplorer / projectfilewizardextension.h
1 /**************************************************************************
2 **
3 ** This file is part of Qt Creator
4 **
5 ** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
6 **
7 ** Contact: Nokia Corporation (qt-info@nokia.com)
8 **
9 ** Commercial Usage
10 **
11 ** Licensees holding valid Qt Commercial licenses may use this file in
12 ** accordance with the Qt Commercial License Agreement provided with the
13 ** Software or, alternatively, in accordance with the terms contained in
14 ** a written agreement between you and Nokia.
15 **
16 ** GNU Lesser General Public License Usage
17 **
18 ** Alternatively, this file may be used under the terms of the GNU Lesser
19 ** General Public License version 2.1 as published by the Free Software
20 ** Foundation and appearing in the file LICENSE.LGPL included in the
21 ** packaging of this file.  Please review the following information to
22 ** ensure the GNU Lesser General Public License version 2.1 requirements
23 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
24 **
25 ** If you are unsure which license is appropriate for your use, please
26 ** contact the sales department at http://qt.nokia.com/contact.
27 **
28 **************************************************************************/
29
30 #ifndef PROJECTFILEWIZARDEXTENSION2_H
31 #define PROJECTFILEWIZARDEXTENSION2_H
32
33 #include <coreplugin/ifilewizardextension.h>
34
35 namespace ProjectExplorer {
36
37 namespace Internal {
38
39 struct ProjectWizardContext;
40
41 /* Final file wizard processing steps:
42  * 1) Add to a project file (*.pri/ *.pro)
43  * 2) Initialize a version control repository (unless the path is already
44  *    managed) and do 'add' if the VCS supports it.  */
45 class ProjectFileWizardExtension : public Core::IFileWizardExtension
46 {
47     Q_OBJECT
48 public:
49     explicit ProjectFileWizardExtension();
50     virtual ~ProjectFileWizardExtension();
51
52     virtual QList<QWizardPage *> extensionPages(const Core::IWizard *wizard);
53     virtual bool process(const QList<Core::GeneratedFile> &files,
54                          bool *removeOpenProjectAttribute, QString *errorMessage);
55
56 public slots:
57     virtual void firstExtensionPageShown(const QList<Core::GeneratedFile> &files);
58
59 private:
60     void initProjectChoices(const QString &generatedProjectFilePath);
61     void initializeVersionControlChoices();
62     bool processProject(const QList<Core::GeneratedFile> &files,
63                         bool *removeOpenProjectAttribute, QString *errorMessage);
64     bool processVersionControl(const QList<Core::GeneratedFile> &files, QString *errorMessage);
65
66     ProjectWizardContext *m_context;
67 };
68
69 } // namespace Internal
70 } // namespace ProjectExplorer
71
72 #endif // PROJECTFILEWIZARDEXTENSION2_H