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

KeyHelperApplet.cpp

Go to the documentation of this file.
00001 #include "KeyHelperApplet.h"
00002 #include "KeyHelperWidget.h"
00003 
00004 #if 0
00005 KeyHelperApplet::KeyHelperApplet()
00006     : widget(0), ref(0)
00007 {
00008     qDebug("KeyHelperApplet::KeyHelperApplet()");
00009 }
00010 
00011 KeyHelperApplet::~KeyHelperApplet()
00012 {
00013     qDebug("KeyHelperApplet::~KeyHelperApplet()");
00014     delete widget;
00015 }
00016 
00017 QWidget* KeyHelperApplet::applet(QWidget* parent)
00018 {
00019     if(!widget){
00020         widget = new KeyHelperWidget(parent);
00021     }
00022     return(widget);
00023 }
00024 
00025 int KeyHelperApplet::position() const
00026 {
00027     return(6);
00028 }
00029 
00030 QRESULT KeyHelperApplet::queryInterface(const QUuid& uuid,
00031     QUnknownInterface** iface)
00032 {
00033     *iface = 0;
00034 
00035     if(QFile::exists("/tmp/disable-keyhelper")
00036         || QFile::exists("/mnt/card/disable-keyhelper")
00037         || QFile::exists("/mnt/cf/disable-keyhelper")){
00038         return QS_FALSE;
00039     }
00040 
00041     if(uuid == IID_QUnknown){
00042         *iface = this;
00043     } else if(uuid == IID_TaskbarApplet){
00044         *iface = this;
00045     }
00046 
00047     if(*iface){
00048         (*iface)->addRef();
00049     }
00050     return QS_OK;
00051 }
00052 
00053 Q_EXPORT_INTERFACE()
00054 {
00055     Q_CREATE_INSTANCE(KeyHelperApplet)
00056 }
00057 
00058 #else
00059 #include <opie2/otaskbarapplet.h>
00060 
00061 using namespace Opie::Ui;
00062 
00063 EXPORT_OPIE_APPLET_v1( KeyHelperWidget )
00064 
00065 #endif

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