File indexing completed on 2024-05-12 16:30:48

0001 /* This file is part of the KDE project
0002  * Copyright (C) 2001-2002 Lennart Kudling <kudling@kde.org>
0003  * Copyright (C) 2002-2003 Rob Buis <buis@kde.org>
0004  * Copyright (C) 2005 Laurent Montel <montel@kde.org>
0005  * Copyright (C) 2005 Thomas Zander <zander@kde.org>
0006  * Copyright (C) 2006 Inge Wallin <inge@lysator.liu.se>
0007  * Copyright (C) 2006 Tim Beaulen <tbscope@gmail.com>
0008  * Copyright (C) 2007 David Faure <faure@kde.org>
0009  * Copyright (C) 2007 Matthias Kretz <kretz@kde.org>
0010  * Copyright (C) 2007 Jan Hambrecht <jaham@gmx.net>
0011  *
0012  * This library is free software; you can redistribute it and/or
0013  * modify it under the terms of the GNU Library General Public
0014  * License as published by the Free Software Foundation; either
0015  * version 2 of the License, or (at your option) any later version.
0016  *
0017  * This library is distributed in the hope that it will be useful,
0018  * but WITHOUT ANY WARRANTY; without even the implied warranty of
0019  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0020  * Library General Public License for more details.
0021  *
0022  * You should have received a copy of the GNU Library General Public License
0023  * along with this library; see the file COPYING.LIB.  If not, write to
0024  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
0025  * Boston, MA 02110-1301, USA.
0026  */
0027 
0028 #ifndef __KARBON_FACTORY_H__
0029 #define __KARBON_FACTORY_H__
0030 
0031 #include <kpluginfactory.h>
0032 #include <KSharedConfig>
0033 
0034 #include <karbonui_export.h>
0035 
0036 class KoComponentData;
0037 
0038 class KARBONUI_EXPORT KarbonFactory : public KPluginFactory
0039 {
0040     Q_OBJECT
0041 
0042 public:
0043     explicit KarbonFactory();
0044     ~KarbonFactory() override;
0045 
0046     QObject* create(const char* iface, QWidget* parentWidget, QObject *parent, const QVariantList& args, const QString& keyword) override;
0047 
0048     static const KSharedConfig::Ptr &karbonConfig();
0049     static const KoComponentData &global();
0050 
0051 private:
0052     static KoComponentData* s_global;
0053 };
0054 
0055 #endif
0056