2012-10-02 09:12:39 +02:00
|
|
|
/****************************************************************************
|
2011-03-02 15:01:17 +01:00
|
|
|
**
|
2016-01-15 14:57:40 +01:00
|
|
|
** Copyright (C) 2016 The Qt Company Ltd.
|
|
|
|
|
** Contact: https://www.qt.io/licensing/
|
2011-03-02 15:01:17 +01:00
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
** This file is part of Qt Creator.
|
2011-03-02 15:01:17 +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-03-02 15:01:17 +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-03-02 15:01:17 +01:00
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
****************************************************************************/
|
2011-03-02 15:01:17 +01:00
|
|
|
|
2013-08-13 10:52:57 +02:00
|
|
|
#ifndef TARGETSETUPWIDGET_H
|
|
|
|
|
#define TARGETSETUPWIDGET_H
|
2011-03-02 15:01:17 +01:00
|
|
|
|
2013-08-13 10:52:57 +02:00
|
|
|
#include "projectexplorer_export.h"
|
2011-03-02 15:01:17 +01:00
|
|
|
|
2013-08-13 10:52:57 +02:00
|
|
|
#include "buildinfo.h"
|
|
|
|
|
#include "task.h"
|
2012-04-24 15:49:09 +02:00
|
|
|
|
2012-02-15 10:42:41 +01:00
|
|
|
#include <QWidget>
|
2011-03-02 15:01:17 +01:00
|
|
|
|
2012-04-24 15:49:09 +02:00
|
|
|
QT_BEGIN_NAMESPACE
|
|
|
|
|
class QCheckBox;
|
|
|
|
|
class QHBoxLayout;
|
|
|
|
|
class QGridLayout;
|
|
|
|
|
class QLabel;
|
|
|
|
|
class QPushButton;
|
|
|
|
|
class QSpacerItem;
|
|
|
|
|
QT_END_NAMESPACE
|
|
|
|
|
|
|
|
|
|
namespace Utils {
|
|
|
|
|
class DetailsWidget;
|
|
|
|
|
class PathChooser;
|
|
|
|
|
} // namespace Utils
|
2012-02-24 17:17:49 +01:00
|
|
|
|
2013-08-13 10:52:57 +02:00
|
|
|
namespace ProjectExplorer {
|
|
|
|
|
class BuildInfo;
|
|
|
|
|
class Kit;
|
2011-03-02 15:01:17 +01:00
|
|
|
|
2013-08-13 10:52:57 +02:00
|
|
|
namespace Internal {
|
|
|
|
|
|
|
|
|
|
class TargetSetupWidget : public QWidget
|
2011-03-02 15:01:17 +01:00
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
public:
|
2013-08-13 10:52:57 +02:00
|
|
|
TargetSetupWidget(Kit *k,
|
|
|
|
|
const QString &projectPath,
|
|
|
|
|
const QList<BuildInfo *> &infoList);
|
|
|
|
|
~TargetSetupWidget();
|
2012-02-24 17:17:49 +01:00
|
|
|
|
2013-08-13 10:52:57 +02:00
|
|
|
Kit *kit();
|
2012-09-04 15:27:10 +02:00
|
|
|
void clearKit();
|
2012-04-24 15:49:09 +02:00
|
|
|
|
2012-09-03 18:31:44 +02:00
|
|
|
bool isKitSelected() const;
|
|
|
|
|
void setKitSelected(bool b);
|
2012-04-24 15:49:09 +02:00
|
|
|
|
2013-08-13 10:52:57 +02:00
|
|
|
void addBuildInfo(BuildInfo *info, bool isImport);
|
2012-02-24 17:17:49 +01:00
|
|
|
|
2013-08-13 10:52:57 +02:00
|
|
|
QList<const BuildInfo *> selectedBuildInfoList() const;
|
|
|
|
|
void setProjectPath(const QString &projectPath);
|
2014-03-18 17:45:11 +01:00
|
|
|
void expandWidget();
|
2011-03-02 15:01:17 +01:00
|
|
|
|
|
|
|
|
signals:
|
|
|
|
|
void selectedToggled() const;
|
2012-04-24 15:49:09 +02:00
|
|
|
|
2016-01-29 16:38:37 +02:00
|
|
|
private:
|
2012-09-03 18:31:44 +02:00
|
|
|
void handleKitUpdate(ProjectExplorer::Kit *k);
|
2012-04-24 15:49:09 +02:00
|
|
|
|
|
|
|
|
void checkBoxToggled(bool b);
|
|
|
|
|
void pathChanged();
|
|
|
|
|
void targetCheckBoxToggled(bool b);
|
2012-09-03 18:31:44 +02:00
|
|
|
void manageKit();
|
2012-04-24 15:49:09 +02:00
|
|
|
|
|
|
|
|
void reportIssues(int index);
|
2013-08-13 10:52:57 +02:00
|
|
|
QPair<Task::TaskType, QString> findIssues(const BuildInfo *info);
|
2012-04-24 15:49:09 +02:00
|
|
|
void clear();
|
|
|
|
|
|
2013-08-13 10:52:57 +02:00
|
|
|
Kit *m_kit;
|
|
|
|
|
QString m_projectPath;
|
2012-04-24 15:49:09 +02:00
|
|
|
bool m_haveImported;
|
|
|
|
|
Utils::DetailsWidget *m_detailsWidget;
|
|
|
|
|
QPushButton *m_manageButton;
|
|
|
|
|
QGridLayout *m_newBuildsLayout;
|
|
|
|
|
QList<QCheckBox *> m_checkboxes;
|
|
|
|
|
QList<Utils::PathChooser *> m_pathChoosers;
|
2013-08-13 10:52:57 +02:00
|
|
|
QList<BuildInfo *> m_infoList;
|
2012-04-24 15:49:09 +02:00
|
|
|
QList<bool> m_enabled;
|
|
|
|
|
QList<QLabel *> m_reportIssuesLabels;
|
|
|
|
|
QList<bool> m_issues;
|
|
|
|
|
bool m_ignoreChange;
|
|
|
|
|
int m_selected; // Number of selected buildconfiguartions
|
2011-03-02 15:01:17 +01:00
|
|
|
};
|
|
|
|
|
|
2013-08-13 10:52:57 +02:00
|
|
|
} // namespace Internal
|
|
|
|
|
} // namespace ProjectExplorer
|
2011-03-02 15:01:17 +01:00
|
|
|
|
2013-08-13 10:52:57 +02:00
|
|
|
#endif // TARGETSETUPWIDGET_H
|