okteta
coordrange.h
Go to the documentation of this file.
94 inline CoordRange::CoordRange( const Coord& start, const Coord& end ) : KDE::KBaseCoordRange(start,end) {}
96 : KDE::KBaseCoordRange( Coord(posRange.start(),lineRange.start()), Coord(posRange.end(),lineRange.end()) ) {}
101 inline CoordRange& CoordRange::operator=( const CoordRange& other ) { KDE::KBaseCoordRange::operator=(other); return *this; }
103 inline bool CoordRange::operator==( const CoordRange& other ) const { return KDE::KBaseCoordRange::operator==(other); }
105 inline Size CoordRange::width( LinePositionSize lineWidth ) const { return lineWidth*(lines()-1) + end().pos() - start().pos()+1; }
107 inline bool CoordRange::includesLine( Line line ) const { return ( start().line() <= line && line <= end().line() ); }
CoordRange & operator=(const CoordRange &other)
Definition: coordrange.h:101
Size width(LinePositionSize lineWidth) const
calculates the number of coords that are covered if a line has the given length.
Definition: coordrange.h:105
bool includesLine(Line line) const
tests if the given line is included by the range.
Definition: coordrange.h:107
bool operator==(const CoordRange &other) const
Definition: coordrange.h:103
LineSize lines() const
calculates the number of lines that are covered by the range.
Definition: coordrange.h:106
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:04:07 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:04:07 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.