OSDN Git Service

Get rid of virtual generatedProjectFilePath()
[qt-creator-jp/qt-creator-jp.git] / src / plugins / genericprojectmanager / genericprojectwizard.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 GENERICPROJECTWIZARD_H
31 #define GENERICPROJECTWIZARD_H
32
33 #include <coreplugin/basefilewizard.h>
34 #include <utils/wizard.h>
35
36 QT_BEGIN_NAMESPACE
37 class QFileInfo;
38 class QDir;
39 QT_END_NAMESPACE
40
41 namespace Utils {
42
43 class FileWizardPage;
44
45 } // namespace Utils
46
47 namespace GenericProjectManager {
48 namespace Internal {
49
50     class GenericProjectWizardDialog : public Utils::Wizard
51 {
52     Q_OBJECT
53
54 public:
55     GenericProjectWizardDialog(QWidget *parent = 0);
56     virtual ~GenericProjectWizardDialog();
57
58     QString path() const;
59     void setPath(const QString &path);
60
61     QString projectName() const;
62
63     Utils::FileWizardPage *m_firstPage;
64 };
65
66 class GenericProjectWizard : public Core::BaseFileWizard
67 {
68     Q_OBJECT
69
70 public:
71     GenericProjectWizard();
72     virtual ~GenericProjectWizard();
73
74     static Core::BaseFileWizardParameters parameters();
75
76 protected:
77     virtual QWizard *createWizardDialog(QWidget *parent,
78                                         const QString &defaultPath,
79                                         const WizardPageList &extensionPages) const;
80
81     virtual Core::GeneratedFiles generateFiles(const QWizard *w,
82                                                QString *errorMessage) const;
83
84     virtual bool postGenerateFiles(const QWizard *w, const Core::GeneratedFiles &l, QString *errorMessage);
85
86     bool isValidDir(const QFileInfo &fileInfo) const;
87
88     void getFileList(const QDir &dir, const QString &projectRoot,
89                      const QStringList &suffixes,
90                      QStringList *files,
91                      QStringList *paths) const;
92 };
93
94 } // end of namespace Internal
95 } // end of namespace GenericProjectManager
96
97 #endif // GENERICPROJECTWIZARD_H