| minputmethodstate.h | | minputmethodstate.h | |
| | | | |
| skipping to change at line 38 | | skipping to change at line 38 | |
| | | | |
| class QKeyEvent; | | class QKeyEvent; | |
| | | | |
| class MInputMethodStatePrivate; | | class MInputMethodStatePrivate; | |
| | | | |
| /*! | | /*! | |
| * \brief A mediator between MInputContext and applications/libmeegotouch t
hat use it | | * \brief A mediator between MInputContext and applications/libmeegotouch t
hat use it | |
| * | | * | |
| * This class allows MInputContext (technically other input contexts too) t
o | | * This class allows MInputContext (technically other input contexts too) t
o | |
| * communicate input method area on display to the application and applicat
ion | | * communicate input method area on display to the application and applicat
ion | |
|
| * to communicate its active window's orientation and custom toolbar to the
input context. | | * to communicate its active window's orientation and custom attribute exte
nsion to the input context. | |
| * The application can be a M application or a plain Qt application (which
needs | | * The application can be a M application or a plain Qt application (which
needs | |
| * to link against libmeegotouch to get access to this class). The input m
ethod area | | * to link against libmeegotouch to get access to this class). The input m
ethod area | |
| * can be used by the application to avoid obstructing the input method. | | * can be used by the application to avoid obstructing the input method. | |
| */ | | */ | |
| class M_CORE_EXPORT MInputMethodState : public QObject | | class M_CORE_EXPORT MInputMethodState : public QObject | |
| { | | { | |
| Q_OBJECT | | Q_OBJECT | |
| | | | |
| public: | | public: | |
| //! \brief Get singleton instance | | //! \brief Get singleton instance | |
| | | | |
| skipping to change at line 80 | | skipping to change at line 80 | |
| * Sends a request to the application's input context to close a softwa
re | | * Sends a request to the application's input context to close a softwa
re | |
| * input panel. | | * input panel. | |
| * \sa requestSoftwareInputPanel | | * \sa requestSoftwareInputPanel | |
| */ | | */ | |
| static void closeSoftwareInputPanel(); | | static void closeSoftwareInputPanel(); | |
| | | | |
| //! \internal | | //! \internal | |
| void emitKeyPress(const QKeyEvent &event); | | void emitKeyPress(const QKeyEvent &event); | |
| void emitKeyRelease(const QKeyEvent &event); | | void emitKeyRelease(const QKeyEvent &event); | |
| | | | |
|
| | | //! \deprecated do not use | |
| // returns the identifiers of registered toolbars | | // returns the identifiers of registered toolbars | |
| QList<int> toolbarIds() const; | | QList<int> toolbarIds() const; | |
| | | | |
|
| // providing item name -> (attribute name -> attribute value) | | // providing target name -> (item name -> (attribute name -> attribute
value)) | |
| typedef QMap<QString, QVariant> AttributeMap; | | typedef QMap<QString, QVariant> AttributeMap; | |
| typedef QMap<QString, AttributeMap> ItemAttributeMap; | | typedef QMap<QString, AttributeMap> ItemAttributeMap; | |
|
| | | typedef QMap<QString, ItemAttributeMap> ExtendedAttributeMap; | |
| | | | |
|
| | | // \deprecated do not use | |
| // returns state set for a toolbar | | // returns state set for a toolbar | |
| ItemAttributeMap toolbarState(int id) const; | | ItemAttributeMap toolbarState(int id) const; | |
|
| | | | |
| | | // returns the identifiers of registered attribute extensions | |
| | | QList<int> attributeExtensionIds() const; | |
| | | | |
| | | // returns all the registered extended attributes for \a id. | |
| | | ExtendedAttributeMap extendedAttributes(int id) const; | |
| //! \internal_end | | //! \internal_end | |
| | | | |
| public Q_SLOTS: | | public Q_SLOTS: | |
| /*! | | /*! | |
| * \brief Application's active window start to rotate to \a newOrientat
ionAngle. | | * \brief Application's active window start to rotate to \a newOrientat
ionAngle. | |
| * | | * | |
| * \note This method should be called when active window start rotation
animation. | | * \note This method should be called when active window start rotation
animation. | |
| */ | | */ | |
| void startActiveWindowOrientationAngleChange(M::OrientationAngle newOri
entationAngle); | | void startActiveWindowOrientationAngleChange(M::OrientationAngle newOri
entationAngle); | |
| | | | |
| | | | |
| skipping to change at line 110 | | skipping to change at line 119 | |
| * \brief Set the orientation angle of application's active window to \
a newOrientationAngle | | * \brief Set the orientation angle of application's active window to \
a newOrientationAngle | |
| * | | * | |
| * \note This method should be called when active window already finish
ed the rotation animation. | | * \note This method should be called when active window already finish
ed the rotation animation. | |
| */ | | */ | |
| void setActiveWindowOrientationAngle(M::OrientationAngle newOrientation
Angle); | | void setActiveWindowOrientationAngle(M::OrientationAngle newOrientation
Angle); | |
| | | | |
| //! \brief Set input method area to \a newRegion | | //! \brief Set input method area to \a newRegion | |
| void setInputMethodArea(const QRect &newRegion); | | void setInputMethodArea(const QRect &newRegion); | |
| | | | |
| /*! | | /*! | |
|
| | | * \deprecated do not use. Use registerAttributeExtension () instead. | |
| * \brief Register an input method toolbar which is defined in \a fileN
ame. | | * \brief Register an input method toolbar which is defined in \a fileN
ame. | |
| * \param \a fileName is the absolute file name of a custom toolbar, o
r the relative file under | | * \param \a fileName is the absolute file name of a custom toolbar, o
r the relative file under | |
|
| * /usr/share/meegoimframework/imtoolbars/ (relative path deprecat
ed). | | * /usr/share/meegoimframework/imtoolbars/. | |
| * \return the registered unique identifier of this toolbar. | | * \return the registered unique identifier of this toolbar. | |
| */ | | */ | |
| int registerToolbar(const QString &fileName); | | int registerToolbar(const QString &fileName); | |
| | | | |
| /*! | | /*! | |
|
| | | * \deprecated do not use. Use unregisterAttributeExtension () instead. | |
| * \brief Unregister an input method toolbar which unique id \a id. | | * \brief Unregister an input method toolbar which unique id \a id. | |
| * \param \a id is the unique identifier of the registered toolbar. | | * \param \a id is the unique identifier of the registered toolbar. | |
| */ | | */ | |
| void unregisterToolbar(int id); | | void unregisterToolbar(int id); | |
| | | | |
|
| //! \brief Set the \a attribute of the \a item in the input method tool | | /*! | |
| bar which has the unique \a id to \a value. | | * \deprecated do not use. Use setExtendedAttribute() instead. | |
| | | * \brief Set the \a attribute of the \a item in the input method tool | |
| | | bar which has the unique \a id to \a value. | |
| | | */ | |
| void setToolbarItemAttribute(int id, const QString &item, | | void setToolbarItemAttribute(int id, const QString &item, | |
| const QString &attribute, const QVariant &
value); | | const QString &attribute, const QVariant &
value); | |
| | | | |
| /*! | | /*! | |
|
| | | * \deprecated do not use. Use attributeExtensionFile() instead. | |
| * \brief Returns the input method toolbar file name which is registere
d with the unique identifier \id. | | * \brief Returns the input method toolbar file name which is registere
d with the unique identifier \id. | |
| * \param id the unique identifier of a registered toolbar. | | * \param id the unique identifier of a registered toolbar. | |
| * \return the file name of toolbar, or empty QString if \a id is inva
lid. | | * \return the file name of toolbar, or empty QString if \a id is inva
lid. | |
| */ | | */ | |
| QString toolbar(int id) const; | | QString toolbar(int id) const; | |
| | | | |
|
| | | /*! | |
| | | * \brief Registers an attribute extension (toolbar contents, keyboard | |
| | | overrides) which is defined in \a fileName, and will be assigned to a text | |
| | | input widget (software input panel). | |
| | | * \param \a fileName is the absolute file name of an attribute extensi | |
| | | on, or the relative file under | |
| | | * /usr/share/meegoimframework/imattributeextensions/. | |
| | | * \note if \a fileName is an empty string, then it means don't load an | |
| | | y content, just get a new id. | |
| | | * \return the registered unique identifier of this attribute extension | |
| | | . | |
| | | */ | |
| | | int registerAttributeExtension(const QString &fileName = QString()); | |
| | | | |
| | | /*! | |
| | | * \brief Unregister the attribute extension which unique id is \a id. | |
| | | * \param \a id is the unique identifier of the registered attribute ex | |
| | | tension. | |
| | | */ | |
| | | void unregisterAttributeExtension(int id); | |
| | | | |
| | | /*! | |
| | | * \brief Set the \a attribute of the \a targetItem in the input method | |
| | | registered attribute extension \a target which has the unique \a id to \a | |
| | | value. | |
| | | * \param id the unique identifier of a registered extended attribute. | |
| | | * \param target a string specifying the target for the attribute. | |
| | | * \param targetItem the item name. | |
| | | * \param attribute attribute to be changed. | |
| | | * \param value new value. | |
| | | * | |
| | | * \note | |
| | | * Every target name beings with a slash character ('/'). | |
| | | * The target "/" is the root target, and shall contain attributes tha | |
| | | t affect the whole input methods framework. | |
| | | * Target "/keys" is used for virtual keyboard keys, "/toolbar" for to | |
| | | olbar contents. | |
| | | * Additional targets can be added in the future. | |
| | | */ | |
| | | void setExtendedAttribute(int id, const QString &target, const QString | |
| | | &targetItem, | |
| | | const QString &attribute, const QVariant &val | |
| | | ue); | |
| | | | |
| | | /*! | |
| | | * \brief Returns the attribute extension definition file name which is | |
| | | registered with the unique identifier \id. | |
| | | * \param id the unique identifier of a registered attribute extension. | |
| | | * \return the file name of the attribute extension, or empty QString i | |
| | | f \a id is invalid. | |
| | | */ | |
| | | QString attributeExtensionFile(int id) const; | |
| | | | |
| Q_SIGNALS: | | Q_SIGNALS: | |
| //! Emitted when input method area is changed | | //! Emitted when input method area is changed | |
| //! \param region new input method area | | //! \param region new input method area | |
| void inputMethodAreaChanged(const QRect ®ion); | | void inputMethodAreaChanged(const QRect ®ion); | |
| | | | |
| /*! | | /*! | |
| * \brief This signal is emitted before the orientation angle of the ap
plication's active window is changed. | | * \brief This signal is emitted before the orientation angle of the ap
plication's active window is changed. | |
| * \param orientationAngle New orientation angle which is about to chan
ge. | | * \param orientationAngle New orientation angle which is about to chan
ge. | |
| * | | * | |
| * \note It is emitted at the start of the rotation animation. | | * \note It is emitted at the start of the rotation animation. | |
| | | | |
| skipping to change at line 155 | | skipping to change at line 209 | |
| void activeWindowOrientationAngleAboutToChange(M::OrientationAngle orie
ntationAngle); | | void activeWindowOrientationAngleAboutToChange(M::OrientationAngle orie
ntationAngle); | |
| | | | |
| /*! | | /*! | |
| * \brief This signal is emitted when the orientation angle of applicat
ion's active window is changed | | * \brief This signal is emitted when the orientation angle of applicat
ion's active window is changed | |
| * \param orientationAngle new orientation angle | | * \param orientationAngle new orientation angle | |
| * | | * | |
| * \note It's emitted with every orientation angle change finished. | | * \note It's emitted with every orientation angle change finished. | |
| */ | | */ | |
| void activeWindowOrientationAngleChanged(M::OrientationAngle orientatio
nAngle); | | void activeWindowOrientationAngleChanged(M::OrientationAngle orientatio
nAngle); | |
| | | | |
|
| | | //! \deprecated do not use. Use attributeExtensionRegistered() instead. | |
| //! Emitted when an input method toolbar which is defined in \a fileNam
e with an unique identifier \a id is registered. | | //! Emitted when an input method toolbar which is defined in \a fileNam
e with an unique identifier \a id is registered. | |
| void toolbarRegistered(int id, const QString &fileName); | | void toolbarRegistered(int id, const QString &fileName); | |
| | | | |
|
| | | //! \deprecated do not use. Use attributeExtensionUnregistered() instea
d. | |
| //! Emitted when an input method toolbar with an unique \a id is unregi
stered. | | //! Emitted when an input method toolbar with an unique \a id is unregi
stered. | |
| void toolbarUnregistered(int id); | | void toolbarUnregistered(int id); | |
| | | | |
| //! Emitted when input method toolbar item attribute is changed. | | //! Emitted when input method toolbar item attribute is changed. | |
| void toolbarItemAttributeChanged(int id, const QString &item, const QSt
ring &attribute, | | void toolbarItemAttributeChanged(int id, const QString &item, const QSt
ring &attribute, | |
| const QVariant &value); | | const QVariant &value); | |
| | | | |
| //! Can be emitted by input method to notify about raw key press event
it receives. | | //! Can be emitted by input method to notify about raw key press event
it receives. | |
| void keyPress(const QKeyEvent &); | | void keyPress(const QKeyEvent &); | |
| | | | |
| //! Can be emitted by input method to notify about raw key release even
t it receives. | | //! Can be emitted by input method to notify about raw key release even
t it receives. | |
| void keyRelease(const QKeyEvent &); | | void keyRelease(const QKeyEvent &); | |
| | | | |
|
| | | //! Emitted when an input method attribute extension which is defined i | |
| | | n \a fileName with an unique identifier \a id is registered. | |
| | | void attributeExtensionRegistered(int id, const QString &fileName); | |
| | | | |
| | | //! Emitted when an input method attribute extension with an unique \a | |
| | | id is unregistered. | |
| | | void attributeExtensionUnregistered(int id); | |
| | | | |
| | | //! Emitted when input method extended attribute is changed. | |
| | | void extendedAttributeChanged(int id, const QString &target, const QStr | |
| | | ing &targetItem, | |
| | | const QString &attribute, const QVariant | |
| | | &value); | |
| | | | |
| private: | | private: | |
| //! Disable default construction | | //! Disable default construction | |
| MInputMethodState(); | | MInputMethodState(); | |
| ~MInputMethodState(); | | ~MInputMethodState(); | |
| Q_DISABLE_COPY(MInputMethodState) | | Q_DISABLE_COPY(MInputMethodState) | |
| | | | |
| MInputMethodStatePrivate *const d_ptr; | | MInputMethodStatePrivate *const d_ptr; | |
| | | | |
| Q_DECLARE_PRIVATE(MInputMethodState) | | Q_DECLARE_PRIVATE(MInputMethodState) | |
| }; | | }; | |
| | | | |
End of changes. 15 change blocks. |
| 5 lines changed or deleted | | 89 lines changed or added | |
|