Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

restart.cpp

Go to the documentation of this file.
00001 /**********************************************************************
00002 ** Copyright (C) 2002 L.J. Potter ljp@llornkcor.com
00003 **  All rights reserved.
00004 **
00005 ** This file may be distributed and/or modified under the terms of the
00006 ** GNU General Public License version 2 as published by the Free Software
00007 ** Foundation and appearing in the file LICENSE.GPL included in the
00008 ** packaging of this file.
00009 **
00010 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
00011 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
00012 **
00013 **********************************************************************/
00014 
00015 #include "restart.h"
00016 
00017 
00018 #include <qpe/qcopenvelope_qws.h>
00019 #include <qpainter.h>
00020 
00021 
00022 /* XPM */
00023 static char *restart_xpm[] = {
00024 "16 16 11 1",
00025 "   c None",
00026 ".  c #000000",
00027 "+  c #DCDCDC",
00028 "@  c #A0A0A0",
00029 "#  c #C3C3C3",
00030 "$  c #808080",
00031 "%  c #FFA858",
00032 "&  c #FFDCA8",
00033 "*  c #FFFFC0",
00034 "=  c #FFFFFF",
00035 "-  c #585858",
00036 "       ..       ",
00037 "   .. .++. ..   ",
00038 "  .+@.@##@.@+.  ",
00039 "  .@+$@%%@$+@.  ",
00040 "   .$%%&%&%$.   ",
00041 " ..+@%&$$%&@+.. ",
00042 ".+#@%&%@@&*%@#+.",
00043 ".$@+$&*&&=*$+@$.",
00044 " .--+$&*=&$+--. ",
00045 "  .$#++$$++#$.  ",
00046 " .@=$-$++$-$=@. ",
00047 " .+@-..@@..-@+. ",
00048 "  ... .+=. ...  ",
00049 "      .-$.      ",
00050 "       ..       ",
00051 "                "};
00052 RestartApplet::RestartApplet( QWidget *parent, const char *name )
00053     : QWidget( parent, name ) {
00054       setFixedHeight( 18 );
00055       setFixedWidth( 16 );
00056     show();
00057 }
00058 
00059 RestartApplet::~RestartApplet() {
00060 }
00061 
00062 void RestartApplet::mousePressEvent( QMouseEvent *) {
00063     QCopEnvelope e("QPE/System", "restart()");
00064 }
00065 
00066 void RestartApplet::paintEvent( QPaintEvent* ) {
00067       QPainter p(this);
00068       p.drawPixmap( 0, 1,  ( const char** ) restart_xpm );
00069 }
00070 

Generated on Sat Nov 5 16:15:24 2005 for OPIE by  doxygen 1.4.2