00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #include "restart.h"
00016
00017
00018 #include <qpe/qcopenvelope_qws.h>
00019 #include <qpainter.h>
00020
00021
00022
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