------------------------------------------------------------------------------
--                                                                          --
--                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.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.Object_Utilities;

package body Qt4.Item_Selection_Models.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_QItemSelectionModel_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_QItemSelectionModel_qt_metacast_wrapper");

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

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

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

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

   procedure currentChanged_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Current : not null access constant Qt4.Model_Indices.Internals.QModelIndex;
     Previous : not null access constant Qt4.Model_Indices.Internals.QModelIndex);
   pragma Import (C, currentChanged_0_wrapper,
                     "__Qt4Ada_QItemSelectionModel_currentChanged_0_wrapper");

   procedure currentColumnChanged_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Current : not null access constant Qt4.Model_Indices.Internals.QModelIndex;
     Previous : not null access constant Qt4.Model_Indices.Internals.QModelIndex);
   pragma Import (C, currentColumnChanged_0_wrapper,
                     "__Qt4Ada_QItemSelectionModel_currentColumnChanged_0_wrapper");

   procedure currentRowChanged_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Current : not null access constant Qt4.Model_Indices.Internals.QModelIndex;
     Previous : not null access constant Qt4.Model_Indices.Internals.QModelIndex);
   pragma Import (C, currentRowChanged_0_wrapper,
                     "__Qt4Ada_QItemSelectionModel_currentRowChanged_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_QItemSelectionModel_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_QItemSelectionModel_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_QItemSelectionModel_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_QItemSelectionModel_sender_0_wrapper");

   procedure select_QModelIndexCR_dispatch
    (Self    : not null Qt_Ada.Internals.Objects.Q_Object_Base_Access;
     Index   : not null Qt4.Model_Indices.Internals.QModelIndex_Access;
     Command : Selection_Flags);
   pragma Export
    (C, select_QModelIndexCR_dispatch,
     "__Qt4Ada_QItemSelectionModel_select_QModelIndexCR_dispatch");
   pragma Warnings (Off, select_QModelIndexCR_dispatch);

   procedure select_QModelIndexCR_wrapper
    (Self    : not null access Qt_Ada.Internals.Objects.QObject;
     Index   : not null Qt4.Model_Indices.Internals.QModelIndex_Access;
     Command : Selection_Flags);
   pragma Import
    (C, select_QModelIndexCR_wrapper,
     "__Qt4Ada_QItemSelectionModel_select_QModelIndexCR_wrapper");

   procedure select_dispatch
    (Self      : not null Qt_Ada.Internals.Objects.Q_Object_Base_Access;
     Selection : not null access Qt4.Item_Selections.Thin.QItemSelection;
     Command   : Selection_Flags);
   pragma Export
    (C, select_dispatch, "__Qt4Ada_QItemSelectionModel_select_dispatch");
   pragma Warnings (Off, select_dispatch);

   procedure select_wrapper
    (Self      : not null access Qt_Ada.Internals.Objects.QObject;
     Selection : not null access Qt4.Item_Selections.Thin.QItemSelection;
     Command   : Selection_Flags);
   pragma Import
    (C, select_wrapper, "__Qt4Ada_QItemSelectionModel_select_wrapper");

   -----------------
   -- Select_Item --
   -----------------

   overriding
   procedure Select_Item
    (Self    : not null access Q_Item_Selection_Model_Director;
     Index   : Qt4.Model_Indices.Q_Model_Index;
     Command : Selection_Flags)
   is
   begin
      select_QModelIndexCR_wrapper
       (Self.QObject_View,
        Qt4.Model_Indices.Internals.QModelIndex_View (Index),
        Command);
   end Select_Item;

   -----------------
   -- Select_Item --
   -----------------

   overriding
   procedure Select_Item
    (Self      : not null access Q_Item_Selection_Model_Director;
     Selection : Qt4.Item_Selections.Q_Item_Selection;
     Command   : Selection_Flags)
   is
   begin
      select_wrapper
       (Self.QObject_View,
        Qt4.Item_Selections.Internals.QItemSelection_View (Selection),
        Command);
   end Select_Item;

   ---------------------
   -- select_dispatch --
   ---------------------

   procedure select_dispatch
    (Self      : not null Qt_Ada.Internals.Objects.Q_Object_Base_Access;
     Selection : not null access Qt4.Item_Selections.Thin.QItemSelection;
     Command   : Selection_Flags)
   is
   begin
      Q_Item_Selection_Model_Director'Class (Self.all).Select_Item
       (Qt4.Item_Selections.Internals.To_Q_Item_Selection (Selection),
        Command);
   end select_dispatch;

   -----------------------------------
   -- select_QModelIndexCR_dispatch --
   -----------------------------------

   procedure select_QModelIndexCR_dispatch
    (Self    : not null Qt_Ada.Internals.Objects.Q_Object_Base_Access;
     Index   : not null Qt4.Model_Indices.Internals.QModelIndex_Access;
     Command : Selection_Flags)
   is
   begin
      Q_Item_Selection_Model_Director'Class (Self.all).Select_Item
       (Qt4.Model_Indices.Internals.Create_Wrapper (Index),
        Command);
   end select_QModelIndexCR_dispatch;

   pragma Style_Checks ("N");

   ----------------------
   -- clear_0_dispatch --
   ----------------------

   procedure clear_0_dispatch
    (Self : not null Qt_Ada.Internals.Objects.Q_Object_Base_Access)
   is
   begin
      Q_Item_Selection_Model_Director'Class (Self.all).Clear;
   end clear_0_dispatch;

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

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

   ----------------------
   -- reset_0_dispatch --
   ----------------------

   procedure reset_0_dispatch
    (Self : not null Qt_Ada.Internals.Objects.Q_Object_Base_Access)
   is
   begin
      Q_Item_Selection_Model_Director'Class (Self.all).Reset;
   end reset_0_dispatch;

   -----------
   -- Reset --
   -----------

   overriding
   procedure Reset
    (Self : not null access Q_Item_Selection_Model_Director)
   is
   begin
      reset_0_wrapper
       (Q_Item_Selection_Model_Director'Class (Self.all).QObject_View);
   end Reset;

   --------------------------
   -- Emit_Current_Changed --
   --------------------------

   not overriding
   procedure Emit_Current_Changed
    (Self : not null access Q_Item_Selection_Model_Director;
     Current : Qt4.Model_Indices.Q_Model_Index;
     Previous : Qt4.Model_Indices.Q_Model_Index)
   is
   begin
      currentChanged_0_wrapper
       (Q_Item_Selection_Model_Director'Class (Self.all).QObject_View,
        Qt4.Model_Indices.Internals.QModelIndex_View (Current),
        Qt4.Model_Indices.Internals.QModelIndex_View (Previous));
   end Emit_Current_Changed;

   ---------------------------------
   -- Emit_Current_Column_Changed --
   ---------------------------------

   not overriding
   procedure Emit_Current_Column_Changed
    (Self : not null access Q_Item_Selection_Model_Director;
     Current : Qt4.Model_Indices.Q_Model_Index;
     Previous : Qt4.Model_Indices.Q_Model_Index)
   is
   begin
      currentColumnChanged_0_wrapper
       (Q_Item_Selection_Model_Director'Class (Self.all).QObject_View,
        Qt4.Model_Indices.Internals.QModelIndex_View (Current),
        Qt4.Model_Indices.Internals.QModelIndex_View (Previous));
   end Emit_Current_Column_Changed;

   ------------------------------
   -- Emit_Current_Row_Changed --
   ------------------------------

   not overriding
   procedure Emit_Current_Row_Changed
    (Self : not null access Q_Item_Selection_Model_Director;
     Current : Qt4.Model_Indices.Q_Model_Index;
     Previous : Qt4.Model_Indices.Q_Model_Index)
   is
   begin
      currentRowChanged_0_wrapper
       (Q_Item_Selection_Model_Director'Class (Self.all).QObject_View,
        Qt4.Model_Indices.Internals.QModelIndex_View (Current),
        Qt4.Model_Indices.Internals.QModelIndex_View (Previous));
   end Emit_Current_Row_Changed;

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

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

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

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

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

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

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

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

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

end Qt4.Item_Selection_Models.Directors;
