------------------------------------------------------------------------------
--                                                                          --
--                An Ada2005 binding to the Qt C++ framework                --
--                                                                          --
------------------------------------------------------------------------------
--                                                                          --
-- Copyright © 2008, 2009 Vadim Godunko <vgodunko@gmail.com>                --
--                                                                          --
-- QtAda is free software;  you can  redistribute it and/or modify it under --
-- terms of the  GNU General Public License as published  by the Free Soft- --
-- ware  Foundation;  either version 2,  or (at your option) any later ver- --
-- sion. QtAda is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY;  without even the  implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License --
-- for  more details.  You should have  received  a copy of the GNU General --
-- Public License distributed with QtAda;  see file COPYING.  If not, write --
-- to  the  Free Software Foundation,  51  Franklin  Street,  Fifth  Floor, --
-- Boston, MA 02110-1301, USA.                                              --
--                                                                          --
------------------------------------------------------------------------------
--  $Revision: 3234 $ $Date: 2009-04-09 23:05:06 +0400 (Thu, 09 Apr 2009) $
------------------------------------------------------------------------------
with Qt4.Widgets;
private with Qt4.LCD_Numbers;
private with Qt4.Widgets.Directors;

with Cannon_Fields;

package Game_Boards is

   type Game_Board is limited new Qt4.Widgets.Q_Widget with private;

   type Game_Board_Access is access all Game_Board'Class;

   procedure Fire (Self : not null access Game_Board'Class);
   pragma Q_Slot (Fire, "fire()");

   procedure Hit (Self : not null access Game_Board'Class);
   pragma Q_Slot (Hit, "hit()");

   procedure Missed (Self : not null access Game_Board'Class);
   pragma Q_Slot (Missed, "missed()");

   procedure New_Game (Self : not null access Game_Board'Class);
   pragma Q_Slot (New_Game, "newGame()");

   package Constructors is

      function Create (Parent : access Qt4.Widgets.Q_Widget'Class := null)
        return not null Game_Board_Access;

   end Constructors;

private

   type Game_Board is new Qt4.Widgets.Directors.Q_Widget_Director with record
      Hits         : Qt4.LCD_Numbers.Q_LCD_Number_Access;
      Shots_Left   : Qt4.LCD_Numbers.Q_LCD_Number_Access;
      Cannon_Field : Cannon_Fields.Cannon_Field_Access;
   end record;

end Game_Boards;
