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

EditScheduledTransForm.h

Go to the documentation of this file.
00001 /** $Revision: 1.13 $
00002     Last updated: $Date: 2002/09/20 12:21:31 $
00003     
00004     Copyright (C) 2000-2002 Vlad Mereuta <dizzy@users.sourceforge.net>
00005 
00006     This program is free software; you can redistribute it and/or modify
00007     it under the terms of the GNU General Public License as published by
00008     the Free Software Foundation; either version 2 of the License, or
00009     any later version.
00010 
00011     This program is distributed in the hope that it will be useful,
00012     but WITHOUT ANY WARRANTY; without even the implied warranty of
00013     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014     GNU General Public License for more details.
00015 
00016     You should have received a copy of the GNU General Public License
00017     along with this program; if not, write to the Free Software
00018     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
00019 
00020 #ifndef __EDIT_SCHEDULED_TRANS_FORM__
00021 #define __EDIT_SCHEDULED_TRANS_FORM__
00022 
00023 #include <PalmOS.h>
00024 
00025 #include "Form.h"
00026 #include "TransactionsDB.h"
00027 
00028 /** the form is used to create a new scheduled transaction or to modify an existing one, depending on the record_is_new member
00029    \todo automatically update the scheduled list on exit
00030 */
00031 class EditScheduledTransForm : public Form
00032 {
00033  private:
00034     ///pointer received from the EditTransactionForm. should point to the date field of the current transaction
00035     DateType    *start_date;
00036          
00037    ///string holding the displayable text for start date
00038     Char        start_date_txt[dateStringLength];
00039    ///string holding the displayable text for end date
00040     Char        end_date_txt[dateStringLength];
00041         
00042     /// the current scheduled data
00043     scheduledStructure* st;
00044     /// this is set to true if we want to create a new account and to false if we want the 'details' functionality
00045     Boolean record_is_new;
00046     
00047  public:
00048     ///constructor; does nothing
00049     EditScheduledTransForm() FORM_SECTION2;
00050     
00051     ///sets the value of the record_is_new attribute
00052     void setRecordIsNew(Boolean b) FORM_SECTION2;
00053    
00054    /** Starts a new session. Receives a new pointer and sets the saved state to false. It also sets
00055        record_is_new to true
00056        @param s pointer to a scheduledStructure where data is to be written */
00057     void newSession(scheduledStructure* s, DateType* trans_date) FORM_SECTION2;
00058    
00059     ///saves the transaction data and updates all the accounts involved
00060     Boolean save() FORM_SECTION2;
00061 
00062     ///set the values for some of the fields in the form (from the transaction record)
00063     void setDefaults() FORM_SECTION2;
00064 
00065     /** sets the repetition interval for the transaction (both on-screen and in the structure)
00066         @param interval new interval */
00067     void setInterval(Repeat_interval interval) FORM_SECTION2;
00068 
00069     /** records a scheduled transaction, giving the option of altering the next date or not */
00070     void recordNow() FORM_SECTION2;
00071 
00072     ///draws form and sets default values
00073     Boolean handleOpenEvent() FORM_SECTION2;
00074 
00075     /// event handler for controls in  the form
00076     Boolean handleCtlSelectEvent(UInt16 control_id) FORM_SECTION2;
00077 };
00078 #endif

Generated on Thu Jan 16 23:11:12 2003 for FreeCoins by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002