~timo-jyrinki/ubuntu/trusty/maliit-framework/fix_qt52

« back to all changes in this revision

Viewing changes to src/maliit/plugins/abstractpluginfactory.h

  • Committer: Package Import Robot
  • Author(s): Iain Lane
  • Date: 2013-01-31 13:26:48 UTC
  • Revision ID: package-import@ubuntu.com-20130131132648-w1u9d2279tppxcft
Tags: upstream-0.94.1
ImportĀ upstreamĀ versionĀ 0.94.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* * This file is part of Maliit framework *
 
2
 *
 
3
 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
 
4
 * All rights reserved.
 
5
 *
 
6
 * Contact: maliit-discuss@lists.maliit.org
 
7
 *
 
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
 
12
 * of this file.
 
13
 */
 
14
 
 
15
#ifndef MIABSTRACTPLUGINFACTORY_H
 
16
#define MIABSTRACTPLUGINFACTORY_H
 
17
 
 
18
#include <QtCore>
 
19
#include <QtPlugin>
 
20
 
 
21
namespace Maliit {
 
22
namespace Plugins {
 
23
    class InputMethodPlugin;
 
24
}
 
25
}
 
26
class MImAbstractPluginFactoryPrivate;
 
27
 
 
28
/*! \ingroup pluginapi
 
29
 * \brief An MInputMethodPlugin factory used for dynamic languages
 
30
 *
 
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
 
33
 * mime-type.
 
34
 */
 
35
class MImAbstractPluginFactory
 
36
{
 
37
    Q_DISABLE_COPY(MImAbstractPluginFactory)
 
38
    Q_DECLARE_PRIVATE(MImAbstractPluginFactory)
 
39
 
 
40
private:
 
41
    const QScopedPointer<MImAbstractPluginFactoryPrivate> d_ptr;
 
42
 
 
43
public:
 
44
    explicit MImAbstractPluginFactory();
 
45
    virtual ~MImAbstractPluginFactory() = 0;
 
46
 
 
47
    //! \brief Implement this function to return the extension of which kind of file this factory can handle
 
48
    virtual QString fileExtension() const = 0;
 
49
 
 
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;
 
52
};
 
53
 
 
54
 
 
55
Q_DECLARE_INTERFACE(MImAbstractPluginFactory,
 
56
                    "org.maliit.maliit-plugins.MImAbstractPluginFactory/0.80")
 
57
 
 
58
#endif