From d3cc020707bd4743cacd11f1d01d024b62deef8c Mon Sep 17 00:00:00 2001 From: zecke Date: Mon, 02 Aug 2004 18:32:18 +0000 Subject: Initial revision --- (limited to 'noncore/styles/plugin.cpp') diff --git a/noncore/styles/plugin.cpp b/noncore/styles/plugin.cpp new file mode 100644 index 0000000..da2f371 --- a/dev/null +++ b/noncore/styles/plugin.cpp @@ -0,0 +1,71 @@ +/* +               =. This file is part of the OPIE Project +             .=l. Copyright (c) 2004 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 "webstyle.h" + +#include + +WebStyleImpl::WebStyleImpl() + : m_style( 0l ) +{} + +/* Qt will delete the style */ +WebStyleImpl::~WebStyleImpl() +{} + +QRESULT WebStyleImpl::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* WebStyleImpl::style() { + if (!m_style ) + m_style = new WebStyle(); + return m_style; +} + +QString WebStyleImpl::name()const { + return qApp->translate("WebStyle", "Web", "Name of the style Web"); +} + + +Q_EXPORT_INTERFACE() +{ + Q_CREATE_INSTANCE( WebStyleImpl ) +} + -- cgit v0.9.0.2