OSDN Git Service

3fdb0e2fd62390f36bd1fcb24752a6727ae1a111
[qt-creator-jp/qt-creator-jp.git] / src / plugins / projectexplorer / publishing / ipublishingwizardfactory.h
1 /**************************************************************************
2 **
3 ** This file is part of Qt Creator
4 **
5 ** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
6 **
7 ** Contact: Nokia Corporation (qt-info@nokia.com)
8 **
9 ** No Commercial Usage
10 **
11 ** This file contains pre-release code and may not be distributed.
12 ** You may use this file in accordance with the terms and conditions
13 ** contained in the Technology Preview License Agreement accompanying
14 ** this package.
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 ** In addition, as a special exception, Nokia gives you certain additional
26 ** rights.  These rights are described in the Nokia Qt LGPL Exception
27 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
28 **
29 ** If you have questions regarding the use of this file, please contact
30 ** Nokia at qt-info@nokia.com.
31 **
32 **************************************************************************/
33 #ifndef IPUBLISHING_WIZARD_FACTORY_H
34 #define IPUBLISHING_WIZARD_FACTORY_H
35
36 #include <projectexplorer/projectexplorer_export.h>
37
38 #include <extensionsystem/pluginmanager.h>
39
40 #include <QtCore/QList>
41 #include <QtGui/QWizard>
42
43 namespace ProjectExplorer {
44 class Project;
45
46 /*!
47   \class ProjectExplorer::IPublishingWizardFactory
48
49   \brief Provides an interface for creating wizards to publish a project.
50
51   A class implementing this interface is used to create an associated wizard
52   that allows users to publish their project to a remote facility, e.g. an
53   app store.
54   Such a wizard would typically transform the project's content into
55   a form expected by that facility ("packaging") and also upload it, if possible.
56
57   The factory objects have to be added to the global object pool via
58   \c ExtensionSystem::PluginManager::addObject().
59   \sa ExtensionSystem::PluginManager::addObject()
60 */
61
62 class PROJECTEXPLORER_EXPORT IPublishingWizardFactory : public QObject
63 {
64     Q_OBJECT
65     Q_DISABLE_COPY(IPublishingWizardFactory)
66 public:
67     /*!
68       A short, one-line description of the type of wizard that this
69       factory can create.
70     */
71     virtual QString displayName() const=0;
72
73     /*!
74       A longer description explaining the exact purpose of the wizard
75       created by this factory.
76     */
77     virtual QString description() const=0;
78
79     /*!
80       Returns true iff the type of wizard that this factory can create
81       is available for the given project.
82     */
83     virtual bool canCreateWizard(const Project *project) const=0;
84
85     /*!
86       Creates a wizard that can publish the given project.
87       Behavior is undefined if canCreateWizard() returns false for
88       that project.
89       \return The newly created publishing wizard
90       \sa canCreateWizard()
91     */
92     virtual QWizard *createWizard(const Project *project) const=0;
93
94 protected:
95     IPublishingWizardFactory(QObject *parent = 0) : QObject(parent) {}
96 };
97
98 } // namespace ProjectExplorer
99
100 #endif // IPUBLISHING_WIZARD_FACTORY_H