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

plugin.cpp

Go to the documentation of this file.
00001 /*
00002                =.            This file is part of the OPIE Project
00003              .=l.            Copyright (c)  2002 Holger Hans Peter Freyther <zecke@handhelds.org>
00004            .>+-=
00005  _;:,     .>    :=|.         This program is free software; you can
00006 .> <`_,   >  .   <=          redistribute it and/or  modify it under
00007 :`=1 )Y*s>-.--   :           the terms of the GNU General Public
00008 .="- .-=="i,     .._         License as published by the Free Software
00009  - .   .-<_>     .<>         Foundation; either version 2 of the License,
00010      ._= =}       :          or (at your option) any later version.
00011     .%`+i>       _;_.
00012     .i_,=:_.      -<s.       This program is distributed in the hope that
00013      +  .  -:.       =       it will be useful,  but WITHOUT ANY WARRANTY;
00014     : ..    .:,     . . .    without even the implied warranty of
00015     =_        +     =;=|`    MERCHANTABILITY or FITNESS FOR A
00016   _.=:.       :    :=>`:     PARTICULAR PURPOSE. See the GNU
00017 ..}^=.=       =       ;      Library General Public License for more
00018 ++=   -.     .`     .:       details.
00019  :     =  ...= . :.=-
00020  -.   .:....=;==+<;          You should have received a copy of the GNU
00021   -_. . .   )=.  =           General Public License along with
00022     --        :-=`           this library; see the file COPYING.
00023                              If not, write to the Free Software Foundation,
00024                              Inc., 59 Temple Place - Suite 330,
00025                              Boston, MA 02111-1307, USA.
00026 
00027 */
00028 
00029 #include "plugin.h"
00030 
00031 #include "phasestyle.h"
00032 
00033 #include <qapplication.h>
00034 
00035 PhaseStyleImpl::PhaseStyleImpl()
00036     : m_style( 0l )
00037 {}
00038 
00039 /* Qt will delete the style */
00040 PhaseStyleImpl::~PhaseStyleImpl()
00041 {}
00042 
00043 QRESULT PhaseStyleImpl::queryInterface( const QUuid& uuid, QUnknownInterface **iface ) {
00044     *iface = 0;
00045 
00046     if ( uuid == IID_QUnknown || uuid == IID_Style)
00047         *iface = this;
00048     else
00049         return QS_FALSE;
00050 
00051     (*iface)->addRef();
00052 
00053     return QS_OK;
00054 }
00055 
00056 QStyle* PhaseStyleImpl::style() {
00057     if (!m_style )
00058         m_style = new PhaseStyle();
00059     return m_style;
00060 }
00061 
00062 QString PhaseStyleImpl::name()const {
00063     return qApp->translate("PhaseStyle", "Phase", "Name of the style Phase");
00064 }
00065 
00066 
00067 Q_EXPORT_INTERFACE()
00068 {
00069     Q_CREATE_INSTANCE( PhaseStyleImpl )
00070 }
00071 

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