------------------------------------------------------------------------------
--                                                                          --
--                An Ada2005 binding to the Qt C++ framework                --
--                                                                          --
------------------------------------------------------------------------------
--                                                                          --
-- Copyright © 2007-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.     --
------------------------------------------------------------------------------
private with Ada.Finalization;
with Interfaces.C;
with Qt4.Lines;
with Qt4.Point_Fs;
with Qt_Ada.Internals.Value_Class_Sizes;
with System;

package Qt4.Line_Fs is

   --  QLineF::IntersectType

   type Intersect_Type is
    (No_Intersection,
     Bounded_Intersection,
     Unbounded_Intersection);
   pragma Convention (C, Intersect_Type);
   for Intersect_Type'Size use Interfaces.C.unsigned'Size;

   type Q_Line_F is tagged private;

   function Create
    (Pt_1 : in Qt4.Point_Fs.Q_Point_F'Class;
     Pt_2 : in Qt4.Point_Fs.Q_Point_F'Class)
       return Q_Line_F;

   function Create
    (X_1 : in Qt4.Q_Real;
     Y_1 : in Qt4.Q_Real;
     X_2 : in Qt4.Q_Real;
     Y_2 : in Qt4.Q_Real)
       return Q_Line_F;

   function Create
    (Line : in Qt4.Lines.Q_Line'Class)
       return Q_Line_F;

   function Angle
    (Self : in Q_Line_F'Class;
     L : in Q_Line_F'Class)
       return Qt4.Q_Real;

   function Dx
    (Self : in Q_Line_F'Class)
       return Qt4.Q_Real;

   function Dy
    (Self : in Q_Line_F'Class)
       return Qt4.Q_Real;

   function Is_Null
    (Self : in Q_Line_F'Class)
       return Boolean;

   function Length
    (Self : in Q_Line_F'Class)
       return Qt4.Q_Real;

   function Normal_Vector
    (Self : in Q_Line_F'Class)
       return Q_Line_F;

   function P_1
    (Self : in Q_Line_F'Class)
       return Qt4.Point_Fs.Q_Point_F;

   function P_2
    (Self : in Q_Line_F'Class)
       return Qt4.Point_Fs.Q_Point_F;

   function Point_At
    (Self : in Q_Line_F'Class;
     T : in Qt4.Q_Real)
       return Qt4.Point_Fs.Q_Point_F;

   procedure Set_Length
    (Self : in out Q_Line_F'Class;
     Len : in Qt4.Q_Real);

   function To_Line
    (Self : in Q_Line_F'Class)
       return Qt4.Lines.Q_Line;

   procedure Translate
    (Self : in out Q_Line_F'Class;
     P : in Qt4.Point_Fs.Q_Point_F'Class);

   procedure Translate
    (Self : in out Q_Line_F'Class;
     Dx : in Qt4.Q_Real;
     Dy : in Qt4.Q_Real);

   function Unit_Vector
    (Self : in Q_Line_F'Class)
       return Q_Line_F;

   function X_1
    (Self : in Q_Line_F'Class)
       return Qt4.Q_Real;

   function X_2
    (Self : in Q_Line_F'Class)
       return Qt4.Q_Real;

   function Y_1
    (Self : in Q_Line_F'Class)
       return Qt4.Q_Real;

   function Y_2
    (Self : in Q_Line_F'Class)
       return Qt4.Q_Real;

   function "="
    (Self : in Q_Line_F;
     D : in Q_Line_F)
       return Boolean;

   package Internals is

      type QLineF is private;

      type QLineF_Access is access all QLineF;
      pragma Convention (C, QLineF_Access);

      function QLineF_View
       (Item : in Q_Line_F'Class)
          return QLineF_Access;
      pragma Inline (QLineF_View);

      function To_Pointer
       (Address : in System.Address)
          return QLineF_Access;
      pragma Inline (To_Pointer);

      function To_Address
       (Pointer : in QLineF_Access)
          return System.Address;
      pragma Inline (To_Address);

      function Create_Wrapper
       (Item : in Internals.QLineF_Access)
          return Q_Line_F;

   private

      type QLineF is record
         Placeholder : Interfaces.C.char_array (1 .. Qt_Ada.Internals.Value_Class_Sizes.QLineF_C_Size_Of);
      end record;
      pragma Convention (C, QLineF);

   end Internals;

private

   type Q_Line_F is new Ada.Finalization.Controlled with record
      Storage : aliased Internals.QLineF;
      Object  : Internals.QLineF_Access := null;
      Wrapper : Boolean := False;
   end record;

   overriding
   procedure Adjust (Self : in out Q_Line_F);

   overriding
   procedure Finalize (Self : in out Q_Line_F);

   overriding
   procedure Initialize (Self : in out Q_Line_F);

end Qt4.Line_Fs;
