1 /**************************************************************************
3 ** This file is part of Qt Creator
5 ** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
7 ** Contact: Nokia Corporation (info@qt.nokia.com)
10 ** GNU Lesser General Public License Usage
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.
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.
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.
28 ** If you have questions regarding the use of this file, please contact
29 ** Nokia at qt-info@nokia.com.
31 **************************************************************************/
33 #ifndef ADDLIBRARYWIZARD_H
34 #define ADDLIBRARYWIZARD_H
36 #include <utils/wizard.h>
37 #include <utils/pathchooser.h>
45 namespace Qt4ProjectManager {
48 class LibraryDetailsWidget;
49 class LibraryDetailsController;
50 class LibraryTypePage;
55 class LibraryDetailsWidget;
58 class AddLibraryWizard : public Utils::Wizard
84 WindowsPlatform = 0x04,
85 SymbianPlatform = 0x08
88 Q_DECLARE_FLAGS(Platforms, Platform)
90 explicit AddLibraryWizard(const QString &fileName, QWidget *parent = 0);
93 LibraryKind libraryKind() const;
94 QString proFile() const;
95 QString snippet() const;
100 LibraryTypePage *m_libraryTypePage;
101 DetailsPage *m_detailsPage;
102 SummaryPage *m_summaryPage;
106 Q_DECLARE_OPERATORS_FOR_FLAGS(AddLibraryWizard::Platforms)
108 class LibraryTypePage : public QWizardPage
112 LibraryTypePage(AddLibraryWizard *parent);
113 AddLibraryWizard::LibraryKind libraryKind() const;
116 QRadioButton *m_internalRadio;
117 QRadioButton *m_externalRadio;
118 QRadioButton *m_systemRadio;
119 QRadioButton *m_packageRadio;
122 class DetailsPage : public QWizardPage
126 DetailsPage(AddLibraryWizard *parent);
127 virtual void initializePage();
128 virtual bool isComplete() const;
129 QString snippet() const;
132 AddLibraryWizard *m_libraryWizard;
133 Ui::LibraryDetailsWidget *m_libraryDetailsWidget;
134 LibraryDetailsController *m_libraryDetailsController;
137 class SummaryPage : public QWizardPage
141 SummaryPage(AddLibraryWizard *parent);
142 virtual void initializePage();
143 QString snippet() const;
145 AddLibraryWizard *m_libraryWizard;
146 QLabel *m_summaryLabel;
147 QLabel *m_snippetLabel;
151 class LibraryPathChooser : public Utils::PathChooser
155 LibraryPathChooser(QWidget *parent);
156 virtual bool validatePath(const QString &path, QString *errorMessage);
160 } // namespace Internal
161 } // namespace Qt4ProjectManager
163 #endif // ADDLIBRARYWIZARD_H