edbee - Qt Editor Library
textchangewithcaret.h
Go to the documentation of this file.
1 
6 #pragma once
7 
8 #include "textchange.h"
9 
10 namespace edbee {
11 
16 {
17 public:
18  TextChangeWithCaret( int offset, int length, const QString& text, int caret );
19 
20  int caret() const ;
21  void setCaret( int caret );
22 
23 private:
24  int caret_;
25 };
26 
27 } // edbee
This is the basic text change that's the base of the textchanges.
Definition: textchange.h:18
A single text-change with an extra offset which represents the location of the caret. Currently this class is passed a TextDocumentFilter which enables it to alter the caret position I'm in doubt if we really need to implement it this way.
Definition: textchangewithcaret.h:15
void setCaret(int caret)
Sets the caret position.
Definition: textchangewithcaret.cpp:28
Copyright 2011-2013 - Reliable Bits Software by Blommers IT.
Definition: commentcommand.cpp:22
TextChangeWithCaret(int offset, int length, const QString &text, int caret)
Definition: textchangewithcaret.cpp:12
int offset() const
Return the offset.
Definition: textchange.cpp:111
int caret() const
returns the caret position
Definition: textchangewithcaret.cpp:20