De-constify piece types.
[tagua/yd.git] / src / core / piece.h
blob2ff92baebcb4adbaf4b587f73def648d035aa4ff
1 /*
2 Copyright (c) 2007 Paolo Capriotti <p.capriotti@gmail.com>
3 (c) 2007 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.
9 */
11 #ifndef CORE__PIECE_H
12 #define CORE__PIECE_H
14 #include <QMetaType>
15 #include "taguaobject.h"
17 class IType;
18 class IColor;
20 class TAGUA_EXPORT Piece : public TaguaObject {
21 IType* m_type;
22 const IColor* m_color;
23 public:
24 Piece(const IColor* color = 0, IType* type = 0);
26 const IColor* color() const;
27 const IType* type() const;
28 IType* type();
29 void setType(IType* type);
31 bool operator==(const Piece& other) const;
32 bool operator!=(const Piece& other) const;
35 Q_DECLARE_METATYPE(Piece)
37 #endif // CORE__PIECE_H