------------------------------------------------------------------------------
--                                                                          --
--                An Ada2005 binding to the Qt C++ framework                --
--                                                                          --
------------------------------------------------------------------------------
--                                                                          --
-- Copyright © 2009 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.Shortcut_Proxies;
pragma Warnings (Off, Qt_Ada.Internals.Objects.Shortcut_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.Shortcuts is

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

   function context_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject)
       return Qt4.Shortcut_Context;
   pragma Import (C, context_0_wrapper,
                     "__Qt4Ada_QShortcut_context_0_wrapper");

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

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

   procedure key_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Returns : not null access Qt4.Key_Sequences.Internals.QKeySequence);
   pragma Import (C, key_0_wrapper,
                     "__Qt4Ada_QShortcut_key_0_wrapper");

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

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

   procedure setContext_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Context : Qt4.Shortcut_Context);
   pragma Import (C, setContext_0_wrapper,
                     "__Qt4Ada_QShortcut_setContext_0_wrapper");

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

   procedure setKey_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Key : not null access constant Qt4.Key_Sequences.Internals.QKeySequence);
   pragma Import (C, setKey_0_wrapper,
                     "__Qt4Ada_QShortcut_setKey_0_wrapper");

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

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

   pragma Style_Checks ("N");

   -----------------
   -- Auto_Repeat --
   -----------------

   function Auto_Repeat
    (Self : not null access constant Q_Shortcut'Class)
       return Standard.Boolean
   is
   begin
      return
        Qt4.To_Boolean
         (autoRepeat_0_wrapper
           (Self.QObject_View));
   end Auto_Repeat;

   -------------
   -- Context --
   -------------

   function Context
    (Self : not null access Q_Shortcut'Class)
       return Qt4.Shortcut_Context
   is
   begin
      return
        context_0_wrapper
         (Self.QObject_View);
   end Context;

   --------
   -- Id --
   --------

   function Id
    (Self : not null access constant Q_Shortcut'Class)
       return Qt4.Q_Integer
   is
   begin
      return
        id_0_wrapper
         (Self.QObject_View);
   end Id;

   ----------------
   -- Is_Enabled --
   ----------------

   function Is_Enabled
    (Self : not null access constant Q_Shortcut'Class)
       return Standard.Boolean
   is
   begin
      return
        Qt4.To_Boolean
         (isEnabled_0_wrapper
           (Self.QObject_View));
   end Is_Enabled;

   ---------
   -- Key --
   ---------

   function Key
    (Self : not null access constant Q_Shortcut'Class)
       return Qt4.Key_Sequences.Q_Key_Sequence
   is
      Returns : Qt4.Key_Sequences.Q_Key_Sequence;

   begin
      key_0_wrapper
       (Self.QObject_View,
        Qt4.Key_Sequences.Internals.QKeySequence_View (Returns));

      return Returns;
   end Key;

   -------------------
   -- Parent_Widget --
   -------------------

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

   ---------------------
   -- Set_Auto_Repeat --
   ---------------------

   procedure Set_Auto_Repeat
    (Self : not null access Q_Shortcut'Class;
     On : Standard.Boolean)
   is
   begin
      setAutoRepeat_0_wrapper
       (Self.QObject_View,
        Qt4.To_bool (On));
   end Set_Auto_Repeat;

   -----------------
   -- Set_Context --
   -----------------

   procedure Set_Context
    (Self : not null access Q_Shortcut'Class;
     Context : Qt4.Shortcut_Context)
   is
   begin
      setContext_0_wrapper
       (Self.QObject_View,
        Context);
   end Set_Context;

   -----------------
   -- Set_Enabled --
   -----------------

   procedure Set_Enabled
    (Self : not null access Q_Shortcut'Class;
     Enabled : Standard.Boolean)
   is
   begin
      setEnabled_0_wrapper
       (Self.QObject_View,
        Qt4.To_bool (Enabled));
   end Set_Enabled;

   -------------
   -- Set_Key --
   -------------

   procedure Set_Key
    (Self : not null access Q_Shortcut'Class;
     Key : Qt4.Key_Sequences.Q_Key_Sequence)
   is
   begin
      setKey_0_wrapper
       (Self.QObject_View,
        Qt4.Key_Sequences.Internals.QKeySequence_View (Key));
   end Set_Key;

   --------------------
   -- Set_Whats_This --
   --------------------

   procedure Set_Whats_This
    (Self : not null access Q_Shortcut'Class;
     Text : Qt4.Strings.Q_String)
   is
   begin
      setWhatsThis_0_wrapper
       (Self.QObject_View,
        Qt4.Strings.Internals.QString_View (Text));
   end Set_Whats_This;

   ----------------
   -- Whats_This --
   ----------------

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

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

      return Returns;
   end Whats_This;

end Qt4.Shortcuts;
