|
| DynamicTextRangeSet (TextDocument *doc, bool stickyMode=false, bool deleteMode=false, QObject *parent=0) |
| Constructs the dynamic textrange set with a document.
|
|
| DynamicTextRangeSet (const TextRangeSet &sel, bool stickyMode=false, bool deleteMode=false, QObject *parent=0) |
| Constructs the dynamic textrange set with an existing rangeset.
|
|
| DynamicTextRangeSet (const TextRangeSet *sel, bool stickyMode=false, bool deleteMode=false, QObject *parent=0) |
| constructs the dynamic rangeset
|
|
virtual | ~DynamicTextRangeSet () |
| destructs the reviever
|
|
void | setStickyMode (bool mode) |
| Is the stickymode enabled.
|
|
bool | stickyMode () const |
| returns the current stickymode
|
|
void | setDeleteMode (bool mode) |
| Sets the delete mode.
|
|
bool | deleteMode () const |
| Returns the current delete mode.
|
|
| TextRangeSet (TextDocument *doc) |
| Constructs a textrange set.
|
|
| TextRangeSet (const TextRangeSet &sel) |
| the copy constructor for copying a selection
|
|
| TextRangeSet (const TextRangeSet *sel) |
|
virtual | ~TextRangeSet () |
|
TextRangeSet & | operator= (const TextRangeSet &sel) |
| copy the value from the rangeset
|
|
TextRangeSet * | clone () const |
|
virtual int | rangeCount () const |
|
virtual TextRange & | range (int idx) |
| returns the selection range
|
|
virtual const TextRange & | constRange (int idx) const |
| Returns a const reference from the.
|
|
virtual void | addRange (int anchor, int caret) |
| Adds a text range.
|
|
virtual void | addRange (const TextRange &range) |
| adds a range
|
|
virtual void | removeRange (int idx) |
| this method removes the range
|
|
virtual void | clear () |
| This method removes ALL carets except the 'global' selection.
|
|
virtual void | toSingleRange () |
| Converts the range to a single range selection.
|
|
virtual void | sortRanges () |
| Sorts the ranges.
|
|
| TextRangeSetBase (TextDocument *doc) |
|
virtual | ~TextRangeSetBase () |
|
TextRange & | lastRange () |
| this method returns the last range
|
|
TextRange & | firstRange () |
| the first range
|
|
int | rangeIndexAtOffset (int offset) |
| This method returns the range index at the given offset.
|
|
bool | rangesBetweenOffsets (int offsetBegin, int offsetEnd, int &firstIndex, int &lastIndex) |
| returns the range indices that are being overlapped by the given offsetBegin and offsetEnd
|
|
bool | rangesBetweenOffsetsExlusiveEnd (int offsetBegin, int offsetEnd, int &firstIndex, int &lastIndex) |
| returns the range indices that are being overlapped by the given offsetBegin and offsetEnd
|
|
bool | rangesAtLine (int line, int &firstIndex, int &lastIndex) |
| Returns the range indices that are being used on the given line.
|
|
bool | rangesAtLineExclusiveEnd (int line, int &firstIndex, int &lastIndex) |
| Returns the range indices that are being used on the given line (Excluding the last offset)
|
|
bool | hasSelection () |
| This method checks if there's a selection available A selection is an range with a different anchor then it's caret.
|
|
bool | equals (TextRangeSetBase &sel) |
| This method checks if two selections are equal.
|
|
void | replaceAll (const TextRangeSetBase &base) |
| Replaces all ranges with the supplied ranges.
|
|
QString | getSelectedText () |
| This method returns all selected text For every filled selection range a line is returned.
|
|
QString | getSelectedTextExpandedToFullLines () |
| Returns ALL lines that are touched by the selection. This means Full lines are always returned.
|
|
QString | rangesAsString () const |
| This method converts the selection ranges as a string, in the format: anchor>caret,anchor>caret.
|
|
void | beginChanges () |
| This method starts the changes.
|
|
void | endChanges () |
|
void | endChangesWithoutProcessing () |
| Ends the changes without processing. WARNING, you should ONLY call this method if the operation you performed kept the rangeset in a valid state. This (at least) means the ranges need to be sorted.
|
|
bool | changing () const |
| Checks if the current rangeset is in a changing state.
|
|
void | resetAnchors () |
| This method resets all anchors to the positions of the carets.
|
|
void | clearSelection () |
| This method moves all carets to the anchor positions.
|
|
void | addTextRanges (const TextRangeSetBase &sel) |
| An union operation This method adds all text selection-items. Merges all ranges.
|
|
void | substractTextRanges (const TextRangeSetBase &sel) |
| The difference operation This method substracts the text-selection from the current selection.
|
|
void | substractRange (int min, int max) |
| This method substracts a single range from the ranges list.
|
|
void | expandToFullLines (int amount) |
| Expands the selection so it selects full lines.
|
|
void | expandToWords (const QString &whitespace, const QStringList &characterGroups) |
| Expands the selection to full words.
|
|
void | selectWordAt (int offset, const QString &whitespace, const QStringList &characterGroups) |
| Selects the word at the given offset.
|
|
void | toggleWordSelectionAt (int offset, const QString &whitespace, const QStringList &characterGroups) |
| Toggles a word selection at the given location The idea is the following, double-click an empty place to select the word at the given location Double click an existing selection to remove the selection (and caret)
|
|
void | moveCarets (int amount) |
| This method moves the carets by character.
|
|
void | moveCaretsOrDeselect (int amount) |
| This method moves the carets or deslects the given character.
|
|
void | moveCaretsByCharGroup (int amount, const QString &whitespace, const QStringList &charGroups) |
| This method moves the carets.
|
|
void | moveCaretsToLineBoundary (int direction, const QString &whitespace) |
| Moves all carets to the given line boundary (line-boundary automatically switches between column 0 and first non-whitespace character)
|
|
void | changeSpatial (int pos, int length, int newLength, bool sticky=false, bool performDelete=false) |
| This method adds (or removes) the given spatial length at the given location.
|
|
void | setRange (int anchor, int caret, int index=0) |
| This method sets the first range item.
|
|
void | setRange (const TextRange &range, int index=0) |
| Sets the range at the given index. Make sure the given index exists!!
|
|
virtual void | processChangesIfRequired (bool joinBorders=false) |
| This method process the changes if required.
|
|
TextDocument * | textDocument () const |
| Returns the associated textdocument.
|
|
void | mergeOverlappingRanges (bool joinBorders) |
| This method merges overlapping ranges.
|
|