Qt 4.8
qeffects.cpp
Go to the documentation of this file.
1 /****************************************************************************
2 **
3 ** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
4 ** Contact: http://www.qt-project.org/legal
5 **
6 ** This file is part of the QtGui module of the Qt Toolkit.
7 **
8 ** $QT_BEGIN_LICENSE:LGPL$
9 ** Commercial License Usage
10 ** Licensees holding valid commercial Qt licenses may use this file in
11 ** accordance with the commercial license agreement provided with the
12 ** Software or, alternatively, in accordance with the terms contained in
13 ** a written agreement between you and Digia. For licensing terms and
14 ** conditions see http://qt.digia.com/licensing. For further information
15 ** use the contact form at http://qt.digia.com/contact-us.
16 **
17 ** GNU Lesser General Public License Usage
18 ** Alternatively, this file may be used under the terms of the GNU Lesser
19 ** General Public License version 2.1 as published by the Free Software
20 ** Foundation and appearing in the file LICENSE.LGPL included in the
21 ** packaging of this file. Please review the following information to
22 ** ensure the GNU Lesser General Public License version 2.1 requirements
23 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
24 **
25 ** In addition, as a special exception, Digia gives you certain additional
26 ** rights. These rights are described in the Digia Qt LGPL Exception
27 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
28 **
29 ** GNU General Public License Usage
30 ** Alternatively, this file may be used under the terms of the GNU
31 ** General Public License version 3.0 as published by the Free Software
32 ** Foundation and appearing in the file LICENSE.GPL included in the
33 ** packaging of this file. Please review the following information to
34 ** ensure the GNU General Public License version 3.0 requirements will be
35 ** met: http://www.gnu.org/copyleft/gpl.html.
36 **
37 **
38 ** $QT_END_LICENSE$
39 **
40 ****************************************************************************/
41 
42 #include "qapplication.h"
43 #ifndef QT_NO_EFFECTS
44 #include "qdesktopwidget.h"
45 #include "qeffects_p.h"
46 #include "qevent.h"
47 #include "qimage.h"
48 #include "qpainter.h"
49 #include "qpixmap.h"
50 #include "qpointer.h"
51 #include "qtimer.h"
52 #include "qelapsedtimer.h"
53 #include "qdebug.h"
54 
56 
57 /*
58  Internal class QAlphaWidget.
59 
60  The QAlphaWidget is shown while the animation lasts
61  and displays the pixmap resulting from the alpha blending.
62 */
63 
64 class QAlphaWidget: public QWidget, private QEffects
65 {
66  Q_OBJECT
67 public:
68  QAlphaWidget(QWidget* w, Qt::WindowFlags f = 0);
69  ~QAlphaWidget();
70 
71  void run(int time);
72 
73 protected:
74  void paintEvent(QPaintEvent* e);
75  void closeEvent(QCloseEvent*);
76  void alphaBlend();
77  bool eventFilter(QObject *, QEvent *);
78 
79 protected slots:
80  void render();
81 
82 private:
84  double alpha;
89  int duration;
90  int elapsed;
91  bool showWidget;
94 };
95 
96 static QAlphaWidget* q_blend = 0;
97 
98 /*
99  Constructs a QAlphaWidget.
100 */
101 QAlphaWidget::QAlphaWidget(QWidget* w, Qt::WindowFlags f)
102  : QWidget(QApplication::desktop()->screen(QApplication::desktop()->screenNumber(w)), f)
103 {
104 #ifndef Q_WS_WIN
105  setEnabled(false);
106 #endif
108  widget = w;
109  alpha = 0;
110 }
111 
113 {
114 #if defined(Q_WS_WIN) && !defined(Q_WS_WINCE)
115  // Restore user-defined opacity value
116  if (widget)
118 #endif
119 }
120 
121 /*
122  \reimp
123 */
125 {
126  QPainter p(this);
127  p.drawPixmap(0, 0, pm);
128 }
129 
130 /*
131  Starts the alphablending animation.
132  The animation will take about \a time ms
133 */
134 void QAlphaWidget::run(int time)
135 {
136  duration = time;
137 
138  if (duration < 0)
139  duration = 150;
140 
141  if (!widget)
142  return;
143 
144  elapsed = 0;
145  checkTime.start();
146 
147  showWidget = true;
148 #if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
149  qApp->installEventFilter(this);
150  widget->setWindowOpacity(0.0);
151  widget->show();
152  connect(&anim, SIGNAL(timeout()), this, SLOT(render()));
153  anim.start(1);
154 #else
155  //This is roughly equivalent to calling setVisible(true) without actually showing the widget
158 
159  qApp->installEventFilter(this);
160 
161  move(widget->geometry().x(),widget->geometry().y());
162  resize(widget->size().width(), widget->size().height());
163 
166  widget->geometry().x(), widget->geometry().y(),
167  widget->geometry().width(), widget->geometry().height()).toImage();
168 
169  if (!backImage.isNull() && checkTime.elapsed() < duration / 2) {
172  show();
173  setEnabled(false);
174 
175  connect(&anim, SIGNAL(timeout()), this, SLOT(render()));
176  anim.start(1);
177  } else {
178  duration = 0;
179  render();
180  }
181 #endif
182 }
183 
184 /*
185  \reimp
186 */
188 {
189  switch (e->type()) {
190  case QEvent::Move:
191  if (o != widget)
192  break;
193  move(widget->geometry().x(),widget->geometry().y());
194  update();
195  break;
196  case QEvent::Hide:
197  case QEvent::Close:
198  if (o != widget)
199  break;
202  showWidget = false;
203  render();
204  break;
205  case QEvent::KeyPress: {
206  QKeyEvent *ke = (QKeyEvent*)e;
207  if (ke->key() == Qt::Key_Escape) {
208  showWidget = false;
209  } else {
210  duration = 0;
211  }
212  render();
213  break;
214  }
215  default:
216  break;
217  }
218  return QWidget::eventFilter(o, e);
219 }
220 
221 /*
222  \reimp
223 */
225 {
226  e->accept();
227  if (!q_blend)
228  return;
229 
230  showWidget = false;
231  render();
232 
234 }
235 
236 /*
237  Render alphablending for the time elapsed.
238 
239  Show the blended widget and free all allocated source
240  if the blending is finished.
241 */
243 {
244  int tempel = checkTime.elapsed();
245  if (elapsed >= tempel)
246  elapsed++;
247  else
248  elapsed = tempel;
249 
250  if (duration != 0)
251  alpha = tempel / double(duration);
252  else
253  alpha = 1;
254 
255 #if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
256  if (alpha >= 1 || !showWidget) {
257  anim.stop();
258  qApp->removeEventFilter(this);
260  q_blend = 0;
261  deleteLater();
262  } else {
264  }
265 #else
266  if (alpha >= 1 || !showWidget) {
267  anim.stop();
268  qApp->removeEventFilter(this);
269 
270  if (widget) {
271  if (!showWidget) {
272 #ifdef Q_WS_WIN
273  setEnabled(true);
274  setFocus();
275 #endif // Q_WS_WIN
276  widget->hide();
277  } else {
278  //Since we are faking the visibility of the widget
279  //we need to unset the hidden state on it before calling show
281  widget->show();
282  lower();
283  }
284  }
285  q_blend = 0;
286  deleteLater();
287  } else {
288  alphaBlend();
290  repaint();
291  }
292 #endif // defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
293 }
294 
295 /*
296  Calculate an alphablended image.
297 */
299 {
300  const int a = qRound(alpha*256);
301  const int ia = 256 - a;
302 
303  const int sw = frontImage.width();
304  const int sh = frontImage.height();
305  const int bpl = frontImage.bytesPerLine();
306  switch(frontImage.depth()) {
307  case 32:
308  {
309  uchar *mixed_data = mixedImage.bits();
310  const uchar *back_data = backImage.bits();
311  const uchar *front_data = frontImage.bits();
312 
313  for (int sy = 0; sy < sh; sy++) {
314  quint32* mixed = (quint32*)mixed_data;
315  const quint32* back = (const quint32*)back_data;
316  const quint32* front = (const quint32*)front_data;
317  for (int sx = 0; sx < sw; sx++) {
318  quint32 bp = back[sx];
319  quint32 fp = front[sx];
320 
321  mixed[sx] = qRgb((qRed(bp)*ia + qRed(fp)*a)>>8,
322  (qGreen(bp)*ia + qGreen(fp)*a)>>8,
323  (qBlue(bp)*ia + qBlue(fp)*a)>>8);
324  }
325  mixed_data += bpl;
326  back_data += bpl;
327  front_data += bpl;
328  }
329  }
330  default:
331  break;
332  }
333 }
334 
335 /*
336  Internal class QRollEffect
337 
338  The QRollEffect widget is shown while the animation lasts
339  and displays a scrolling pixmap.
340 */
341 
342 class QRollEffect : public QWidget, private QEffects
343 {
344  Q_OBJECT
345 public:
346  QRollEffect(QWidget* w, Qt::WindowFlags f, DirFlags orient);
347 
348  void run(int time);
349 
350 protected:
351  void paintEvent(QPaintEvent*);
352  void closeEvent(QCloseEvent*);
353 
354 private slots:
355  void scroll();
356 
357 private:
359 
364 
365  int duration;
366  int elapsed;
367  bool done;
370 
373 
375 };
376 
377 static QRollEffect* q_roll = 0;
378 
379 /*
380  Construct a QRollEffect widget.
381 */
382 QRollEffect::QRollEffect(QWidget* w, Qt::WindowFlags f, DirFlags orient)
383  : QWidget(0, f), orientation(orient)
384 {
385 #ifndef Q_WS_WIN
386  setEnabled(false);
387 #endif
388 
389  widget = w;
390  Q_ASSERT(widget);
391 
393 
395  totalWidth = widget->width();
397  } else {
400  }
401 
404 
406  currentWidth = 0;
408  currentHeight = 0;
409 
411 }
412 
413 /*
414  \reimp
415 */
417 {
418  int x = orientation & RightScroll ? qMin(0, currentWidth - totalWidth) : 0;
420 
421  QPainter p(this);
422  p.drawPixmap(x, y, pm);
423 }
424 
425 /*
426  \reimp
427 */
429 {
430  e->accept();
431  if (done)
432  return;
433 
434  showWidget = false;
435  done = true;
436  scroll();
437 
439 }
440 
441 /*
442  Start the animation.
443 
444  The animation will take about \a time ms, or is
445  calculated if \a time is negative
446 */
447 void QRollEffect::run(int time)
448 {
449  if (!widget)
450  return;
451 
452  duration = time;
453  elapsed = 0;
454 
455  if (duration < 0) {
456  int dist = 0;
458  dist += totalWidth - currentWidth;
460  dist += totalHeight - currentHeight;
461  duration = qMin(qMax(dist/3, 50), 120);
462  }
463 
464  connect(&anim, SIGNAL(timeout()), this, SLOT(scroll()));
465 
466  move(widget->geometry().x(),widget->geometry().y());
468 
469  //This is roughly equivalent to calling setVisible(true) without actually showing the widget
472 
473  show();
474  setEnabled(false);
475 
476  qApp->installEventFilter(this);
477 
478  showWidget = true;
479  done = false;
480  anim.start(1);
481  checkTime.start();
482 }
483 
484 /*
485  Roll according to the time elapsed.
486 */
488 {
489  if (!done && widget) {
490  int tempel = checkTime.elapsed();
491  if (elapsed >= tempel)
492  elapsed++;
493  else
494  elapsed = tempel;
495 
496  if (currentWidth != totalWidth) {
498  + (2 * totalWidth * (elapsed%duration) + duration)
499  / (2 * duration);
500  // equiv. to int((totalWidth*elapsed) / duration + 0.5)
502  }
503  if (currentHeight != totalHeight) {
505  + (2 * totalHeight * (elapsed%duration) + duration)
506  / (2 * duration);
507  // equiv. to int((totalHeight*elapsed) / duration + 0.5)
509  }
510  done = (currentHeight >= totalHeight) &&
512 
513  int w = totalWidth;
514  int h = totalHeight;
515  int x = widget->geometry().x();
516  int y = widget->geometry().y();
517 
522 
523  setUpdatesEnabled(false);
524  if (orientation & UpScroll)
525  y = widget->geometry().y() + qMax(0, totalHeight - currentHeight);
526  if (orientation & LeftScroll)
527  x = widget->geometry().x() + qMax(0, totalWidth - currentWidth);
528  if (orientation & UpScroll || orientation & LeftScroll)
529  move(x, y);
530 
531  resize(w, h);
532  setUpdatesEnabled(true);
533  repaint();
534  }
535  if (done || !widget) {
536  anim.stop();
537  qApp->removeEventFilter(this);
538  if (widget) {
539  if (!showWidget) {
540 #ifdef Q_WS_WIN
541  setEnabled(true);
542  setFocus();
543 #endif
544  widget->hide();
545  } else {
546  //Since we are faking the visibility of the widget
547  //we need to unset the hidden state on it before calling show
549  widget->show();
550  lower();
551  }
552  }
553  q_roll = 0;
554  deleteLater();
555  }
556 }
557 
562 void qScrollEffect(QWidget* w, QEffects::DirFlags orient, int time)
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 }
580 
584 void qFadeEffect(QWidget* w, int time)
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 }
604 
606 
607 /*
608  Delete this after timeout
609 */
610 
611 #include "qeffects.moc"
612 
613 #endif //QT_NO_EFFECTS
void scroll(int dx, int dy)
Scrolls the widget including its children dx pixels to the right and dy downward. ...
Definition: qwidget.cpp:10684
The QPainter class performs low-level painting on widgets and other paint devices.
Definition: qpainter.h:86
QPixmap pm
Definition: qeffects.cpp:83
QImage toImage() const
Converts the pixmap to a QImage.
Definition: qpixmap.cpp:542
The QApplication class manages the GUI application&#39;s control flow and main settings.
Definition: qapplication.h:99
static QPixmap fromImage(const QImage &image, Qt::ImageConversionFlags flags=Qt::AutoColor)
Converts the given image to a pixmap using the specified flags to control the conversion.
Definition: qpixmap.cpp:2197
QPointer< QWidget > widget
Definition: qeffects.cpp:88
The QKeyEvent class describes a key event.
Definition: qevent.h:224
QImage copy(const QRect &rect=QRect()) const
Returns a sub-area of the image as a new image.
Definition: qimage.cpp:1410
QImage frontImage
Definition: qeffects.cpp:86
int y() const
Q_DECL_CONSTEXPR const T & qMin(const T &a, const T &b)
Definition: qglobal.h:1215
#define QT_END_NAMESPACE
This macro expands to.
Definition: qglobal.h:90
QRollEffect(QWidget *w, Qt::WindowFlags f, DirFlags orient)
Definition: qeffects.cpp:382
static QRollEffect * q_roll
Definition: qeffects.cpp:377
QTimer anim
Definition: qeffects.cpp:92
QAlphaWidget(QWidget *w, Qt::WindowFlags f=0)
Definition: qeffects.cpp:101
void alphaBlend()
Definition: qeffects.cpp:298
int width
the width of the widget excluding any window frame
Definition: qwidget.h:166
void scroll()
Definition: qeffects.cpp:487
bool isNull() const
Returns true if it is a null image, otherwise returns false.
Definition: qimage.cpp:1542
void run(int time)
Definition: qeffects.cpp:447
#define SLOT(a)
Definition: qobjectdefs.h:226
The QWidget class is the base class of all user interface objects.
Definition: qwidget.h:150
int width() const
Returns the width of the rectangle.
Definition: qrect.h:303
bool showWidget
Definition: qeffects.cpp:368
int bytesPerLine() const
Returns the number of bytes per image scanline.
Definition: qimage.cpp:1812
long ASN1_INTEGER_get ASN1_INTEGER * a
QPointer< QWidget > widget
Definition: qeffects.cpp:358
int height() const
Returns the height of the rectangle.
Definition: qrect.h:306
void closeEvent(QCloseEvent *)
This event handler is called with the given event when Qt receives a window close request for a top-l...
Definition: qeffects.cpp:224
#define Q_ASSERT(cond)
Definition: qglobal.h:1823
The QObject class is the base class of all Qt objects.
Definition: qobject.h:111
void setUpdatesEnabled(bool enable)
Definition: qwidget.cpp:7670
The QElapsedTimer class provides a fast way to calculate elapsed times.
Definition: qelapsedtimer.h:53
qint64 elapsed() const
Returns the number of milliseconds since this QElapsedTimer was last started.
bool showWidget
Definition: qeffects.cpp:91
int totalWidth
Definition: qeffects.cpp:363
Q_DECL_CONSTEXPR const T & qMax(const T &a, const T &b)
Definition: qglobal.h:1217
Q_GUI_EXPORT_INLINE int qRed(QRgb rgb)
Definition: qrgb.h:57
static QAlphaWidget * q_blend
Definition: qeffects.cpp:96
void update()
Updates the widget unless updates are disabled or the widget is hidden.
Definition: qwidget.cpp:10883
int key() const
Returns the code of the key that was pressed or released.
Definition: qevent.h:231
#define SIGNAL(a)
Definition: qobjectdefs.h:227
unsigned char uchar
Definition: qglobal.h:994
int width() const
Returns the width.
Definition: qsize.h:126
#define QT_BEGIN_NAMESPACE
This macro expands to.
Definition: qglobal.h:89
void lower()
Lowers the widget to the bottom of the parent widget&#39;s stack.
Definition: qwidget.cpp:11939
QImage mixedImage
Definition: qeffects.cpp:87
void qScrollEffect(QWidget *w, QEffects::DirFlags orient, int time)
Scroll widget w in time ms.
Definition: qeffects.cpp:562
int height
the height of the widget excluding any window frame
Definition: qwidget.h:167
bool testAttribute(Qt::WidgetAttribute) const
Returns true if attribute attribute is set on this widget; otherwise returns false.
Definition: qwidget.h:1041
static bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
Creates a connection of the given type from the signal in the sender object to the method in the rece...
Definition: qobject.cpp:2580
#define qApp
QPixmap pm
Definition: qeffects.cpp:374
QImage backImage
Definition: qeffects.cpp:85
void paintEvent(QPaintEvent *e)
This event handler can be reimplemented in a subclass to receive paint events passed in event...
Definition: qeffects.cpp:124
The QImage class provides a hardware-independent image representation that allows direct access to th...
Definition: qimage.h:87
static void sendPostedEvents()
QSize size
the size of the widget excluding any window frame
Definition: qwidget.h:165
int currentWidth
Definition: qeffects.cpp:361
int depth() const
Returns the depth of the image.
Definition: qimage.cpp:1620
void show()
Shows the widget and its child widgets.
QTimer anim
Definition: qeffects.cpp:371
Q_GUI_EXPORT_INLINE int qBlue(QRgb rgb)
Definition: qrgb.h:63
void setEnabled(bool)
Definition: qwidget.cpp:3447
#define Q_OBJECT
Definition: qobjectdefs.h:157
void hide()
Hides the widget.
Definition: qwidget.h:501
virtual bool eventFilter(QObject *, QEvent *)
Filters events if this object has been installed as an event filter for the watched object...
Definition: qobject.cpp:1375
static QDesktopWidget * desktop()
Returns the desktop widget (also called the root window).
void repaint()
Repaints the widget directly by calling paintEvent() immediately, unless updates are disabled or the ...
Definition: qwidget.cpp:10761
uchar * bits()
Returns a pointer to the first pixel data.
Definition: qimage.cpp:1946
void setFocus()
Gives the keyboard input focus to this widget (or its focus proxy) if this widget or one of its paren...
Definition: qwidget.h:432
void render()
Definition: qeffects.cpp:242
void closeEvent(QCloseEvent *)
This event handler is called with the given event when Qt receives a window close request for a top-l...
Definition: qeffects.cpp:428
int width() const
Returns the width of the image.
Definition: qimage.cpp:1557
int x() const
void resize(int w, int h)
This corresponds to resize(QSize(w, h)).
Definition: qwidget.h:1014
int y() const
Returns the y-coordinate of the rectangle&#39;s top edge.
Definition: qrect.h:255
int x() const
Returns the x-coordinate of the rectangle&#39;s left edge.
Definition: qrect.h:252
Q_GUI_EXPORT_INLINE QRgb qRgb(int r, int g, int b)
Definition: qrgb.h:69
virtual void closeEvent(QCloseEvent *)
This event handler is called with the given event when Qt receives a window close request for a top-l...
Definition: qwidget.cpp:9626
QElapsedTimer checkTime
Definition: qeffects.cpp:93
unsigned int quint32
Definition: qglobal.h:938
int orientation
Definition: qeffects.cpp:369
int height() const
Returns the height.
Definition: qsize.h:129
int height() const
Returns the height of the image.
Definition: qimage.cpp:1572
void setAttribute(Qt::WidgetAttribute, bool on=true)
Sets the attribute attribute on this widget if on is true; otherwise clears the attribute.
Definition: qwidget.cpp:11087
The QPixmap class is an off-screen image representation that can be used as a paint device...
Definition: qpixmap.h:71
Q_GUI_EXPORT_INLINE int qGreen(QRgb rgb)
Definition: qrgb.h:60
void run(int time)
Definition: qeffects.cpp:134
void drawPixmap(const QRectF &targetRect, const QPixmap &pixmap, const QRectF &sourceRect)
Draws the rectangular portion source of the given pixmap into the given target in the paint device...
Definition: qpainter.cpp:5619
void accept()
Sets the accept flag of the event object, the equivalent of calling setAccepted(true).
Definition: qcoreevent.h:309
QSize sizeHint
the recommended size for the widget
Definition: qwidget.h:195
WId winId() const
Returns the window system identifier of the widget.
Definition: qwidget.cpp:2557
static QPixmap grabWindow(WId, int x=0, int y=0, int w=-1, int h=-1)
Creates and returns a pixmap constructed by grabbing the contents of the given window restricted by Q...
int totalHeight
Definition: qeffects.cpp:362
The QTimer class provides repetitive and single-shot timers.
Definition: qtimer.h:56
void paintEvent(QPaintEvent *)
This event handler can be reimplemented in a subclass to receive paint events passed in event...
Definition: qeffects.cpp:416
#define slots
Definition: qobjectdefs.h:68
int currentHeight
Definition: qeffects.cpp:360
bool eventFilter(QObject *, QEvent *)
Filters events if this object has been installed as an event filter for the watched object...
Definition: qeffects.cpp:187
The QPaintEvent class contains event parameters for paint events.
Definition: qevent.h:298
void stop()
Stops the timer.
Definition: qtimer.cpp:284
void qFadeEffect(QWidget *w, int time)
Fade in widget w in time ms.
Definition: qeffects.cpp:584
void start(int msec)
Starts or restarts the timer with a timeout interval of msec milliseconds.
Definition: qtimer.cpp:249
The QEvent class is the base class of all event classes.
Definition: qcoreevent.h:56
Type type() const
Returns the event type.
Definition: qcoreevent.h:303
double alpha
Definition: qeffects.cpp:84
QRect geometry
the geometry of the widget relative to its parent and excluding the window frame
Definition: qwidget.h:158
void setWindowOpacity(qreal level)
Definition: qwidget.cpp:11497
void start()
Starts this timer.
void deleteLater()
Schedules this object for deletion.
Definition: qobject.cpp:2145
The QCloseEvent class contains parameters that describe a close event.
Definition: qevent.h:364
uint DirFlags
Definition: qeffects_p.h:74
static QPixmap grabWidget(QWidget *widget, const QRect &rect)
Creates a pixmap and paints the given widget, restricted by the given rectangle, in it...
Definition: qpixmap.cpp:1188
Q_DECL_CONSTEXPR int qRound(qreal d)
Definition: qglobal.h:1203
void move(int x, int y)
This corresponds to move(QPoint(x, y)).
Definition: qwidget.h:1011
QElapsedTimer checkTime
Definition: qeffects.cpp:372