1 /****************************************************************************
3 ** Copyright (C) 2006 Trolltech AS. All rights reserved.
5 ** This file is part of the documentation of Qt. It was originally
6 ** published as part of Qt Quarterly.
8 ** This file may be used under the terms of the GNU General Public License
9 ** version 2.0 as published by the Free Software Foundation or under the
10 ** terms of the Qt Commercial License Agreement. The respective license
11 ** texts for these are provided with the open source and commercial
14 ** If you are unsure which license is appropriate for your use, please
15 ** review the following information:
16 ** http://www.trolltech.com/products/qt/licensing.html or contact the
17 ** sales department at sales@trolltech.com.
19 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
20 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
22 ****************************************************************************/
31 class FaderWidget : public QWidget
34 Q_PROPERTY(QColor fadeColor READ fadeColor WRITE setFadeColor)
35 Q_PROPERTY(int fadeDuration READ fadeDuration WRITE setFadeDuration)
38 FaderWidget(QWidget *parent);
40 QColor fadeColor() const { return startColor; }
41 void setFadeColor(const QColor &newColor) { startColor = newColor; }
43 int fadeDuration() const { return duration; }
44 void setFadeDuration(int milliseconds) { duration = milliseconds; }
50 void done(QWidget *w);
53 void paintEvent(QPaintEvent *event);
57 QColor startColor, endColor;