Represents the text state of the editor.
More...
#include <text.h>
List of all members.
Detailed Description
Represents the text state of the editor.
To avoid needless copying and to keep synchronization between consumers of this model simple, the master copy is shared as SharedText between AbstractTextEditor, LayoutUpdater and WordEngine. The model itself is a passive component; users of this model are responsible for notifying other users whenever they update the shared master copy.
Constructor & Destructor Documentation
MaliitKeyboard::Model::Text::Text |
( |
| ) |
|
|
explicit |
offset of cursor position in surrounding text.
C'tor
Member Function Documentation
void MaliitKeyboard::Model::Text::appendToPreedit |
( |
const QString & |
appendix | ) |
|
Append to preedit.
- Parameters:
-
appendix | the string to append to current preedit. |
void MaliitKeyboard::Model::Text::commitPreedit |
( |
| ) |
|
Commits current preedit. Insert preedit into surrounding text and updates surrounding offset to match expected cursor position.
QString MaliitKeyboard::Model::Text::preedit |
( |
| ) |
const |
void MaliitKeyboard::Model::Text::setPreedit |
( |
const QString & |
preedit | ) |
|
Set current preedit.
- Parameters:
-
preedit | the updated preedit. |
void MaliitKeyboard::Model::Text::setSurrounding |
( |
const QString & |
surrounding | ) |
|
Set text surrounding cursor position.
- Parameters:
-
surrounding | the updated surrounding text. |
void MaliitKeyboard::Model::Text::setSurroundingOffset |
( |
uint |
offset | ) |
|
Set offset of cursor position in surrounding text. Affects surroundingLeft and surroundingRight.
- Parameters:
-
offset | the updated offset. |
QString MaliitKeyboard::Model::Text::surrounding |
( |
| ) |
const |
Returns text surrounding cursor position.
QString MaliitKeyboard::Model::Text::surroundingLeft |
( |
| ) |
const |
Returns text left of cursor position. Depends on surroundingOffset.
uint MaliitKeyboard::Model::Text::surroundingOffset |
( |
| ) |
const |
Returns offset of cursor position in surrounding text.
QString MaliitKeyboard::Model::Text::surroundingRight |
( |
| ) |
const |
Returns text right of cursor position. Depends on surroundingOffset.
Member Data Documentation
QString MaliitKeyboard::Model::Text::m_preedit |
|
private |
current text segment that is edited.
QString MaliitKeyboard::Model::Text::m_surrounding |
|
private |
text to left and right side of cursor position, in current text block.
uint MaliitKeyboard::Model::Text::m_surrounding_offset |
|
private |
The documentation for this class was generated from the following files: