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

package body Qt_Ada.Internals.Objects.Sql_Table_Model_Proxies is

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

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

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

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

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

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

   procedure sort_0_virtual
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Column : Qt4.Q_Integer;
     Order : Qt4.Sort_Order);
      pragma Import (C, sort_0_virtual,
                     "__Qt4Ada_QSqlTableModel_sort_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");

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

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

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

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

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

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

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

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

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

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

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

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

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

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

   type Q_Sql_Table_Model_Proxy_Access is
     access all Q_Sql_Table_Model_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_Sql_Table_Model_Proxy_Access
        := new Q_Sql_Table_Model_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
    ("QSqlTableModel", Create'Access);
end Qt_Ada.Internals.Objects.Sql_Table_Model_Proxies;
