Top | ![]() |
![]() |
![]() |
![]() |
MrpProperty * | mrp_property_new () |
const gchar * | mrp_property_get_name () |
MrpPropertyType | mrp_property_get_property_type () |
void | mrp_property_set_label () |
const gchar * | mrp_property_get_label () |
void | mrp_property_set_description () |
const gchar * | mrp_property_get_description () |
void | mrp_property_set_user_defined () |
gboolean | mrp_property_get_user_defined () |
MrpProperty * | mrp_property_ref () |
void | mrp_property_unref () |
const gchar * | mrp_property_type_as_string () |
MrpProperty is a typedef to GParamSpec. It is used to add properties to projects, resources and tasks at run time, for example by the user of a GUI application, or plugins that add functionality.
MrpProperty * mrp_property_new (const gchar *name
,MrpPropertyType type
,const gchar *label
,const gchar *description
,gboolean user_defined
);
Creates a new MrpProperty. name
must be unique in the application.
user_defined
specifies if the property was created by a user or a plugin
or Planner itself.
name |
the name of the property |
|
type |
||
label |
the human readable label |
|
description |
a string describing the property |
|
user_defined |
a gboolean |
const gchar *
mrp_property_get_name (MrpProperty *property
);
Fetches the name of property
MrpPropertyType
mrp_property_get_property_type (MrpProperty *property
);
Fetches the type of property
void mrp_property_set_label (MrpProperty *property
,const gchar *label
);
Sets the label of property
and signals the "property-changed" signal on
the project property
is attached to.
const gchar *
mrp_property_get_label (MrpProperty *property
);
Fetches the label of property
void mrp_property_set_description (MrpProperty *property
,const gchar *description
);
Sets the description of property
and signals the "property-changed" signal on the project property
is attached to.
const gchar *
mrp_property_get_description (MrpProperty *property
);
Fetches the description of property
void mrp_property_set_user_defined (MrpProperty *property
,gboolean user_defined
);
Sets if property
is user-defined or created by a plugin or Planner
itself.
gboolean
mrp_property_get_user_defined (MrpProperty *property
);
Fetches if property
is uesr defined or not.
MrpProperty *
mrp_property_ref (MrpProperty *property
);
Add a reference to property
. User should call this when storing a reference
to property
.
void
mrp_property_unref (MrpProperty *property
);
Remove a reference from property
. If the reference count reaches 0 the
property will be freed. User should not use it's reference after calling
mrp_property_unref()
.
const gchar *
mrp_property_type_as_string (MrpPropertyType type
);
Transform a MrpPropertyType into a human readable string.
The different types of custom properties. Cost and duration are simply float and integer values, but the extra information provided makes it possible to format the values properly in a GUI.