------------------------------------------------------------------------------
--                                                                          --
--                An Ada2005 binding to the Qt C++ framework                --
--                                                                          --
------------------------------------------------------------------------------
--                                                                          --
-- Copyright © 2008 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.Widgets;
with Qt_Ada.Internals.Object_Registry;
with Qt_Ada.Internals.Objects;

with Qt_Ada.Internals.Objects.Table_Widget_Proxies;
pragma Warnings (Off, Qt_Ada.Internals.Objects.Table_Widget_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.Table_Widgets is

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

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

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

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

   procedure removeCellWidget_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Row : Qt4.Q_Integer;
     Column : Qt4.Q_Integer);
   pragma Import (C, removeCellWidget_0_wrapper,
                     "__Qt4Ada_QTableWidget_removeCellWidget_0_wrapper");

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

   procedure setCellWidget_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Row : Qt4.Q_Integer;
     Column : Qt4.Q_Integer;
     Widget : not null access Qt_Ada.Internals.Objects.QObject);
   pragma Import (C, setCellWidget_0_wrapper,
                     "__Qt4Ada_QTableWidget_setCellWidget_0_wrapper");

   procedure setColumnCount_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Columns : Qt4.Q_Integer);
   pragma Import (C, setColumnCount_0_wrapper,
                     "__Qt4Ada_QTableWidget_setColumnCount_0_wrapper");

   procedure setCurrentCell_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Row : Qt4.Q_Integer;
     Column : Qt4.Q_Integer);
   pragma Import (C, setCurrentCell_0_wrapper,
                     "__Qt4Ada_QTableWidget_setCurrentCell_0_wrapper");

   procedure setRowCount_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Rows : Qt4.Q_Integer);
   pragma Import (C, setRowCount_0_wrapper,
                     "__Qt4Ada_QTableWidget_setRowCount_0_wrapper");

   procedure sortItems_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Column : Qt4.Q_Integer;
     Order : Qt4.Sort_Order);
   pragma Import (C, sortItems_0_wrapper,
                     "__Qt4Ada_QTableWidget_sortItems_0_wrapper");

   procedure visualColumn_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Logical_Column : Qt4.Q_Integer);
   pragma Import (C, visualColumn_0_wrapper,
                     "__Qt4Ada_QTableWidget_visualColumn_0_wrapper");

   procedure visualRow_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Logical_Row : Qt4.Q_Integer);
   pragma Import (C, visualRow_0_wrapper,
                     "__Qt4Ada_QTableWidget_visualRow_0_wrapper");

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

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

   procedure insertColumn_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Column : Qt4.Q_Integer);
   pragma Import (C, insertColumn_0_wrapper,
                     "__Qt4Ada_QTableWidget_insertColumn_0_wrapper");

   procedure insertRow_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Row : Qt4.Q_Integer);
   pragma Import (C, insertRow_0_wrapper,
                     "__Qt4Ada_QTableWidget_insertRow_0_wrapper");

   procedure removeColumn_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Column : Qt4.Q_Integer);
   pragma Import (C, removeColumn_0_wrapper,
                     "__Qt4Ada_QTableWidget_removeColumn_0_wrapper");

   procedure removeRow_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Row : Qt4.Q_Integer);
   pragma Import (C, removeRow_0_wrapper,
                     "__Qt4Ada_QTableWidget_removeRow_0_wrapper");

   pragma Style_Checks ("N");

   -----------------
   -- Cell_Widget --
   -----------------

   function Cell_Widget
    (Self : not null access constant Q_Table_Widget'Class;
     Row : Qt4.Q_Integer;
     Column : Qt4.Q_Integer)
       return not null access Qt4.Widgets.Q_Widget'Class
   is
   begin
      return
        Qt4.Widgets.Q_Widget'Class
         (Qt_Ada.Internals.Object_Registry.To_Q_Object
           (cellWidget_0_wrapper
             (Self.QObject_View,
              Row,
              Column)).all)'Access;
   end Cell_Widget;

   ------------------
   -- Column_Count --
   ------------------

   function Column_Count
    (Self : not null access constant Q_Table_Widget'Class)
       return Qt4.Q_Integer
   is
   begin
      return
        columnCount_0_wrapper
         (Self.QObject_View);
   end Column_Count;

   --------------------
   -- Current_Column --
   --------------------

   function Current_Column
    (Self : not null access constant Q_Table_Widget'Class)
       return Qt4.Q_Integer
   is
   begin
      return
        currentColumn_0_wrapper
         (Self.QObject_View);
   end Current_Column;

   -----------------
   -- Current_Row --
   -----------------

   function Current_Row
    (Self : not null access constant Q_Table_Widget'Class)
       return Qt4.Q_Integer
   is
   begin
      return
        currentRow_0_wrapper
         (Self.QObject_View);
   end Current_Row;

   ------------------------
   -- Remove_Cell_Widget --
   ------------------------

   procedure Remove_Cell_Widget
    (Self : not null access Q_Table_Widget'Class;
     Row : Qt4.Q_Integer;
     Column : Qt4.Q_Integer)
   is
   begin
      removeCellWidget_0_wrapper
       (Self.QObject_View,
        Row,
        Column);
   end Remove_Cell_Widget;

   ---------------
   -- Row_Count --
   ---------------

   function Row_Count
    (Self : not null access constant Q_Table_Widget'Class)
       return Qt4.Q_Integer
   is
   begin
      return
        rowCount_0_wrapper
         (Self.QObject_View);
   end Row_Count;

   ---------------------
   -- Set_Cell_Widget --
   ---------------------

   procedure Set_Cell_Widget
    (Self : not null access Q_Table_Widget'Class;
     Row : Qt4.Q_Integer;
     Column : Qt4.Q_Integer;
     Widget : not null access Qt4.Widgets.Q_Widget'Class)
   is
   begin
      setCellWidget_0_wrapper
       (Self.QObject_View,
        Row,
        Column,
        Widget.QObject_View);
   end Set_Cell_Widget;

   ----------------------
   -- Set_Column_Count --
   ----------------------

   procedure Set_Column_Count
    (Self : not null access Q_Table_Widget'Class;
     Columns : Qt4.Q_Integer)
   is
   begin
      setColumnCount_0_wrapper
       (Self.QObject_View,
        Columns);
   end Set_Column_Count;

   ----------------------
   -- Set_Current_Cell --
   ----------------------

   procedure Set_Current_Cell
    (Self : not null access Q_Table_Widget'Class;
     Row : Qt4.Q_Integer;
     Column : Qt4.Q_Integer)
   is
   begin
      setCurrentCell_0_wrapper
       (Self.QObject_View,
        Row,
        Column);
   end Set_Current_Cell;

   -------------------
   -- Set_Row_Count --
   -------------------

   procedure Set_Row_Count
    (Self : not null access Q_Table_Widget'Class;
     Rows : Qt4.Q_Integer)
   is
   begin
      setRowCount_0_wrapper
       (Self.QObject_View,
        Rows);
   end Set_Row_Count;

   ----------------
   -- Sort_Items --
   ----------------

   procedure Sort_Items
    (Self : not null access Q_Table_Widget'Class;
     Column : Qt4.Q_Integer;
     Order : Qt4.Sort_Order
       := Qt4.Ascending_Order)
   is
   begin
      sortItems_0_wrapper
       (Self.QObject_View,
        Column,
        Order);
   end Sort_Items;

   -------------------
   -- Visual_Column --
   -------------------

   procedure Visual_Column
    (Self : not null access constant Q_Table_Widget'Class;
     Logical_Column : Qt4.Q_Integer)
   is
   begin
      visualColumn_0_wrapper
       (Self.QObject_View,
        Logical_Column);
   end Visual_Column;

   ----------------
   -- Visual_Row --
   ----------------

   procedure Visual_Row
    (Self : not null access constant Q_Table_Widget'Class;
     Logical_Row : Qt4.Q_Integer)
   is
   begin
      visualRow_0_wrapper
       (Self.QObject_View,
        Logical_Row);
   end Visual_Row;

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

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

   --------------------
   -- Clear_Contents --
   --------------------

   procedure Clear_Contents
    (Self : not null access Q_Table_Widget'Class)
   is
   begin
      clearContents_0_wrapper
       (Self.QObject_View);
   end Clear_Contents;

   -------------------
   -- Insert_Column --
   -------------------

   procedure Insert_Column
    (Self : not null access Q_Table_Widget'Class;
     Column : Qt4.Q_Integer)
   is
   begin
      insertColumn_0_wrapper
       (Self.QObject_View,
        Column);
   end Insert_Column;

   ----------------
   -- Insert_Row --
   ----------------

   procedure Insert_Row
    (Self : not null access Q_Table_Widget'Class;
     Row : Qt4.Q_Integer)
   is
   begin
      insertRow_0_wrapper
       (Self.QObject_View,
        Row);
   end Insert_Row;

   -------------------
   -- Remove_Column --
   -------------------

   procedure Remove_Column
    (Self : not null access Q_Table_Widget'Class;
     Column : Qt4.Q_Integer)
   is
   begin
      removeColumn_0_wrapper
       (Self.QObject_View,
        Column);
   end Remove_Column;

   ----------------
   -- Remove_Row --
   ----------------

   procedure Remove_Row
    (Self : not null access Q_Table_Widget'Class;
     Row : Qt4.Q_Integer)
   is
   begin
      removeRow_0_wrapper
       (Self.QObject_View,
        Row);
   end Remove_Row;

end Qt4.Table_Widgets;
