------------------------------------------------------------------------------
--                                                                          --
--                An Ada2005 binding to the Qt C++ framework                --
--                                                                          --
------------------------------------------------------------------------------
--                                                                          --
-- Copyright © 2008, 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.Dialogs;
with Qt4.String_Lists;
with Qt4.Strings;
with Qt4.Widgets;
with Qt_Ada.Generic_Object_Pointers;

package Qt4.File_Dialogs is

   type File_Dialog_File_Mode is
    (Any_File,
     Existing_File,
     Directory,
     Existing_Files,
     Directory_Only);
   pragma Convention (C, File_Dialog_File_Mode);

   type Q_File_Dialog is limited interface
     and Qt4.Dialogs.Q_Dialog;

   type Q_File_Dialog_Access is
     access all Q_File_Dialog'Class;
   for Q_File_Dialog_Access'Storage_Size use 0;

   type Q_File_Dialog_Pointer is tagged;

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

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

   function File_Mode
    (Self : not null access constant Q_File_Dialog'Class)
       return Qt4.File_Dialogs.File_Dialog_File_Mode;

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

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

   procedure Select_File
    (Self : not null access Q_File_Dialog'Class;
     Filename : Qt4.Strings.Q_String);

   procedure Select_Filter
    (Self : not null access Q_File_Dialog'Class;
     Filter : Qt4.Strings.Q_String);

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

   procedure Set_Confirm_Overwrite
    (Self : not null access Q_File_Dialog'Class;
     Enabled : Standard.Boolean);

   procedure Set_Default_Suffix
    (Self : not null access Q_File_Dialog'Class;
     Suffix : Qt4.Strings.Q_String);

   procedure Set_Directory
    (Self : not null access Q_File_Dialog'Class;
     Directory : Qt4.Strings.Q_String);

   procedure Set_File_Mode
    (Self : not null access Q_File_Dialog'Class;
     Mode : Qt4.File_Dialogs.File_Dialog_File_Mode);

   procedure Set_Filter
    (Self : not null access Q_File_Dialog'Class;
     Filter : Qt4.Strings.Q_String);

   procedure Set_Read_Only
    (Self : not null access Q_File_Dialog'Class;
     Enabled : Standard.Boolean);

   procedure Set_Resolve_Symlinks
    (Self : not null access Q_File_Dialog'Class;
     Enabled : Standard.Boolean);

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

   type Option is
    (Default,
     Show_Dirs_Only,
     Dont_Resolve_Symlinks,
     Dont_Confirm_Overwrite,
     Dont_Use_Sheet,
     Dont_Use_Native_Dialog);
   pragma Convention (C, Option);
   for Option'Size use Interfaces.C.int'Size;
   for Option use
    (Default                => 16#00#,
     Show_Dirs_Only         => 16#01#,
     Dont_Resolve_Symlinks  => 16#02#,
     Dont_Confirm_Overwrite => 16#04#,
     Dont_Use_Sheet         => 16#08#,
     Dont_Use_Native_Dialog => 16#10#);

   package Option_Flags is
     new Qt4_Generic_Flags (Option);

   type Options is new Option_Flags.Flags;

   function Get_Existing_Directory
    (Parent  : access Qt4.Widgets.Q_Widget'Class := null;
     Caption : Qt4.Strings.Q_String := Qt4.Strings.Create;
     Dir     : Qt4.Strings.Q_String := Qt4.Strings.Create;
     Opts    : Options := +Show_Dirs_Only)
       return Qt4.Strings.Q_String;

   function Get_Open_File_Name
    (Parent          : access Qt4.Widgets.Q_Widget'Class := null;
     Caption         : Qt4.Strings.Q_String := Qt4.Strings.Create;
     Dir             : Qt4.Strings.Q_String := Qt4.Strings.Create;
     Filter          : Qt4.Strings.Q_String := Qt4.Strings.Create;
     Selected_Filter : Qt4.Strings.Q_String := Qt4.Strings.Create;
     Opts            : Options := +Default)
       return Qt4.Strings.Q_String;

   function Get_Save_File_Name
    (Parent          : access Widgets.Q_Widget'Class := null;
     Caption         : Qt4.Strings.Q_String := Qt4.Strings.Create;
     Dir             : Qt4.Strings.Q_String := Qt4.Strings.Create;
     Filter          : Qt4.Strings.Q_String := Qt4.Strings.Create;
     Selected_Filter : Qt4.Strings.Q_String := Qt4.Strings.Create;
     Opts            : Options := +Default)
       return Qt4.Strings.Q_String;

   package Q_File_Dialog_Pointers is
     new Qt_Ada.Generic_Object_Pointers (Q_File_Dialog, Q_File_Dialog_Access);

   type Q_File_Dialog_Pointer is
     new Q_File_Dialog_Pointers.Q_Pointer with null record;

end Qt4.File_Dialogs;
