------------------------------------------------------------------------------
--                                                                          --
--                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.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.Sql_Table_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_QSqlTableModel_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_QSqlTableModel_qt_metacast_wrapper");

   function insertRows_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Row : Qt4.Q_Integer;
     Count : Qt4.Q_Integer;
     Parent : not null access constant Qt4.Model_Indices.Internals.QModelIndex)
       return Qt4.bool;
   pragma Import (C, insertRows_0_wrapper,
                     "__Qt4Ada_QSqlTableModel_insertRows_0_wrapper");

   function removeColumns_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Column : Qt4.Q_Integer;
     Count : Qt4.Q_Integer;
     Parent : not null access constant Qt4.Model_Indices.Internals.QModelIndex)
       return Qt4.bool;
   pragma Import (C, removeColumns_0_wrapper,
                     "__Qt4Ada_QSqlTableModel_removeColumns_0_wrapper");

   function removeRows_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Row : Qt4.Q_Integer;
     Count : Qt4.Q_Integer;
     Parent : not null access constant Qt4.Model_Indices.Internals.QModelIndex)
       return Qt4.bool;
   pragma Import (C, removeRows_0_wrapper,
                     "__Qt4Ada_QSqlTableModel_removeRows_0_wrapper");

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

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

   function select_0_dispatch
    (Self : not null Qt_Ada.Internals.Objects.Q_Object_Base_Access)
       return Qt4.bool;
   pragma Export (C, select_0_dispatch,
                     "__Qt4Ada_QSqlTableModel_select_0_dispatch");
   pragma Warnings (Off, select_0_dispatch);
   --  GCC GNAT 4.3.0: suppress warning
   --  is a tagged type which does not correspond to any C type

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

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

   procedure setEditStrategy_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Strategy : Qt4.Sql_Table_Models.Sql_Table_Model_Edit_Strategy);
   pragma Import (C, setEditStrategy_0_wrapper,
                     "__Qt4Ada_QSqlTableModel_setEditStrategy_0_wrapper");

   procedure setFilter_0_dispatch
    (Self : not null Qt_Ada.Internals.Objects.Q_Object_Base_Access;
     Filter : not null access Qt4.Strings.Internals.QString);
   pragma Export (C, setFilter_0_dispatch,
                     "__Qt4Ada_QSqlTableModel_setFilter_0_dispatch");
   pragma Warnings (Off, setFilter_0_dispatch);
   --  GCC GNAT 4.3.0: suppress warning
   --  is a tagged type which does not correspond to any C type

   procedure setFilter_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Filter : not null access constant Qt4.Strings.Internals.QString);
   pragma Import (C, setFilter_0_wrapper,
                     "__Qt4Ada_QSqlTableModel_setFilter_0_wrapper");

   procedure setSort_0_dispatch
    (Self : not null Qt_Ada.Internals.Objects.Q_Object_Base_Access;
     Column : Qt4.Q_Integer;
     Order : Qt4.Sort_Order);
   pragma Export (C, setSort_0_dispatch,
                     "__Qt4Ada_QSqlTableModel_setSort_0_dispatch");
   pragma Warnings (Off, setSort_0_dispatch);
   --  GCC GNAT 4.3.0: suppress warning
   --  is a tagged type which does not correspond to any C type

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

   procedure setTable_0_dispatch
    (Self : not null Qt_Ada.Internals.Objects.Q_Object_Base_Access;
     Table_Name : not null access Qt4.Strings.Internals.QString);
   pragma Export (C, setTable_0_dispatch,
                     "__Qt4Ada_QSqlTableModel_setTable_0_dispatch");
   pragma Warnings (Off, setTable_0_dispatch);
   --  GCC GNAT 4.3.0: suppress warning
   --  is a tagged type which does not correspond to any C type

   procedure setTable_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Table_Name : not null access constant Qt4.Strings.Internals.QString);
   pragma Import (C, setTable_0_wrapper,
                     "__Qt4Ada_QSqlTableModel_setTable_0_wrapper");

   procedure sort_0_dispatch
    (Self : not null Qt_Ada.Internals.Objects.Q_Object_Base_Access;
     Column : Qt4.Q_Integer;
     Order : Qt4.Sort_Order);
   pragma Export (C, sort_0_dispatch,
                     "__Qt4Ada_QSqlTableModel_sort_0_dispatch");
   pragma Warnings (Off, sort_0_dispatch);
   --  GCC GNAT 4.3.0: suppress warning
   --  is a tagged type which does not correspond to any C type

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

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

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

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

   function deleteRowFromTable_0_dispatch
    (Self : not null Qt_Ada.Internals.Objects.Q_Object_Base_Access;
     Row : Qt4.Q_Integer)
       return Qt4.bool;
   pragma Export (C, deleteRowFromTable_0_dispatch,
                     "__Qt4Ada_QSqlTableModel_deleteRowFromTable_0_dispatch");
   pragma Warnings (Off, deleteRowFromTable_0_dispatch);
   --  GCC GNAT 4.3.0: suppress warning
   --  is a tagged type which does not correspond to any C type

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

   procedure indexInQuery_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Item : not null access constant Qt4.Model_Indices.Internals.QModelIndex;
     Returns : not null access Qt4.Model_Indices.Internals.QModelIndex);
   pragma Import (C, indexInQuery_0_wrapper,
                     "__Qt4Ada_QSqlTableModel_indexInQuery_0_wrapper");

   function orderByClause_0_dispatch
    (Self : not null Qt_Ada.Internals.Objects.Q_Object_Base_Access)
       return not null access Qt4.Strings.Internals.QString;
   pragma Export (C, orderByClause_0_dispatch,
                     "__Qt4Ada_QSqlTableModel_orderByClause_0_dispatch");
   pragma Warnings (Off, orderByClause_0_dispatch);
   --  GCC GNAT 4.3.0: suppress warning
   --  is a tagged type which does not correspond to any C type

   procedure orderByClause_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Returns : not null access Qt4.Strings.Internals.QString);
   pragma Import (C, orderByClause_0_wrapper,
                     "__Qt4Ada_QSqlTableModel_orderByClause_0_wrapper");

   function selectStatement_0_dispatch
    (Self : not null Qt_Ada.Internals.Objects.Q_Object_Base_Access)
       return not null access Qt4.Strings.Internals.QString;
   pragma Export (C, selectStatement_0_dispatch,
                     "__Qt4Ada_QSqlTableModel_selectStatement_0_dispatch");
   pragma Warnings (Off, selectStatement_0_dispatch);
   --  GCC GNAT 4.3.0: suppress warning
   --  is a tagged type which does not correspond to any C type

   procedure selectStatement_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Returns : not null access Qt4.Strings.Internals.QString);
   pragma Import (C, selectStatement_0_wrapper,
                     "__Qt4Ada_QSqlTableModel_selectStatement_0_wrapper");

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

   procedure dataChanged_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Top_Left : not null access constant Qt4.Model_Indices.Internals.QModelIndex;
     Bottom_Right : not null access constant Qt4.Model_Indices.Internals.QModelIndex);
   pragma Import (C, dataChanged_0_wrapper,
                     "__Qt4Ada_QSqlTableModel_dataChanged_0_wrapper");

   procedure headerDataChanged_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Orientation : Qt4.Orientation;
     First : Qt4.Q_Integer;
     Last : Qt4.Q_Integer);
   pragma Import (C, headerDataChanged_0_wrapper,
                     "__Qt4Ada_QSqlTableModel_headerDataChanged_0_wrapper");

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

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

   procedure beginInsertColumns_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Parent : not null access constant Qt4.Model_Indices.Internals.QModelIndex;
     First : Qt4.Q_Integer;
     Last : Qt4.Q_Integer);
   pragma Import (C, beginInsertColumns_0_wrapper,
                     "__Qt4Ada_QSqlTableModel_beginInsertColumns_0_wrapper");

   procedure beginInsertRows_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Parent : not null access constant Qt4.Model_Indices.Internals.QModelIndex;
     First : Qt4.Q_Integer;
     Last : Qt4.Q_Integer);
   pragma Import (C, beginInsertRows_0_wrapper,
                     "__Qt4Ada_QSqlTableModel_beginInsertRows_0_wrapper");

   function beginMoveColumns_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Source_Parent : not null access constant Qt4.Model_Indices.Internals.QModelIndex;
     Source_First : Qt4.Q_Integer;
     Source_Last : Qt4.Q_Integer;
     Destination_Parent : not null access constant Qt4.Model_Indices.Internals.QModelIndex;
     Destination_Child : Qt4.Q_Integer)
       return Qt4.bool;
   pragma Import (C, beginMoveColumns_0_wrapper,
                     "__Qt4Ada_QSqlTableModel_beginMoveColumns_0_wrapper");

   function beginMoveRows_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Source_Parent : not null access constant Qt4.Model_Indices.Internals.QModelIndex;
     Source_First : Qt4.Q_Integer;
     Source_Last : Qt4.Q_Integer;
     Destination_Parent : not null access constant Qt4.Model_Indices.Internals.QModelIndex;
     Destination_Child : Qt4.Q_Integer)
       return Qt4.bool;
   pragma Import (C, beginMoveRows_0_wrapper,
                     "__Qt4Ada_QSqlTableModel_beginMoveRows_0_wrapper");

   procedure beginRemoveColumns_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Parent : not null access constant Qt4.Model_Indices.Internals.QModelIndex;
     First : Qt4.Q_Integer;
     Last : Qt4.Q_Integer);
   pragma Import (C, beginRemoveColumns_0_wrapper,
                     "__Qt4Ada_QSqlTableModel_beginRemoveColumns_0_wrapper");

   procedure beginRemoveRows_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Parent : not null access constant Qt4.Model_Indices.Internals.QModelIndex;
     First : Qt4.Q_Integer;
     Last : Qt4.Q_Integer);
   pragma Import (C, beginRemoveRows_0_wrapper,
                     "__Qt4Ada_QSqlTableModel_beginRemoveRows_0_wrapper");

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

   procedure changePersistentIndex_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     From : not null access constant Qt4.Model_Indices.Internals.QModelIndex;
     To : not null access constant Qt4.Model_Indices.Internals.QModelIndex);
   pragma Import (C, changePersistentIndex_0_wrapper,
                     "__Qt4Ada_QSqlTableModel_changePersistentIndex_0_wrapper");

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

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

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

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

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

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

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

   procedure reset_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject);
   pragma Import (C, reset_0_wrapper,
                     "__Qt4Ada_QSqlTableModel_reset_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_QSqlTableModel_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_QSqlTableModel_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_QSqlTableModel_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_QSqlTableModel_sender_0_wrapper");

   pragma Style_Checks ("N");

   -----------------
   -- Insert_Rows --
   -----------------

   overriding
   function Insert_Rows
    (Self : not null access Q_Sql_Table_Model_Director;
     Row : Qt4.Q_Integer;
     Count : Qt4.Q_Integer;
     Parent : Qt4.Model_Indices.Q_Model_Index
       := Qt4.Model_Indices.Create)
       return Standard.Boolean
   is
   begin
      return
        Qt4.To_Boolean
         (insertRows_0_wrapper
           (Q_Sql_Table_Model_Director'Class (Self.all).QObject_View,
            Row,
            Count,
            Qt4.Model_Indices.Internals.QModelIndex_View (Parent)));
   end Insert_Rows;

   --------------------
   -- Remove_Columns --
   --------------------

   overriding
   function Remove_Columns
    (Self : not null access Q_Sql_Table_Model_Director;
     Column : Qt4.Q_Integer;
     Count : Qt4.Q_Integer;
     Parent : Qt4.Model_Indices.Q_Model_Index
       := Qt4.Model_Indices.Create)
       return Standard.Boolean
   is
   begin
      return
        Qt4.To_Boolean
         (removeColumns_0_wrapper
           (Q_Sql_Table_Model_Director'Class (Self.all).QObject_View,
            Column,
            Count,
            Qt4.Model_Indices.Internals.QModelIndex_View (Parent)));
   end Remove_Columns;

   -----------------
   -- Remove_Rows --
   -----------------

   overriding
   function Remove_Rows
    (Self : not null access Q_Sql_Table_Model_Director;
     Row : Qt4.Q_Integer;
     Count : Qt4.Q_Integer;
     Parent : Qt4.Model_Indices.Q_Model_Index
       := Qt4.Model_Indices.Create)
       return Standard.Boolean
   is
   begin
      return
        Qt4.To_Boolean
         (removeRows_0_wrapper
           (Q_Sql_Table_Model_Director'Class (Self.all).QObject_View,
            Row,
            Count,
            Qt4.Model_Indices.Internals.QModelIndex_View (Parent)));
   end Remove_Rows;

   --------------------------
   -- revertRow_0_dispatch --
   --------------------------

   procedure revertRow_0_dispatch
    (Self : not null Qt_Ada.Internals.Objects.Q_Object_Base_Access;
     Row : Qt4.Q_Integer)
   is
   begin
      Q_Sql_Table_Model_Director'Class (Self.all).Revert_Row
       (Row);
   end revertRow_0_dispatch;

   ----------------
   -- Revert_Row --
   ----------------

   overriding
   procedure Revert_Row
    (Self : not null access Q_Sql_Table_Model_Director;
     Row : Qt4.Q_Integer)
   is
   begin
      revertRow_0_wrapper
       (Q_Sql_Table_Model_Director'Class (Self.all).QObject_View,
        Row);
   end Revert_Row;

   -----------------------
   -- select_0_dispatch --
   -----------------------

   function select_0_dispatch
    (Self : not null Qt_Ada.Internals.Objects.Q_Object_Base_Access)
       return Qt4.bool
   is
   begin
      return
        Qt4.To_bool
         (Q_Sql_Table_Model_Director'Class (Self.all).Select_Query);
   end select_0_dispatch;

   ------------------
   -- Select_Query --
   ------------------

   overriding
   function Select_Query
    (Self : not null access Q_Sql_Table_Model_Director)
       return Standard.Boolean
   is
   begin
      return
        Qt4.To_Boolean
         (select_0_wrapper
           (Q_Sql_Table_Model_Director'Class (Self.all).QObject_View));
   end Select_Query;

   --------------------------------
   -- setEditStrategy_0_dispatch --
   --------------------------------

   procedure setEditStrategy_0_dispatch
    (Self : not null Qt_Ada.Internals.Objects.Q_Object_Base_Access;
     Strategy : Qt4.Sql_Table_Models.Sql_Table_Model_Edit_Strategy)
   is
   begin
      Q_Sql_Table_Model_Director'Class (Self.all).Set_Edit_Strategy
       (Strategy);
   end setEditStrategy_0_dispatch;

   -----------------------
   -- Set_Edit_Strategy --
   -----------------------

   overriding
   procedure Set_Edit_Strategy
    (Self : not null access Q_Sql_Table_Model_Director;
     Strategy : Qt4.Sql_Table_Models.Sql_Table_Model_Edit_Strategy)
   is
   begin
      setEditStrategy_0_wrapper
       (Q_Sql_Table_Model_Director'Class (Self.all).QObject_View,
        Strategy);
   end Set_Edit_Strategy;

   --------------------------
   -- setFilter_0_dispatch --
   --------------------------

   procedure setFilter_0_dispatch
    (Self : not null Qt_Ada.Internals.Objects.Q_Object_Base_Access;
     Filter : not null access Qt4.Strings.Internals.QString)
   is
   begin
      Q_Sql_Table_Model_Director'Class (Self.all).Set_Filter
       (Qt4.Strings.Internals.Create_Wrapper (Qt4.Strings.Internals.QString_Access (Filter)));
   end setFilter_0_dispatch;

   ----------------
   -- Set_Filter --
   ----------------

   overriding
   procedure Set_Filter
    (Self : not null access Q_Sql_Table_Model_Director;
     Filter : Qt4.Strings.Q_String)
   is
   begin
      setFilter_0_wrapper
       (Q_Sql_Table_Model_Director'Class (Self.all).QObject_View,
        Qt4.Strings.Internals.QString_View (Filter));
   end Set_Filter;

   ------------------------
   -- setSort_0_dispatch --
   ------------------------

   procedure setSort_0_dispatch
    (Self : not null Qt_Ada.Internals.Objects.Q_Object_Base_Access;
     Column : Qt4.Q_Integer;
     Order : Qt4.Sort_Order)
   is
   begin
      Q_Sql_Table_Model_Director'Class (Self.all).Set_Sort
       (Column,
        Order);
   end setSort_0_dispatch;

   --------------
   -- Set_Sort --
   --------------

   overriding
   procedure Set_Sort
    (Self : not null access Q_Sql_Table_Model_Director;
     Column : Qt4.Q_Integer;
     Order : Qt4.Sort_Order)
   is
   begin
      setSort_0_wrapper
       (Q_Sql_Table_Model_Director'Class (Self.all).QObject_View,
        Column,
        Order);
   end Set_Sort;

   -------------------------
   -- setTable_0_dispatch --
   -------------------------

   procedure setTable_0_dispatch
    (Self : not null Qt_Ada.Internals.Objects.Q_Object_Base_Access;
     Table_Name : not null access Qt4.Strings.Internals.QString)
   is
   begin
      Q_Sql_Table_Model_Director'Class (Self.all).Set_Table
       (Qt4.Strings.Internals.Create_Wrapper (Qt4.Strings.Internals.QString_Access (Table_Name)));
   end setTable_0_dispatch;

   ---------------
   -- Set_Table --
   ---------------

   overriding
   procedure Set_Table
    (Self : not null access Q_Sql_Table_Model_Director;
     Table_Name : Qt4.Strings.Q_String)
   is
   begin
      setTable_0_wrapper
       (Q_Sql_Table_Model_Director'Class (Self.all).QObject_View,
        Qt4.Strings.Internals.QString_View (Table_Name));
   end Set_Table;

   ---------------------
   -- sort_0_dispatch --
   ---------------------

   procedure sort_0_dispatch
    (Self : not null Qt_Ada.Internals.Objects.Q_Object_Base_Access;
     Column : Qt4.Q_Integer;
     Order : Qt4.Sort_Order)
   is
   begin
      Q_Sql_Table_Model_Director'Class (Self.all).Sort
       (Column,
        Order);
   end sort_0_dispatch;

   ----------
   -- Sort --
   ----------

   overriding
   procedure Sort
    (Self : not null access Q_Sql_Table_Model_Director;
     Column : Qt4.Q_Integer;
     Order : Qt4.Sort_Order)
   is
   begin
      sort_0_wrapper
       (Q_Sql_Table_Model_Director'Class (Self.all).QObject_View,
        Column,
        Order);
   end Sort;

   ------------
   -- Revert --
   ------------

   overriding
   procedure Revert
    (Self : not null access Q_Sql_Table_Model_Director)
   is
   begin
      revert_0_wrapper
       (Q_Sql_Table_Model_Director'Class (Self.all).QObject_View);
   end Revert;

   ------------
   -- Submit --
   ------------

   overriding
   function Submit
    (Self : not null access Q_Sql_Table_Model_Director)
       return Standard.Boolean
   is
   begin
      return
        Qt4.To_Boolean
         (submit_0_wrapper
           (Q_Sql_Table_Model_Director'Class (Self.all).QObject_View));
   end Submit;

   ------------------------
   -- Emit_Before_Delete --
   ------------------------

   not overriding
   procedure Emit_Before_Delete
    (Self : not null access Q_Sql_Table_Model_Director;
     Row : Qt4.Q_Integer)
   is
   begin
      beforeDelete_0_wrapper
       (Q_Sql_Table_Model_Director'Class (Self.all).QObject_View,
        Row);
   end Emit_Before_Delete;

   -----------------------------------
   -- deleteRowFromTable_0_dispatch --
   -----------------------------------

   function deleteRowFromTable_0_dispatch
    (Self : not null Qt_Ada.Internals.Objects.Q_Object_Base_Access;
     Row : Qt4.Q_Integer)
       return Qt4.bool
   is
   begin
      return
        Qt4.To_bool
         (Q_Sql_Table_Model_Director'Class (Self.all).Delete_Row_From_Table
           (Row));
   end deleteRowFromTable_0_dispatch;

   ---------------------------
   -- Delete_Row_From_Table --
   ---------------------------

   not overriding
   function Delete_Row_From_Table
    (Self : not null access Q_Sql_Table_Model_Director;
     Row : Qt4.Q_Integer)
       return Standard.Boolean
   is
   begin
      return
        Qt4.To_Boolean
         (deleteRowFromTable_0_wrapper
           (Q_Sql_Table_Model_Director'Class (Self.all).QObject_View,
            Row));
   end Delete_Row_From_Table;

   --------------------
   -- Index_In_Query --
   --------------------

   overriding
   function Index_In_Query
    (Self : not null access constant Q_Sql_Table_Model_Director;
     Item : Qt4.Model_Indices.Q_Model_Index)
       return Qt4.Model_Indices.Q_Model_Index
   is
      Returns : Qt4.Model_Indices.Q_Model_Index;

   begin
      indexInQuery_0_wrapper
       (Q_Sql_Table_Model_Director'Class (Self.all).QObject_View,
        Qt4.Model_Indices.Internals.QModelIndex_View (Item),
        Qt4.Model_Indices.Internals.QModelIndex_View (Returns));

      return Returns;
   end Index_In_Query;

   ------------------------------
   -- orderByClause_0_dispatch --
   ------------------------------

   function orderByClause_0_dispatch
    (Self : not null Qt_Ada.Internals.Objects.Q_Object_Base_Access)
       return not null access Qt4.Strings.Internals.QString
   is
   begin
      return
        Qt4.Strings.Thin.copy_QString
         (Qt4.Strings.Internals.QString_View
           (Q_Sql_Table_Model_Director'Class (Self.all).Order_By_Clause));
   end orderByClause_0_dispatch;

   ---------------------
   -- Order_By_Clause --
   ---------------------

   not overriding
   function Order_By_Clause
    (Self : not null access constant Q_Sql_Table_Model_Director)
       return Qt4.Strings.Q_String
   is
      Returns : Qt4.Strings.Q_String;

   begin
      orderByClause_0_wrapper
       (Q_Sql_Table_Model_Director'Class (Self.all).QObject_View,
        Qt4.Strings.Internals.QString_View (Returns));

      return Returns;
   end Order_By_Clause;

   --------------------------------
   -- selectStatement_0_dispatch --
   --------------------------------

   function selectStatement_0_dispatch
    (Self : not null Qt_Ada.Internals.Objects.Q_Object_Base_Access)
       return not null access Qt4.Strings.Internals.QString
   is
   begin
      return
        Qt4.Strings.Thin.copy_QString
         (Qt4.Strings.Internals.QString_View
           (Q_Sql_Table_Model_Director'Class (Self.all).Select_Statement));
   end selectStatement_0_dispatch;

   ----------------------
   -- Select_Statement --
   ----------------------

   not overriding
   function Select_Statement
    (Self : not null access constant Q_Sql_Table_Model_Director)
       return Qt4.Strings.Q_String
   is
      Returns : Qt4.Strings.Q_String;

   begin
      selectStatement_0_wrapper
       (Q_Sql_Table_Model_Director'Class (Self.all).QObject_View,
        Qt4.Strings.Internals.QString_View (Returns));

      return Returns;
   end Select_Statement;

   ------------------
   -- Query_Change --
   ------------------

   overriding
   procedure Query_Change
    (Self : not null access Q_Sql_Table_Model_Director)
   is
   begin
      queryChange_0_wrapper
       (Q_Sql_Table_Model_Director'Class (Self.all).QObject_View);
   end Query_Change;

   -----------------------
   -- Emit_Data_Changed --
   -----------------------

   overriding
   procedure Emit_Data_Changed
    (Self : not null access Q_Sql_Table_Model_Director;
     Top_Left : Qt4.Model_Indices.Q_Model_Index;
     Bottom_Right : Qt4.Model_Indices.Q_Model_Index)
   is
   begin
      dataChanged_0_wrapper
       (Q_Sql_Table_Model_Director'Class (Self.all).QObject_View,
        Qt4.Model_Indices.Internals.QModelIndex_View (Top_Left),
        Qt4.Model_Indices.Internals.QModelIndex_View (Bottom_Right));
   end Emit_Data_Changed;

   ------------------------------
   -- Emit_Header_Data_Changed --
   ------------------------------

   overriding
   procedure Emit_Header_Data_Changed
    (Self : not null access Q_Sql_Table_Model_Director;
     Orientation : Qt4.Orientation;
     First : Qt4.Q_Integer;
     Last : Qt4.Q_Integer)
   is
   begin
      headerDataChanged_0_wrapper
       (Q_Sql_Table_Model_Director'Class (Self.all).QObject_View,
        Orientation,
        First,
        Last);
   end Emit_Header_Data_Changed;

   -------------------------------------
   -- Emit_Layout_About_To_Be_Changed --
   -------------------------------------

   overriding
   procedure Emit_Layout_About_To_Be_Changed
    (Self : not null access Q_Sql_Table_Model_Director)
   is
   begin
      layoutAboutToBeChanged_0_wrapper
       (Q_Sql_Table_Model_Director'Class (Self.all).QObject_View);
   end Emit_Layout_About_To_Be_Changed;

   -------------------------
   -- Emit_Layout_Changed --
   -------------------------

   overriding
   procedure Emit_Layout_Changed
    (Self : not null access Q_Sql_Table_Model_Director)
   is
   begin
      layoutChanged_0_wrapper
       (Q_Sql_Table_Model_Director'Class (Self.all).QObject_View);
   end Emit_Layout_Changed;

   --------------------------
   -- Begin_Insert_Columns --
   --------------------------

   overriding
   procedure Begin_Insert_Columns
    (Self : not null access Q_Sql_Table_Model_Director;
     Parent : Qt4.Model_Indices.Q_Model_Index;
     First : Qt4.Q_Integer;
     Last : Qt4.Q_Integer)
   is
   begin
      beginInsertColumns_0_wrapper
       (Q_Sql_Table_Model_Director'Class (Self.all).QObject_View,
        Qt4.Model_Indices.Internals.QModelIndex_View (Parent),
        First,
        Last);
   end Begin_Insert_Columns;

   -----------------------
   -- Begin_Insert_Rows --
   -----------------------

   overriding
   procedure Begin_Insert_Rows
    (Self : not null access Q_Sql_Table_Model_Director;
     Parent : Qt4.Model_Indices.Q_Model_Index;
     First : Qt4.Q_Integer;
     Last : Qt4.Q_Integer)
   is
   begin
      beginInsertRows_0_wrapper
       (Q_Sql_Table_Model_Director'Class (Self.all).QObject_View,
        Qt4.Model_Indices.Internals.QModelIndex_View (Parent),
        First,
        Last);
   end Begin_Insert_Rows;

   ------------------------
   -- Begin_Move_Columns --
   ------------------------

   overriding
   function Begin_Move_Columns
    (Self : not null access Q_Sql_Table_Model_Director;
     Source_Parent : Qt4.Model_Indices.Q_Model_Index;
     Source_First : Qt4.Q_Integer;
     Source_Last : Qt4.Q_Integer;
     Destination_Parent : Qt4.Model_Indices.Q_Model_Index;
     Destination_Child : Qt4.Q_Integer)
       return Standard.Boolean
   is
   begin
      return
        Qt4.To_Boolean
         (beginMoveColumns_0_wrapper
           (Q_Sql_Table_Model_Director'Class (Self.all).QObject_View,
            Qt4.Model_Indices.Internals.QModelIndex_View (Source_Parent),
            Source_First,
            Source_Last,
            Qt4.Model_Indices.Internals.QModelIndex_View (Destination_Parent),
            Destination_Child));
   end Begin_Move_Columns;

   ---------------------
   -- Begin_Move_Rows --
   ---------------------

   overriding
   function Begin_Move_Rows
    (Self : not null access Q_Sql_Table_Model_Director;
     Source_Parent : Qt4.Model_Indices.Q_Model_Index;
     Source_First : Qt4.Q_Integer;
     Source_Last : Qt4.Q_Integer;
     Destination_Parent : Qt4.Model_Indices.Q_Model_Index;
     Destination_Child : Qt4.Q_Integer)
       return Standard.Boolean
   is
   begin
      return
        Qt4.To_Boolean
         (beginMoveRows_0_wrapper
           (Q_Sql_Table_Model_Director'Class (Self.all).QObject_View,
            Qt4.Model_Indices.Internals.QModelIndex_View (Source_Parent),
            Source_First,
            Source_Last,
            Qt4.Model_Indices.Internals.QModelIndex_View (Destination_Parent),
            Destination_Child));
   end Begin_Move_Rows;

   --------------------------
   -- Begin_Remove_Columns --
   --------------------------

   overriding
   procedure Begin_Remove_Columns
    (Self : not null access Q_Sql_Table_Model_Director;
     Parent : Qt4.Model_Indices.Q_Model_Index;
     First : Qt4.Q_Integer;
     Last : Qt4.Q_Integer)
   is
   begin
      beginRemoveColumns_0_wrapper
       (Q_Sql_Table_Model_Director'Class (Self.all).QObject_View,
        Qt4.Model_Indices.Internals.QModelIndex_View (Parent),
        First,
        Last);
   end Begin_Remove_Columns;

   -----------------------
   -- Begin_Remove_Rows --
   -----------------------

   overriding
   procedure Begin_Remove_Rows
    (Self : not null access Q_Sql_Table_Model_Director;
     Parent : Qt4.Model_Indices.Q_Model_Index;
     First : Qt4.Q_Integer;
     Last : Qt4.Q_Integer)
   is
   begin
      beginRemoveRows_0_wrapper
       (Q_Sql_Table_Model_Director'Class (Self.all).QObject_View,
        Qt4.Model_Indices.Internals.QModelIndex_View (Parent),
        First,
        Last);
   end Begin_Remove_Rows;

   -----------------------
   -- Begin_Reset_Model --
   -----------------------

   overriding
   procedure Begin_Reset_Model
    (Self : not null access Q_Sql_Table_Model_Director)
   is
   begin
      beginResetModel_0_wrapper
       (Q_Sql_Table_Model_Director'Class (Self.all).QObject_View);
   end Begin_Reset_Model;

   -----------------------------
   -- Change_Persistent_Index --
   -----------------------------

   overriding
   procedure Change_Persistent_Index
    (Self : not null access Q_Sql_Table_Model_Director;
     From : Qt4.Model_Indices.Q_Model_Index;
     To : Qt4.Model_Indices.Q_Model_Index)
   is
   begin
      changePersistentIndex_0_wrapper
       (Q_Sql_Table_Model_Director'Class (Self.all).QObject_View,
        Qt4.Model_Indices.Internals.QModelIndex_View (From),
        Qt4.Model_Indices.Internals.QModelIndex_View (To));
   end Change_Persistent_Index;

   ------------------------
   -- End_Insert_Columns --
   ------------------------

   overriding
   procedure End_Insert_Columns
    (Self : not null access Q_Sql_Table_Model_Director)
   is
   begin
      endInsertColumns_0_wrapper
       (Q_Sql_Table_Model_Director'Class (Self.all).QObject_View);
   end End_Insert_Columns;

   ---------------------
   -- End_Insert_Rows --
   ---------------------

   overriding
   procedure End_Insert_Rows
    (Self : not null access Q_Sql_Table_Model_Director)
   is
   begin
      endInsertRows_0_wrapper
       (Q_Sql_Table_Model_Director'Class (Self.all).QObject_View);
   end End_Insert_Rows;

   ----------------------
   -- End_Move_Columns --
   ----------------------

   overriding
   procedure End_Move_Columns
    (Self : not null access Q_Sql_Table_Model_Director)
   is
   begin
      endMoveColumns_0_wrapper
       (Q_Sql_Table_Model_Director'Class (Self.all).QObject_View);
   end End_Move_Columns;

   -------------------
   -- End_Move_Rows --
   -------------------

   overriding
   procedure End_Move_Rows
    (Self : not null access Q_Sql_Table_Model_Director)
   is
   begin
      endMoveRows_0_wrapper
       (Q_Sql_Table_Model_Director'Class (Self.all).QObject_View);
   end End_Move_Rows;

   ------------------------
   -- End_Remove_Columns --
   ------------------------

   overriding
   procedure End_Remove_Columns
    (Self : not null access Q_Sql_Table_Model_Director)
   is
   begin
      endRemoveColumns_0_wrapper
       (Q_Sql_Table_Model_Director'Class (Self.all).QObject_View);
   end End_Remove_Columns;

   ---------------------
   -- End_Remove_Rows --
   ---------------------

   overriding
   procedure End_Remove_Rows
    (Self : not null access Q_Sql_Table_Model_Director)
   is
   begin
      endRemoveRows_0_wrapper
       (Q_Sql_Table_Model_Director'Class (Self.all).QObject_View);
   end End_Remove_Rows;

   ---------------------
   -- End_Reset_Model --
   ---------------------

   overriding
   procedure End_Reset_Model
    (Self : not null access Q_Sql_Table_Model_Director)
   is
   begin
      endResetModel_0_wrapper
       (Q_Sql_Table_Model_Director'Class (Self.all).QObject_View);
   end End_Reset_Model;

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

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

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

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

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

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

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

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

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

   overriding
   function Sender
    (Self : not null access constant Q_Sql_Table_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_Sql_Table_Model_Director'Class (Self.all).QObject_View));
   end Sender;

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

end Qt4.Sql_Table_Models.Directors;
