From 4d0a9fc4a21e7a7242e466f8eec1dc61d173800d Mon Sep 17 00:00:00 2001 From: zecke Date: Mon, 02 Aug 2004 18:37:26 +0000 Subject: Initial revision --- (limited to 'noncore/styles/phase/plugin.cpp') diff --git a/noncore/styles/phase/plugin.cpp b/noncore/styles/phase/plugin.cpp new file mode 100644 index 0000000..8396c0a --- a/dev/null +++ b/noncore/styles/phase/plugin.cpp @@ -0,0 +1,71 @@ +/* +               =. This file is part of the OPIE Project +             .=l. Copyright (c) 2002 Holger Hans Peter Freyther +           .>+-= + _;:,     .>    :=|. This program is free software; you can +.> <`_,   >  .   <= redistribute it and/or modify it under +:`=1 )Y*s>-.--   : the terms of the GNU General Public +.="- .-=="i,     .._ License as published by the Free Software + - .   .-<_>     .<> Foundation; either version 2 of the License, +     ._= =}       : or (at your option) any later version. +    .%`+i>       _;_. +    .i_,=:_.      -`: PARTICULAR PURPOSE. See the GNU +..}^=.=       =       ; Library General Public License for more +++=   -.     .`     .: details. + :     =  ...= . :.=- + -.   .:....=;==+<; You should have received a copy of the GNU +  -_. . .   )=.  = General Public License along with +    --        :-=` this library; see the file COPYING. + If not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. + +*/ + +#include "plugin.h" + +#include "phasestyle.h" + +#include + +PhaseStyleImpl::PhaseStyleImpl() + : m_style( 0l ) +{} + +/* Qt will delete the style */ +PhaseStyleImpl::~PhaseStyleImpl() +{} + +QRESULT PhaseStyleImpl::queryInterface( const QUuid& uuid, QUnknownInterface **iface ) { + *iface = 0; + + if ( uuid == IID_QUnknown || uuid == IID_Style) + *iface = this; + else + return QS_FALSE; + + (*iface)->addRef(); + + return QS_OK; +} + +QStyle* PhaseStyleImpl::style() { + if (!m_style ) + m_style = new PhaseStyle(); + return m_style; +} + +QString PhaseStyleImpl::name()const { + return qApp->translate("PhaseStyle", "Phase", "Name of the style Phase"); +} + + +Q_EXPORT_INTERFACE() +{ + Q_CREATE_INSTANCE( PhaseStyleImpl ) +} + -- cgit v0.9.0.2