2 Copyright (c) 2006 Paolo Capriotti <p.capriotti@gmail.com>
3 (c) 2006 Maurizio Monge <maurizio.monge@kdemail.net>
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
20 struct TAGUA_EXPORT Point
{
21 static Point
invalid() { return Point(-1, -1); }
22 bool valid() const { return x
!= -1 && y
!= -1; }
28 QString
row(int ysize
) const;
29 QString
numcol(int xsize
) const;
31 QString
alpharow() const;
33 explicit Point(const QString
& str
, int ysize
);
34 explicit Point(const QPoint
&);
36 QString
toString(int ysize
) const;
38 Point
operator+(const Point
& other
) const;
39 Point
operator+=(const Point
& other
);
40 Point
operator-() const;
41 Point
operator-(const Point
& other
) const;
42 Point
operator*(int n
) const;
43 Point
operator/(int n
) const;
44 Point
div(int n
) const;
45 bool operator==(const Point
& other
) const;
46 bool operator!=(const Point
& other
) const;
47 bool operator<(const Point
& other
) const;
48 bool operator<=(const Point
& other
) const;
50 // true if for each coordinate of other, either it
51 // is -1, or it is equal to the corresponding
53 bool resembles(const Point
& other
) const;
55 operator QPoint() const;
57 Point
normalizeInfinity() const;
61 int normalizeInfinityHelper(int n
) const;
64 Q_DECLARE_METATYPE(Point
)
66 TAGUA_EXPORT QDebug
operator<<(QDebug
, const Point
&);