Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

EditAccountForm Class Reference

the form is used to create a new transaction or to modify an existing one, depending on the record_is_new member. More...

#include <EditAccountForm.h>

Inheritance diagram for EditAccountForm:

Form Collaboration diagram for EditAccountForm:

Collaboration graph
[legend]
List of all members.

Public Methods

 EditAccountForm ()
 constructor. More...

void setRecordIsNew (Boolean b)

Static Public Methods

EditAccountForm * instance () FORM_SECTION1
 returns singleton reference to this object. More...

void drawCurrencyItem (Int16 item_no, RectangleType *bounds, Char **txt) FORM_SECTION1
 callback for custom list drawing. More...


Private Methods

Boolean save () FORM_SECTION1
 saves the changes to the database. More...

void init () FORM_SECTION1
 set the values of various form fields from the database. More...

void setParentAccount (UInt32 id) FORM_SECTION1
 saves the data provided by ChooseAccountForm and updates the screen. More...

void updateTypeSelection () FORM_SECTION1
 reflect change in account type selection on popup trigger and list. More...

void setCurrencyListSelection (UInt16 selection) FORM_SECTION1
 set the currency trigger and selects the right item from currency list. More...

void updateCurPopupTrigger (UInt16 selection) FORM_SECTION1
 updates the currency trigger by writing the text corresponding to a given selection. More...

Boolean handleOpenEvent () FORM_SECTION1
 draws form and sets default values. More...

Boolean handleCtlSelectEvent (UInt16 control_id) FORM_SECTION1
 event handler for controls in the form. More...

Boolean handleUpdateEvent (UInt16 update_code) FORM_SECTION1
 handles form updating. More...

Boolean handlePopSelect (popSelect &pop_select) FORM_SECTION1
 handle the currency popup select event. More...


Private Attributes

UInt16 selected_cat
 the selected category. More...

Char parent_name [55]
 buffer to store the parent name. More...

accountStructure account
 holds the data being manipulated. More...

MemHandle rech
 handle to the currently edited account record (used for saving the record). More...

UInt32 prev_parent_uid
 previous parent of the account. More...

UInt8 prev_depth
 previous depth of the account. More...

Boolean record_is_new
 this is set to true if we want to create a new account and to false if we want the 'details' functionality. More...

UInt16 trans_id
 contains the id of the last saved transaction. More...

ChooseAccountFormchoose_account_form
 local choose acc form. More...

NoteForm_note_form
 form to handle notes. More...


Static Private Attributes

EditAccountForm * _instance
 reference to this object. More...


Detailed Description

the form is used to create a new transaction or to modify an existing one, depending on the record_is_new member.

Copyright (C) 2000-2002 Vlad Mereuta <dizzy@users.sourceforge.net>

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

Definition at line 31 of file EditAccountForm.h.


Constructor & Destructor Documentation

EditAccountForm::EditAccountForm  
 

constructor.


Member Function Documentation

void EditAccountForm::drawCurrencyItem Int16    item_no,
RectangleType *    bounds,
Char **    txt
[static]
 

callback for custom list drawing.

Boolean EditAccountForm::handleCtlSelectEvent UInt16    control_id [private, virtual]
 

event handler for controls in the form.

Reimplemented from Form.

Boolean EditAccountForm::handleOpenEvent   [private, virtual]
 

draws form and sets default values.

Reimplemented from Form.

Boolean EditAccountForm::handlePopSelect popSelect &    pop_select [private, virtual]
 

handle the currency popup select event.

Parameters:
pop_select  event data captured

Reimplemented from Form.

Boolean EditAccountForm::handleUpdateEvent UInt16    update_code [private, virtual]
 

handles form updating.

Reimplemented from Form.

void EditAccountForm::init   [private]
 

set the values of various form fields from the database.

EditAccountForm* EditAccountForm::instance   [static]
 

returns singleton reference to this object.

Boolean EditAccountForm::save   [private]
 

saves the changes to the database.

void EditAccountForm::setCurrencyListSelection UInt16    selection [private]
 

set the currency trigger and selects the right item from currency list.

Parameters:
selection  id of the currency to be selected

void EditAccountForm::setParentAccount UInt32    id [private]
 

saves the data provided by ChooseAccountForm and updates the screen.

Parameters:
id  of the account/category to be displayed

void EditAccountForm::setRecordIsNew Boolean    b [inline]
 

Definition at line 40 of file EditAccountForm.h.

References record_is_new.

void EditAccountForm::updateCurPopupTrigger UInt16    selection [private]
 

updates the currency trigger by writing the text corresponding to a given selection.

Parameters:
selection  ID of the currency to be displayed

void EditAccountForm::updateTypeSelection   [private]
 

reflect change in account type selection on popup trigger and list.


Member Data Documentation

EditAccountForm* EditAccountForm::_instance [static, private]
 

reference to this object.

Definition at line 65 of file EditAccountForm.h.

NoteForm* EditAccountForm::_note_form [private]
 

form to handle notes.

Definition at line 68 of file EditAccountForm.h.

accountStructure EditAccountForm::account [private]
 

holds the data being manipulated.

Definition at line 50 of file EditAccountForm.h.

ChooseAccountForm* EditAccountForm::choose_account_form [private]
 

local choose acc form.

Definition at line 62 of file EditAccountForm.h.

Char EditAccountForm::parent_name[55] [private]
 

buffer to store the parent name.

Definition at line 47 of file EditAccountForm.h.

UInt8 EditAccountForm::prev_depth [private]
 

previous depth of the account.

Definition at line 56 of file EditAccountForm.h.

UInt32 EditAccountForm::prev_parent_uid [private]
 

previous parent of the account.

Definition at line 54 of file EditAccountForm.h.

MemHandle EditAccountForm::rech [private]
 

handle to the currently edited account record (used for saving the record).

Definition at line 52 of file EditAccountForm.h.

Boolean EditAccountForm::record_is_new [private]
 

this is set to true if we want to create a new account and to false if we want the 'details' functionality.

Definition at line 58 of file EditAccountForm.h.

Referenced by setRecordIsNew.

UInt16 EditAccountForm::selected_cat [private]
 

the selected category.

Definition at line 45 of file EditAccountForm.h.

UInt16 EditAccountForm::trans_id [private]
 

contains the id of the last saved transaction.

Definition at line 60 of file EditAccountForm.h.


The documentation for this class was generated from the following file:
Generated on Thu Jan 16 23:11:14 2003 for FreeCoins by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002