------------------------------------------------------------------------------
--                                                                          --
--                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 Qt_Ada.Internals.Objects;

with Qt_Ada.Internals.Objects.Status_Bar_Proxies;
pragma Warnings (Off, Qt_Ada.Internals.Objects.Status_Bar_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.Status_Bars is

   procedure addPermanentWidget_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Widget : not null access Qt_Ada.Internals.Objects.QObject;
     Stretch : Qt4.Q_Integer);
   pragma Import (C, addPermanentWidget_0_wrapper,
                     "__Qt4Ada_QStatusBar_addPermanentWidget_0_wrapper");

   procedure addWidget_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Widget : not null access Qt_Ada.Internals.Objects.QObject;
     Stretch : Qt4.Q_Integer);
   pragma Import (C, addWidget_0_wrapper,
                     "__Qt4Ada_QStatusBar_addWidget_0_wrapper");

   procedure currentMessage_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Returns : not null access Qt4.Strings.Internals.QString);
   pragma Import (C, currentMessage_0_wrapper,
                     "__Qt4Ada_QStatusBar_currentMessage_0_wrapper");

   procedure insertPermanentWidget_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Index : Qt4.Q_Integer;
     Widget : not null access Qt_Ada.Internals.Objects.QObject;
     Stretch : Qt4.Q_Integer);
   pragma Import (C, insertPermanentWidget_0_wrapper,
                     "__Qt4Ada_QStatusBar_insertPermanentWidget_0_wrapper");

   procedure insertWidget_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Index : Qt4.Q_Integer;
     Widget : not null access Qt_Ada.Internals.Objects.QObject;
     Stretch : Qt4.Q_Integer);
   pragma Import (C, insertWidget_0_wrapper,
                     "__Qt4Ada_QStatusBar_insertWidget_0_wrapper");

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

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

   procedure setSizeGripEnabled_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Enabled : Qt4.bool);
   pragma Import (C, setSizeGripEnabled_0_wrapper,
                     "__Qt4Ada_QStatusBar_setSizeGripEnabled_0_wrapper");

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

   procedure showMessage_wrapper
    (Self    : not null access Qt_Ada.Internals.Objects.QObject;
     Message : not null access Qt4.Strings.Internals.QString;
     Timeout : Interfaces.C.int);
   pragma Import
    (C, showMessage_wrapper, "__Qt4Ada_QStatusBar_showMessage_wrapper");

   ------------------
   -- Show_Message --
   ------------------

   procedure Show_Message
    (Self    : not null access Q_Status_Bar'Class;
     Message : Strings.Q_String;
     Timeout : Duration := 0.0)
   is
   begin
      showMessage_wrapper
       (Self.QObject_View,
        Strings.Internals.QString_View (Message),
        Interfaces.C.int (Timeout * 1000));
   end Show_Message;

   pragma Style_Checks ("N");

   --------------------------
   -- Add_Permanent_Widget --
   --------------------------

   procedure Add_Permanent_Widget
    (Self : not null access Q_Status_Bar'Class;
     Widget : not null access Qt4.Widgets.Q_Widget'Class;
     Stretch : Qt4.Q_Integer
       :=  0)
   is
   begin
      addPermanentWidget_0_wrapper
       (Self.QObject_View,
        Widget.QObject_View,
        Stretch);
   end Add_Permanent_Widget;

   ----------------
   -- Add_Widget --
   ----------------

   procedure Add_Widget
    (Self : not null access Q_Status_Bar'Class;
     Widget : not null access Qt4.Widgets.Q_Widget'Class;
     Stretch : Qt4.Q_Integer
       :=  0)
   is
   begin
      addWidget_0_wrapper
       (Self.QObject_View,
        Widget.QObject_View,
        Stretch);
   end Add_Widget;

   ---------------------
   -- Current_Message --
   ---------------------

   function Current_Message
    (Self : not null access constant Q_Status_Bar'Class)
       return Qt4.Strings.Q_String
   is
      Returns : Qt4.Strings.Q_String;

   begin
      currentMessage_0_wrapper
       (Self.QObject_View,
        Qt4.Strings.Internals.QString_View (Returns));

      return Returns;
   end Current_Message;

   -----------------------------
   -- Insert_Permanent_Widget --
   -----------------------------

   procedure Insert_Permanent_Widget
    (Self : not null access Q_Status_Bar'Class;
     Index : Qt4.Q_Integer;
     Widget : not null access Qt4.Widgets.Q_Widget'Class;
     Stretch : Qt4.Q_Integer
       :=  0)
   is
   begin
      insertPermanentWidget_0_wrapper
       (Self.QObject_View,
        Index,
        Widget.QObject_View,
        Stretch);
   end Insert_Permanent_Widget;

   -------------------
   -- Insert_Widget --
   -------------------

   procedure Insert_Widget
    (Self : not null access Q_Status_Bar'Class;
     Index : Qt4.Q_Integer;
     Widget : not null access Qt4.Widgets.Q_Widget'Class;
     Stretch : Qt4.Q_Integer
       :=  0)
   is
   begin
      insertWidget_0_wrapper
       (Self.QObject_View,
        Index,
        Widget.QObject_View,
        Stretch);
   end Insert_Widget;

   --------------------------
   -- Is_Size_Grip_Enabled --
   --------------------------

   function Is_Size_Grip_Enabled
    (Self : not null access constant Q_Status_Bar'Class)
       return Standard.Boolean
   is
   begin
      return
        Qt4.To_Boolean
         (isSizeGripEnabled_0_wrapper
           (Self.QObject_View));
   end Is_Size_Grip_Enabled;

   -------------------
   -- Remove_Widget --
   -------------------

   procedure Remove_Widget
    (Self : not null access Q_Status_Bar'Class;
     Widget : not null access Qt4.Widgets.Q_Widget'Class)
   is
   begin
      removeWidget_0_wrapper
       (Self.QObject_View,
        Widget.QObject_View);
   end Remove_Widget;

   ---------------------------
   -- Set_Size_Grip_Enabled --
   ---------------------------

   procedure Set_Size_Grip_Enabled
    (Self : not null access Q_Status_Bar'Class;
     Enabled : Standard.Boolean)
   is
   begin
      setSizeGripEnabled_0_wrapper
       (Self.QObject_View,
        Qt4.To_bool (Enabled));
   end Set_Size_Grip_Enabled;

   -------------------
   -- Clear_Message --
   -------------------

   procedure Clear_Message
    (Self : not null access Q_Status_Bar'Class)
   is
   begin
      clearMessage_0_wrapper
       (Self.QObject_View);
   end Clear_Message;

end Qt4.Status_Bars;
