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

with Qt_Ada.Internals.Objects.Dock_Widget_Proxies;
pragma Warnings (Off, Qt_Ada.Internals.Objects.Dock_Widget_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.Dock_Widgets is

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

   procedure setFloating_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Floating : Qt4.bool);
   pragma Import (C, setFloating_0_wrapper,
                     "__Qt4Ada_QDockWidget_setFloating_0_wrapper");

   procedure setTitleBarWidget_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Widget : not null access Qt_Ada.Internals.Objects.QObject);
   pragma Import (C, setTitleBarWidget_0_wrapper,
                     "__Qt4Ada_QDockWidget_setTitleBarWidget_0_wrapper");

   procedure setWidget_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Widget : not null access Qt_Ada.Internals.Objects.QObject);
   pragma Import (C, setWidget_0_wrapper,
                     "__Qt4Ada_QDockWidget_setWidget_0_wrapper");

   function titleBarWidget_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject)
       return not null access Qt_Ada.Internals.Objects.QObject;
   pragma Import (C, titleBarWidget_0_wrapper,
                     "__Qt4Ada_QDockWidget_titleBarWidget_0_wrapper");

   function toggleViewAction_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject)
       return not null access Qt_Ada.Internals.Objects.QObject;
   pragma Import (C, toggleViewAction_0_wrapper,
                     "__Qt4Ada_QDockWidget_toggleViewAction_0_wrapper");

   function widget_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject)
       return not null access Qt_Ada.Internals.Objects.QObject;
   pragma Import (C, widget_0_wrapper,
                     "__Qt4Ada_QDockWidget_widget_0_wrapper");

   procedure setAllowedAreas_wrapper
     (Self  : not null access Qt_Ada.Internals.Objects.QObject;
      Areas : Qt4.Dock_Widget_Areas);
   pragma Import (C,
                  setAllowedAreas_wrapper,
                  "__Qt4Ada_QDockWidget_setAllowedAreas_wrapper");

   procedure setFeatures_wrapper
     (Self     : not null access Qt_Ada.Internals.Objects.QObject;
      Features : Dock_Widget_Features);
   pragma Import
    (C, setFeatures_wrapper, "__Qt4Ada_QDockWidget_setFeatures_wrapper");

   -----------------------
   -- Set_Allowed_Areas --
   -----------------------

   procedure Set_Allowed_Areas
    (Self  : not null access Q_Dock_Widget'Class;
     Areas : Qt4.Dock_Widget_Areas)
   is
   begin
      setAllowedAreas_wrapper (Self.QObject_View, Areas);
   end Set_Allowed_Areas;

   ------------------
   -- Set_Features --
   ------------------

   procedure Set_Features
    (Self     : not null access Q_Dock_Widget'Class;
     Features : Dock_Widget_Features)
   is
   begin
      setFeatures_wrapper (Self.QObject_View, Features);
   end Set_Features;

   pragma Style_Checks ("N");

   -----------------
   -- Is_Floating --
   -----------------

   function Is_Floating
    (Self : not null access constant Q_Dock_Widget'Class)
       return Standard.Boolean
   is
   begin
      return
        Qt4.To_Boolean
         (isFloating_0_wrapper
           (Self.QObject_View));
   end Is_Floating;

   ------------------
   -- Set_Floating --
   ------------------

   procedure Set_Floating
    (Self : not null access Q_Dock_Widget'Class;
     Floating : Standard.Boolean)
   is
   begin
      setFloating_0_wrapper
       (Self.QObject_View,
        Qt4.To_bool (Floating));
   end Set_Floating;

   --------------------------
   -- Set_Title_Bar_Widget --
   --------------------------

   procedure Set_Title_Bar_Widget
    (Self : not null access Q_Dock_Widget'Class;
     Widget : not null access Qt4.Widgets.Q_Widget'Class)
   is
   begin
      setTitleBarWidget_0_wrapper
       (Self.QObject_View,
        Widget.QObject_View);
   end Set_Title_Bar_Widget;

   ----------------
   -- Set_Widget --
   ----------------

   procedure Set_Widget
    (Self : not null access Q_Dock_Widget'Class;
     Widget : not null access Qt4.Widgets.Q_Widget'Class)
   is
   begin
      setWidget_0_wrapper
       (Self.QObject_View,
        Widget.QObject_View);
   end Set_Widget;

   ----------------------
   -- Title_Bar_Widget --
   ----------------------

   function Title_Bar_Widget
    (Self : not null access constant Q_Dock_Widget'Class)
       return not null access Qt4.Widgets.Q_Widget'Class
   is
   begin
      return
        Qt4.Widgets.Q_Widget'Class
         (Qt_Ada.Internals.Object_Registry.To_Q_Object
           (titleBarWidget_0_wrapper
             (Self.QObject_View)).all)'Access;
   end Title_Bar_Widget;

   ------------------------
   -- Toggle_View_Action --
   ------------------------

   function Toggle_View_Action
    (Self : not null access constant Q_Dock_Widget'Class)
       return not null access Qt4.Actions.Q_Action'Class
   is
   begin
      return
        Qt4.Actions.Q_Action'Class
         (Qt_Ada.Internals.Object_Registry.To_Q_Object
           (toggleViewAction_0_wrapper
             (Self.QObject_View)).all)'Access;
   end Toggle_View_Action;

   ------------
   -- Widget --
   ------------

   function Widget
    (Self : not null access constant Q_Dock_Widget'Class)
       return not null access Qt4.Widgets.Q_Widget'Class
   is
   begin
      return
        Qt4.Widgets.Q_Widget'Class
         (Qt_Ada.Internals.Object_Registry.To_Q_Object
           (widget_0_wrapper
             (Self.QObject_View)).all)'Access;
   end Widget;

end Qt4.Dock_Widgets;
