------------------------------------------------------------------------------
--                                                                          --
--                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.Abstract_Item_Models;
with Qt4.Abstract_Item_Views;
with Qt4.Widgets;
with Qt_Ada.Internals.Object_Registry;
with Qt_Ada.Internals.Objects;

with Qt_Ada.Internals.Objects.Completer_Proxies;
pragma Warnings (Off, Qt_Ada.Internals.Objects.Completer_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.Completers is

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

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

   function completionModel_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject)
       return not null access Qt_Ada.Internals.Objects.QObject;
   pragma Import (C, completionModel_0_wrapper,
                     "__Qt4Ada_QCompleter_completionModel_0_wrapper");

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

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

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

   procedure currentIndex_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Returns : not null access Qt4.Model_Indices.Internals.QModelIndex);
   pragma Import (C, currentIndex_0_wrapper,
                     "__Qt4Ada_QCompleter_currentIndex_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_QCompleter_currentRow_0_wrapper");

   function model_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject)
       return not null access Qt_Ada.Internals.Objects.QObject;
   pragma Import (C, model_0_wrapper,
                     "__Qt4Ada_QCompleter_model_0_wrapper");

   function popup_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject)
       return not null access Qt_Ada.Internals.Objects.QObject;
   pragma Import (C, popup_0_wrapper,
                     "__Qt4Ada_QCompleter_popup_0_wrapper");

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

   procedure setCompletionRole_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Role : Qt4.Q_Integer);
   pragma Import (C, setCompletionRole_0_wrapper,
                     "__Qt4Ada_QCompleter_setCompletionRole_0_wrapper");

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

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

   procedure setPopup_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Popup : not null access Qt_Ada.Internals.Objects.QObject);
   pragma Import (C, setPopup_0_wrapper,
                     "__Qt4Ada_QCompleter_setPopup_0_wrapper");

   procedure setWidget_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Popup : not null access Qt_Ada.Internals.Objects.QObject);
   pragma Import (C, setWidget_0_wrapper,
                     "__Qt4Ada_QCompleter_setWidget_0_wrapper");

   function widget_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject)
       return not null access Qt_Ada.Internals.Objects.QObject;
   pragma Import (C, widget_0_wrapper,
                     "__Qt4Ada_QCompleter_widget_0_wrapper");

   procedure complete_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Rect : not null access constant Qt4.Rects.Internals.QRect);
   pragma Import (C, complete_0_wrapper,
                     "__Qt4Ada_QCompleter_complete_0_wrapper");

   procedure setCompletionPrefix_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Prefix : not null access constant Qt4.Strings.Internals.QString);
   pragma Import (C, setCompletionPrefix_0_wrapper,
                     "__Qt4Ada_QCompleter_setCompletionPrefix_0_wrapper");

   pragma Style_Checks ("N");

   -----------------------
   -- Completion_Column --
   -----------------------

   function Completion_Column
    (Self : not null access constant Q_Completer'Class)
       return Qt4.Q_Integer
   is
   begin
      return
        completionColumn_0_wrapper
         (Self.QObject_View);
   end Completion_Column;

   ----------------------
   -- Completion_Count --
   ----------------------

   function Completion_Count
    (Self : not null access constant Q_Completer'Class)
       return Qt4.Q_Integer
   is
   begin
      return
        completionCount_0_wrapper
         (Self.QObject_View);
   end Completion_Count;

   ----------------------
   -- Completion_Model --
   ----------------------

   function Completion_Model
    (Self : not null access constant Q_Completer'Class)
       return not null access Qt4.Abstract_Item_Models.Q_Abstract_Item_Model'Class
   is
   begin
      return
        Qt4.Abstract_Item_Models.Q_Abstract_Item_Model'Class
         (Qt_Ada.Internals.Object_Registry.To_Q_Object
           (completionModel_0_wrapper
             (Self.QObject_View)).all)'Access;
   end Completion_Model;

   -----------------------
   -- Completion_Prefix --
   -----------------------

   function Completion_Prefix
    (Self : not null access constant Q_Completer'Class)
       return Qt4.Strings.Q_String
   is
      Returns : Qt4.Strings.Q_String;

   begin
      completionPrefix_0_wrapper
       (Self.QObject_View,
        Qt4.Strings.Internals.QString_View (Returns));

      return Returns;
   end Completion_Prefix;

   ---------------------
   -- Completion_Role --
   ---------------------

   function Completion_Role
    (Self : not null access constant Q_Completer'Class)
       return Qt4.Q_Integer
   is
   begin
      return
        completionRole_0_wrapper
         (Self.QObject_View);
   end Completion_Role;

   ------------------------
   -- Current_Completion --
   ------------------------

   function Current_Completion
    (Self : not null access constant Q_Completer'Class)
       return Qt4.Strings.Q_String
   is
      Returns : Qt4.Strings.Q_String;

   begin
      currentCompletion_0_wrapper
       (Self.QObject_View,
        Qt4.Strings.Internals.QString_View (Returns));

      return Returns;
   end Current_Completion;

   -------------------
   -- Current_Index --
   -------------------

   function Current_Index
    (Self : not null access constant Q_Completer'Class)
       return Qt4.Model_Indices.Q_Model_Index
   is
      Returns : Qt4.Model_Indices.Q_Model_Index;

   begin
      currentIndex_0_wrapper
       (Self.QObject_View,
        Qt4.Model_Indices.Internals.QModelIndex_View (Returns));

      return Returns;
   end Current_Index;

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

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

   -----------
   -- Model --
   -----------

   function Model
    (Self : not null access constant Q_Completer'Class)
       return not null access Qt4.Abstract_Item_Models.Q_Abstract_Item_Model'Class
   is
   begin
      return
        Qt4.Abstract_Item_Models.Q_Abstract_Item_Model'Class
         (Qt_Ada.Internals.Object_Registry.To_Q_Object
           (model_0_wrapper
             (Self.QObject_View)).all)'Access;
   end Model;

   -----------
   -- Popup --
   -----------

   function Popup
    (Self : not null access constant Q_Completer'Class)
       return not null access Qt4.Abstract_Item_Views.Q_Abstract_Item_View'Class
   is
   begin
      return
        Qt4.Abstract_Item_Views.Q_Abstract_Item_View'Class
         (Qt_Ada.Internals.Object_Registry.To_Q_Object
           (popup_0_wrapper
             (Self.QObject_View)).all)'Access;
   end Popup;

   ---------------------------
   -- Set_Completion_Column --
   ---------------------------

   procedure Set_Completion_Column
    (Self : not null access Q_Completer'Class;
     Column : Qt4.Q_Integer)
   is
   begin
      setCompletionColumn_0_wrapper
       (Self.QObject_View,
        Column);
   end Set_Completion_Column;

   -------------------------
   -- Set_Completion_Role --
   -------------------------

   procedure Set_Completion_Role
    (Self : not null access Q_Completer'Class;
     Role : Qt4.Q_Integer)
   is
   begin
      setCompletionRole_0_wrapper
       (Self.QObject_View,
        Role);
   end Set_Completion_Role;

   ---------------------
   -- Set_Current_Row --
   ---------------------

   function Set_Current_Row
    (Self : not null access Q_Completer'Class;
     Row : Qt4.Q_Integer)
       return Standard.Boolean
   is
   begin
      return
        Qt4.To_Boolean
         (setCurrentRow_0_wrapper
           (Self.QObject_View,
            Row));
   end Set_Current_Row;

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

   procedure Set_Model
    (Self : not null access Q_Completer'Class;
     C : not null access Qt4.Abstract_Item_Models.Q_Abstract_Item_Model'Class)
   is
   begin
      setModel_0_wrapper
       (Self.QObject_View,
        C.QObject_View);
   end Set_Model;

   ---------------
   -- Set_Popup --
   ---------------

   procedure Set_Popup
    (Self : not null access Q_Completer'Class;
     Popup : not null access Qt4.Abstract_Item_Views.Q_Abstract_Item_View'Class)
   is
   begin
      setPopup_0_wrapper
       (Self.QObject_View,
        Popup.QObject_View);
   end Set_Popup;

   ----------------
   -- Set_Widget --
   ----------------

   procedure Set_Widget
    (Self : not null access Q_Completer'Class;
     Popup : not null access Qt4.Widgets.Q_Widget'Class)
   is
   begin
      setWidget_0_wrapper
       (Self.QObject_View,
        Popup.QObject_View);
   end Set_Widget;

   ------------
   -- Widget --
   ------------

   function Widget
    (Self : not null access constant Q_Completer'Class)
       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
           (widget_0_wrapper
             (Self.QObject_View)).all)'Access;
   end Widget;

   --------------
   -- Complete --
   --------------

   procedure Complete
    (Self : not null access Q_Completer'Class;
     Rect : Qt4.Rects.Q_Rect
       := Qt4.Rects.Create)
   is
   begin
      complete_0_wrapper
       (Self.QObject_View,
        Qt4.Rects.Internals.QRect_View (Rect));
   end Complete;

   ---------------------------
   -- Set_Completion_Prefix --
   ---------------------------

   procedure Set_Completion_Prefix
    (Self : not null access Q_Completer'Class;
     Prefix : Qt4.Strings.Q_String)
   is
   begin
      setCompletionPrefix_0_wrapper
       (Self.QObject_View,
        Qt4.Strings.Internals.QString_View (Prefix));
   end Set_Completion_Prefix;

end Qt4.Completers;
