diff options
| author | Jesper K. Pedersen <jesper.pedersen@kdab.com> | 2013-05-08 08:32:09 +0200 |
|---|---|---|
| committer | Jesper K. Pedersen <jesper.pedersen@kdab.com> | 2013-05-13 10:17:11 +0200 |
| commit | f5448f89f28f6e3ffd252e2b7e26b302662aab45 (patch) | |
| tree | aed21c290c838dc273f0305d60451f303dc624c5 /utils/position.cpp | |
| parent | 985b7197f051a1992554413b882a56eb0bd5b9a4 (diff) | |
Introduced the class Position
Using QPoint with x,y is very confusing on the scripting level,
where the mental picture is line and columns rather than y,x
Change-Id: I4d9353afa26879d9aa44436d56841f55a50723bd
Reviewed-by: Nicolas Arnaud-Cormos <nicolas@kdab.com>
Diffstat (limited to 'utils/position.cpp')
| -rw-r--r-- | utils/position.cpp | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/utils/position.cpp b/utils/position.cpp new file mode 100644 index 0000000..719cf27 --- /dev/null +++ b/utils/position.cpp @@ -0,0 +1,33 @@ +#include "position.h" + +namespace Scripting { +namespace Internal { + +Position::Position(int line, int column) + : m_line(line), m_column(column) +{ +} + +int Position::line() const +{ + return m_line; +} + +void Position::setLine(int line) +{ + m_line = line; +} + +int Position::column() const +{ + return m_column; +} + +void Position::setColumn(int column) +{ + m_column = column; +} + + +} // namespace Internal +} // namespace Scripting |
