Main Page | Namespace List | Class Hierarchy | Class List | File List | Class Members | File Members | Related Pages

hk_dsdatavisible Class Reference

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

#include <hk_dsdatavisible.h>

Inheritance diagram for hk_dsdatavisible:

hk_dsvisible hk_visible hk_class hk_dsgridcolumn hk_reportdata hk_reportsection List of all members.

Public Member Functions

 hk_dsdatavisible (hk_presentation *p=NULL)
virtual ~hk_dsdatavisible ()
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)
virtual void set_datasource (hk_datasource *d)
hk_datasourcedatasource (void)
virtual void savedata (ostream &s)
virtual void loaddata (const hk_string &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)

Static Public Member Functions

static void set_defaultnumberformat (bool use_thousandsseparator, int precision)
static bool defaultuse_numberseparator (void)
static int defaultprecision (void)

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.42
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.


Constructor & Destructor Documentation

hk_dsdatavisible::hk_dsdatavisible hk_presentation p = NULL  ) 
 

virtual hk_dsdatavisible::~hk_dsdatavisible  )  [virtual]
 


Member Function Documentation

virtual bool hk_dsdatavisible::action_on_valuechanged void   )  [virtual]
 

virtual 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.

virtual void hk_dsdatavisible::before_insert_row void   )  [protected, virtual]
 

Reimplemented from hk_dsvisible.

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

virtual void hk_dsdatavisible::columndata_has_changed void   )  [inline, protected, virtual]
 

hk_string hk_dsdatavisible::columnname void   ) 
 

int hk_dsdatavisible::commadigits void   ) 
 

Deprecated:
use precision() instead

hk_datasource* hk_dsdatavisible::datasource void   ) 
 

Reimplemented from hk_dsvisible.

virtual 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.

virtual 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.

virtual 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.

static int hk_dsdatavisible::defaultprecision void   )  [static]
 

static bool hk_dsdatavisible::defaultuse_numberseparator void   )  [static]
 

hk_string hk_dsdatavisible::defaultvalue void   ) 
 

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

unsigned int hk_dsdatavisible::find const hk_string searchtext,
bool  wholephrase = false,
bool  casesensitive = false,
bool  backwards = false
 

unsigned int hk_dsdatavisible::find unsigned int  from,
unsigned int  to,
const hk_string searchtext,
bool  wholephrase = false,
bool  casesensitive = false,
bool  backwards = false
 

Reimplemented in hk_dsgridcolumn.

virtual void hk_dsdatavisible::loaddata const hk_string 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_dsgridcolumn.

virtual void hk_dsdatavisible::new_column_pointer_created void   )  [protected, virtual]
 

Reimplemented in hk_reportdata.

hk_string hk_dsdatavisible::on_valuechanged_action void   ) 
 

int hk_dsdatavisible::precision void   ) 
 

virtual bool hk_dsdatavisible::presentationmode_changed void   )  [protected, virtual]
 

Reimplemented from hk_dsvisible.

Reimplemented in hk_dsgridcolumn, hk_reportsection, and hk_reportdata.

hk_string hk_dsdatavisible::raw_defaultvalue void   ) 
 

Returns:
the default value as set with set_defaultvalue

void hk_dsdatavisible::reset_default bool  registerchange = true  ) 
 

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

virtual 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_dsgridcolumn.

void hk_dsdatavisible::set_columnname const hk_string c,
bool  registerchange,
int  coloccurance
 

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".

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

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

the datasource

Reimplemented from hk_dsvisible.

Reimplemented in hk_dsgridcolumn, and hk_reportsection.

static void hk_dsdatavisible::set_defaultnumberformat bool  use_thousandsseparator,
int  precision
[static]
 

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.
 *

void hk_dsdatavisible::set_numberformat bool  use_numberseparator,
int  commadigits,
bool  registerchange,
bool  force_setting
 

void hk_dsdatavisible::set_numberformat bool  use_numberseparator = false,
int  commadigits = -1,
bool  registerchange = true
 

void hk_dsdatavisible::set_on_valuechanged_action const hk_string ,
bool  registerchange = true,
bool  force_setting = true
 

virtual 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

bool hk_dsdatavisible::use_defaultvalue void   ) 
 

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

bool hk_dsdatavisible::use_numberseparator void   ) 
 

virtual hk_string hk_dsdatavisible::value void   )  [virtual]
 

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

returns the formatted value of the row 'row'

Reimplemented in hk_dsgridcolumn.

virtual void hk_dsdatavisible::widget_specific_numberformat void   )  [protected, virtual]
 

virtual void hk_dsdatavisible::widget_specific_set_column void   )  [protected, virtual]
 


Friends And Related Function Documentation

friend class hk_column [friend]
 


Member Data Documentation

hk_column* hk_dsdatavisible::p_column [protected]
 


The documentation for this class was generated from the following file:
Generated on Thu Mar 9 18:40:41 2006 for hk_classes by  doxygen 1.4.1