X-Git-Url: http://vcs.maemo.org/git/?a=blobdiff_plain;f=src%2Fkkj.h;h=ec7d79b2d1e52e83ebf0543bf10a7525f6e74a31;hb=5c28d3fb6ec5a39d7415b068da47e6b01898d6d7;hp=3afb9b24f89245c56d8d0aa11090549c5ce76f98;hpb=e8b2ee80f71a1cb65ccdd846aff047a108dfd699;p=ptas diff --git a/src/kkj.h b/src/kkj.h index 3afb9b2..ec7d79b 100644 --- a/src/kkj.h +++ b/src/kkj.h @@ -1,6 +1,10 @@ #ifndef KKJ_H #define KKJ_H +#include + +class KKJPrivate; + /** * A class representing the Finnish KKJ coordinate. */ @@ -20,6 +24,22 @@ public: virtual ~KKJ(); /** + * Equals operator. + * Tests the equality of this coordinate and another coordinate and returns \c true + * if the coordinates represent the same position. + * @param rhs the other coordinate to test against. + * @return \c true if the coordinates are the same, \c false otherwise. + */ + bool operator==(const KKJ &rhs) const; + + /** + * Assignment operator. + * @param rhs the object that is copied. + * @return this object. + */ + KKJ& operator=(const KKJ &rhs); + + /** * Returns the northing of the coordinate. * @return the northing. */ @@ -31,9 +51,22 @@ public: */ unsigned int easting() const; +protected: + /** + * Constructs a new KKJ coordinate with the given values. + * @param dd a private implementation member. + * @param northing the northing coordinate. + * @param easting the easting coordinate. + */ + KKJ(KKJPrivate &dd, unsigned int northing, unsigned int easting); + + private: - unsigned int mNorthing; - unsigned int mEasting; + /// Pointer to the private member + KKJPrivate *const d_ptr; + + Q_DECLARE_PRIVATE(KKJ) + }; #endif // KKJ_H