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

with Qt_Ada.Internals.Objects.Settings_Proxies;
pragma Warnings (Off, Qt_Ada.Internals.Objects.Settings_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.Settings is

   procedure allKeys_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Returns : not null access Qt4.String_Lists.Internals.QStringList);
   pragma Import (C, allKeys_0_wrapper,
                     "__Qt4Ada_QSettings_allKeys_0_wrapper");

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

   procedure beginGroup_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Prefix : not null access constant Qt4.Strings.Internals.QString);
   pragma Import (C, beginGroup_0_wrapper,
                     "__Qt4Ada_QSettings_beginGroup_0_wrapper");

   function beginReadArray_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Prefix : not null access constant Qt4.Strings.Internals.QString)
       return Qt4.Q_Integer;
   pragma Import (C, beginReadArray_0_wrapper,
                     "__Qt4Ada_QSettings_beginReadArray_0_wrapper");

   procedure beginWriteArray_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Prefix : not null access constant Qt4.Strings.Internals.QString;
     Size : Qt4.Q_Integer);
   pragma Import (C, beginWriteArray_0_wrapper,
                     "__Qt4Ada_QSettings_beginWriteArray_0_wrapper");

   procedure childGroups_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Returns : not null access Qt4.String_Lists.Internals.QStringList);
   pragma Import (C, childGroups_0_wrapper,
                     "__Qt4Ada_QSettings_childGroups_0_wrapper");

   procedure childKeys_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Returns : not null access Qt4.String_Lists.Internals.QStringList);
   pragma Import (C, childKeys_0_wrapper,
                     "__Qt4Ada_QSettings_childKeys_0_wrapper");

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

   function contains_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Key : not null access constant Qt4.Strings.Internals.QString)
       return Qt4.bool;
   pragma Import (C, contains_0_wrapper,
                     "__Qt4Ada_QSettings_contains_0_wrapper");

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

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

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

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

   function format_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject)
       return Qt4.Settings.Settings_Format;
   pragma Import (C, format_0_wrapper,
                     "__Qt4Ada_QSettings_format_0_wrapper");

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

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

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

   procedure remove_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Key : not null access constant Qt4.Strings.Internals.QString);
   pragma Import (C, remove_0_wrapper,
                     "__Qt4Ada_QSettings_remove_0_wrapper");

   function scope_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject)
       return Qt4.Settings.Settings_Scope;
   pragma Import (C, scope_0_wrapper,
                     "__Qt4Ada_QSettings_scope_0_wrapper");

   procedure setArrayIndex_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Index : Qt4.Q_Integer);
   pragma Import (C, setArrayIndex_0_wrapper,
                     "__Qt4Ada_QSettings_setArrayIndex_0_wrapper");

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

   procedure setValue_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Key : not null access constant Qt4.Strings.Internals.QString;
     Value : not null access constant Qt4.Variants.Internals.QVariant);
   pragma Import (C, setValue_0_wrapper,
                     "__Qt4Ada_QSettings_setValue_0_wrapper");

   function status_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject)
       return Qt4.Settings.Settings_Status;
   pragma Import (C, status_0_wrapper,
                     "__Qt4Ada_QSettings_status_0_wrapper");

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

   procedure value_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Key : not null access constant Qt4.Strings.Internals.QString;
     Default_Value : not null access constant Qt4.Variants.Internals.QVariant;
     Returns : not null access Qt4.Variants.Internals.QVariant);
   pragma Import (C, value_0_wrapper,
                     "__Qt4Ada_QSettings_value_0_wrapper");

   function defaultFormat return Qt4.Settings.Settings_Format;
   pragma Import (C, defaultFormat, "__Qt4Ada_QSettings_defaultFormat_wrapper");

   --------------------
   -- Default_Format --
   --------------------

   function Default_Format return Qt4.Settings.Settings_Format is
   begin
      return defaultFormat;
   end Default_Format;

   pragma Style_Checks ("N");

   --------------
   -- All_Keys --
   --------------

   function All_Keys
    (Self : not null access constant Q_Settings'Class)
       return Qt4.String_Lists.Q_String_List
   is
      Returns : Qt4.String_Lists.Q_String_List;

   begin
      allKeys_0_wrapper
       (Self.QObject_View,
        Qt4.String_Lists.Internals.QStringList_View (Returns));

      return Returns;
   end All_Keys;

   ----------------------
   -- Application_Name --
   ----------------------

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

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

      return Returns;
   end Application_Name;

   -----------------
   -- Begin_Group --
   -----------------

   procedure Begin_Group
    (Self : not null access Q_Settings'Class;
     Prefix : Qt4.Strings.Q_String)
   is
   begin
      beginGroup_0_wrapper
       (Self.QObject_View,
        Qt4.Strings.Internals.QString_View (Prefix));
   end Begin_Group;

   ----------------------
   -- Begin_Read_Array --
   ----------------------

   function Begin_Read_Array
    (Self : not null access Q_Settings'Class;
     Prefix : Qt4.Strings.Q_String)
       return Qt4.Q_Integer
   is
   begin
      return
        beginReadArray_0_wrapper
         (Self.QObject_View,
          Qt4.Strings.Internals.QString_View (Prefix));
   end Begin_Read_Array;

   -----------------------
   -- Begin_Write_Array --
   -----------------------

   procedure Begin_Write_Array
    (Self : not null access Q_Settings'Class;
     Prefix : Qt4.Strings.Q_String;
     Size : Qt4.Q_Integer
       :=  1)
   is
   begin
      beginWriteArray_0_wrapper
       (Self.QObject_View,
        Qt4.Strings.Internals.QString_View (Prefix),
        Size);
   end Begin_Write_Array;

   ------------------
   -- Child_Groups --
   ------------------

   function Child_Groups
    (Self : not null access constant Q_Settings'Class)
       return Qt4.String_Lists.Q_String_List
   is
      Returns : Qt4.String_Lists.Q_String_List;

   begin
      childGroups_0_wrapper
       (Self.QObject_View,
        Qt4.String_Lists.Internals.QStringList_View (Returns));

      return Returns;
   end Child_Groups;

   ----------------
   -- Child_Keys --
   ----------------

   function Child_Keys
    (Self : not null access constant Q_Settings'Class)
       return Qt4.String_Lists.Q_String_List
   is
      Returns : Qt4.String_Lists.Q_String_List;

   begin
      childKeys_0_wrapper
       (Self.QObject_View,
        Qt4.String_Lists.Internals.QStringList_View (Returns));

      return Returns;
   end Child_Keys;

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

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

   --------------
   -- Contains --
   --------------

   function Contains
    (Self : not null access constant Q_Settings'Class;
     Key : Qt4.Strings.Q_String)
       return Standard.Boolean
   is
   begin
      return
        Qt4.To_Boolean
         (contains_0_wrapper
           (Self.QObject_View,
            Qt4.Strings.Internals.QString_View (Key)));
   end Contains;

   ---------------
   -- End_Array --
   ---------------

   procedure End_Array
    (Self : not null access Q_Settings'Class)
   is
   begin
      endArray_0_wrapper
       (Self.QObject_View);
   end End_Array;

   ---------------
   -- End_Group --
   ---------------

   procedure End_Group
    (Self : not null access Q_Settings'Class)
   is
   begin
      endGroup_0_wrapper
       (Self.QObject_View);
   end End_Group;

   -----------------------
   -- Fallbacks_Enabled --
   -----------------------

   function Fallbacks_Enabled
    (Self : not null access constant Q_Settings'Class)
       return Standard.Boolean
   is
   begin
      return
        Qt4.To_Boolean
         (fallbacksEnabled_0_wrapper
           (Self.QObject_View));
   end Fallbacks_Enabled;

   ---------------
   -- File_Name --
   ---------------

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

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

      return Returns;
   end File_Name;

   ------------
   -- Format --
   ------------

   function Format
    (Self : not null access constant Q_Settings'Class)
       return Qt4.Settings.Settings_Format
   is
   begin
      return
        format_0_wrapper
         (Self.QObject_View);
   end Format;

   -----------
   -- Group --
   -----------

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

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

      return Returns;
   end Group;

   -----------------
   -- Is_Writable --
   -----------------

   function Is_Writable
    (Self : not null access constant Q_Settings'Class)
       return Standard.Boolean
   is
   begin
      return
        Qt4.To_Boolean
         (isWritable_0_wrapper
           (Self.QObject_View));
   end Is_Writable;

   -----------------------
   -- Organization_Name --
   -----------------------

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

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

      return Returns;
   end Organization_Name;

   ------------
   -- Remove --
   ------------

   procedure Remove
    (Self : not null access Q_Settings'Class;
     Key : Qt4.Strings.Q_String)
   is
   begin
      remove_0_wrapper
       (Self.QObject_View,
        Qt4.Strings.Internals.QString_View (Key));
   end Remove;

   -----------
   -- Scope --
   -----------

   function Scope
    (Self : not null access constant Q_Settings'Class)
       return Qt4.Settings.Settings_Scope
   is
   begin
      return
        scope_0_wrapper
         (Self.QObject_View);
   end Scope;

   ---------------------
   -- Set_Array_Index --
   ---------------------

   procedure Set_Array_Index
    (Self : not null access Q_Settings'Class;
     Index : Qt4.Q_Integer)
   is
   begin
      setArrayIndex_0_wrapper
       (Self.QObject_View,
        Index);
   end Set_Array_Index;

   ---------------------------
   -- Set_Fallbacks_Enabled --
   ---------------------------

   procedure Set_Fallbacks_Enabled
    (Self : not null access Q_Settings'Class;
     Enabled : Standard.Boolean)
   is
   begin
      setFallbacksEnabled_0_wrapper
       (Self.QObject_View,
        Qt4.To_bool (Enabled));
   end Set_Fallbacks_Enabled;

   ---------------
   -- Set_Value --
   ---------------

   procedure Set_Value
    (Self : not null access Q_Settings'Class;
     Key : Qt4.Strings.Q_String;
     Value : Qt4.Variants.Q_Variant)
   is
   begin
      setValue_0_wrapper
       (Self.QObject_View,
        Qt4.Strings.Internals.QString_View (Key),
        Qt4.Variants.Internals.QVariant_View (Value));
   end Set_Value;

   ------------
   -- Status --
   ------------

   function Status
    (Self : not null access constant Q_Settings'Class)
       return Qt4.Settings.Settings_Status
   is
   begin
      return
        status_0_wrapper
         (Self.QObject_View);
   end Status;

   ----------
   -- Sync --
   ----------

   procedure Sync
    (Self : not null access Q_Settings'Class)
   is
   begin
      sync_0_wrapper
       (Self.QObject_View);
   end Sync;

   -----------
   -- Value --
   -----------

   function Value
    (Self : not null access Q_Settings'Class;
     Key : Qt4.Strings.Q_String;
     Default_Value : Qt4.Variants.Q_Variant
       := Qt4.Variants.Create)
       return Qt4.Variants.Q_Variant
   is
      Returns : Qt4.Variants.Q_Variant;

   begin
      value_0_wrapper
       (Self.QObject_View,
        Qt4.Strings.Internals.QString_View (Key),
        Qt4.Variants.Internals.QVariant_View (Default_Value),
        Qt4.Variants.Internals.QVariant_View (Returns));

      return Returns;
   end Value;

end Qt4.Settings;
