------------------------------------------------------------------------------
--                                                                          --
--                An Ada2005 binding to the Qt C++ framework                --
--                                                                          --
------------------------------------------------------------------------------
--                                                                          --
-- Copyright © 2008, 2009 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: 3266 $ $Date: 2009-04-18 13:27:41 +0400 (Sat, 18 Apr 2009) $
------------------------------------------------------------------------------
with Qt4.Main_Windows;
private with Qt4.Actions;
private with Qt4.List_Widgets;
private with Qt4.Main_Windows.Directors;
private with Qt4.Menus;
private with Qt4.Strings;
private with Qt4.Text_Edits;
private with Qt4.Tool_Bars;

package Main_Windows is

   type Main_Window is limited new Qt4.Main_Windows.Q_Main_Window with private;

   type Main_Window_Access is access all Main_Window'Class;

   function Create return not null Main_Window_Access;

private

   type Main_Window is
     new Qt4.Main_Windows.Directors.Q_Main_Window_Director with
   record
      Text_Edit       : Qt4.Text_Edits.Q_Text_Edit_Access;
      Customer_List   : Qt4.List_Widgets.Q_List_Widget_Access;
      Paragraphs_List : Qt4.List_Widgets.Q_List_Widget_Access;

      File_Menu       : Qt4.Menus.Q_Menu_Access;
      Edit_Menu       : Qt4.Menus.Q_Menu_Access;
      View_Menu       : Qt4.Menus.Q_Menu_Access;
      Help_Menu       : Qt4.Menus.Q_Menu_Access;

      File_Tool_Bar   : Qt4.Tool_Bars.Q_Tool_Bar_Access;
      Edit_Tool_Bar   : Qt4.Tool_Bars.Q_Tool_Bar_Access;

      New_Letter_Act  : Qt4.Actions.Q_Action_Access;
      Save_Act        : Qt4.Actions.Q_Action_Access;
      Print_Act       : Qt4.Actions.Q_Action_Access;
      Undo_Act        : Qt4.Actions.Q_Action_Access;
      About_Act       : Qt4.Actions.Q_Action_Access;
      About_Qt_Act    : Qt4.Actions.Q_Action_Access;
      Quit_Act        : Qt4.Actions.Q_Action_Access;
   end record;

   procedure Create_Actions (Self : not null access Main_Window'Class);

   procedure Create_Menus (Self : not null access Main_Window'Class);

   procedure Create_Status_Bar (Self : not null access Main_Window'Class);

   procedure Create_Dock_Windows (Self : not null access Main_Window'Class);

   procedure Create_Tool_Bars (Self : not null access Main_Window'Class);

   procedure New_Letter (Self : not null access Main_Window'Class);
   pragma Q_Slot (New_Letter, "newLetter()");

   procedure Print (Self : not null access Main_Window'Class);
   pragma Q_Slot (Print, "print()");

   procedure About_Qt (Self : not null access Main_Window'Class);
   pragma Q_Slot (About_Qt, "aboutQt()");

   procedure About (Self : not null access Main_Window'Class);
   pragma Q_Slot (About, "about()");

   procedure Save (Self : not null access Main_Window'Class);
   pragma Q_Slot (Save, "save()");

   procedure Undo (Self : not null access Main_Window'Class);
   pragma Q_Slot (Undo, "undo()");

   procedure Insert_Customer
    (Self     : not null access Main_Window'Class;
     Customer : Qt4.Strings.Q_String);
   pragma Q_Slot (Insert_Customer, "insertCustomer(QString)");

   procedure Add_Paragraph
    (Self      : not null access Main_Window'Class;
     Paragraph : Qt4.Strings.Q_String);
   pragma Q_Slot (Add_Paragraph, "addParagraph(QString)");

end Main_Windows;
