OSDN Git Service

Update license.
[qt-creator-jp/qt-creator-jp.git] / src / plugins / qt4projectmanager / addlibrarywizard.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 (info@qt.nokia.com)
8 **
9 **
10 ** GNU Lesser General Public License Usage
11 **
12 ** This file may be used under the terms of the GNU Lesser General Public
13 ** License version 2.1 as published by the Free Software Foundation and
14 ** appearing in the file LICENSE.LGPL included in the packaging of this file.
15 ** Please review the following information to ensure the GNU Lesser General
16 ** Public License version 2.1 requirements will be met:
17 ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
18 **
19 ** In addition, as a special exception, Nokia gives you certain additional
20 ** rights. These rights are described in the Nokia Qt LGPL Exception
21 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
22 **
23 ** Other Usage
24 **
25 ** Alternatively, this file may be used in accordance with the terms and
26 ** conditions contained in a signed written agreement between you and Nokia.
27 **
28 ** If you have questions regarding the use of this file, please contact
29 ** Nokia at qt-info@nokia.com.
30 **
31 **************************************************************************/
32
33 #ifndef ADDLIBRARYWIZARD_H
34 #define ADDLIBRARYWIZARD_H
35
36 #include <utils/wizard.h>
37 #include <utils/pathchooser.h>
38
39 QT_BEGIN_NAMESPACE
40 class QRadioButton;
41 class QCheckBox;
42 class QLabel;
43 QT_END_NAMESPACE
44
45 namespace Qt4ProjectManager {
46 namespace Internal {
47
48 class LibraryDetailsWidget;
49 class LibraryDetailsController;
50 class LibraryTypePage;
51 class DetailsPage;
52 class SummaryPage;
53
54 namespace Ui {
55     class LibraryDetailsWidget;
56 }
57
58 class AddLibraryWizard : public Utils::Wizard
59 {
60     Q_OBJECT
61 public:
62     enum LibraryKind {
63         InternalLibrary,
64         ExternalLibrary,
65         SystemLibrary,
66         PackageLibrary
67         };
68
69     enum LinkageType {
70         DynamicLinkage,
71         StaticLinkage,
72         NoLinkage
73         };
74
75     enum MacLibraryType {
76         FrameworkType,
77         LibraryType,
78         NoLibraryType
79         };
80
81     enum Platform {
82         LinuxPlatform   = 0x01,
83         MacPlatform     = 0x02,
84         WindowsPlatform = 0x04,
85         SymbianPlatform = 0x08
86         };
87
88     Q_DECLARE_FLAGS(Platforms, Platform)
89
90     explicit AddLibraryWizard(const QString &fileName, QWidget *parent = 0);
91     ~AddLibraryWizard();
92
93     LibraryKind libraryKind() const;
94     QString proFile() const;
95     QString snippet() const;
96
97 signals:
98
99 private:
100     LibraryTypePage *m_libraryTypePage;
101     DetailsPage *m_detailsPage;
102     SummaryPage *m_summaryPage;
103     QString m_proFile;
104 };
105
106 Q_DECLARE_OPERATORS_FOR_FLAGS(AddLibraryWizard::Platforms)
107
108 class LibraryTypePage : public QWizardPage
109 {
110     Q_OBJECT
111 public:
112     LibraryTypePage(AddLibraryWizard *parent);
113     AddLibraryWizard::LibraryKind libraryKind() const;
114
115 private:
116     QRadioButton *m_internalRadio;
117     QRadioButton *m_externalRadio;
118     QRadioButton *m_systemRadio;
119     QRadioButton *m_packageRadio;
120 };
121
122 class DetailsPage : public QWizardPage
123 {
124     Q_OBJECT
125 public:
126     DetailsPage(AddLibraryWizard *parent);
127     virtual void initializePage();
128     virtual bool isComplete() const;
129     QString snippet() const;
130
131 private:
132     AddLibraryWizard *m_libraryWizard;
133     Ui::LibraryDetailsWidget *m_libraryDetailsWidget;
134     LibraryDetailsController *m_libraryDetailsController;
135 };
136
137 class SummaryPage : public QWizardPage
138 {
139     Q_OBJECT
140 public:
141     SummaryPage(AddLibraryWizard *parent);
142     virtual void initializePage();
143     QString snippet() const;
144 private:
145     AddLibraryWizard *m_libraryWizard;
146     QLabel *m_summaryLabel;
147     QLabel *m_snippetLabel;
148     QString m_snippet;
149 };
150
151 class LibraryPathChooser : public Utils::PathChooser
152 {
153     Q_OBJECT
154 public:
155     LibraryPathChooser(QWidget *parent);
156     virtual bool validatePath(const QString &path, QString *errorMessage);
157 };
158
159
160 } // namespace Internal
161 } // namespace Qt4ProjectManager
162
163 #endif // ADDLIBRARYWIZARD_H