Added getters

This commit is contained in:
Roberto Raggi
2009-11-24 11:43:03 +01:00
parent e43bd82afb
commit 7586847b9f
2 changed files with 43 additions and 29 deletions

View File

@@ -55,22 +55,32 @@ class QTCREATOR_UTILS_EXPORT ChangeSet
QString *string;
QTextCursor *cursor;
public:
struct Replace {
int pos;
int length;
QString replacement;
};
QList<Replace> replaceList;
struct Move {
int pos;
int length;
int to;
};
QList<Move> moveList;
public:
ChangeSet();
QList<Replace> replaceList() const;
QList<Move> moveList() const;
void replace(int pos, int length, const QString &replacement);
void move(int pos, int length, int to);
void write(QString *s);
void write(QTextCursor *textCursor);
private:
bool hasOverlap(int pos, int length);
bool hasMoveInto(int pos, int length);
@@ -79,14 +89,8 @@ class QTCREATOR_UTILS_EXPORT ChangeSet
void write_helper();
public:
ChangeSet();
void replace(int pos, int length, const QString &replacement);
void move(int pos, int length, int to);
void write(QString *s);
void write(QTextCursor *textCursor);
QList<Replace> m_replaceList;
QList<Move> m_moveList;
};
} // namespace Utils