00001 #ifndef NEWACCOUNT_H 00002 #define NEWACCOUNT_H 00003 00004 #include <qbuttongroup.h> 00005 #include <qcombobox.h> 00006 #include <qlineedit.h> 00007 #include <qpushbutton.h> 00008 #include <qradiobutton.h> 00009 #include <qlayout.h> 00010 #include <qdialog.h> 00011 #include <qlabel.h> 00012 #include <qhbox.h> 00013 #include <qcheckbox.h> 00014 00015 #include "account.h" 00016 #include "preferences.h" 00017 #include "currency.h" 00018 00019 class NewAccount : public QDialog 00020 { 00021 Q_OBJECT 00022 00023 public: 00024 NewAccount ( QWidget *parent = 0, const char *name = 0, bool modal = TRUE ); 00025 ~NewAccount(); 00026 00027 QLabel *namelabel; 00028 QHBox *accountbox; 00029 QLineEdit* accountname; 00030 QPushButton* descriptionbutton; 00031 00032 QHBox *datebox; 00033 QLabel *datelabel; 00034 QLineEdit* startdate; 00035 QPushButton* datebutton; 00036 00037 QCheckBox* childcheckbox; 00038 00039 QLabel *childlabel; 00040 QComboBox *childbox; 00041 00042 QLabel *balancelabel; 00043 QHBox *balancebox; 00044 QLineEdit* accountbalance; 00045 QPushButton* balancecalculator; 00046 00047 QLabel *creditlimitlabel; 00048 QHBox *creditlimitbox; 00049 QLineEdit* creditlimit; 00050 QPushButton* creditlimitcalculator; 00051 00052 Currency *currencybox; 00053 00054 QLabel *typelabel; 00055 QComboBox* accounttype; 00056 00057 QGridLayout *layout; 00058 00059 int getDay (); 00060 int getMonth (); 00061 int getYear (); 00062 QString getDescription (); 00063 void setDescription ( QString ); 00064 00065 // When a user edits an account and edits the date, this flag 00066 // is set to TRUE adding the new date to the account. Otherwise, 00067 // the old date is used for the edited account. This prevents a date 00068 // from reverting to 0/0/0 if the date is not edited 00069 bool getDateEdited (); 00070 00071 public slots: 00072 void showChildPulldownMenu(); 00073 void hideChildPulldownMenu(); 00074 void showCalculator(); 00075 void showCreditLimitCalculator (); 00076 void activateCreditLimit ( int ); 00077 void showCalendar (); 00078 void addAccountDescription (); 00079 00080 private: 00081 int index, year, month, day, currencypreference; 00082 QString accountdescription; 00083 bool dateedited; 00084 }; 00085 00086 #endif 00087
1.4.2