source: trunk/tools/shared/qtgradienteditor/qtgradientstopscontroller.h@ 890

Last change on this file since 890 was 846, checked in by Dmitry A. Kuminov, 14 years ago

trunk: Merged in qt 4.7.2 sources from branches/vendor/nokia/qt.

File size: 4.4 KB
RevLine 
[2]1/****************************************************************************
2**
[846]3** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
[561]4** All rights reserved.
5** Contact: Nokia Corporation ([email protected])
[2]6**
7** This file is part of the tools applications of the Qt Toolkit.
8**
9** $QT_BEGIN_LICENSE:LGPL$
10** Commercial Usage
11** Licensees holding valid Qt Commercial licenses may use this file in
12** accordance with the Qt Commercial License Agreement provided with the
13** Software or, alternatively, in accordance with the terms contained in
14** a written agreement between you and Nokia.
15**
16** GNU Lesser General Public License Usage
17** Alternatively, this file may be used under the terms of the GNU Lesser
18** General Public License version 2.1 as published by the Free Software
19** Foundation and appearing in the file LICENSE.LGPL included in the
20** packaging of this file. Please review the following information to
21** ensure the GNU Lesser General Public License version 2.1 requirements
22** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
23**
[561]24** In addition, as a special exception, Nokia gives you certain additional
25** rights. These rights are described in the Nokia Qt LGPL Exception
26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
[2]27**
28** GNU General Public License Usage
29** Alternatively, this file may be used under the terms of the GNU
30** General Public License version 3.0 as published by the Free Software
31** Foundation and appearing in the file LICENSE.GPL included in the
32** packaging of this file. Please review the following information to
33** ensure the GNU General Public License version 3.0 requirements will be
34** met: http://www.gnu.org/copyleft/gpl.html.
35**
[561]36** If you have questions regarding the use of this file, please contact
37** Nokia at [email protected].
[2]38** $QT_END_LICENSE$
39**
40****************************************************************************/
41
42#ifndef QTGRADIENTSTOPSCONTROLLER_H
43#define QTGRADIENTSTOPSCONTROLLER_H
44
45#include <QtGui/QWidget>
46
47QT_BEGIN_NAMESPACE
48
49namespace Ui {
50 class QtGradientEditor;
51}
52
53class QtGradientStopsController : public QObject
54{
55 Q_OBJECT
56public:
57 QtGradientStopsController(QObject *parent = 0);
58 ~QtGradientStopsController();
59
60 void setUi(Ui::QtGradientEditor *editor);
61
62 void setGradientStops(const QGradientStops &stops);
63 QGradientStops gradientStops() const;
64
65 QColor::Spec spec() const;
66 void setSpec(QColor::Spec spec);
67
68signals:
69
70 void gradientStopsChanged(const QGradientStops &stops);
71
72private:
[561]73 QScopedPointer<class QtGradientStopsControllerPrivate> d_ptr;
[2]74 Q_DECLARE_PRIVATE(QtGradientStopsController)
75 Q_DISABLE_COPY(QtGradientStopsController)
76 Q_PRIVATE_SLOT(d_func(), void slotHsvClicked())
77 Q_PRIVATE_SLOT(d_func(), void slotRgbClicked())
78 Q_PRIVATE_SLOT(d_func(), void slotCurrentStopChanged(QtGradientStop *stop))
79 Q_PRIVATE_SLOT(d_func(), void slotStopMoved(QtGradientStop *stop, qreal newPos))
80 Q_PRIVATE_SLOT(d_func(), void slotStopsSwapped(QtGradientStop *stop1, QtGradientStop *stop2))
81 Q_PRIVATE_SLOT(d_func(), void slotStopChanged(QtGradientStop *stop, const QColor &newColor))
82 Q_PRIVATE_SLOT(d_func(), void slotStopSelected(QtGradientStop *stop, bool selected))
83 Q_PRIVATE_SLOT(d_func(), void slotStopAdded(QtGradientStop *stop))
84 Q_PRIVATE_SLOT(d_func(), void slotStopRemoved(QtGradientStop *stop))
85 Q_PRIVATE_SLOT(d_func(), void slotUpdatePositionSpinBox())
86 Q_PRIVATE_SLOT(d_func(), void slotChangeColor(const QColor &color))
87 Q_PRIVATE_SLOT(d_func(), void slotChangeHue(const QColor &color))
88 Q_PRIVATE_SLOT(d_func(), void slotChangeSaturation(const QColor &color))
89 Q_PRIVATE_SLOT(d_func(), void slotChangeValue(const QColor &color))
90 Q_PRIVATE_SLOT(d_func(), void slotChangeAlpha(const QColor &color))
91 Q_PRIVATE_SLOT(d_func(), void slotChangeHue(int))
92 Q_PRIVATE_SLOT(d_func(), void slotChangeSaturation(int))
93 Q_PRIVATE_SLOT(d_func(), void slotChangeValue(int))
94 Q_PRIVATE_SLOT(d_func(), void slotChangeAlpha(int))
95 //Q_PRIVATE_SLOT(d_func(), void slotChangePosition(double newPos))
96 Q_PRIVATE_SLOT(d_func(), void slotChangePosition(double value))
97 Q_PRIVATE_SLOT(d_func(), void slotChangeZoom(int value))
98 Q_PRIVATE_SLOT(d_func(), void slotZoomIn())
99 Q_PRIVATE_SLOT(d_func(), void slotZoomOut())
100 Q_PRIVATE_SLOT(d_func(), void slotZoomAll())
101 Q_PRIVATE_SLOT(d_func(), void slotZoomChanged(double))
102};
103
104QT_END_NAMESPACE
105
106#endif
Note: See TracBrowser for help on using the repository browser.