Changeset 651 for trunk/src/gui/text/qtextcursor.cpp
- Timestamp:
- Mar 8, 2010, 12:52:58 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/vendor/nokia/qt/4.6.2 (added) merged: 650 /branches/vendor/nokia/qt/current merged: 649 /branches/vendor/nokia/qt/4.6.1 removed
- Property svn:mergeinfo changed
-
trunk/src/gui/text/qtextcursor.cpp
r561 r651 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 20 09Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 20 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation ([email protected]) … … 863 863 \ingroup shared 864 864 865 866 Text cursors are objects that are used to access and modify the contents867 and underlying structure of text documents via a programming interface868 t hat mimics the behavior of a cursor in a text editor. QTextCursor contains869 information about both the cursor's position within a QTextDocument and any870 selection that ithas made.865 Text cursors are objects that are used to access and modify the 866 867 868 t 869 870 has made. 871 871 872 872 QTextCursor is modeled on the way a text cursor behaves in a text 873 editor, providing a programmatic means of performing standard actions 874 through the user interface. A document can be thought of as a 875 single string of characters with the cursor's position() being \e 876 between any two characters (or at the very beginning or very end 877 of the document). Documents can also contain tables, lists, 878 images, and other objects in addition to text but, from the developer's 879 point of view, the document can be treated as one long string. 880 Some portions of that string can be considered to lie within particular 881 blocks (e.g. paragraphs), or within a table's cell, or a list's item, 882 or other structural elements. When we refer to "current character" we 883 mean the character immediately after the cursor position() in the 884 document; similarly the "current block" is the block that contains the 885 cursor position(). 873 editor, providing a programmatic means of performing standard 874 actions through the user interface. A document can be thought of 875 as a single string of characters. The cursor's current position() 876 then is always either \e between two consecutive characters in the 877 string, or else \e before the very first character or \e after the 878 very last character in the string. Documents can also contain 879 tables, lists, images, and other objects in addition to text but, 880 from the developer's point of view, the document can be treated as 881 one long string. Some portions of that string can be considered 882 to lie within particular blocks (e.g. paragraphs), or within a 883 table's cell, or a list's item, or other structural elements. When 884 we refer to "current character" we mean the character immediately 885 \e before the cursor position() in the document. Similarly, the 886 "current block" is the block that contains the cursor position(). 886 887 887 888 A QTextCursor also has an anchor() position. The text that is … … 941 942 942 943 Cursor movements are limited to valid cursor positions. In Latin 943 writing this is usually after every character in the text. In some 944 other writing systems cursor movements are limited to "clusters" 945 (e.g. a syllable in Devanagari, or a base letter plus diacritics). 946 Functions such as movePosition() and deleteChar() limit cursor 947 movement to these valid positions. 944 writing this is between any two consecutive characters in the 945 text, before the first character, or after the last character. In 946 some other writing systems cursor movements are limited to 947 "clusters" (e.g. a syllable in Devanagari, or a base letter plus 948 diacritics). Functions such as movePosition() and deleteChar() 949 limit cursor movement to these valid positions. 948 950 949 951 \sa \link richtext.html Rich Text Processing\endlink … … 1740 1742 1741 1743 /*! 1742 Returns the format of the character immediately before the cursor position(). If the cursor is 1743 positioned at the beginning of a text block that is not empty then the format of the character 1744 Returns the format of the character immediately before the cursor 1745 position(). If the cursor is positioned at the beginning of a text 1746 block that is not empty then the format of the character 1744 1747 immediately after the cursor is returned. 1745 1748
Note:
See TracChangeset
for help on using the changeset viewer.