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

with Qt_Ada.Internals.Objects.Core_Application_Proxies;
pragma Warnings (Off, Qt_Ada.Internals.Objects.Core_Application_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.Core_Applications is

   procedure applicationDirPath_wrapper
    (Result : not null access Strings.Internals.QString);
   pragma Import (C, applicationDirPath_wrapper,
                   "__Qt4Ada_QCoreApplication_applicationDirPath_wrapper");

   procedure arguments_0_wrapper
    (Returns : not null access Qt4.String_Lists.Internals.QStringList);
   pragma Import (C, arguments_0_wrapper,
                     "__QtAda_QCoreApplication_arguments_S");

   function instance_wrapper
     return not null access Qt_Ada.Internals.Objects.QObject;
   pragma Import (C, instance_wrapper,
                  "__QtAda_QCoreApplication_instance_wrapper");

   procedure setApplicationName_QStringCR
    (Application : not null Qt4.Strings.Internals.QString_Access);
   pragma Import
    (C, setApplicationName_QStringCR,
     "__QtAda_QCoreApplication_setApplicationName_QStringCR");

   procedure setApplicationVersion_QStringCR
    (Version : not null Qt4.Strings.Internals.QString_Access);
   pragma Import
    (C, setApplicationVersion_QStringCR,
     "__QtAda_QCoreApplication_setApplicationVersion_QStringCR");

   procedure setOrganizationDomain_QStringCR
    (Org_Domain : not null Qt4.Strings.Internals.QString_Access);
   pragma Import
    (C, setOrganizationDomain_QStringCR,
     "__QtAda_QCoreApplication_setOrganizationDomain_QStringCR");

   procedure setOrganizationName_QStringCR
    (Org_Name : not null Qt4.Strings.Internals.QString_Access);
   pragma Import
    (C, setOrganizationName_QStringCR,
     "__QtAda_QCoreApplication_setOrganizationName_QStringCR");

   --------------------------
   -- Application_Dir_Path --
   --------------------------

   function Application_Dir_Path return Strings.Q_String is
   begin
      return Result : Strings.Q_String do
         applicationDirPath_wrapper
          (Strings.Internals.QString_View (Result));
      end return;
   end Application_Dir_Path;

   ---------------
   -- Arguments --
   ---------------

   function Arguments return Qt4.String_Lists.Q_String_List is
      Returns : Qt4.String_Lists.Q_String_List;

   begin
      arguments_0_wrapper
       (Qt4.String_Lists.Internals.QStringList_View (Returns));

      return Returns;
   end Arguments;

   --------------
   -- Instance --
   --------------

   function Instance return not null access Q_Core_Application'Class is
   begin
      return
        Q_Core_Application'Class
         (Qt_Ada.Internals.Object_Registry.To_Q_Object
           (instance_wrapper).all)'Access;
   end Instance;

   --------------------------
   -- Set_Application_Name --
   --------------------------

   procedure Set_Application_Name (Application : Qt4.Strings.Q_String) is
   begin
      setApplicationName_QStringCR
       (Qt4.Strings.Internals.QString_View (Application));
   end Set_Application_Name;

   -----------------------------
   -- Set_Application_Version --
   -----------------------------

   procedure Set_Application_Version (Version : Qt4.Strings.Q_String) is
   begin
      setApplicationVersion_QStringCR
       (Qt4.Strings.Internals.QString_View (Version));
   end Set_Application_Version;

   -----------------------------
   -- Set_Organization_Domain --
   -----------------------------

   procedure Set_Organization_Domain (Org_Domain : Qt4.Strings.Q_String) is
   begin
      setOrganizationDomain_QStringCR
       (Qt4.Strings.Internals.QString_View (Org_Domain));
   end Set_Organization_Domain;

   ---------------------------
   -- Set_Organization_Name --
   ---------------------------

   procedure Set_Organization_Name (Org_Name : Qt4.Strings.Q_String) is
   begin
      setOrganizationName_QStringCR
       (Qt4.Strings.Internals.QString_View (Org_Name));
   end Set_Organization_Name;

   pragma Style_Checks ("N");

   -----------
   -- Dummy --
   -----------

   procedure Dummy is
   begin
      null;
   end Dummy;

end Qt4.Core_Applications;
