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

with Qt_Ada.Internals.Objects.Label_Proxies;
pragma Warnings (Off, Qt_Ada.Internals.Objects.Label_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.Labels is

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

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

   function indent_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject)
       return Qt4.Q_Integer;
   pragma Import (C, indent_0_wrapper,
                     "__Qt4Ada_QLabel_indent_0_wrapper");

   function margin_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject)
       return Qt4.Q_Integer;
   pragma Import (C, margin_0_wrapper,
                     "__Qt4Ada_QLabel_margin_0_wrapper");

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

   procedure setBuddy_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Buddy : not null access Qt_Ada.Internals.Objects.QObject);
   pragma Import (C, setBuddy_0_wrapper,
                     "__Qt4Ada_QLabel_setBuddy_0_wrapper");

   procedure setIndent_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Indent : Qt4.Q_Integer);
   pragma Import (C, setIndent_0_wrapper,
                     "__Qt4Ada_QLabel_setIndent_0_wrapper");

   procedure setMargin_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Margin : Qt4.Q_Integer);
   pragma Import (C, setMargin_0_wrapper,
                     "__Qt4Ada_QLabel_setMargin_0_wrapper");

   procedure setOpenExternalLinks_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Open : Qt4.bool);
   pragma Import (C, setOpenExternalLinks_0_wrapper,
                     "__Qt4Ada_QLabel_setOpenExternalLinks_0_wrapper");

   procedure setPixmap_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Pixmap : not null access constant Qt4.Pixmaps.Internals.QPixmap);
   pragma Import (C, setPixmap_0_wrapper,
                     "__Qt4Ada_QLabel_setPixmap_0_wrapper");

   procedure setScaledContents_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Scaled : Qt4.bool);
   pragma Import (C, setScaledContents_0_wrapper,
                     "__Qt4Ada_QLabel_setScaledContents_0_wrapper");

   procedure setWordWrap_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     On : Qt4.bool);
   pragma Import (C, setWordWrap_0_wrapper,
                     "__Qt4Ada_QLabel_setWordWrap_0_wrapper");

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

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

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

   procedure setNum_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Num : Qt4.Q_Integer);
   pragma Import (C, setNum_0_wrapper,
                     "__Qt4Ada_QLabel_setNum_0_wrapper");

   procedure setText_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Text : not null access constant Qt4.Strings.Internals.QString);
   pragma Import (C, setText_0_wrapper,
                     "__Qt4Ada_QLabel_setText_0_wrapper");

   procedure setAlignment_wrapper
    (Self  : not null access Qt_Ada.Internals.Objects.QObject;
     Value : Qt4.Alignment);
   pragma Import
    (C, setAlignment_wrapper, "__Qt4Ada_QLabel_setAlignment_wrapper");

   procedure setTextInteractionFlags_wrapper
    (Self  : not null access Qt_Ada.Internals.Objects.QObject;
     Flags : Qt4.Text_Interaction_Flags);
   pragma Import (C, setTextInteractionFlags_wrapper,
                  "__Qt4Ada_QLabel_setTextInteractionFlags_wrapper");

   -------------------
   -- Set_Alignment --
   -------------------

   procedure Set_Alignment
    (Self  : not null access Q_Label'Class;
     Value : Qt4.Alignment)
   is
   begin
      setAlignment_wrapper (Self.QObject_View, Value);
   end Set_Alignment;

   --------------------------------
   -- Set_Text_Interaction_Flags --
   --------------------------------

   procedure Set_Text_Interaction_Flags
    (Self  : not null access Q_Label'Class;
     Flags : Qt4.Text_Interaction_Flags)
   is
   begin
      setTextInteractionFlags_wrapper (Self.QObject_View, Flags);
   end Set_Text_Interaction_Flags;

   pragma Style_Checks ("N");

   -----------
   -- Buddy --
   -----------

   function Buddy
    (Self : not null access constant Q_Label'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
           (buddy_0_wrapper
             (Self.QObject_View)).all)'Access;
   end Buddy;

   -------------------------
   -- Has_Scaled_Contents --
   -------------------------

   function Has_Scaled_Contents
    (Self : not null access constant Q_Label'Class)
       return Standard.Boolean
   is
   begin
      return
        Qt4.To_Boolean
         (hasScaledContents_0_wrapper
           (Self.QObject_View));
   end Has_Scaled_Contents;

   ------------
   -- Indent --
   ------------

   function Indent
    (Self : not null access constant Q_Label'Class)
       return Qt4.Q_Integer
   is
   begin
      return
        indent_0_wrapper
         (Self.QObject_View);
   end Indent;

   ------------
   -- Margin --
   ------------

   function Margin
    (Self : not null access constant Q_Label'Class)
       return Qt4.Q_Integer
   is
   begin
      return
        margin_0_wrapper
         (Self.QObject_View);
   end Margin;

   -------------------------
   -- Open_External_Links --
   -------------------------

   function Open_External_Links
    (Self : not null access constant Q_Label'Class)
       return Standard.Boolean
   is
   begin
      return
        Qt4.To_Boolean
         (openExternalLinks_0_wrapper
           (Self.QObject_View));
   end Open_External_Links;

   ---------------
   -- Set_Buddy --
   ---------------

   procedure Set_Buddy
    (Self : not null access Q_Label'Class;
     Buddy : not null access Qt4.Widgets.Q_Widget'Class)
   is
   begin
      setBuddy_0_wrapper
       (Self.QObject_View,
        Buddy.QObject_View);
   end Set_Buddy;

   ----------------
   -- Set_Indent --
   ----------------

   procedure Set_Indent
    (Self : not null access Q_Label'Class;
     Indent : Qt4.Q_Integer)
   is
   begin
      setIndent_0_wrapper
       (Self.QObject_View,
        Indent);
   end Set_Indent;

   ----------------
   -- Set_Margin --
   ----------------

   procedure Set_Margin
    (Self : not null access Q_Label'Class;
     Margin : Qt4.Q_Integer)
   is
   begin
      setMargin_0_wrapper
       (Self.QObject_View,
        Margin);
   end Set_Margin;

   -----------------------------
   -- Set_Open_External_Links --
   -----------------------------

   procedure Set_Open_External_Links
    (Self : not null access Q_Label'Class;
     Open : Standard.Boolean)
   is
   begin
      setOpenExternalLinks_0_wrapper
       (Self.QObject_View,
        Qt4.To_bool (Open));
   end Set_Open_External_Links;

   ----------------
   -- Set_Pixmap --
   ----------------

   procedure Set_Pixmap
    (Self : not null access Q_Label'Class;
     Pixmap : Qt4.Pixmaps.Q_Pixmap)
   is
   begin
      setPixmap_0_wrapper
       (Self.QObject_View,
        Qt4.Pixmaps.Internals.QPixmap_View (Pixmap));
   end Set_Pixmap;

   -------------------------
   -- Set_Scaled_Contents --
   -------------------------

   procedure Set_Scaled_Contents
    (Self : not null access Q_Label'Class;
     Scaled : Standard.Boolean)
   is
   begin
      setScaledContents_0_wrapper
       (Self.QObject_View,
        Qt4.To_bool (Scaled));
   end Set_Scaled_Contents;

   -------------------
   -- Set_Word_Wrap --
   -------------------

   procedure Set_Word_Wrap
    (Self : not null access Q_Label'Class;
     On : Standard.Boolean)
   is
   begin
      setWordWrap_0_wrapper
       (Self.QObject_View,
        Qt4.To_bool (On));
   end Set_Word_Wrap;

   ----------
   -- Text --
   ----------

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

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

      return Returns;
   end Text;

   ---------------
   -- Word_Wrap --
   ---------------

   function Word_Wrap
    (Self : not null access constant Q_Label'Class)
       return Standard.Boolean
   is
   begin
      return
        Qt4.To_Boolean
         (wordWrap_0_wrapper
           (Self.QObject_View));
   end Word_Wrap;

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

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

   -------------
   -- Set_Num --
   -------------

   procedure Set_Num
    (Self : not null access Q_Label'Class;
     Num : Qt4.Q_Integer)
   is
   begin
      setNum_0_wrapper
       (Self.QObject_View,
        Num);
   end Set_Num;

   --------------
   -- Set_Text --
   --------------

   procedure Set_Text
    (Self : not null access Q_Label'Class;
     Text : Qt4.Strings.Q_String)
   is
   begin
      setText_0_wrapper
       (Self.QObject_View,
        Qt4.Strings.Internals.QString_View (Text));
   end Set_Text;

end Qt4.Labels;
