------------------------------------------------------------------------------
--                                                                          --
--                An Ada2005 binding to the Qt C++ framework                --
--                                                                          --
------------------------------------------------------------------------------
--                                                                          --
-- Copyright © 2009, 2010 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.                                              --
--                                                                          --
-- As a special exception,  if other files  instantiate  generics from this --
-- unit, or you link  this unit with other files  to produce an executable, --
-- this  unit  does not  by itself cause  the resulting  executable  to  be --
-- covered  by the  GNU  General  Public  License.  This exception does not --
-- however invalidate  any other reasons why  the executable file  might be --
-- covered by the  GNU Public License.                                      --
--                                                                          --
------------------------------------------------------------------------------
--    This file has been generated automatically. Please don't edit it.     --
------------------------------------------------------------------------------
with Qt4.Graphics_Items.Directors;
with Qt4.Style_Options;
with Qt_Ada.Internals.Objects.Object_Utilities;

package body Qt_Ada.Internals.Graphics_Items.Graphics_Item_Proxies is

   procedure advance_0_virtual
    (Self : not null access Qt_Ada.Internals.Graphics_Items.QGraphicsItem;
     Phase : Qt4.Q_Integer);
      pragma Import (C, advance_0_virtual,
                     "__Qt4Ada_QGraphicsItem_advance_0_virtual");

   procedure boundingRect_0_virtual
    (Self : not null access Qt_Ada.Internals.Graphics_Items.QGraphicsItem;
     Returns : not null access Qt4.Rect_Fs.Internals.QRectF);
      pragma Import (C, boundingRect_0_virtual,
                     "__Qt4Ada_QGraphicsItem_boundingRect_0_virtual");

   function collidesWithItem_0_virtual
    (Self : not null access Qt_Ada.Internals.Graphics_Items.QGraphicsItem;
     Other : not null access constant Qt_Ada.Internals.Graphics_Items.QGraphicsItem;
     Mode : Qt4.Item_Selection_Mode)
       return Qt4.bool;
      pragma Import (C, collidesWithItem_0_virtual,
                     "__Qt4Ada_QGraphicsItem_collidesWithItem_0_virtual");

   function collidesWithPath_0_virtual
    (Self : not null access Qt_Ada.Internals.Graphics_Items.QGraphicsItem;
     Path : not null access constant Qt4.Painter_Paths.Internals.QPainterPath;
     Mode : Qt4.Item_Selection_Mode)
       return Qt4.bool;
      pragma Import (C, collidesWithPath_0_virtual,
                     "__Qt4Ada_QGraphicsItem_collidesWithPath_0_virtual");

   function contains_0_virtual
    (Self : not null access Qt_Ada.Internals.Graphics_Items.QGraphicsItem;
     Point : not null access constant Qt4.Point_Fs.Internals.QPointF)
       return Qt4.bool;
      pragma Import (C, contains_0_virtual,
                     "__Qt4Ada_QGraphicsItem_contains_0_virtual");

   function isObscuredBy_0_virtual
    (Self : not null access Qt_Ada.Internals.Graphics_Items.QGraphicsItem;
     Item : not null access constant Qt_Ada.Internals.Graphics_Items.QGraphicsItem)
       return Qt4.bool;
      pragma Import (C, isObscuredBy_0_virtual,
                     "__Qt4Ada_QGraphicsItem_isObscuredBy_0_virtual");

   procedure opaqueArea_0_virtual
    (Self : not null access Qt_Ada.Internals.Graphics_Items.QGraphicsItem;
     Returns : not null access Qt4.Painter_Paths.Internals.QPainterPath);
      pragma Import (C, opaqueArea_0_virtual,
                     "__Qt4Ada_QGraphicsItem_opaqueArea_0_virtual");

   procedure shape_0_virtual
    (Self : not null access Qt_Ada.Internals.Graphics_Items.QGraphicsItem;
     Returns : not null access Qt4.Painter_Paths.Internals.QPainterPath);
      pragma Import (C, shape_0_virtual,
                     "__Qt4Ada_QGraphicsItem_shape_0_virtual");

   procedure paint_virtual
    (Self    : not null access Qt_Ada.Internals.Graphics_Items.QGraphicsItem;
     Painter : not null access Qt4.Painters.Internals.QPainter;
     Option  : not null access Qt4.Style_Options.Thin.QStyleOption;
     Widget  : access Qt_Ada.Internals.Objects.QObject);
   pragma Import
    (C, paint_virtual, "__Qt4Ada_QGraphicsItem_paint_virtual");

   -----------
   -- Paint --
   -----------

   procedure Paint
    (Self    : not null access Q_Graphics_Item_Proxy;
     Painter : in out Qt4.Painters.Q_Painter'Class;
     Option  :
       Qt4.Style_Option_Graphics_Items.Q_Style_Option_Graphics_Item'Class;
     Widget  : access Qt4.Widgets.Q_Widget'Class := null)
   is
   begin
      paint_virtual
       (Self.QGraphicsItem_View,
        Qt4.Painters.Internals.QPainter_View (Painter),
        Qt4.Style_Options.Internals.QStyleOption_View (Option),
        Qt_Ada.Internals.Objects.Object_Utilities.Corresponding_QObject
         (Widget));
   end Paint;

   pragma Style_Checks ("N");

   -------------
   -- Advance --
   -------------

   procedure Advance
    (Self : not null access Q_Graphics_Item_Proxy;
     Phase : Qt4.Q_Integer)
   is
   begin
      advance_0_virtual
       (Q_Graphics_Item_Proxy'Class (Self.all).QGraphicsItem_View,
        Phase);
   end Advance;

   -------------------
   -- Bounding_Rect --
   -------------------

   function Bounding_Rect
    (Self : not null access constant Q_Graphics_Item_Proxy)
       return Qt4.Rect_Fs.Q_Rect_F
   is
      Returns : Qt4.Rect_Fs.Q_Rect_F;

   begin
      boundingRect_0_virtual
       (Q_Graphics_Item_Proxy'Class (Self.all).QGraphicsItem_View,
        Qt4.Rect_Fs.Internals.QRectF_View (Returns));

      return Returns;
   end Bounding_Rect;

   ------------------------
   -- Collides_With_Item --
   ------------------------

   function Collides_With_Item
    (Self : not null access constant Q_Graphics_Item_Proxy;
     Other : not null access constant Qt4.Graphics_Items.Q_Graphics_Item'Class;
     Mode : Qt4.Item_Selection_Mode)
       return Standard.Boolean
   is
   begin
      return
        Qt4.To_Boolean
         (collidesWithItem_0_virtual
           (Q_Graphics_Item_Proxy'Class (Self.all).QGraphicsItem_View,
            Other.QGraphicsItem_View,
            Mode));
   end Collides_With_Item;

   ------------------------
   -- Collides_With_Path --
   ------------------------

   function Collides_With_Path
    (Self : not null access constant Q_Graphics_Item_Proxy;
     Path : Qt4.Painter_Paths.Q_Painter_Path;
     Mode : Qt4.Item_Selection_Mode)
       return Standard.Boolean
   is
   begin
      return
        Qt4.To_Boolean
         (collidesWithPath_0_virtual
           (Q_Graphics_Item_Proxy'Class (Self.all).QGraphicsItem_View,
            Qt4.Painter_Paths.Internals.QPainterPath_View (Path),
            Mode));
   end Collides_With_Path;

   --------------
   -- Contains --
   --------------

   function Contains
    (Self : not null access constant Q_Graphics_Item_Proxy;
     Point : Qt4.Point_Fs.Q_Point_F)
       return Standard.Boolean
   is
   begin
      return
        Qt4.To_Boolean
         (contains_0_virtual
           (Q_Graphics_Item_Proxy'Class (Self.all).QGraphicsItem_View,
            Qt4.Point_Fs.Internals.QPointF_View (Point)));
   end Contains;

   --------------------
   -- Is_Obscured_By --
   --------------------

   function Is_Obscured_By
    (Self : not null access constant Q_Graphics_Item_Proxy;
     Item : not null access constant Qt4.Graphics_Items.Q_Graphics_Item'Class)
       return Standard.Boolean
   is
   begin
      return
        Qt4.To_Boolean
         (isObscuredBy_0_virtual
           (Q_Graphics_Item_Proxy'Class (Self.all).QGraphicsItem_View,
            Item.QGraphicsItem_View));
   end Is_Obscured_By;

   -----------------
   -- Opaque_Area --
   -----------------

   function Opaque_Area
    (Self : not null access constant Q_Graphics_Item_Proxy)
       return Qt4.Painter_Paths.Q_Painter_Path
   is
      Returns : Qt4.Painter_Paths.Q_Painter_Path;

   begin
      opaqueArea_0_virtual
       (Q_Graphics_Item_Proxy'Class (Self.all).QGraphicsItem_View,
        Qt4.Painter_Paths.Internals.QPainterPath_View (Returns));

      return Returns;
   end Opaque_Area;

   -----------
   -- Shape --
   -----------

   function Shape
    (Self : not null access constant Q_Graphics_Item_Proxy)
       return Qt4.Painter_Paths.Q_Painter_Path
   is
      Returns : Qt4.Painter_Paths.Q_Painter_Path;

   begin
      shape_0_virtual
       (Q_Graphics_Item_Proxy'Class (Self.all).QGraphicsItem_View,
        Qt4.Painter_Paths.Internals.QPainterPath_View (Returns));

      return Returns;
   end Shape;
end Qt_Ada.Internals.Graphics_Items.Graphics_Item_Proxies;
