Top | ![]() |
![]() |
![]() |
![]() |
MrpCalendar * | calendar | Read / Write |
MrpGroup * | default-group | Read / Write |
gchar * | manager | Read / Write |
gchar * | name | Read / Write |
gchar * | organization | Read / Write |
gchar * | phase | Read / Write |
gpointer | phases | Read / Write |
glong | project-start | Read / Write |
void | calendar-tree-changed | Run Last |
void | day-added | Run Last |
void | day-changed | Run Last |
void | day-removed | Run Last |
void | default-group-changed | Run Last |
void | group-added | Run Last |
void | group-removed | Run Last |
void | loaded | Run Last |
void | needs-saving-changed | Run Last |
void | property-added | Run Last |
void | property-changed | Run Last |
void | property-removed | Run Last |
void | resource-added | Run Last |
void | resource-removed | Run Last |
void | task-inserted | Run Last |
void | task-moved | Run Last |
void | task-removed | Run Last |
gboolean (*MrpTaskTraverseFunc) (MrpTask *Param1
,gpointer Param2
);
A function to use with mrp_project_task_traverse()
. task
is the
currently traversed task, and data
is the user data passed to the
mrp_project_task_traverse()
. The traversal can be stopped by returning
TRUE
.
gboolean
mrp_project_is_empty (MrpProject *project
);
Checks whether a project is empty.
gboolean
mrp_project_needs_saving (MrpProject *project
);
Checks if project
needs saving
mrptime
mrp_project_get_project_start (MrpProject *project
);
Fetches the project start from project
.
void mrp_project_set_project_start (MrpProject *project
,mrptime start
);
Set the project start.
gboolean mrp_project_load (MrpProject *project
,const gchar *uri
,GError **error
);
Loads a project stored at uri
into project
.
project |
an MrpProject |
|
uri |
the URI where project should be read from |
|
error |
location to store error, or |
gboolean mrp_project_save (MrpProject *project
,gboolean force
,GError **error
);
Saves a project.
project |
an MrpProject |
|
force |
overwrite changes done by someone else if necessary |
|
error |
location to store error, or |
gboolean mrp_project_save_to_xml (MrpProject *project
,gchar **str
,GError **error
);
Saves a project as XML to a string buffer.
project |
an MrpProject |
|
str |
location to store XML string |
|
error |
location to store error, or |
gboolean mrp_project_load_from_xml (MrpProject *project
,const gchar *str
,GError **error
);
Loads a project from XML data into project
.
project |
an MrpProject |
|
str |
XML string with project data to read from |
|
error |
location to store error, or |
gboolean mrp_project_save_as (MrpProject *project
,const gchar *uri
,gboolean force
,GError **error
);
Saves a project to a specific URI.
project |
an MrpProject |
|
uri |
URI to save to |
|
force |
overwrite an existing file if necessary |
|
error |
location to store error, or |
const gchar *
mrp_project_get_uri (MrpProject *project
);
Fetches the URI from project
.
MrpResource * mrp_project_get_resource_by_name (MrpProject *project
,const gchar *name
);
Retrieves the first resource in the list that match the name.
GList *
mrp_project_get_resources (MrpProject *project
);
Fetches the list of resources in project
. This list should not be freed and
if caller needs to manipulate it, a copy needs to be made first.
void mrp_project_add_resource (MrpProject *project
,MrpResource *resource
);
Adds resource
to the list of resources in project
.
void mrp_project_remove_resource (MrpProject *project
,MrpResource *resource
);
Removes resource
from project
.
MrpGroup * mrp_project_get_group_by_name (MrpProject *project
,const gchar *name
);
Retrieves the first group with name that matches name
GList *
mrp_project_get_groups (MrpProject *project
);
Fetches the list of groups in project
. The list should not be freed and if
caller needs to manipulate it, a copy needs to be made first.
void mrp_project_add_group (MrpProject *project
,MrpGroup *group
);
Adds group
to the list of groups in project
.
void mrp_project_remove_group (MrpProject *project
,MrpGroup *group
);
Removes group
from project
.
MrpTask * mrp_project_get_task_by_name (MrpProject *project
,const gchar *name
);
Retrieves the first task with name matching name
. Uses task_traverse to traverse all tasks.
GList *
mrp_project_get_all_tasks (MrpProject *project
);
Returns a new list of the tasks in project
. The caller needs to free the
list with g_list_free()
, but not the values in it.
void mrp_project_insert_task (MrpProject *project
,MrpTask *parent
,gint position
,MrpTask *task
);
Insert task
in the task tree with parent
at position
among other
children.
project |
an MrpProject |
|
parent |
MrpTask that will be parent to inserted task |
|
position |
position among children to insert task |
|
task |
MrpTask to insert |
void mrp_project_remove_task (MrpProject *project
,MrpTask *task
);
Removes task
from the task tree in project
.
gboolean mrp_project_move_task (MrpProject *project
,MrpTask *task
,MrpTask *sibling
,MrpTask *parent
,gboolean before
,GError **error
);
Move the task in the task tree. If sibling
is NULL
task will be placed
first among the children of parent
if before
is TRUE
, otherwise it will
be placed last. If sibling
is set, task
will be placed before or after
sibling
depending on the value of before
.
project |
an MrpProject |
|
task |
MrpTask to move |
|
sibling |
||
parent |
MrpTask the new parent |
|
before |
whether to put |
|
error |
location to store error, or NULL |
MrpTask *
mrp_project_get_root_task (MrpProject *project
);
Fetches the root task from project
.
void mrp_project_task_traverse (MrpProject *project
,MrpTask *root
,MrpTaskTraverseFunc func
,gpointer user_data
);
Calls func
on each task under root
in the task tree. user_data
is passed
to func
. If func
returns TRUE
, the traversal is stopped.
project |
an MrpProject |
|
root |
MrpTask indicates where traversing will begin. |
|
func |
the function to call for each task |
|
user_data |
user data passed to the function |
void
mrp_project_reschedule (MrpProject *project
);
Reschedules the project, calculating task start/end/duration etc.
gint mrp_project_calculate_task_work (MrpProject *project
,MrpTask *task
,mrptime start
,mrptime finish
);
Calculates the work needed to achieve the given start and finish time, with the allocated resources' calendards in consideration.
project |
an MrpProject |
|
task |
an MrpTask |
|
start |
a start time, or if |
|
finish |
a finish time |
GList * mrp_project_get_properties_from_type (MrpProject *project
,GType object_type
);
Fetches a list of the properties belonging to project
and applies to
object_type
. The list should not be freed and needs to be copied before
modified.
void mrp_project_add_property (MrpProject *project
,GType object_type
,MrpProperty *property
,gboolean user_defined
);
Add a custom property to project
. The object_type
specifies what kind of
objects the property applies to. user_defined
specifies whether the
property is created by the user or by some plugin.
project |
an MrpProject |
|
object_type |
the owner type |
|
property |
an MrpProperty |
|
user_defined |
whether the property is defined through a user interface |
void mrp_project_remove_property (MrpProject *project
,GType object_type
,const gchar *name
);
Removes the property corresponding to object_type
and name
from project
.
project |
an MrpProject |
|
object_type |
a GType specifing object type to remove property from |
|
name |
the name of the property |
MrpProperty * mrp_project_get_property (MrpProject *project
,const gchar *name
,GType object_type
);
Fetches an MrpProperty that corresponds to name
and object_type
. This is
mainly for language bindings and should not be used for other cases.
project |
an MrpProject |
|
name |
the name of the property |
|
object_type |
object type the property belongs to |
gboolean mrp_project_has_property (MrpProject *project
,GType owner_type
,const gchar *name
);
Checks if project
has a property named name
applying to object of type
object_type
.
project |
an MrpProperty |
|
owner_type |
a GType specifing object type look for property on |
|
name |
the name of the property |
MrpCalendar *
mrp_project_get_root_calendar (MrpProject *project
);
Fetches the root calendar of project
.
MrpCalendar *
mrp_project_get_calendar (MrpProject *project
);
Fetches the calendar used by project
.
typedef struct _MrpProjectPriv MrpProjectPriv;
A private struct for internal use only. The definition of this structure is not publically available.
“calendar”
property“calendar” MrpCalendar *
The calendar used in the project.
Flags: Read / Write
“default-group”
property“default-group” MrpGroup *
Default group for new resources.
Flags: Read / Write
“manager”
property“manager” gchar *
The manager of the project.
Flags: Read / Write
Default value: ""
“organization”
property“organization” gchar *
The organization behind the project.
Flags: Read / Write
Default value: ""
“phase”
property“phase” gchar *
The phase the project is in.
Flags: Read / Write
Default value: ""
“phases”
property“phases” gpointer
The various phases the project can be in.
Flags: Read / Write
“project-start”
property“project-start” glong
The start date of the project.
Flags: Read / Write
Allowed values: >= 0
Default value: 0
“calendar-tree-changed”
signalvoid user_function (MrpProject *mrpproject, MrpCalendar *arg1, gpointer user_data)
mrpproject |
the object which received the signal. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“day-added”
signalvoid user_function (MrpProject *mrpproject, gpointer arg1, gpointer user_data)
mrpproject |
the object which received the signal. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“day-changed”
signalvoid user_function (MrpProject *mrpproject, gpointer arg1, gpointer user_data)
mrpproject |
the object which received the signal. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“day-removed”
signalvoid user_function (MrpProject *mrpproject, gpointer arg1, gpointer user_data)
mrpproject |
the object which received the signal. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“default-group-changed”
signalvoid user_function (MrpProject *mrpproject, MrpGroup *arg1, gpointer user_data)
mrpproject |
the object which received the signal. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“group-added”
signalvoid user_function (MrpProject *mrpproject, MrpGroup *arg1, gpointer user_data)
mrpproject |
the object which received the signal. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“group-removed”
signalvoid user_function (MrpProject *mrpproject, MrpGroup *arg1, gpointer user_data)
mrpproject |
the object which received the signal. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“loaded”
signalvoid user_function (MrpProject *mrpproject, gpointer user_data)
mrpproject |
the object which received the signal. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“needs-saving-changed”
signalvoid user_function (MrpProject *mrpproject, gboolean arg1, gpointer user_data)
mrpproject |
the object which received the signal. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“property-added”
signalvoid user_function (MrpProject *mrpproject, glong arg1, gpointer arg2, gpointer user_data)
mrpproject |
the object which received the signal. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“property-changed”
signalvoid user_function (MrpProject *mrpproject, gpointer arg1, gpointer user_data)
mrpproject |
the object which received the signal. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“property-removed”
signalvoid user_function (MrpProject *mrpproject, gpointer arg1, gpointer user_data)
mrpproject |
the object which received the signal. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“resource-added”
signalvoid user_function (MrpProject *mrpproject, MrpResource *arg1, gpointer user_data)
mrpproject |
the object which received the signal. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“resource-removed”
signalvoid user_function (MrpProject *mrpproject, MrpResource *arg1, gpointer user_data)
mrpproject |
the object which received the signal. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“task-inserted”
signalvoid user_function (MrpProject *mrpproject, MrpTask *arg1, gpointer user_data)
mrpproject |
the object which received the signal. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“task-moved”
signalvoid user_function (MrpProject *mrpproject, MrpTask *arg1, gpointer user_data)
mrpproject |
the object which received the signal. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“task-removed”
signalvoid user_function (MrpProject *mrpproject, MrpTask *arg1, gpointer user_data)
mrpproject |
the object which received the signal. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last