2022-08-19 15:59:36 +02:00
|
|
|
// Copyright (C) 2016 The Qt Company Ltd.
|
|
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0
|
2010-11-01 14:14:17 +01:00
|
|
|
|
2016-02-02 18:26:51 +01:00
|
|
|
#pragma once
|
2011-02-01 18:36:00 +01:00
|
|
|
|
|
|
|
|
#include "projectexplorer_export.h"
|
|
|
|
|
|
2015-04-21 13:17:27 +02:00
|
|
|
#include <QScrollArea>
|
2010-11-01 14:14:17 +01:00
|
|
|
|
2012-07-17 14:03:45 +02:00
|
|
|
QT_BEGIN_NAMESPACE
|
|
|
|
|
class QFormLayout;
|
2012-08-16 15:59:10 +02:00
|
|
|
class QLineEdit;
|
2012-07-17 14:03:45 +02:00
|
|
|
class QLabel;
|
|
|
|
|
QT_END_NAMESPACE
|
2011-02-22 17:32:22 +01:00
|
|
|
|
2010-11-01 14:14:17 +01:00
|
|
|
namespace ProjectExplorer {
|
|
|
|
|
|
2011-02-01 18:36:00 +01:00
|
|
|
class ToolChain;
|
|
|
|
|
|
|
|
|
|
// --------------------------------------------------------------------------
|
|
|
|
|
// ToolChainConfigWidget
|
|
|
|
|
// --------------------------------------------------------------------------
|
|
|
|
|
|
2015-04-21 13:17:27 +02:00
|
|
|
class PROJECTEXPLORER_EXPORT ToolChainConfigWidget : public QScrollArea
|
2010-11-01 14:14:17 +01:00
|
|
|
{
|
2011-02-01 18:36:00 +01:00
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
public:
|
2016-02-02 18:26:51 +01:00
|
|
|
explicit ToolChainConfigWidget(ToolChain *tc);
|
2012-07-17 14:03:45 +02:00
|
|
|
|
2014-10-13 22:37:28 +03:00
|
|
|
ToolChain *toolChain() const;
|
2011-02-01 18:36:00 +01:00
|
|
|
|
2012-08-16 15:59:10 +02:00
|
|
|
void apply();
|
|
|
|
|
void discard();
|
|
|
|
|
bool isDirty() const;
|
|
|
|
|
void makeReadOnly();
|
2011-03-29 17:51:40 +02:00
|
|
|
|
2011-02-01 18:36:00 +01:00
|
|
|
signals:
|
2012-02-21 12:00:45 +01:00
|
|
|
void dirty();
|
2011-02-01 18:36:00 +01:00
|
|
|
|
2016-01-29 16:38:37 +02:00
|
|
|
protected:
|
2011-02-23 11:36:59 +01:00
|
|
|
void setErrorMessage(const QString &);
|
|
|
|
|
void clearErrorMessage();
|
2011-02-22 17:32:22 +01:00
|
|
|
|
2012-08-16 15:59:10 +02:00
|
|
|
virtual void applyImpl() = 0;
|
|
|
|
|
virtual void discardImpl() = 0;
|
|
|
|
|
virtual bool isDirtyImpl() const = 0;
|
|
|
|
|
virtual void makeReadOnlyImpl() = 0;
|
|
|
|
|
|
|
|
|
|
void addErrorLabel();
|
2020-05-19 14:06:08 +03:00
|
|
|
static QStringList splitString(const QString &s);
|
2012-08-16 15:59:10 +02:00
|
|
|
QFormLayout *m_mainLayout;
|
|
|
|
|
QLineEdit *m_nameLineEdit;
|
2011-02-22 17:32:22 +01:00
|
|
|
|
2011-02-01 18:36:00 +01:00
|
|
|
private:
|
2012-07-17 14:03:45 +02:00
|
|
|
ToolChain *m_toolChain;
|
2016-04-13 15:52:14 +02:00
|
|
|
QLabel *m_errorLabel = nullptr;
|
2010-11-01 14:14:17 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // namespace ProjectExplorer
|