------------------------------------------------------------------------------
--                                                                          --
--                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.Objects;
with Qt4.String_Lists;
with Qt4.Strings;
with Qt4.Variants;
with Qt_Ada.Generic_Object_Pointers;

package Qt4.Settings is

   type Settings_Format is
    (Native_Format,
     Ini_Format,
     Invalid_Format,
     Custom_Format1,
     Custom_Format2,
     Custom_Format3,
     Custom_Format4,
     Custom_Format5,
     Custom_Format6,
     Custom_Format7,
     Custom_Format8,
     Custom_Format9,
     Custom_Format10,
     Custom_Format11,
     Custom_Format12,
     Custom_Format13,
     Custom_Format14,
     Custom_Format15,
     Custom_Format16);
   pragma Convention (C, Settings_Format);
   for Settings_Format use
    (Native_Format =>      16#0#,
     Ini_Format =>      16#1#,
     Invalid_Format =>     16#10#,
     Custom_Format1 =>     16#11#,
     Custom_Format2 =>     16#12#,
     Custom_Format3 =>     16#13#,
     Custom_Format4 =>     16#14#,
     Custom_Format5 =>     16#15#,
     Custom_Format6 =>     16#16#,
     Custom_Format7 =>     16#17#,
     Custom_Format8 =>     16#18#,
     Custom_Format9 =>     16#19#,
     Custom_Format10 =>     16#1A#,
     Custom_Format11 =>     16#1B#,
     Custom_Format12 =>     16#1C#,
     Custom_Format13 =>     16#1D#,
     Custom_Format14 =>     16#1E#,
     Custom_Format15 =>     16#1F#,
     Custom_Format16 =>     16#20#);

   type Settings_Scope is
    (User_Scope,
     System_Scope);
   pragma Convention (C, Settings_Scope);

   type Settings_Status is
    (No_Error,
     Access_Error,
     Format_Error);
   pragma Convention (C, Settings_Status);

   type Q_Settings is limited interface
     and Qt4.Objects.Q_Object;

   type Q_Settings_Access is
     access all Q_Settings'Class;
   for Q_Settings_Access'Storage_Size use 0;

   type Q_Settings_Pointer is tagged;

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

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

   procedure Begin_Group
    (Self : not null access Q_Settings'Class;
     Prefix : Qt4.Strings.Q_String);

   function Begin_Read_Array
    (Self : not null access Q_Settings'Class;
     Prefix : Qt4.Strings.Q_String)
       return Qt4.Q_Integer;

   procedure Begin_Write_Array
    (Self : not null access Q_Settings'Class;
     Prefix : Qt4.Strings.Q_String;
     Size : Qt4.Q_Integer
       :=  1);

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

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

   procedure Clear
    (Self : not null access Q_Settings'Class);

   function Contains
    (Self : not null access constant Q_Settings'Class;
     Key : Qt4.Strings.Q_String)
       return Standard.Boolean;

   procedure End_Array
    (Self : not null access Q_Settings'Class);

   procedure End_Group
    (Self : not null access Q_Settings'Class);

   function Fallbacks_Enabled
    (Self : not null access constant Q_Settings'Class)
       return Standard.Boolean;

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

   function Format
    (Self : not null access constant Q_Settings'Class)
       return Qt4.Settings.Settings_Format;

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

   function Is_Writable
    (Self : not null access constant Q_Settings'Class)
       return Standard.Boolean;

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

   procedure Remove
    (Self : not null access Q_Settings'Class;
     Key : Qt4.Strings.Q_String);

   function Scope
    (Self : not null access constant Q_Settings'Class)
       return Qt4.Settings.Settings_Scope;

   procedure Set_Array_Index
    (Self : not null access Q_Settings'Class;
     Index : Qt4.Q_Integer);

   procedure Set_Fallbacks_Enabled
    (Self : not null access Q_Settings'Class;
     Enabled : Standard.Boolean);

   procedure Set_Value
    (Self : not null access Q_Settings'Class;
     Key : Qt4.Strings.Q_String;
     Value : Qt4.Variants.Q_Variant);

   function Status
    (Self : not null access constant Q_Settings'Class)
       return Qt4.Settings.Settings_Status;

   procedure Sync
    (Self : not null access Q_Settings'Class);

   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;

   function Default_Format return Qt4.Settings.Settings_Format;

   package Q_Settings_Pointers is
     new Qt_Ada.Generic_Object_Pointers (Q_Settings, Q_Settings_Access);

   type Q_Settings_Pointer is
     new Q_Settings_Pointers.Q_Pointer with null record;

end Qt4.Settings;
