hk_dsdatavisible Class Reference

base class for visible widgets with data connection More...

#include <hk_dsdatavisible.h>

Inheritance diagram for hk_dsdatavisible:

Inheritance graph
[legend]
Collaboration diagram for hk_dsdatavisible:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 hk_dsdatavisible (hk_presentation *p=NULL)
void set_columnname (const hk_string &c, bool registerchange=true)
void set_columnname (const hk_string &c, bool registerchange, int coloccurance)
hk_columncolumn (void)
hk_string columnname (void) const
virtual void set_datasource (hk_datasource *d)
hk_datasourcedatasource (void)
virtual void savedata (ostream &s)
virtual void loaddata (xmlNodePtr definition)
bool use_defaultvalue (void)
void set_defaultvalue (const hk_string &def, bool registerchange=true)
hk_string raw_defaultvalue (void)
hk_string defaultvalue (void)
void reset_default (bool registerchange=true)
void set_numberformat (bool use_numberseparator=false, int commadigits=-1, bool registerchange=true)
void set_numberformat (bool use_numberseparator, int commadigits, bool registerchange, bool force_setting)
bool use_numberseparator (void)
int commadigits (void)
int precision (void)
virtual hk_string value_at (unsigned long row)
virtual hk_string value (void)
virtual void set_value (const hk_string &)
unsigned int find (unsigned int from, unsigned int to, const hk_string &searchtext, bool wholephrase=false, bool casesensitive=false, bool backwards=false)
unsigned int find (const hk_string &searchtext, bool wholephrase=false, bool casesensitive=false, bool backwards=false)
void set_on_valuechanged_action (const hk_string &, bool registerchange=true, bool force_setting=true)
hk_string on_valuechanged_action (void)
virtual bool action_on_valuechanged (void)
virtual hk_string tag_value (int tagnumber, bool &ok)
bool set_filtervalue (const hk_string &)
hk_string filtervalue (bool withcolumnnames=false) const

Static Public Member Functions

static void set_defaultnumberformat (bool use_thousandsseparator, int precision)
static bool defaultuse_numberseparator (void)
static int defaultprecision (void)
static bool parsed_value (hk_string &v, hk_connection *c)

Protected Member Functions

void set_data_has_changed (void)
virtual bool datasource_disable (void)
virtual bool datasource_enable (void)
virtual void datasource_delete (void)
virtual bool before_columns_deleted (void)
virtual void widget_specific_set_column (void)
virtual void widget_specific_numberformat (void)
virtual void columndata_has_changed (void)
virtual void before_insert_row (void)
virtual void new_column_pointer_created (void)
virtual bool presentationmode_changed (void)

Protected Attributes

hk_columnp_column

Friends

class hk_column

Detailed Description

base class for visible widgets with data connection

Version:
Revision
1.47
Author:
Horst Knorr (hk_classes@knoda.org) This is the base class for visible widgets that provides access to a specific column and its data. To use visible objects you have to define the datasource and the column.


Member Function Documentation

void hk_dsdatavisible::set_columnname ( const hk_string &  c,
bool  registerchange = true 
)

column name in the datasource. If there is no column with this name the widget will not be enabled

Parameters:
column the wished column
registerchange,: If this object will be displayed on a form you can decide whether changing the column name should mark the form as changed (then it will be saved when closed). Default is "true".

hk_column * hk_dsdatavisible::column ( void   ) 

Returns:
NULL if there is no column with the defined name. An object of type hk_column if it was found in the datasource

void hk_dsdatavisible::set_datasource ( hk_datasource d  )  [virtual]

the datasource

Reimplemented from hk_dsvisible.

Reimplemented in hk_dscombobox, hk_dsgridcolumn, and hk_reportsection.

void hk_dsdatavisible::savedata ( ostream &  s  )  [virtual]

stores the object's values to stream s. Especially used to store queries, forms and reports

Reimplemented from hk_dsvisible.

Reimplemented in hk_dscombobox, and hk_dsgridcolumn.

void hk_dsdatavisible::loaddata ( xmlNodePtr  definition  )  [virtual]

loads the object's values out of the definition string. Especially used to load queries, forms and reports

Reimplemented from hk_dsvisible.

Reimplemented in hk_dscombobox, and hk_dsgridcolumn.

bool hk_dsdatavisible::use_defaultvalue ( void   ) 

true if the default value will be used while inserting a new row

void hk_dsdatavisible::set_defaultvalue ( const hk_string &  def,
bool  registerchange = true 
)

sets the default value

Parameters:
def the new default value
registerchange if true and this widget is part of a form the new default value will be stored when closing the form.
The following variables are available:
 NOW% the actual date, time or datetime, depending on the fieldtype. Default ist datetime
 NOWDATE% the actual date
 NOWTIME% the actual time
 TRUE% the driver specific true value.
 FALSE% the driver specific false value.

hk_string hk_dsdatavisible::raw_defaultvalue ( void   ) 

Returns:
the default value as set with set_defaultvalue

hk_string hk_dsdatavisible::defaultvalue ( void   ) 

Returns:
the default value, but variables are replaced by its values

void hk_dsdatavisible::reset_default ( bool  registerchange = true  ) 

resets the default value. After that no default value will be used

int hk_dsdatavisible::commadigits ( void   ) 

Deprecated:
use precision() instead

hk_string hk_dsdatavisible::value_at ( unsigned long  row  )  [virtual]

returns the formatted value of the row 'row'

Reimplemented in hk_dscombobox, and hk_dsgridcolumn.

void hk_dsdatavisible::set_value ( const hk_string &   )  [virtual]

sets the display value. If this object has an existing column() the data will be changed

void hk_dsdatavisible::set_data_has_changed ( void   )  [protected]

used from eg. hk_kdememo to allow to signal the datasource that the data has changed without writing it with hk_column::set_asstring

bool hk_dsdatavisible::datasource_disable ( void   )  [protected, virtual]

FOR WIDGET DEVELOPERS ONLY: will be automatically called when the datasources is disabling

Reimplemented from hk_dsvisible.

Reimplemented in hk_dscombobox.

bool hk_dsdatavisible::datasource_enable ( void   )  [protected, virtual]

FOR WIDGET DEVELOPERS ONLY: will be automatically called when the datasources is enabling

Reimplemented from hk_dsvisible.

Reimplemented in hk_dscombobox.

void hk_dsdatavisible::datasource_delete ( void   )  [protected, virtual]

FOR WIDGET DEVELOPERS ONLY: will be automatically called when the datasources is destroyed

Reimplemented from hk_dsvisible.

bool hk_dsdatavisible::before_columns_deleted ( void   )  [protected, virtual]

FOR WIDGET DEVELOPERS ONLY: will be automatically called before the columns will be deleted. usually column pointers will be set to NULL in this function. i.e.when enabling,disabling or when a depending datasource has to requery its rows.

Reimplemented from hk_dsvisible.


The documentation for this class was generated from the following files:
Generated on Tue Nov 28 02:48:22 2006 for Databaseconnectionclasses by  doxygen 1.5.0