Home · All Classes · Main Classes · Deprecated

minputmethodstate.h

Go to the documentation of this file.
00001 /***************************************************************************
00002 **
00003 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
00004 ** All rights reserved.
00005 ** Contact: Nokia Corporation (directui@nokia.com)
00006 **
00007 ** This file is part of libmeegotouch.
00008 **
00009 ** If you have questions regarding the use of this file, please contact
00010 ** Nokia at directui@nokia.com.
00011 **
00012 ** This library is free software; you can redistribute it and/or
00013 ** modify it under the terms of the GNU Lesser General Public
00014 ** License version 2.1 as published by the Free Software Foundation
00015 ** and appearing in the file LICENSE.LGPL included in the packaging
00016 ** of this file.
00017 **
00018 ****************************************************************************/
00019 
00020 #ifndef MINPUTMETHODSTATE_H
00021 #define MINPUTMETHODSTATE_H
00022 
00023 #include <QObject>
00024 #include <QRect>
00025 
00026 #include "mnamespace.h"
00027 #include "mexport.h"
00028 
00029 class QKeyEvent;
00030 
00031 class MInputMethodStatePrivate;
00032 
00043 class M_CORE_EXPORT MInputMethodState : public QObject
00044 {
00045     Q_OBJECT
00046 
00047 public:
00050     static MInputMethodState *instance();
00051 
00054     QRect inputMethodArea() const;
00055 
00058     M::OrientationAngle activeWindowOrientationAngle() const;
00059 
00067     static void requestSoftwareInputPanel();
00068 
00074     static void closeSoftwareInputPanel();
00075 
00077     void emitKeyPress(const QKeyEvent &event);
00078     void emitKeyRelease(const QKeyEvent &event);
00079 
00080     // returns the identifiers of registered toolbars
00081     QList<int> toolbarIds() const;
00082 
00083     // providing item name -> (attribute name -> attribute value)
00084     typedef QMap<QString, QVariant> AttributeMap;
00085     typedef QMap<QString, AttributeMap> ItemAttributeMap;
00086 
00087     // returns state set for a toolbar
00088     ItemAttributeMap toolbarState(int id) const;
00090 
00091 public Q_SLOTS:
00093     void setActiveWindowOrientationAngle(M::OrientationAngle newOrientation);
00094 
00096     void setInputMethodArea(const QRect &newRegion);
00097 
00104     int registerToolbar(const QString &fileName);
00105 
00110     void unregisterToolbar(int id);
00111 
00113     void setToolbarItemAttribute(int id, const QString &item,
00114                                  const QString &attribute, const QVariant &value);
00115 
00121     QString toolbar(int id) const;
00122 
00123 Q_SIGNALS:
00126     void inputMethodAreaChanged(const QRect &region);
00127 
00130     void activeWindowOrientationAngleChanged(M::OrientationAngle orientation);
00131 
00133     void toolbarRegistered(int id, const QString &fileName);
00134 
00136     void toolbarUnregistered(int id);
00137 
00139     void toolbarItemAttributeChanged(int id, const QString &item, const QString &attribute,
00140                                      const QVariant &value);
00141 
00143     void keyPress(const QKeyEvent &);
00144 
00146     void keyRelease(const QKeyEvent &);
00147 
00148 private:
00150     MInputMethodState();
00151     ~MInputMethodState();
00152     Q_DISABLE_COPY(MInputMethodState)
00153 
00154     MInputMethodStatePrivate *const d_ptr;
00155 
00156     Q_DECLARE_PRIVATE(MInputMethodState)
00157 };
00158 
00159 #endif

Copyright © 2010 Nokia Corporation Generated on Thu Nov 4 2010 18:14:20 (PDT)
Doxygen 1.7.1
MeeGo Touch