Modificaciones varias:
- Se han añadido constructores new() a las columnas. - VnLabel se alinea a la izquierda y hace un widget_show()
This commit is contained in:
parent
e1b3173e5b
commit
cc827ae619
29
db/db-calc.c
29
db/db-calc.c
|
@ -42,25 +42,14 @@ G_DEFINE_TYPE (DbCalc, db_calc, GVN_TYPE_PARAM);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* db_calc_new:
|
* db_calc_new:
|
||||||
* @model: the #DbModel in which the operations will apply
|
|
||||||
* @type: the #DbCalcOperationType
|
|
||||||
* @col: the number of a column (starting with 0)
|
|
||||||
*
|
*
|
||||||
* Creates a new #DbCalc using @col to select the only column to be processed
|
* Creates a new #DbCalc.
|
||||||
* in each row of @model.
|
|
||||||
*
|
*
|
||||||
* Return value: a new #DbCalc
|
* Return value: a new #DbCalc
|
||||||
**/
|
**/
|
||||||
DbCalc * db_calc_new (DbModel * model, DbCalcType type, const gchar * column_name)
|
DbCalc * db_calc_new ()
|
||||||
{
|
{
|
||||||
g_return_val_if_fail (DB_IS_MODEL (model), NULL);
|
return g_object_new (DB_TYPE_CALC, NULL);
|
||||||
|
|
||||||
return g_object_new (DB_TYPE_CALC
|
|
||||||
,"model", model
|
|
||||||
,"type", type
|
|
||||||
,"column-name", column_name
|
|
||||||
,NULL
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -416,7 +405,7 @@ static void db_calc_class_init (DbCalcClass * k)
|
||||||
,_("Model")
|
,_("Model")
|
||||||
,_("The model where the operations will be applied")
|
,_("The model where the operations will be applied")
|
||||||
,DB_TYPE_MODEL
|
,DB_TYPE_MODEL
|
||||||
,G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE)
|
,G_PARAM_READWRITE)
|
||||||
);
|
);
|
||||||
|
|
||||||
g_object_class_install_property (klass, PROP_TYPE
|
g_object_class_install_property (klass, PROP_TYPE
|
||||||
|
@ -425,21 +414,21 @@ static void db_calc_class_init (DbCalcClass * k)
|
||||||
,_("The type of the operation applied over the function")
|
,_("The type of the operation applied over the function")
|
||||||
,DB_TYPE_CALC_TYPE
|
,DB_TYPE_CALC_TYPE
|
||||||
,DB_CALC_TYPE_SUM
|
,DB_CALC_TYPE_SUM
|
||||||
,G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE)
|
,G_PARAM_READWRITE)
|
||||||
);
|
);
|
||||||
|
|
||||||
g_object_class_install_property (klass, PROP_FUNC
|
g_object_class_install_property (klass, PROP_FUNC
|
||||||
,g_param_spec_pointer ("function"
|
,g_param_spec_pointer ("function"
|
||||||
,_("Function")
|
,_("Function")
|
||||||
,_("The function to execute")
|
,_("The function to execute")
|
||||||
,G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE)
|
,G_PARAM_READWRITE)
|
||||||
);
|
);
|
||||||
|
|
||||||
g_object_class_install_property (klass, PROP_DATA
|
g_object_class_install_property (klass, PROP_DATA
|
||||||
,g_param_spec_pointer ("data"
|
,g_param_spec_pointer ("data"
|
||||||
,_("Data")
|
,_("Data")
|
||||||
,_("The user provided data for the function")
|
,_("The user provided data for the function")
|
||||||
,G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE)
|
,G_PARAM_READWRITE)
|
||||||
);
|
);
|
||||||
|
|
||||||
g_object_class_install_property (klass, PROP_COLUMN_INDEX
|
g_object_class_install_property (klass, PROP_COLUMN_INDEX
|
||||||
|
@ -449,7 +438,7 @@ static void db_calc_class_init (DbCalcClass * k)
|
||||||
,-1
|
,-1
|
||||||
,G_MAXINT
|
,G_MAXINT
|
||||||
,-1
|
,-1
|
||||||
,G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE)
|
,G_PARAM_READWRITE)
|
||||||
);
|
);
|
||||||
|
|
||||||
g_object_class_install_property (klass, PROP_COLUMN_NAME
|
g_object_class_install_property (klass, PROP_COLUMN_NAME
|
||||||
|
@ -457,7 +446,7 @@ static void db_calc_class_init (DbCalcClass * k)
|
||||||
,_("Column name")
|
,_("Column name")
|
||||||
,_("A column name to apply the operations over it")
|
,_("A column name to apply the operations over it")
|
||||||
,NULL
|
,NULL
|
||||||
,G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE)
|
,G_PARAM_READWRITE)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -87,9 +87,7 @@ struct _DbCalcClass
|
||||||
GType db_calc_get_type ();
|
GType db_calc_get_type ();
|
||||||
GType db_calc_type_get_type ();
|
GType db_calc_type_get_type ();
|
||||||
|
|
||||||
DbCalc * db_calc_new (DbModel * model
|
DbCalc * db_calc_new ();
|
||||||
,DbCalcType type
|
|
||||||
,const gchar * column_name);
|
|
||||||
DbCalc * db_calc_new_with_func (DbModel * model
|
DbCalc * db_calc_new_with_func (DbModel * model
|
||||||
,DbCalcType type
|
,DbCalcType type
|
||||||
,DbCalcFunc func
|
,DbCalcFunc func
|
||||||
|
|
|
@ -18,14 +18,15 @@
|
||||||
#ifndef FIELD_H
|
#ifndef FIELD_H
|
||||||
#define FIELD_H
|
#define FIELD_H
|
||||||
|
|
||||||
#include "vn-entry.h"
|
|
||||||
#include "vn-spin.h"
|
|
||||||
#include "vn-calendar.h"
|
#include "vn-calendar.h"
|
||||||
#include "vn-combo.h"
|
|
||||||
#include "vn-check.h"
|
#include "vn-check.h"
|
||||||
#include "vn-image.h"
|
#include "vn-combo.h"
|
||||||
#include "vn-completion.h"
|
#include "vn-completion.h"
|
||||||
#include "vn-date-chooser.h"
|
#include "vn-date-chooser.h"
|
||||||
|
#include "vn-entry.h"
|
||||||
#include "vn-http-image.h"
|
#include "vn-http-image.h"
|
||||||
|
#include "vn-image.h"
|
||||||
|
#include "vn-label.h"
|
||||||
|
#include "vn-spin.h"
|
||||||
|
|
||||||
#endif
|
#endif
|
Reference in New Issue