3
* Copyright (C) 2003 Vivien Malerba
5
* This program is free software; you can redistribute it and/or
6
* modify it under the terms of the GNU General Public License as
7
* published by the Free Software Foundation; either version 2 of the
8
* License, or (at your option) any later version.
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
15
* You should have received a copy of the GNU General Public License
16
* along with this program; if not, write to the Free Software
17
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
22
#ifndef __MG_QF_VALUE_H_
23
#define __MG_QF_VALUE_H_
25
#include <libgda/libgda.h>
28
#include "mg-qfield.h"
29
#include "mg-server-data-type.h"
33
#define MG_QF_VALUE_TYPE (mg_qf_value_get_type())
34
#define MG_QF_VALUE(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, mg_qf_value_get_type(), MgQfValue)
35
#define MG_QF_VALUE_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, mg_qf_value_get_type (), MgQfValueClass)
36
#define IS_MG_QF_VALUE(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, mg_qf_value_get_type ())
40
extern GQuark mg_qf_value_error_quark (void);
41
#define MG_QF_VALUE_ERROR mg_qf_value_error_quark ()
45
MG_QF_VALUE_XML_LOAD_ERROR,
46
MG_QF_VALUE_RENDER_ERROR,
47
MG_QF_VALUE_PARAM_ERROR
51
/* struct for the object's data */
55
MgQfValuePrivate *priv;
58
/* struct for the object's class */
59
struct _MgQfValueClass
64
void (*templ_signal) (MgQfValue *obj);
67
guint mg_qf_value_get_type (void);
68
GObject *mg_qf_value_new (MgQuery *query, MgServerDataType *type);
70
void mg_qf_value_set_value (MgQfValue *field, const GdaValue *val);
71
const GdaValue *mg_qf_value_get_value (MgQfValue *field);
72
void mg_qf_value_set_default_value (MgQfValue *field, const GdaValue *default_val);
73
const GdaValue *mg_qf_value_get_default_value (MgQfValue *field);
74
GdaValueType mg_qf_value_get_value_type (MgQfValue *field);
75
MgServerDataType *mg_qf_value_get_server_data_type(MgQfValue *field);
77
void mg_qf_value_set_is_parameter (MgQfValue *field, gboolean is_param);
78
gboolean mg_qf_value_is_parameter (MgQfValue *field);
80
void mg_qf_value_set_not_null (MgQfValue *field, gboolean not_null);
81
gboolean mg_qf_value_get_not_null (MgQfValue *field);
82
gboolean mg_qf_value_is_value_null (MgQfValue *field, MgContext *context);