------------------------------------------------------------------------------
--                                                                          --
--                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 Qt4.Child_Events;
with Qt4.Events;
with Qt4.Timer_Events;
with Qt_Ada.Internals.Events;
with Qt_Ada.Internals.Object_Registry;
pragma Elaborate (Qt_Ada.Internals.Object_Registry);
with Qt_Ada.Internals.Objects;
with Qt_Ada.Internals.Objects.Object_Utilities;

package body Qt4.Processes.Directors is

   function qt_metacall_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Kind : Qt4.Meta_Objects.Call;
     Id   : Qt4.Q_Integer;
     Args : Qt4.Address_Pointer)
       return Qt4.Q_Integer;
   pragma Import (C, qt_metacall_wrapper,
                  "__Qt4Ada_QProcess_qt_metacall_wrapper");

   function qt_metacast_wrapper
    (Self  : not null access Qt_Ada.Internals.Objects.QObject;
     Class : Interfaces.C.char_array)
       return System.Address;
   pragma Import (C, qt_metacast_wrapper,
                  "__Qt4Ada_QProcess_qt_metacast_wrapper");

   procedure error_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Error : Qt4.Processes.Process_Process_Error);
   pragma Import (C, error_0_wrapper,
                     "__Qt4Ada_QProcess_error_0_wrapper");

   procedure finished_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Exit_Code : Qt4.Q_Integer;
     Exit_Status : Qt4.Processes.Process_Exit_Status);
   pragma Import (C, finished_0_wrapper,
                     "__Qt4Ada_QProcess_finished_0_wrapper");

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

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

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

   procedure stateChanged_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     State : Qt4.Processes.Process_Process_State);
   pragma Import (C, stateChanged_0_wrapper,
                     "__Qt4Ada_QProcess_stateChanged_0_wrapper");

   procedure setProcessState_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     State : Qt4.Processes.Process_Process_State);
   pragma Import (C, setProcessState_0_wrapper,
                     "__Qt4Ada_QProcess_setProcessState_0_wrapper");

   procedure setupChildProcess_0_dispatch
    (Self : not null Qt_Ada.Internals.Objects.Q_Object_Base_Access);
   pragma Export (C, setupChildProcess_0_dispatch,
                     "__Qt4Ada_QProcess_setupChildProcess_0_dispatch");
   pragma Warnings (Off, setupChildProcess_0_dispatch);
   --  GCC GNAT 4.3.0: suppress warning
   --  is a tagged type which does not correspond to any C type

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

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

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

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

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

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

   procedure bytesWritten_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Bytes : Qt4.Q_Integer_64);
   pragma Import (C, bytesWritten_0_wrapper,
                     "__Qt4Ada_QProcess_bytesWritten_0_wrapper");

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

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

   procedure setErrorString_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Error_String : not null access constant Qt4.Strings.Internals.QString);
   pragma Import (C, setErrorString_0_wrapper,
                     "__Qt4Ada_QProcess_setErrorString_0_wrapper");

   procedure childEvent_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Event : not null access Qt_Ada.Internals.Events.QEvent);
   pragma Import (C, childEvent_0_wrapper,
                     "__Qt4Ada_QProcess_childEvent_0_wrapper");

   procedure customEvent_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Event : not null access Qt_Ada.Internals.Events.QEvent);
   pragma Import (C, customEvent_0_wrapper,
                     "__Qt4Ada_QProcess_customEvent_0_wrapper");

   procedure timerEvent_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Event : not null access Qt_Ada.Internals.Events.QEvent);
   pragma Import (C, timerEvent_0_wrapper,
                     "__Qt4Ada_QProcess_timerEvent_0_wrapper");

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

   function open_wrapper
    (This : not null access Qt_Ada.Internals.Objects.QObject;
     Mode : Qt4.IO_Devices.Open_Mode)
       return bool;
   pragma Import (C, open_wrapper, "__Qt4Ada_QProcess_open_wrapper");

   ----------
   -- Open --
   ----------

   overriding
   function Open
    (Self : not null access Q_Process_Director;
     Mode : Qt4.IO_Devices.Open_Mode)
       return Boolean
   is
   begin
      return Qt4.To_Boolean (open_wrapper (Self.QObject_View, Mode));
   end Open;

   pragma Style_Checks ("N");

   ----------------
   -- Emit_Error --
   ----------------

   not overriding
   procedure Emit_Error
    (Self : not null access Q_Process_Director;
     Error : Qt4.Processes.Process_Process_Error)
   is
   begin
      error_0_wrapper
       (Q_Process_Director'Class (Self.all).QObject_View,
        Error);
   end Emit_Error;

   -------------------
   -- Emit_Finished --
   -------------------

   not overriding
   procedure Emit_Finished
    (Self : not null access Q_Process_Director;
     Exit_Code : Qt4.Q_Integer;
     Exit_Status : Qt4.Processes.Process_Exit_Status)
   is
   begin
      finished_0_wrapper
       (Q_Process_Director'Class (Self.all).QObject_View,
        Exit_Code,
        Exit_Status);
   end Emit_Finished;

   ------------------------------------
   -- Emit_Ready_Read_Standard_Error --
   ------------------------------------

   not overriding
   procedure Emit_Ready_Read_Standard_Error
    (Self : not null access Q_Process_Director)
   is
   begin
      readyReadStandardError_0_wrapper
       (Q_Process_Director'Class (Self.all).QObject_View);
   end Emit_Ready_Read_Standard_Error;

   -------------------------------------
   -- Emit_Ready_Read_Standard_Output --
   -------------------------------------

   not overriding
   procedure Emit_Ready_Read_Standard_Output
    (Self : not null access Q_Process_Director)
   is
   begin
      readyReadStandardOutput_0_wrapper
       (Q_Process_Director'Class (Self.all).QObject_View);
   end Emit_Ready_Read_Standard_Output;

   ------------------
   -- Emit_Started --
   ------------------

   not overriding
   procedure Emit_Started
    (Self : not null access Q_Process_Director)
   is
   begin
      started_0_wrapper
       (Q_Process_Director'Class (Self.all).QObject_View);
   end Emit_Started;

   ------------------------
   -- Emit_State_Changed --
   ------------------------

   not overriding
   procedure Emit_State_Changed
    (Self : not null access Q_Process_Director;
     State : Qt4.Processes.Process_Process_State)
   is
   begin
      stateChanged_0_wrapper
       (Q_Process_Director'Class (Self.all).QObject_View,
        State);
   end Emit_State_Changed;

   -----------------------
   -- Set_Process_State --
   -----------------------

   not overriding
   procedure Set_Process_State
    (Self : not null access Q_Process_Director;
     State : Qt4.Processes.Process_Process_State)
   is
   begin
      setProcessState_0_wrapper
       (Q_Process_Director'Class (Self.all).QObject_View,
        State);
   end Set_Process_State;

   ----------------------------------
   -- setupChildProcess_0_dispatch --
   ----------------------------------

   procedure setupChildProcess_0_dispatch
    (Self : not null Qt_Ada.Internals.Objects.Q_Object_Base_Access)
   is
   begin
      Q_Process_Director'Class (Self.all).Setup_Child_Process;
   end setupChildProcess_0_dispatch;

   -------------------------
   -- Setup_Child_Process --
   -------------------------

   not overriding
   procedure Setup_Child_Process
    (Self : not null access Q_Process_Director)
   is
   begin
      setupChildProcess_0_wrapper
       (Q_Process_Director'Class (Self.all).QObject_View);
   end Setup_Child_Process;

   ------------
   -- At_End --
   ------------

   overriding
   function At_End
    (Self : not null access constant Q_Process_Director)
       return Standard.Boolean
   is
   begin
      return
        Qt4.To_Boolean
         (atEnd_0_wrapper
           (Q_Process_Director'Class (Self.all).QObject_View));
   end At_End;

   -------------------
   -- Can_Read_Line --
   -------------------

   overriding
   function Can_Read_Line
    (Self : not null access constant Q_Process_Director)
       return Standard.Boolean
   is
   begin
      return
        Qt4.To_Boolean
         (canReadLine_0_wrapper
           (Q_Process_Director'Class (Self.all).QObject_View));
   end Can_Read_Line;

   -----------
   -- Close --
   -----------

   overriding
   procedure Close
    (Self : not null access Q_Process_Director)
   is
   begin
      close_0_wrapper
       (Q_Process_Director'Class (Self.all).QObject_View);
   end Close;

   -------------------
   -- Is_Sequential --
   -------------------

   overriding
   function Is_Sequential
    (Self : not null access constant Q_Process_Director)
       return Standard.Boolean
   is
   begin
      return
        Qt4.To_Boolean
         (isSequential_0_wrapper
           (Q_Process_Director'Class (Self.all).QObject_View));
   end Is_Sequential;

   -------------------------
   -- Emit_About_To_Close --
   -------------------------

   overriding
   procedure Emit_About_To_Close
    (Self : not null access Q_Process_Director)
   is
   begin
      aboutToClose_0_wrapper
       (Q_Process_Director'Class (Self.all).QObject_View);
   end Emit_About_To_Close;

   ------------------------
   -- Emit_Bytes_Written --
   ------------------------

   overriding
   procedure Emit_Bytes_Written
    (Self : not null access Q_Process_Director;
     Bytes : Qt4.Q_Integer_64)
   is
   begin
      bytesWritten_0_wrapper
       (Q_Process_Director'Class (Self.all).QObject_View,
        Bytes);
   end Emit_Bytes_Written;

   --------------------------------
   -- Emit_Read_Channel_Finished --
   --------------------------------

   overriding
   procedure Emit_Read_Channel_Finished
    (Self : not null access Q_Process_Director)
   is
   begin
      readChannelFinished_0_wrapper
       (Q_Process_Director'Class (Self.all).QObject_View);
   end Emit_Read_Channel_Finished;

   ---------------------
   -- Emit_Ready_Read --
   ---------------------

   overriding
   procedure Emit_Ready_Read
    (Self : not null access Q_Process_Director)
   is
   begin
      readyRead_0_wrapper
       (Q_Process_Director'Class (Self.all).QObject_View);
   end Emit_Ready_Read;

   ----------------------
   -- Set_Error_String --
   ----------------------

   overriding
   procedure Set_Error_String
    (Self : not null access Q_Process_Director;
     Error_String : Qt4.Strings.Q_String)
   is
   begin
      setErrorString_0_wrapper
       (Q_Process_Director'Class (Self.all).QObject_View,
        Qt4.Strings.Internals.QString_View (Error_String));
   end Set_Error_String;

   -----------------
   -- Child_Event --
   -----------------

   overriding
   procedure Child_Event
    (Self : not null access Q_Process_Director;
     Event : not null access Qt4.Child_Events.Q_Child_Event'Class)
   is
   begin
      childEvent_0_wrapper
       (Q_Process_Director'Class (Self.all).QObject_View,
        Event.QEvent_View);
   end Child_Event;

   ------------------
   -- Custom_Event --
   ------------------

   overriding
   procedure Custom_Event
    (Self : not null access Q_Process_Director;
     Event : not null access Qt4.Events.Q_Event'Class)
   is
   begin
      customEvent_0_wrapper
       (Q_Process_Director'Class (Self.all).QObject_View,
        Event.QEvent_View);
   end Custom_Event;

   -----------------
   -- Timer_Event --
   -----------------

   overriding
   procedure Timer_Event
    (Self : not null access Q_Process_Director;
     Event : not null access Qt4.Timer_Events.Q_Timer_Event'Class)
   is
   begin
      timerEvent_0_wrapper
       (Q_Process_Director'Class (Self.all).QObject_View,
        Event.QEvent_View);
   end Timer_Event;

   ------------
   -- Sender --
   ------------

   overriding
   function Sender
    (Self : not null access constant Q_Process_Director)
       return access Qt4.Objects.Q_Object'Class
   is
   begin
      return
        Qt_Ada.Internals.Objects.Object_Utilities.Corresponding_Q_Object
         (sender_0_wrapper
           (Q_Process_Director'Class (Self.all).QObject_View));
   end Sender;

begin
   Qt_Ada.Internals.Object_Registry.Register_Director
    ("QProcess", qt_metacast_wrapper'Access, qt_metacall_wrapper'Access);

end Qt4.Processes.Directors;
