Qt 4.8
Classes | Functions | Variables
qeffects.cpp File Reference
#include "qapplication.h"
#include "qdesktopwidget.h"
#include "qeffects_p.h"
#include "qevent.h"
#include "qimage.h"
#include "qpainter.h"
#include "qpixmap.h"
#include "qpointer.h"
#include "qtimer.h"
#include "qelapsedtimer.h"
#include "qdebug.h"
#include "qeffects.moc"

Go to the source code of this file.

Classes

class  QAlphaWidget
 
class  QRollEffect
 

Functions

void qFadeEffect (QWidget *w, int time)
 Fade in widget w in time ms. More...
 
void qScrollEffect (QWidget *w, QEffects::DirFlags orient, int time)
 Scroll widget w in time ms. More...
 

Variables

static QAlphaWidgetq_blend = 0
 
static QRollEffectq_roll = 0
 

Function Documentation

◆ qFadeEffect()

void qFadeEffect ( QWidget w,
int  time 
)

Fade in widget w in time ms.

Definition at line 584 of file qeffects.cpp.

Referenced by QMenu::popup(), QMenuPrivate::setCurrentAction(), and QToolTip::showText().

585 {
586  if (q_blend) {
587  q_blend->deleteLater();
588  q_blend = 0;
589  }
590 
591  if (!w)
592  return;
593 
596 
597  Qt::WindowFlags flags = Qt::ToolTip;
598 
599  // those can be popups - they would steal the focus, but are disabled
600  q_blend = new QAlphaWidget(w, flags);
601 
602  q_blend->run(time);
603 }
static QAlphaWidget * q_blend
Definition: qeffects.cpp:96
static void sendPostedEvents()
void run(int time)
Definition: qeffects.cpp:134
void deleteLater()
Schedules this object for deletion.
Definition: qobject.cpp:2145

◆ qScrollEffect()

void qScrollEffect ( QWidget w,
QEffects::DirFlags  orient,
int  time 
)

Scroll widget w in time ms.

orient may be 1 (vertical), 2 (horizontal) or 3 (diagonal).

Definition at line 562 of file qeffects.cpp.

Referenced by QMenu::popup(), QMenuPrivate::setCurrentAction(), QComboBox::showPopup(), and QToolTip::showText().

563 {
564  if (q_roll) {
565  q_roll->deleteLater();
566  q_roll = 0;
567  }
568 
569  if (!w)
570  return;
571 
574  Qt::WindowFlags flags = Qt::ToolTip;
575 
576  // those can be popups - they would steal the focus, but are disabled
577  q_roll = new QRollEffect(w, flags, orient);
578  q_roll->run(time);
579 }
static QRollEffect * q_roll
Definition: qeffects.cpp:377
void run(int time)
Definition: qeffects.cpp:447
static void sendPostedEvents()
void deleteLater()
Schedules this object for deletion.
Definition: qobject.cpp:2145

Variable Documentation

◆ q_blend

QAlphaWidget* q_blend = 0
static

Definition at line 96 of file qeffects.cpp.

◆ q_roll

QRollEffect* q_roll = 0
static

Definition at line 377 of file qeffects.cpp.