Hi experts. now am in effort to subclass QtAda's QWidget. I've done the Qt
C++ version and am going to port it to Ada version on QtAda.
I need to override *'Paint_Event'* method in my program, I've redeclared the
method using *overriding *keyword but it don't work since under *
Qt4.Widgets.Director* package the method declared *not overriding.* how can
I override the method...?
BTW, here are my codes:

=====================================================================================================================
the ads (Render_Areas)
=====================================================================================================================

with
Qt4.Widgets.Directors,
     Qt4.Widgets.Constructors,
     Qt4.Colors,
     Qt4.Painters,
     Qt4.Paint_Events,
     Commons;
use
  Qt4.Widgets.Directors;

package Render_Areas is

   type Render_Area is
   limited new Qt4.Widgets.Q_Widget with private;

   type Render_Area_Access is access all Render_Area'Class;

   function Create return not null Render_Area_Access;

*-- this part is not working,  the compiler complain about it.*
*overriding*
*   procedure Paint_Event*
*    (Self : not null access Q_Widget_Director;*
*     Event : not null access Qt4.Paint_Events.Q_Paint_Event'Class);*

private
   type Render_Area is
     new Qt4.Widgets.Directors.Q_Widget_Director
   with record
      X_Pivot : Integer;
      Pivot_Hour : Integer;
      Hour_In_Graph: Integer;
      First_Hour_Showed: Integer;
      X_Line_Distance: Integer;
      Line_Count_In_Front_Pivot: Integer;
      Line_Count_Behind_Pivot: Integer;
      Per_Line_Distance: Commons.Double;
      Per_Minute_Line_Distance: Commons.Double;

      X_Start_Click: Integer;
      X_End_Click: Integer;

      Painter: qt4.Painters.Q_Painter;
      Main_Grid_Color: qt4.Colors.Q_Color;
      Child_Grid_Color: qt4.Colors.Q_Color;
   end record;

   function Get_Current_X_Pivot(i:Integer) return Integer;
   procedure Complete_Vertical_Grid;
   procedure Complete_MM_Vertical_Grid(input: Integer);
   procedure Fill_Left_Area;
   procedure Draw_Time_Table;
   function Get_Hour_Label(input: Integer) return Integer;
   procedure Set_Painter_Color(color : qt4.Colors.Q_Color);


end Render_Areas;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://box347.bluehost.com/pipermail/qtada-users_lists.qtada.com/attachments/20110502/6f8ef889/attachment.htm>
_______________________________________________
qtada-users mailing list
[email protected]
http://box347.bluehost.com/mailman/listinfo/qtada-users_lists.qtada.com

Reply via email to