Qt 4.8
Classes | Functions
qeffects_p.h File Reference
#include "QtCore/qnamespace.h"

Go to the source code of this file.

Classes

struct  QEffects
 

Functions

void Q_GUI_EXPORT qFadeEffect (QWidget *, int time=-1)
 Fade in widget w in time ms. More...
 
void Q_GUI_EXPORT qScrollEffect (QWidget *, QEffects::DirFlags dir=QEffects::DownScroll, int time=-1)
 Scroll widget w in time ms. More...
 

Function Documentation

◆ qFadeEffect()

void Q_GUI_EXPORT qFadeEffect ( QWidget ,
int  time = -1 
)

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 Q_GUI_EXPORT 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