Update QtColorButton copy to more recent Qt 5.6.3

Last version with LGPL 2.1

NO_CHANGELOG
parent 4b81fbd6
/**************************************************************************** /****************************************************************************
** Copied from Qt 5.6.3 sources, module qttools, directory src/shared/qtgradienteditor
** with small modifications to match more modern C++ standards and for no alpha-channel
** **
** Copied from Qt 4.6.0 sources, directory tools/shared/qtgradienteditor ** Copyright (C) 2015 The Qt Company Ltd.
** with small modifications to allow compilation with Qt 4.4 and Qt 5.0 ** Contact: http://www.qt.io/licensing/
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
** **
** This file is part of the tools applications of the Qt Toolkit. ** This file is part of the tools applications of the Qt Toolkit.
** **
** No Commercial Usage ** $QT_BEGIN_LICENSE:LGPL21$
** This file contains pre-release code and may not be distributed. ** Commercial License Usage
** You may use this file in accordance with the terms and conditions ** Licensees holding valid commercial Qt licenses may use this file in
** contained in the Technology Preview License Agreement accompanying ** accordance with the commercial license agreement provided with the
** this package. ** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see http://www.qt.io/terms-conditions. For further
** information use the contact form at http://www.qt.io/contact-us.
** **
** GNU Lesser General Public License Usage ** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser ** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software ** General Public License version 2.1 or version 3 as published by the Free
** Foundation and appearing in the file LICENSE.LGPL included in the ** Software Foundation and appearing in the file LICENSE.LGPLv21 and
** packaging of this file. Please review the following information to ** LICENSE.LGPLv3 included in the packaging of this file. Please review the
** ensure the GNU Lesser General Public License version 2.1 requirements ** following information to ensure the GNU Lesser General Public License
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
** **
** In addition, as a special exception, Nokia gives you certain additional ** As a special exception, The Qt Company gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception ** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
** **
** If you have questions regarding the use of this file, please contact ** $QT_END_LICENSE$
** Nokia at qt-info@nokia.com.
**
** **
****************************************************************************/ ****************************************************************************/
#include "qtcolorbutton.h" #include "qtcolorbutton.h"
#include <QColorDialog> #include <QColorDialog>
#include <QPainter> #include <QPainter>
#include <QMimeData> #include <QMimeData>
#include <QDrag>
#include <QDragEnterEvent> #include <QDragEnterEvent>
#include <QDrag>
#include <QApplication> #include <QApplication>
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
...@@ -127,7 +126,6 @@ QtColorButton::QtColorButton(QWidget *parent) ...@@ -127,7 +126,6 @@ QtColorButton::QtColorButton(QWidget *parent)
QtColorButton::~QtColorButton() QtColorButton::~QtColorButton()
{ {
delete d_ptr;
} }
void QtColorButton::setColor(const QColor &color) void QtColorButton::setColor(const QColor &color)
......
/**************************************************************************** /****************************************************************************
** Copied from Qt 5.6.3 sources, module qttools, directory src/shared/qtgradienteditor
** with small modifications to match more modern C++ standards and for no alpha-channel
** **
** Copied from Qt 4.6.0 sources, directory tools/shared/qtgradienteditor ** Copyright (C) 2015 The Qt Company Ltd.
** with small modifications to allow compilation with Qt 4.4 ** Contact: http://www.qt.io/licensing/
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
** **
** This file is part of the tools applications of the Qt Toolkit. ** This file is part of the tools applications of the Qt Toolkit.
** **
** No Commercial Usage ** $QT_BEGIN_LICENSE:LGPL21$
** This file contains pre-release code and may not be distributed. ** Commercial License Usage
** You may use this file in accordance with the terms and conditions ** Licensees holding valid commercial Qt licenses may use this file in
** contained in the Technology Preview License Agreement accompanying ** accordance with the commercial license agreement provided with the
** this package. ** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see http://www.qt.io/terms-conditions. For further
** information use the contact form at http://www.qt.io/contact-us.
** **
** GNU Lesser General Public License Usage ** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser ** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software ** General Public License version 2.1 or version 3 as published by the Free
** Foundation and appearing in the file LICENSE.LGPL included in the ** Software Foundation and appearing in the file LICENSE.LGPLv21 and
** packaging of this file. Please review the following information to ** LICENSE.LGPLv3 included in the packaging of this file. Please review the
** ensure the GNU Lesser General Public License version 2.1 requirements ** following information to ensure the GNU Lesser General Public License
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
** **
** In addition, as a special exception, Nokia gives you certain additional ** As a special exception, The Qt Company gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception ** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
** **
** If you have questions regarding the use of this file, please contact ** $QT_END_LICENSE$
** Nokia at qt-info@nokia.com.
** **
****************************************************************************/ ****************************************************************************/
...@@ -68,7 +69,7 @@ protected: ...@@ -68,7 +69,7 @@ protected:
void dropEvent(QDropEvent *event) override; void dropEvent(QDropEvent *event) override;
#endif #endif
private: private:
class QtColorButtonPrivate* d_ptr; QScopedPointer<class QtColorButtonPrivate> d_ptr;
Q_DECLARE_PRIVATE(QtColorButton) Q_DECLARE_PRIVATE(QtColorButton)
Q_DISABLE_COPY(QtColorButton) Q_DISABLE_COPY(QtColorButton)
Q_PRIVATE_SLOT(d_func(), void slotEditColor()) Q_PRIVATE_SLOT(d_func(), void slotEditColor())
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment