------------------------------------------------------------------------------
--                                                                          --
--                An Ada2005 binding to the Qt C++ framework                --
--                                                                          --
------------------------------------------------------------------------------
--                                                                          --
-- Copyright © 2008-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.Abstract_Buttons;
with Qt4.Push_Buttons;
with Qt_Ada.Internals.Object_Registry;
with Qt_Ada.Internals.Objects;
with Qt_Ada.Internals.Objects.Push_Button_Utilities;

with Qt_Ada.Internals.Objects.Dialog_Button_Box_Proxies;
pragma Warnings (Off, Qt_Ada.Internals.Objects.Dialog_Button_Box_Proxies);
--  Elaboration of the proxy tagged type package register proxy object
--  constructor. Bindings must be able to create proxy object of the
--  corresponding tagged type for works properly.

package body Qt4.Dialog_Button_Boxes is

   procedure addButton_2_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Button : not null access Qt_Ada.Internals.Objects.QObject;
     Role : Qt4.Dialog_Button_Boxes.Dialog_Button_Box_Button_Role);
   pragma Import (C, addButton_2_wrapper,
                     "__Qt4Ada_QDialogButtonBox_addButton_2_wrapper");

   function addButton_1_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Text : not null access constant Qt4.Strings.Internals.QString;
     Role : Qt4.Dialog_Button_Boxes.Dialog_Button_Box_Button_Role)
       return not null access Qt_Ada.Internals.Objects.QObject;
   pragma Import (C, addButton_1_wrapper,
                     "__Qt4Ada_QDialogButtonBox_addButton_1_wrapper");

   function addButton_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Button : Qt4.Dialog_Button_Boxes.Dialog_Button_Box_Standard_Button)
       return not null access Qt_Ada.Internals.Objects.QObject;
   pragma Import (C, addButton_0_wrapper,
                     "__Qt4Ada_QDialogButtonBox_addButton_0_wrapper");

   function button_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Which : Qt4.Dialog_Button_Boxes.Dialog_Button_Box_Standard_Button)
       return access Qt_Ada.Internals.Objects.QObject;
   pragma Import (C, button_0_wrapper,
                     "__Qt4Ada_QDialogButtonBox_button_0_wrapper");

   function buttonRole_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Button : not null access Qt_Ada.Internals.Objects.QObject)
       return Qt4.Dialog_Button_Boxes.Dialog_Button_Box_Button_Role;
   pragma Import (C, buttonRole_0_wrapper,
                     "__Qt4Ada_QDialogButtonBox_buttonRole_0_wrapper");

   function centerButtons_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject)
       return Qt4.bool;
   pragma Import (C, centerButtons_0_wrapper,
                     "__Qt4Ada_QDialogButtonBox_centerButtons_0_wrapper");

   procedure clear_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject);
   pragma Import (C, clear_0_wrapper,
                     "__Qt4Ada_QDialogButtonBox_clear_0_wrapper");

   function orientation_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject)
       return Qt4.Orientation;
   pragma Import (C, orientation_0_wrapper,
                     "__Qt4Ada_QDialogButtonBox_orientation_0_wrapper");

   procedure removeButton_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Button : not null access Qt_Ada.Internals.Objects.QObject);
   pragma Import (C, removeButton_0_wrapper,
                     "__Qt4Ada_QDialogButtonBox_removeButton_0_wrapper");

   procedure setCenterButtons_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Center : Qt4.bool);
   pragma Import (C, setCenterButtons_0_wrapper,
                     "__Qt4Ada_QDialogButtonBox_setCenterButtons_0_wrapper");

   procedure setOrientation_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Orientation : Qt4.Orientation);
   pragma Import (C, setOrientation_0_wrapper,
                     "__Qt4Ada_QDialogButtonBox_setOrientation_0_wrapper");

   function standardButton_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Button : not null access Qt_Ada.Internals.Objects.QObject)
       return Qt4.Dialog_Button_Boxes.Dialog_Button_Box_Standard_Button;
   pragma Import (C, standardButton_0_wrapper,
                     "__Qt4Ada_QDialogButtonBox_standardButton_0_wrapper");

   pragma Style_Checks ("N");

   ----------------
   -- Add_Button --
   ----------------

   procedure Add_Button
    (Self : not null access Q_Dialog_Button_Box'Class;
     Button : not null access Qt4.Abstract_Buttons.Q_Abstract_Button'Class;
     Role : Qt4.Dialog_Button_Boxes.Dialog_Button_Box_Button_Role)
   is
   begin
      addButton_2_wrapper
       (Self.QObject_View,
        Button.QObject_View,
        Role);
   end Add_Button;

   ----------------
   -- Add_Button --
   ----------------

   function Add_Button
    (Self : not null access Q_Dialog_Button_Box'Class;
     Text : Qt4.Strings.Q_String;
     Role : Qt4.Dialog_Button_Boxes.Dialog_Button_Box_Button_Role)
       return not null access Qt4.Push_Buttons.Q_Push_Button'Class
   is
   begin
      return
        Qt4.Push_Buttons.Q_Push_Button'Class
         (Qt_Ada.Internals.Object_Registry.To_Q_Object
           (addButton_1_wrapper
             (Self.QObject_View,
              Qt4.Strings.Internals.QString_View (Text),
              Role)).all)'Access;
   end Add_Button;

   ----------------
   -- Add_Button --
   ----------------

   function Add_Button
    (Self : not null access Q_Dialog_Button_Box'Class;
     Button : Qt4.Dialog_Button_Boxes.Dialog_Button_Box_Standard_Button)
       return not null access Qt4.Push_Buttons.Q_Push_Button'Class
   is
   begin
      return
        Qt4.Push_Buttons.Q_Push_Button'Class
         (Qt_Ada.Internals.Object_Registry.To_Q_Object
           (addButton_0_wrapper
             (Self.QObject_View,
              Button)).all)'Access;
   end Add_Button;

   ------------
   -- Button --
   ------------

   function Button
    (Self : not null access constant Q_Dialog_Button_Box'Class;
     Which : Qt4.Dialog_Button_Boxes.Dialog_Button_Box_Standard_Button)
       return access Qt4.Push_Buttons.Q_Push_Button'Class
   is
   begin
      return
        Qt_Ada.Internals.Objects.Push_Button_Utilities.Corresponding_Q_Push_Button
         (button_0_wrapper
           (Self.QObject_View,
            Which));
   end Button;

   -----------------
   -- Button_Role --
   -----------------

   function Button_Role
    (Self : not null access constant Q_Dialog_Button_Box'Class;
     Button : not null access Qt4.Abstract_Buttons.Q_Abstract_Button'Class)
       return Qt4.Dialog_Button_Boxes.Dialog_Button_Box_Button_Role
   is
   begin
      return
        buttonRole_0_wrapper
         (Self.QObject_View,
          Button.QObject_View);
   end Button_Role;

   --------------------
   -- Center_Buttons --
   --------------------

   function Center_Buttons
    (Self : not null access constant Q_Dialog_Button_Box'Class)
       return Standard.Boolean
   is
   begin
      return
        Qt4.To_Boolean
         (centerButtons_0_wrapper
           (Self.QObject_View));
   end Center_Buttons;

   -----------
   -- Clear --
   -----------

   procedure Clear
    (Self : not null access Q_Dialog_Button_Box'Class)
   is
   begin
      clear_0_wrapper
       (Self.QObject_View);
   end Clear;

   -----------------
   -- Orientation --
   -----------------

   function Orientation
    (Self : not null access constant Q_Dialog_Button_Box'Class)
       return Qt4.Orientation
   is
   begin
      return
        orientation_0_wrapper
         (Self.QObject_View);
   end Orientation;

   -------------------
   -- Remove_Button --
   -------------------

   procedure Remove_Button
    (Self : not null access Q_Dialog_Button_Box'Class;
     Button : not null access Qt4.Abstract_Buttons.Q_Abstract_Button'Class)
   is
   begin
      removeButton_0_wrapper
       (Self.QObject_View,
        Button.QObject_View);
   end Remove_Button;

   ------------------------
   -- Set_Center_Buttons --
   ------------------------

   procedure Set_Center_Buttons
    (Self : not null access Q_Dialog_Button_Box'Class;
     Center : Standard.Boolean)
   is
   begin
      setCenterButtons_0_wrapper
       (Self.QObject_View,
        Qt4.To_bool (Center));
   end Set_Center_Buttons;

   ---------------------
   -- Set_Orientation --
   ---------------------

   procedure Set_Orientation
    (Self : not null access Q_Dialog_Button_Box'Class;
     Orientation : Qt4.Orientation)
   is
   begin
      setOrientation_0_wrapper
       (Self.QObject_View,
        Orientation);
   end Set_Orientation;

   ---------------------
   -- Standard_Button --
   ---------------------

   function Standard_Button
    (Self : not null access constant Q_Dialog_Button_Box'Class;
     Button : not null access Qt4.Abstract_Buttons.Q_Abstract_Button'Class)
       return Qt4.Dialog_Button_Boxes.Dialog_Button_Box_Standard_Button
   is
   begin
      return
        standardButton_0_wrapper
         (Self.QObject_View,
          Button.QObject_View);
   end Standard_Button;

end Qt4.Dialog_Button_Boxes;
