------------------------------------------------------------------------------
--                                                                          --
--                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.                                              --
--                                                                          --
------------------------------------------------------------------------------
--  $Revision: 3769 $ $Date: 2010-10-24 03:16:28 +0400 (Sun, 24 Oct 2010) $
------------------------------------------------------------------------------
with Qt4.Strings;
with Qt4.Sql_Databases;
with Qt4.Sql_Relational_Table_Models;
with Qt4.Sql_Table_Models;
with Qt4.Table_Views;

package Relational_Table_Models is

   ---------------------------------------------------------------------------
   --! <Subprogram>
   --!    <Unit> Initialize_Model
   --!    <Purpose>
   --!    <Exceptions>
   ---------------------------------------------------------------------------
   procedure Initialize_Model
    (Model : access
       Qt4.Sql_Relational_Table_Models.Q_Sql_Relational_Table_Model'Class);

   ---------------------------------------------------------------------------
   --! <Subprogram>
   --!    <Unit> Create_Views
   --!    <Purpose>
   --!    <Exceptions>
   ---------------------------------------------------------------------------
   function Create_View
    (Title : Qt4.Strings.Q_String;
     Model : access Qt4.Sql_Table_Models.Q_Sql_Table_Model'Class)
       return not null access Qt4.Table_Views.Q_Table_View'Class;

   ---------------------------------------------------------------------------
   --! <Subprogram>
   --!    <Unit> Create_Relational_Tables
   --!    <Purpose>
   --!    <Exceptions>
   ---------------------------------------------------------------------------
   procedure Create_Relational_Tables
    (DB : in out Qt4.Sql_Databases.Q_Sql_Database);

end Relational_Table_Models;
