Advertisement
seberm

Untitled

Mar 21st, 2011
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.55 KB | None | 0 0
  1. #ifndef FIGURE_H
  2. #define FIGURE_H
  3.  
  4. #include <QObject>
  5.  
  6. class Figure : public QObject {
  7.    
  8.     Q_OBJECT
  9.  
  10. public:
  11.     enum Type { King, Queen, Rook, Bishop, Knight };
  12.    
  13.         explicit Figure(int x, int y, Type type, QObject *parent = 0);
  14.     inline int getX() const { return m_x; }
  15.     inline int getY() const { return m_y; }
  16.     Figure::Type type();
  17.     QString nameByType() const;
  18.     QString nameByType(Type type) const;
  19.     QString coordinates() const;
  20.    
  21.    
  22. signals:
  23.  
  24. public slots:
  25.    
  26. private:
  27.     int m_x;
  28.     int m_y;
  29.     Type m_type;
  30.  
  31. };
  32.  
  33. #endif // FIGURE_H
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement