2012-10-02 09:12:39 +02:00
|
|
|
/****************************************************************************
|
2011-02-10 20:58: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-02-10 20:58:17 +01:00
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
** This file is part of Qt Creator.
|
2011-02-10 20:58: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-02-10 20:58: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-02-10 20:58:17 +01:00
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
****************************************************************************/
|
2011-02-10 20:58:17 +01:00
|
|
|
|
2016-03-18 07:55:01 +01:00
|
|
|
#pragma once
|
2011-02-10 20:58:17 +01:00
|
|
|
|
|
|
|
|
#include "core_global.h"
|
|
|
|
|
|
2012-02-15 10:42:41 +01:00
|
|
|
#include <QWidget>
|
2011-08-17 12:54:58 +02:00
|
|
|
|
2014-10-20 23:13:13 +02:00
|
|
|
#include <utils/macroexpander.h>
|
2014-10-13 18:49:44 +02:00
|
|
|
#include <functional>
|
|
|
|
|
|
2011-02-10 20:58:17 +01:00
|
|
|
namespace Core {
|
|
|
|
|
|
2014-06-20 00:34:41 +02:00
|
|
|
namespace Internal { class VariableChooserPrivate; }
|
2011-11-24 13:00:01 +01:00
|
|
|
|
2011-02-10 20:58:17 +01:00
|
|
|
class CORE_EXPORT VariableChooser : public QWidget
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
explicit VariableChooser(QWidget *parent = 0);
|
2018-05-07 15:00:03 +02:00
|
|
|
~VariableChooser() override;
|
2011-02-10 20:58:17 +01:00
|
|
|
|
2014-10-20 23:13:13 +02:00
|
|
|
void addMacroExpanderProvider(const Utils::MacroExpanderProvider &provider);
|
2014-10-13 18:49:44 +02:00
|
|
|
void addSupportedWidget(QWidget *textcontrol, const QByteArray &ownName = QByteArray());
|
2013-03-28 11:05:35 +01:00
|
|
|
|
2014-11-05 16:10:09 +01:00
|
|
|
static void addSupportForChildWidgets(QWidget *parent, Utils::MacroExpander *expander);
|
|
|
|
|
|
2011-06-22 16:21:04 +02:00
|
|
|
protected:
|
2018-05-07 15:00:03 +02:00
|
|
|
bool event(QEvent *ev) override;
|
|
|
|
|
bool eventFilter(QObject *, QEvent *event) override;
|
2011-06-22 16:21:04 +02:00
|
|
|
|
2011-02-10 20:58:17 +01:00
|
|
|
private:
|
2014-06-20 00:34:41 +02:00
|
|
|
Internal::VariableChooserPrivate *d;
|
2011-02-10 20:58:17 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // namespace Core
|