Home

Qt_Ada.Generic_Variants

The generic package Qt_Ada.Generic_Variants allows application to store values of the user defined types in the instance of the QVariant type.

with Qt4.Meta_Types;
with Qt4.Variants;

generic
   type Value_Type is private;
   Type_Name : String;

package Qt_Ada.Generic_Variants is

   Type_Id : constant Qt4.Meta_Types.Meta_Type_Type;

   function Create (Item : in Value_Type) return Qt4.Variants.Q_Variant;

   function To_Value (Variant : in Qt4.Variants.Q_Variant'Class)
     return Value_Type;

private

end Qt_Ada.Generic_Variants;

The constant Type_Id is an unique QVariant's identifier of user's type.

The function Create returns new instance of QVariant in which specified value is stored.

The function To_Value returns the stored value.


QtAda 3.1