summaryrefslogtreecommitdiff
path: root/core/launcher/wait.cpp
Unidiff
Diffstat (limited to 'core/launcher/wait.cpp') (more/less context) (show whitespace changes)
-rw-r--r--core/launcher/wait.cpp64
1 files changed, 64 insertions, 0 deletions
diff --git a/core/launcher/wait.cpp b/core/launcher/wait.cpp
new file mode 100644
index 0000000..059e6f1
--- a/dev/null
+++ b/core/launcher/wait.cpp
@@ -0,0 +1,64 @@
1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3**
4** This file is part of Qtopia Environment.
5**
6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file.
10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15**
16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you.
18**
19**********************************************************************/
20
21#include "wait.h"
22
23#include <qpe/resource.h>
24
25#include <qwidget.h>
26#include <qpixmap.h>
27#include <qpainter.h>
28
29
30Wait *lastWaitObject = NULL;
31
32
33Wait::Wait( QWidget *parent ) : QWidget( parent ),
34 pm( Resource::loadPixmap( "wait" ) ), waiting( FALSE )
35{
36 setFixedSize( pm.size() );
37 lastWaitObject = this;
38 hide();
39}
40
41
42Wait *Wait::getWaitObject()
43{
44 return lastWaitObject;
45}
46
47
48void Wait::setWaiting( bool w )
49{
50 waiting = w;
51 if ( w )
52 show();
53 else
54 hide();
55}
56
57
58void Wait::paintEvent( QPaintEvent * )
59{
60 QPainter p( this );
61 p.drawPixmap( 0, 0, pm );
62}
63
64