quicklist.c File Reference


Detailed Description

Utility functions.

Author:
Copyright 2006-2007 Neil Williams <linux@codehelp.co.uk>
So far, this is only (yet another) prototype file full of other prototypes. The idea is to reorganise the C code and files for a more functional approach supporting dynamic memory allocation instead of fixed limits, foreach routines instead of direct access inside structs and a "cleaner" interface between components.

Will also include linking quicklist against libqof2 so that a QlField is a registered QofObject and other objects need to then be converted into fields. External QofObjects will need a "read-only" mode within Ql.

Todo:
  1. quicklist.c|h : replacement for dialog_initial to handle the main window and notebook tabs.
  2. object.c|h : New code to convert QlFieldInfo into QofObject and other QofObjects into QlFieldInfo.
  3. plugin.c|h : Add code to support plugging in libqofexpensesobjects and libqofcashobjects (libpilotobjects once available too). This will require support in QOF for handling QofObject in a similar manner to QofBackend.
  4. fold dim_list_menu into menus.c
  5. remove types.h
  6. remove tools.c|h
  7. split report.c into reportshow and reportnew
  8. remove d2qls and qls2d, fold the rest of main.c into quicklist.c and remove main.c
Currently, this file acts as a temporary store for code that is to replace older code elsewhere. Getting all of the above done is going to take some time.

Definition in file quicklist.c.

Go to the source code of this file.

Functions

QlReportInfoql_get_reportinfo (QlTabData *tab, gint report_index)
 Retrieve the report context from the tab.
gboolean ql_add_reportinfo (QlTabData *tab, QlReportInfo *report)
gboolean ql_set_reportinfo (QlTabData *tab, QlReportInfo *report, gint report_index)
void ql_remove_reportinfo (QlTabData *tab, gint report_index)
gint ql_get_last_report (QlTabData *tab)
void ql_fieldinfo_foreach (QlTabData *tab, QlReportInfoCB cb, gpointer user_data)
 iterate over each field in the tab


Function Documentation

void ql_fieldinfo_foreach ( QlTabData tab,
QlFieldInfoCB  cb,
gpointer  user_data 
)

iterate over each field in the tab

Parameters:
tab The notebook tab containing the GtkSheet
cb QlFieldInfoCB function to pass each field from the sheet.
user_data Pointer to data to pass to the callback.

Definition at line 107 of file quicklist.c.

00108 {
00109     g_return_if_fail (tab);
00110     g_hash_table_foreach (tab->file->report_ptr, cb, user_data);
00111 }

QlReportInfo* ql_get_reportinfo ( QlTabData tab,
gint  report_index 
)

Retrieve the report context from the tab.

Parameters:
tab The notebook tab context
report_index Currently an int but probably more useful as the report name.

Definition at line 58 of file quicklist.c.

00059 {
00060     QlFieldInfo * field;
00061 
00062     g_return_val_if_fail (tab, NULL);
00063     field = (QlReportInfo*)g_hash_table_lookup (tab->file->report_ptr,
00064         GINT_TO_POINTER(report_index));
00065     return field;
00066 }


Generated on Mon Jan 28 22:02:11 2008 for quicklist by  doxygen 1.5.4