#include <hk_class.h>
Inheritance diagram for hk_class:
Public Types | |
enum | enum_interaction { noninteractive, interactive } |
enum | enum_measuresystem { cm, inch } |
enum | enum_tagtype { normaltag, mastertag } |
Public Member Functions | |
void | hkclassname (const hk_string &n) |
hk_string | hkclassname (void) const |
void | hkdebug (const hk_string &d) const |
void | hkdebug (const hk_string &d, const hk_string &e) const |
void | hkdebug (const hk_string &d, int i) const |
void | hkdebug (const hk_string &d, double i) const |
void | wanna_debug (bool d) |
bool | wanna_debug (void) const |
bool | generaldebug (void) |
virtual void | savedata (ostream &s) |
virtual void | loaddata (const hk_string &definition) |
Static Public Member Functions | |
static void | set_generaldebug (bool d) |
static hk_string | hk_translate (const hk_string &t) |
static void | show_warningmessage (const hk_string &m) |
static void | set_warningmessage (messagewindowtype *m) |
static bool | show_yesnodialog (const hk_string &m, bool default_value) |
static void | set_yesnodialog (yesno_dialogtype *d) |
static hk_string | show_stringvaluedialog (const hk_string &t) |
static void | set_stringvaluedialog (stringvalue_dialogtype *t) |
static void | set_translatefunction (translatefunctiontype *t) |
static void | set_filedialog (file_dialogtype *f) |
static hk_string | show_filedialog (const hk_string &f="", enum_operationmode m=file_open) |
static void | set_directorydialog (stringvalue_dialogtype *f) |
static hk_string | show_directorydialog (const hk_string &f="") |
static void | set_showpedantic (bool s) |
static bool | showpedantic (void) |
static void | set_measuresystem (enum_measuresystem) |
static enum_measuresystem | measuresystem (void) |
static bool | get_tagvalue (const hk_string &where, const hk_string &tag, hk_string &value, int position=1, enum_tagtype tagtype=normaltag) |
static bool | get_tagvalue (const hk_string &where, const hk_string &tag, unsigned long &value, int position=1) |
static bool | get_tagvalue (const hk_string &where, const hk_string &tag, unsigned int &value, int position=1) |
static bool | get_tagvalue (const hk_string &where, const hk_string &tag, long &value, int position=1) |
static bool | get_tagvalue (const hk_string &where, const hk_string &tag, int &value, int position=1) |
static bool | get_tagvalue (const hk_string &where, const hk_string &tag, bool &value, int position=1) |
static void | set_tagvalue (ostream &stream, const hk_string &tag, const hk_string &value) |
static void | set_tagvalue (ostream &stream, const hk_string &tag, unsigned long value) |
static void | set_tagvalue (ostream &stream, const hk_string &tag, unsigned int value) |
static void | set_tagvalue (ostream &stream, const hk_string &tag, long value) |
static void | set_tagvalue (ostream &stream, const hk_string &tag, int value) |
static void | set_tagvalue (ostream &stream, const hk_string &tag, bool value) |
static void | start_mastertag (ostream &stream, const hk_string &tag) |
static void | end_mastertag (ostream &stream, const hk_string &tag) |
static void | set_defaultdatetimeformat (const hk_string &timeformat, const hk_string &dateformat, const hk_string &datetimeformat) |
static hk_string | defaultdateformat (void) |
static hk_string | defaulttimeformat (void) |
static hk_string | defaultdatetimeformat (void) |
static void | save_preferences (void) |
static bool | runtime_only (void) |
static void | set_locale (const hk_string &locale) |
static hk_string | locale (void) |
static void | set_defaultdriver (const hk_string &d) |
static hk_string | defaultdriver (void) |
static void | set_default_automatic_data_update (bool) |
static bool | default_automatic_data_update (void) |
Protected Member Functions | |
hk_class (void) | |
virtual | ~hk_class (void) |
hk_interpreter * | new_interpreter (const hk_string &interpreter, hk_presentation *) |
Static Protected Attributes | |
static hk_string | p_defaulttimeformat |
static hk_string | p_defaultdateformat |
static hk_string | p_defaultdatetimeformat |
static bool | p_runtime_only |
hk_class is the basic class for all other defined classes. It has some methods to support a simple debugging.
|
this enum will be used from other class members if their behaviour should be different e.g. if called from the command line in a script (then they should be noninteractive) or as a GUI application, where the user should interactively enter a password when the previous login failed. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
just writes </tag> to a stream. Use this function if you want to end a section |
|
|
|
|
|
|
|
|
|
|
|
|
|
called from loaddata to load a variable value originally stored with set_tagvalue
|
|
tries to translate the message t by using the translatingfunction set with set_translatefunction.
|
|
|
|
The classname is for internal debugging use only It will be shown in front of all debugging messages. |
|
|
|
|
|
|
|
if wanna_debug is true hkdebug prints on standard output the classname and the message d.
|
|
loads the object's values out of the definition string. Especially used to load queries, forms and reports Reimplemented in hk_connection, hk_database, hk_visible, hk_dsvisible, hk_dsdatavisible, hk_dsgrid, hk_dsgridcolumn, hk_colour, hk_subform, and hk_kdeform. |
|
|
|
|
|
|
|
true if widgets can't get in design mode |
|
This function stores all preferences of the hk_classes library in the file ~/.hk_classes/preferences like the defaultdateformat, and hk_report::printcommand |
|
stores the object's values to stream s. Especially used to store queries, forms and reports Reimplemented in hk_connection, hk_database, hk_visible, hk_dsvisible, hk_dsdatavisible, hk_dsgrid, hk_dsgridcolumn, hk_colour, and hk_subform. |
|
|
|
|
|
|
|
|
|
|
|
|
|
sets the locale which is used for the regional formats (e.g. dataformat). Default is "" that means that the environment variable is queried and set |
|
|
|
if true all dialogs and messages will be shown. if false only important messages(errors and warnings) will be shown.
|
|
you can write your own GUI dependend function to print a string value dialog by defining a function of stringvalue_dialogtype |
|
|
|
|
|
|
|
|
|
|
|
Each value will be stored between delimiting tags in the form <tag>value</tag>
|
|
|
|
you can write your own GUI dependend function to print warning messages by defining a function of messagewindowtype |
|
you can write your own GUI dependend function to print yes_no message by defining a function of dialogtype |
|
|
|
|
|
prints a question by using a function set with set_stringvaluedialog. If none is set the question will be print to standard error (cerr). The user has to answer the question by entering a string (i.e. a filename).
|
|
prints a warning message by using a function set with set_warningmessage. If none is set the message will be print to standard error (cerr). |
|
prints a question by using a function set with set_yesnomessage. If none is set the question will be print to standard error (cerr). The user has either to answer the question with yes or no.
|
|
|
|
just writes <tag> to a stream. Use this function if you want to begin a section. Don't forget to call end_mastertag |
|
|
|
|
|
|
|
|
|
|
|
|