## mrp-property

mrp-property

## Functions

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 ()

## Types and Values

typedef | MrpProperty
enum | MrpPropertyType

## Includes

    #include <libplanner/planner.h>

## Description

## Functions

### mrp_property_new ()

    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.

#### Parameters

name | the name of the property |
type | an MrpPropertyType |
label | the human readable label |
description | a string describing the property |
user_defined | a gboolean |

#### Returns

a newly create property.

[transfer full]

### mrp_property_get_name ()

    const gchar *
    mrp_property_get_name (MrpProperty *property);

Fetches the name of `property`

#### Parameters

property | an MrpProperty |

#### Returns

the name of `property`

### mrp_property_get_property_type ()

    MrpPropertyType
    mrp_property_get_property_type (MrpProperty *property);

Fetches the type of `property`

#### Parameters

property | an MrpProperty |

#### Returns

the type of `property`

### mrp_property_set_label ()

    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.

#### Parameters

property | an MrpProperty |
label | a string containing the new label |

### mrp_property_get_label ()

    const gchar *
    mrp_property_get_label (MrpProperty *property);

Fetches the label of `property`

#### Parameters

property | an MrpProperty |

#### Returns

the label of `property`

### mrp_property_set_description ()

    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.

#### Parameters

property | an MrpProperty |
description | a string containing the new description |

### mrp_property_get_description ()

    const gchar *
    mrp_property_get_description (MrpProperty *property);

Fetches the description of `property`

#### Parameters

property | an MrpProperty |

#### Returns

the description of `property`

### mrp_property_set_user_defined ()

    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.

#### Parameters

property | an MrpProperty |
user_defined | if the property is user defined |

### mrp_property_get_user_defined ()

    gboolean
    mrp_property_get_user_defined (MrpProperty *property);

Fetches if `property` is uesr defined or not.

#### Parameters

property | an MrpProperty |

#### Returns

`TRUE` if `property` is user defined, otherwise `FALSE`

### mrp_property_ref ()

    MrpProperty *
    mrp_property_ref (MrpProperty *property);

Add a reference to `property` . User should call this when storing a reference to `property` .

#### Parameters

property | an MrpProperty |

#### Returns

the property.

[transfer full]

### mrp_property_unref ()

    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()`.

#### Parameters

property | an MrpProperty |

### mrp_property_type_as_string ()

    const gchar *
    mrp_property_type_as_string (MrpPropertyType type);

Transform a MrpPropertyTYpe into a human readable string.

#### Parameters

type | an MrpPropertyType |

#### Returns

a string representation of `type`

## Types and Values

### MrpProperty

    typedef GParamSpec MrpProperty;

### enum MrpPropertyType

#### Members

MRP_PROPERTY_TYPE_NONE |  |
MRP_PROPERTY_TYPE_INT |  |
MRP_PROPERTY_TYPE_FLOAT |  |
MRP_PROPERTY_TYPE_STRING |  |
MRP_PROPERTY_TYPE_STRING_LIST |  |
MRP_PROPERTY_TYPE_DATE |  |
MRP_PROPERTY_TYPE_DURATION |  |
MRP_PROPERTY_TYPE_COST |  |