3 // Note: this file has been copied from the Qt source.
4 // Those classes are normally used internally in Qt
5 // but we need them for immitate the roll-over effect of QComboBox.
7 // Some class definitions have been moved from qeffects.cpp to this file.
8 // They are framed with the comment "MOVED FROM qeffect.cpp"
10 /****************************************************************************
11 ** $Id: qt/qeffects_p.h 3.3.4 edited May 27 2003 $
13 ** Definition of QEffects functions
17 ** Copyright (C) 2000 Trolltech AS. All rights reserved.
19 ** This file is part of the widgets module of the Qt GUI Toolkit.
21 ** This file may be distributed under the terms of the Q Public License
22 ** as defined by Trolltech AS of Norway and appearing in the file
23 ** LICENSE.QPL included in the packaging of this file.
25 ** This file may be distributed and/or modified under the terms of the
26 ** GNU General Public License version 2 as published by the Free Software
27 ** Foundation and appearing in the file LICENSE.GPL included in the
28 ** packaging of this file.
30 ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
31 ** licenses may use this file in accordance with the Qt Commercial License
32 ** Agreement provided with the Software.
34 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
35 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
37 ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
38 ** information about Qt Commercial License Agreements.
39 ** See http://www.trolltech.com/qpl/ for QPL licensing information.
40 ** See http://www.trolltech.com/gpl/ for GPL licensing information.
42 ** Contact info@trolltech.com if any conditions of this licensing are
45 **********************************************************************/
55 // This file is not part of the Qt API. It exists for the convenience
56 // of qeffects.cpp, qcombobox.cpp, qpopupmenu.cpp and qtooltip.cpp.
57 // This header file may change from version to version without notice,
58 // or even be removed.
65 #include "qnamespace.h"
80 typedef uint DirFlags
;
83 extern void Q_EXPORT
qScrollEffect( QWidget
*, QEffects::DirFlags dir
= QEffects::DownScroll
, int time
= -1 );
84 extern void Q_EXPORT
qFadeEffect( QWidget
*, int time
= -1 );
87 /******************* MOVED FROM qeffect.cpp: */
89 #include "qguardedptr.h"
90 #include "qdatetime.h"
96 Internal class to get access to protected QWidget-members
99 class QAccessWidget
: public QWidget
101 friend class QAlphaWidget
;
102 friend class QRollEffect
;
104 QAccessWidget( QWidget
* parent
=0, const char* name
=0, WFlags f
= 0 )
105 : QWidget( parent
, name
, f
) {}
109 Internal class QAlphaWidget.
111 The QAlphaWidget is shown while the animation lasts
112 and displays the pixmap resulting from the alpha blending.
115 class QAlphaWidget
: public QWidget
, private QEffects
119 QAlphaWidget( QWidget
* w
, WFlags f
= 0 );
121 void run( int time
);
124 void paintEvent( QPaintEvent
* e
);
125 void closeEvent( QCloseEvent
* );
126 bool eventFilter( QObject
* o
, QEvent
* e
);
138 QGuardedPtr
<QAccessWidget
> widget
;
147 Internal class QRollEffect
149 The QRollEffect widget is shown while the animation lasts
150 and displays a scrolling pixmap.
153 class QRollEffect
: public QWidget
, private QEffects
157 QRollEffect( QWidget
* w
, WFlags f
, DirFlags orient
);
159 void run( int time
);
162 void paintEvent( QPaintEvent
* );
163 bool eventFilter( QObject
*, QEvent
* );
164 void closeEvent( QCloseEvent
* );
170 QGuardedPtr
<QAccessWidget
> widget
;
189 /******************************/
191 #endif // QT_NO_EFFECTS
193 #endif // QEFFECTS_P_H