1
/* * This file is part of Maliit framework *
3
* Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
6
* Contact: maliit-discuss@lists.maliit.org
8
* This library is free software; you can redistribute it and/or
9
* modify it under the terms of the GNU Lesser General Public
10
* License version 2.1 as published by the Free Software Foundation
11
* and appearing in the file LICENSE.LGPL included in the packaging
15
#ifndef MIABSTRACTPLUGINFACTORY_H
16
#define MIABSTRACTPLUGINFACTORY_H
23
class InputMethodPlugin;
26
class MImAbstractPluginFactoryPrivate;
28
/*! \ingroup pluginapi
29
* \brief An MInputMethodPlugin factory used for dynamic languages
31
* To create a factory, re-implement the virtual functions. These functions will
32
* be used to create a new instance of MInputMethodPlugin based on file
35
class MImAbstractPluginFactory
37
Q_DISABLE_COPY(MImAbstractPluginFactory)
38
Q_DECLARE_PRIVATE(MImAbstractPluginFactory)
41
const QScopedPointer<MImAbstractPluginFactoryPrivate> d_ptr;
44
explicit MImAbstractPluginFactory();
45
virtual ~MImAbstractPluginFactory() = 0;
47
//! \brief Implement this function to return the extension of which kind of file this factory can handle
48
virtual QString fileExtension() const = 0;
50
//! \brief Implement this function to create a new MInputMethodPlugin base on a file
51
virtual Maliit::Plugins::InputMethodPlugin* create(const QString &file) const = 0;
55
Q_DECLARE_INTERFACE(MImAbstractPluginFactory,
56
"org.maliit.maliit-plugins.MImAbstractPluginFactory/0.80")