2012-10-02 09:12:39 +02:00
|
|
|
/****************************************************************************
|
2010-11-01 14:14:17 +01:00
|
|
|
**
|
2016-01-15 14:57:40 +01:00
|
|
|
** Copyright (C) 2016 The Qt Company Ltd.
|
|
|
|
|
** Contact: https://www.qt.io/licensing/
|
2010-11-01 14:14:17 +01:00
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
** This file is part of Qt Creator.
|
2010-11-01 14:14: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.
|
2010-11-01 14:14: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.
|
2010-12-17 17:14:20 +01:00
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
****************************************************************************/
|
2010-11-01 14:14:17 +01:00
|
|
|
|
2011-02-01 18:36:00 +01:00
|
|
|
#ifndef TOOLCHAINCONFIGWIDGET_H
|
|
|
|
|
#define TOOLCHAINCONFIGWIDGET_H
|
|
|
|
|
|
|
|
|
|
#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;
|
|
|
|
|
class QGridLayout;
|
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:
|
2014-10-13 22:37:28 +03:00
|
|
|
ToolChainConfigWidget(ToolChain *);
|
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();
|
|
|
|
|
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;
|
|
|
|
|
QLabel *m_errorLabel;
|
2010-11-01 14:14:17 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // namespace ProjectExplorer
|
|
|
|
|
|
2011-02-01 18:36:00 +01:00
|
|
|
#endif // TOOLCHAINCONFIGWIDGET_H
|