~michael-sheldon/ubuntu/utopic/maliit-framework/fix-orientation-updates

« back to all changes in this revision

Viewing changes to maliit-plugins-quick/input-method/minputmethodquickplugin.h

  • Committer: Package Import Robot
  • Author(s): Ricardo Salveti de Araujo, Sergio Schvezov, Ricardo Salveti de Araujo
  • Date: 2013-07-23 19:47:04 UTC
  • mfrom: (1.1.2) (1.2.1 experimental)
  • Revision ID: package-import@ubuntu.com-20130723194704-1lsy1kmlda069cea
Tags: 0.99.0+git20130615+97e8335-0ubuntu1
[ Sergio Schvezov ]
* New build from HEAD 97e8335.
* Packaging import from lp:phablet-extras/maliit-framework.

[ Ricardo Salveti de Araujo ]
* debian/control: adding vcs and fixing dependencies
* General package cleanup

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* * This file is part of Maliit framework *
2
 
 *
3
 
 * Copyright (C) 2011 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 M_INPUT_METHOD_QUICK_PLUGIN
16
 
#define M_INPUT_METHOD_QUICK_PLUGIN
17
 
 
18
 
#include <maliit/plugins/inputmethodplugin.h>
19
 
 
20
 
#include <QWidget>
21
 
#include <QString>
22
 
#include <QStringList>
23
 
#include <QSet>
24
 
 
25
 
class MInputMethodQuickPluginPrivate;
26
 
 
27
 
//! \brief Creates an input method plugin that allows to use QML.
28
 
//!
29
 
//! To create a QML-based virtual keyboard or input method plugin, derive from
30
 
//! this class and reimplement MInputMethodPlugin::name() and
31
 
//! MInputMethodQuickPlugin::qmlFileName().
32
 
//! The QML components can communicate with the framework through the
33
 
//! MInputMethodQuick context.
34
 
//! If the provided MInputMethodQuick class is not sufficient, then reimplement
35
 
//! MInputMethodQuickPlugin::createInputMethodSettings as well and create a
36
 
//! custom MAbstractInputMethod instance there.
37
 
class MInputMethodQuickPlugin
38
 
    : public Maliit::Plugins::InputMethodPlugin
39
 
{
40
 
public:
41
 
    MInputMethodQuickPlugin();
42
 
    virtual ~MInputMethodQuickPlugin();
43
 
 
44
 
    // FIXME: Add getter as vfunc with next API break and remove both static functions.
45
 
    //! Add list of import paths that will be used by the internal QML engine of this plugin.
46
 
    //! For this function to take any effect, it needs to be called before the
47
 
    //! reimplementation of createInputMethod calls MInputMethodQuickPlugin::createInputMethod.
48
 
    static void setQmlImportPaths(const QStringList &paths);
49
 
 
50
 
    //! \internal
51
 
    //! Used to read the current list of import paths.
52
 
    static QStringList qmlImportPaths();
53
 
    //! \internal_end
54
 
 
55
 
    //! \reimp
56
 
    virtual MAbstractInputMethod *createInputMethod(MAbstractInputMethodHost *host);
57
 
    virtual QSet<Maliit::HandlerState> supportedStates() const;
58
 
    //! \reimp_end
59
 
 
60
 
    //! Which QML file to load.
61
 
    virtual QString qmlFileName() const = 0;
62
 
 
63
 
private:
64
 
    Q_DISABLE_COPY(MInputMethodQuickPlugin);
65
 
    Q_DECLARE_PRIVATE(MInputMethodQuickPlugin);
66
 
    MInputMethodQuickPluginPrivate *const d_ptr;
67
 
};
68
 
 
69
 
Q_DECLARE_INTERFACE(MInputMethodQuickPlugin,
70
 
                    "com.meego.meegoimframework.MInputMethodQuickPlugin/1.1")
71
 
 
72
 
#endif // M_INPUT_METHOD_QUICK_PLUGIN