* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
-#ifndef _TYPES_H_
-#define _TYPES_H_
+#ifndef TYPES_H_
+#define TYPES_H_
#include <QDebug>
#include <QString>
#include <QVariant>
+#include <QTextStream>
class SignedId {
protected:
inline bool operator==(const SignedId &other) const { return id == other.id; }
inline bool operator!=(const SignedId &other) const { return id != other.id; }
inline bool operator<(const SignedId &other) const { return id < other.id; }
+ inline bool operator<=(const SignedId &other) const { return id <= other.id; }
inline bool operator>(const SignedId &other) const { return id > other.id; }
inline bool operator>=(const SignedId &other) const { return id >= other.id; }
inline bool operator==(int i) const { return id == i; }
inline QDataStream &operator<<(QDataStream &out, const SignedId &signedId) { out << signedId.toInt(); return out; }
inline QDataStream &operator>>(QDataStream &in, SignedId &signedId) { in >> signedId.id; return in; }
+inline QTextStream &operator<<(QTextStream &out, const SignedId &signedId) { out << QString::number(signedId.toInt()); return out; }
inline QDebug operator<<(QDebug dbg, const SignedId &signedId) { dbg.space() << signedId.toInt(); return dbg; }
inline uint qHash(const SignedId &id) { return qHash(id.toInt()); }