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 // coptright Mon 10-21-2002 01:14:03 by L. Potter <ljp@llornkcor.com>
00002 
00003 #include "restart.h"
00004 
00005 #include <opie2/oresource.h>
00006 
00007 #include <qpe/applnk.h>
00008 #include <qpe/qpeapplication.h>
00009 #include <qpe/qcopenvelope_qws.h>
00010 
00011 RestartApplet::RestartApplet ( )
00012   : QObject ( 0, "RestartApplet" )
00013 {
00014 }
00015 
00016 RestartApplet::~RestartApplet ( )
00017 {
00018 }
00019 
00020 int RestartApplet::position ( ) const
00021 {
00022     return 4;
00023 }
00024 
00025 QString RestartApplet::name ( ) const
00026 {
00027   return tr( "Restart" );
00028 }
00029 
00030 QString RestartApplet::text ( ) const
00031 {
00032   return tr( "Restart Opie" );
00033 }
00034 
00035 QIconSet RestartApplet::icon ( ) const
00036 {
00037     QPixmap pix = Opie::Core::OResource::loadPixmap( "exec", Opie::Core::OResource::SmallIcon );
00038     return pix;
00039 }
00040 
00041 QPopupMenu *RestartApplet::popup ( QWidget * ) const
00042 {
00043   return 0;
00044 }
00045 
00046 void RestartApplet::activated ( )
00047 {
00048     QCopEnvelope e("QPE/System", "restart()");
00049 }
00050 
00051 
00052 QRESULT RestartApplet::queryInterface ( const QUuid &uuid, QUnknownInterface **iface )
00053 {
00054   *iface = 0;
00055   if ( uuid == IID_QUnknown )
00056     *iface = this;
00057   else if ( uuid == IID_MenuApplet )
00058     *iface = this;
00059   else
00060     return QS_FALSE;
00061 
00062   if ( *iface )
00063     (*iface)-> addRef ( );
00064   return QS_OK;
00065 }
00066 
00067 Q_EXPORT_INTERFACE( )
00068 {
00069   Q_CREATE_INSTANCE( RestartApplet )
00070 }
00071 
00072 

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