------------------------------------------------------------------------------
--                                                                          --
--                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;
pragma Elaborate (Qt_Ada.Internals.Object_Registry);

package body Qt_Ada.Internals.Objects.Abstract_Item_View_Proxies is

   procedure indexAt_0_virtual
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Point : not null access constant Qt4.Points.Internals.QPoint;
     Returns : not null access Qt4.Model_Indices.Internals.QModelIndex);
      pragma Import (C, indexAt_0_virtual,
                     "__Qt4Ada_QAbstractItemView_indexAt_0_virtual");

   procedure keyboardSearch_0_virtual
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Search : not null access constant Qt4.Strings.Internals.QString);
      pragma Import (C, keyboardSearch_0_virtual,
                     "__Qt4Ada_QAbstractItemView_keyboardSearch_0_virtual");

   procedure scrollTo_0_virtual
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Index : not null access constant Qt4.Model_Indices.Internals.QModelIndex;
     Hint : Qt4.Abstract_Item_Views.Abstract_Item_View_Scroll_Hint);
      pragma Import (C, scrollTo_0_virtual,
                     "__Qt4Ada_QAbstractItemView_scrollTo_0_virtual");

   procedure setModel_0_virtual
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Model : not null access Qt_Ada.Internals.Objects.QObject);
      pragma Import (C, setModel_0_virtual,
                     "__Qt4Ada_QAbstractItemView_setModel_0_virtual");

   procedure setSelectionModel_0_virtual
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Selection_Model : not null access Qt_Ada.Internals.Objects.QObject);
      pragma Import (C, setSelectionModel_0_virtual,
                     "__Qt4Ada_QAbstractItemView_setSelectionModel_0_virtual");

   function sizeHintForColumn_0_virtual
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Column : Qt4.Q_Integer)
       return Qt4.Q_Integer;
      pragma Import (C, sizeHintForColumn_0_virtual,
                     "__Qt4Ada_QAbstractItemView_sizeHintForColumn_0_virtual");

   function sizeHintForRow_0_virtual
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Row : Qt4.Q_Integer)
       return Qt4.Q_Integer;
      pragma Import (C, sizeHintForRow_0_virtual,
                     "__Qt4Ada_QAbstractItemView_sizeHintForRow_0_virtual");

   procedure visualRect_0_virtual
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Index : not null access constant Qt4.Model_Indices.Internals.QModelIndex;
     Returns : not null access Qt4.Rects.Internals.QRect);
      pragma Import (C, visualRect_0_virtual,
                     "__Qt4Ada_QAbstractItemView_visualRect_0_virtual");

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

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

   procedure setRootIndex_0_virtual
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Index : not null access constant Qt4.Model_Indices.Internals.QModelIndex);
      pragma Import (C, setRootIndex_0_virtual,
                     "__Qt4Ada_QAbstractItemView_setRootIndex_0_virtual");

   function Create
    (Object : not null Qt_Ada.Internals.Objects.QObject_Access)
       return not null Qt_Ada.Internals.Objects.Q_Object_Base_Access;

   pragma Style_Checks ("N");

   --------------
   -- Index_At --
   --------------

   function Index_At
    (Self : not null access constant Q_Abstract_Item_View_Proxy;
     Point : Qt4.Points.Q_Point)
       return Qt4.Model_Indices.Q_Model_Index
   is
      Returns : Qt4.Model_Indices.Q_Model_Index;

   begin
      indexAt_0_virtual
       (Q_Abstract_Item_View_Proxy'Class (Self.all).QObject_View,
        Qt4.Points.Internals.QPoint_View (Point),
        Qt4.Model_Indices.Internals.QModelIndex_View (Returns));

      return Returns;
   end Index_At;

   ---------------------
   -- Keyboard_Search --
   ---------------------

   procedure Keyboard_Search
    (Self : not null access Q_Abstract_Item_View_Proxy;
     Search : Qt4.Strings.Q_String)
   is
   begin
      keyboardSearch_0_virtual
       (Q_Abstract_Item_View_Proxy'Class (Self.all).QObject_View,
        Qt4.Strings.Internals.QString_View (Search));
   end Keyboard_Search;

   ---------------
   -- Scroll_To --
   ---------------

   procedure Scroll_To
    (Self : not null access Q_Abstract_Item_View_Proxy;
     Index : Qt4.Model_Indices.Q_Model_Index;
     Hint : Qt4.Abstract_Item_Views.Abstract_Item_View_Scroll_Hint)
   is
   begin
      scrollTo_0_virtual
       (Q_Abstract_Item_View_Proxy'Class (Self.all).QObject_View,
        Qt4.Model_Indices.Internals.QModelIndex_View (Index),
        Hint);
   end Scroll_To;

   ---------------
   -- Set_Model --
   ---------------

   procedure Set_Model
    (Self : not null access Q_Abstract_Item_View_Proxy;
     Model : not null access Qt4.Abstract_Item_Models.Q_Abstract_Item_Model'Class)
   is
   begin
      setModel_0_virtual
       (Q_Abstract_Item_View_Proxy'Class (Self.all).QObject_View,
        Model.QObject_View);
   end Set_Model;

   -------------------------
   -- Set_Selection_Model --
   -------------------------

   procedure Set_Selection_Model
    (Self : not null access Q_Abstract_Item_View_Proxy;
     Selection_Model : not null access Qt4.Item_Selection_Models.Q_Item_Selection_Model'Class)
   is
   begin
      setSelectionModel_0_virtual
       (Q_Abstract_Item_View_Proxy'Class (Self.all).QObject_View,
        Selection_Model.QObject_View);
   end Set_Selection_Model;

   --------------------------
   -- Size_Hint_For_Column --
   --------------------------

   function Size_Hint_For_Column
    (Self : not null access constant Q_Abstract_Item_View_Proxy;
     Column : Qt4.Q_Integer)
       return Qt4.Q_Integer
   is
   begin
      return
        sizeHintForColumn_0_virtual
         (Q_Abstract_Item_View_Proxy'Class (Self.all).QObject_View,
          Column);
   end Size_Hint_For_Column;

   -----------------------
   -- Size_Hint_For_Row --
   -----------------------

   function Size_Hint_For_Row
    (Self : not null access constant Q_Abstract_Item_View_Proxy;
     Row : Qt4.Q_Integer)
       return Qt4.Q_Integer
   is
   begin
      return
        sizeHintForRow_0_virtual
         (Q_Abstract_Item_View_Proxy'Class (Self.all).QObject_View,
          Row);
   end Size_Hint_For_Row;

   -----------------
   -- Visual_Rect --
   -----------------

   function Visual_Rect
    (Self : not null access constant Q_Abstract_Item_View_Proxy;
     Index : Qt4.Model_Indices.Q_Model_Index)
       return Qt4.Rects.Q_Rect
   is
      Returns : Qt4.Rects.Q_Rect;

   begin
      visualRect_0_virtual
       (Q_Abstract_Item_View_Proxy'Class (Self.all).QObject_View,
        Qt4.Model_Indices.Internals.QModelIndex_View (Index),
        Qt4.Rects.Internals.QRect_View (Returns));

      return Returns;
   end Visual_Rect;

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

   procedure Reset
    (Self : not null access Q_Abstract_Item_View_Proxy)
   is
   begin
      reset_0_virtual
       (Q_Abstract_Item_View_Proxy'Class (Self.all).QObject_View);
   end Reset;

   ----------------
   -- Select_All --
   ----------------

   procedure Select_All
    (Self : not null access Q_Abstract_Item_View_Proxy)
   is
   begin
      selectAll_0_virtual
       (Q_Abstract_Item_View_Proxy'Class (Self.all).QObject_View);
   end Select_All;

   --------------------
   -- Set_Root_Index --
   --------------------

   procedure Set_Root_Index
    (Self : not null access Q_Abstract_Item_View_Proxy;
     Index : Qt4.Model_Indices.Q_Model_Index)
   is
   begin
      setRootIndex_0_virtual
       (Q_Abstract_Item_View_Proxy'Class (Self.all).QObject_View,
        Qt4.Model_Indices.Internals.QModelIndex_View (Index));
   end Set_Root_Index;

   type Q_Abstract_Item_View_Proxy_Access is
     access all Q_Abstract_Item_View_Proxy'Class;

   ------------
   -- Create --
   ------------

   function Create
    (Object : not null Qt_Ada.Internals.Objects.QObject_Access)
       return not null Qt_Ada.Internals.Objects.Q_Object_Base_Access
   is
      Self : constant not null Q_Abstract_Item_View_Proxy_Access
        := new Q_Abstract_Item_View_Proxy;

   begin
      Qt_Ada.Internals.Objects.Initialize (Self, Object);

      return Qt_Ada.Internals.Objects.Q_Object_Base_Access (Self);
   end Create;

begin
   Qt_Ada.Internals.Object_Registry.Register_Proxy
    ("QAbstractItemView", Create'Access);
end Qt_Ada.Internals.Objects.Abstract_Item_View_Proxies;
