2012-10-02 09:12:39 +02:00
|
|
|
/****************************************************************************
|
2011-02-23 15:16:34 +01:00
|
|
|
**
|
2016-01-15 14:57:40 +01:00
|
|
|
** Copyright (C) 2016 The Qt Company Ltd.
|
|
|
|
|
** Contact: https://www.qt.io/licensing/
|
2011-02-23 15:16:34 +01:00
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
** This file is part of Qt Creator.
|
2011-02-23 15:16:34 +01:00
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
** Commercial License Usage
|
|
|
|
|
** Licensees holding valid commercial Qt licenses may use this file in
|
|
|
|
|
** accordance with the commercial license agreement provided with the
|
|
|
|
|
** Software or, alternatively, in accordance with the terms contained in
|
2016-01-15 14:57:40 +01:00
|
|
|
** a written agreement between you and The Qt Company. For licensing terms
|
|
|
|
|
** and conditions see https://www.qt.io/terms-conditions. For further
|
|
|
|
|
** information use the contact form at https://www.qt.io/contact-us.
|
2011-02-23 15:16:34 +01:00
|
|
|
**
|
2016-01-15 14:57:40 +01:00
|
|
|
** GNU General Public License Usage
|
|
|
|
|
** Alternatively, this file may be used under the terms of the GNU
|
|
|
|
|
** General Public License version 3 as published by the Free Software
|
|
|
|
|
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
|
|
|
|
|
** included in the packaging of this file. Please review the following
|
|
|
|
|
** information to ensure the GNU General Public License requirements will
|
|
|
|
|
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
|
2011-02-23 15:16:34 +01:00
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
****************************************************************************/
|
2011-02-23 15:16:34 +01:00
|
|
|
|
2016-03-18 07:55:01 +01:00
|
|
|
#pragma once
|
2010-08-16 18:23:30 +02:00
|
|
|
|
|
|
|
|
#include <utils/wizard.h>
|
|
|
|
|
#include <utils/pathchooser.h>
|
|
|
|
|
|
2022-07-28 13:02:49 +02:00
|
|
|
#include <QCoreApplication>
|
|
|
|
|
|
2010-08-16 18:23:30 +02:00
|
|
|
QT_BEGIN_NAMESPACE
|
2022-07-28 13:02:49 +02:00
|
|
|
class QCheckBox;
|
|
|
|
|
class QComboBox;
|
|
|
|
|
class QGroupBox;
|
2010-08-16 18:23:30 +02:00
|
|
|
class QRadioButton;
|
|
|
|
|
class QLabel;
|
|
|
|
|
QT_END_NAMESPACE
|
|
|
|
|
|
2022-07-28 13:02:49 +02:00
|
|
|
namespace Utils { class PathChooser; }
|
|
|
|
|
|
|
|
|
|
namespace QmakeProjectManager::Internal {
|
2010-08-16 18:23:30 +02:00
|
|
|
|
|
|
|
|
class LibraryDetailsController;
|
|
|
|
|
class LibraryTypePage;
|
|
|
|
|
class DetailsPage;
|
|
|
|
|
class SummaryPage;
|
|
|
|
|
|
2022-07-28 13:02:49 +02:00
|
|
|
class LibraryDetailsWidget
|
|
|
|
|
{
|
|
|
|
|
Q_DECLARE_TR_FUNCTIONS(QmakeProjectManager::Internal::LibraryDetailsWidget)
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
explicit LibraryDetailsWidget(QWidget *parent);
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
QGroupBox *platformGroupBox;
|
|
|
|
|
QGroupBox *linkageGroupBox;
|
|
|
|
|
QGroupBox *macGroupBox;
|
|
|
|
|
QGroupBox *winGroupBox;
|
|
|
|
|
|
|
|
|
|
Utils::PathChooser *includePathChooser;
|
|
|
|
|
QLineEdit *packageLineEdit;
|
|
|
|
|
Utils::PathChooser *libraryPathChooser;
|
|
|
|
|
QComboBox *libraryComboBox;
|
|
|
|
|
QComboBox *libraryTypeComboBox;
|
|
|
|
|
QLabel *libraryLabel;
|
|
|
|
|
QLabel *libraryFileLabel;
|
|
|
|
|
QLabel *libraryTypeLabel;
|
|
|
|
|
QLabel *packageLabel;
|
|
|
|
|
QLabel *includeLabel;
|
|
|
|
|
QCheckBox *linCheckBox;
|
|
|
|
|
QCheckBox *macCheckBox;
|
|
|
|
|
QCheckBox *winCheckBox;
|
|
|
|
|
QRadioButton *dynamicRadio;
|
|
|
|
|
QRadioButton *staticRadio;
|
|
|
|
|
QRadioButton *libraryRadio;
|
|
|
|
|
QRadioButton *frameworkRadio;
|
|
|
|
|
QCheckBox *useSubfoldersCheckBox;
|
|
|
|
|
QCheckBox *addSuffixCheckBox;
|
|
|
|
|
QCheckBox *removeSuffixCheckBox;
|
|
|
|
|
};
|
2010-08-16 18:23:30 +02:00
|
|
|
|
|
|
|
|
class AddLibraryWizard : public Utils::Wizard
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
public:
|
|
|
|
|
enum LibraryKind {
|
2010-11-10 12:50:02 +01:00
|
|
|
InternalLibrary,
|
2010-08-16 18:23:30 +02:00
|
|
|
ExternalLibrary,
|
2010-11-10 12:50:02 +01:00
|
|
|
SystemLibrary,
|
|
|
|
|
PackageLibrary
|
2010-08-16 18:23:30 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
enum LinkageType {
|
|
|
|
|
DynamicLinkage,
|
|
|
|
|
StaticLinkage,
|
|
|
|
|
NoLinkage
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
enum MacLibraryType {
|
|
|
|
|
FrameworkType,
|
|
|
|
|
LibraryType,
|
|
|
|
|
NoLibraryType
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
enum Platform {
|
|
|
|
|
LinuxPlatform = 0x01,
|
|
|
|
|
MacPlatform = 0x02,
|
2013-10-22 11:10:08 +02:00
|
|
|
WindowsMinGWPlatform = 0x04,
|
|
|
|
|
WindowsMSVCPlatform = 0x08
|
2010-08-16 18:23:30 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
Q_DECLARE_FLAGS(Platforms, Platform)
|
|
|
|
|
|
2021-09-30 13:09:18 +02:00
|
|
|
explicit AddLibraryWizard(const Utils::FilePath &proFile, QWidget *parent = nullptr);
|
2018-07-23 00:39:48 +02:00
|
|
|
~AddLibraryWizard() override;
|
2010-08-16 18:23:30 +02:00
|
|
|
|
|
|
|
|
LibraryKind libraryKind() const;
|
2021-09-30 13:09:18 +02:00
|
|
|
Utils::FilePath proFile() const;
|
2010-08-16 18:23:30 +02:00
|
|
|
QString snippet() const;
|
|
|
|
|
|
|
|
|
|
private:
|
2015-06-18 15:14:06 +02:00
|
|
|
LibraryTypePage *m_libraryTypePage = nullptr;
|
|
|
|
|
DetailsPage *m_detailsPage = nullptr;
|
|
|
|
|
SummaryPage *m_summaryPage = nullptr;
|
2021-09-30 13:09:18 +02:00
|
|
|
Utils::FilePath m_proFile;
|
2010-08-16 18:23:30 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
class LibraryTypePage : public QWizardPage
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
public:
|
|
|
|
|
LibraryTypePage(AddLibraryWizard *parent);
|
|
|
|
|
AddLibraryWizard::LibraryKind libraryKind() const;
|
|
|
|
|
|
|
|
|
|
private:
|
2015-06-18 15:14:06 +02:00
|
|
|
QRadioButton *m_internalRadio = nullptr;
|
|
|
|
|
QRadioButton *m_externalRadio = nullptr;
|
|
|
|
|
QRadioButton *m_systemRadio = nullptr;
|
|
|
|
|
QRadioButton *m_packageRadio = nullptr;
|
2010-08-16 18:23:30 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
class DetailsPage : public QWizardPage
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
public:
|
|
|
|
|
DetailsPage(AddLibraryWizard *parent);
|
2018-07-23 00:39:48 +02:00
|
|
|
void initializePage() override;
|
|
|
|
|
bool isComplete() const override;
|
2010-08-16 18:23:30 +02:00
|
|
|
QString snippet() const;
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
AddLibraryWizard *m_libraryWizard;
|
2022-07-28 13:02:49 +02:00
|
|
|
LibraryDetailsWidget *m_libraryDetailsWidget = nullptr;
|
2015-06-18 15:14:06 +02:00
|
|
|
LibraryDetailsController *m_libraryDetailsController = nullptr;
|
2010-08-16 18:23:30 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
class SummaryPage : public QWizardPage
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
public:
|
|
|
|
|
SummaryPage(AddLibraryWizard *parent);
|
2018-07-23 00:39:48 +02:00
|
|
|
void initializePage() override;
|
2010-08-16 18:23:30 +02:00
|
|
|
QString snippet() const;
|
|
|
|
|
private:
|
2015-06-18 15:14:06 +02:00
|
|
|
AddLibraryWizard *m_libraryWizard = nullptr;
|
|
|
|
|
QLabel *m_summaryLabel = nullptr;
|
|
|
|
|
QLabel *m_snippetLabel = nullptr;
|
2010-08-16 18:23:30 +02:00
|
|
|
QString m_snippet;
|
|
|
|
|
};
|
|
|
|
|
|
2022-07-28 13:02:49 +02:00
|
|
|
} // QmakeProjectManager::Internal
|
2019-05-15 08:57:53 +03:00
|
|
|
|
|
|
|
|
Q_DECLARE_OPERATORS_FOR_FLAGS(QmakeProjectManager::Internal::AddLibraryWizard::Platforms)
|