summaryrefslogtreecommitdiff
path: root/noncore/apps/qashmoney/newtransaction.h
authorallenforsythe <allenforsythe>2003-05-04 22:02:48 (UTC)
committer allenforsythe <allenforsythe>2003-05-04 22:02:48 (UTC)
commit4593e3cf4eca4867e34b3220007c24523cf642b6 (patch) (side-by-side diff)
treebd8071834dec2a5008b1b270c7953f5cfd65754d /noncore/apps/qashmoney/newtransaction.h
parent2894d0b14c0b3efa3ce259214b5aa597a6abfed1 (diff)
downloadopie-4593e3cf4eca4867e34b3220007c24523cf642b6.zip
opie-4593e3cf4eca4867e34b3220007c24523cf642b6.tar.gz
opie-4593e3cf4eca4867e34b3220007c24523cf642b6.tar.bz2
Initial revision
Diffstat (limited to 'noncore/apps/qashmoney/newtransaction.h') (more/less context) (ignore whitespace changes)
-rwxr-xr-xnoncore/apps/qashmoney/newtransaction.h95
1 files changed, 95 insertions, 0 deletions
diff --git a/noncore/apps/qashmoney/newtransaction.h b/noncore/apps/qashmoney/newtransaction.h
new file mode 100755
index 0000000..4ee3b9d
--- a/dev/null
+++ b/noncore/apps/qashmoney/newtransaction.h
@@ -0,0 +1,95 @@
+#ifndef NEWTRANSACTION_H
+#define NEWTRANSACTION_H
+
+#include <qlineedit.h>
+#include <qpushbutton.h>
+#include <qlayout.h>
+#include <qcheckbox.h>
+#include <qdialog.h>
+#include <qlabel.h>
+#include <qstringlist.h>
+#include <qhbox.h>
+
+#include "transaction.h"
+#include "preferences.h"
+
+class NewTransaction : public QDialog
+{
+ Q_OBJECT
+
+ public:
+
+ int year, month, day;
+
+ NewTransaction ( QWidget* parent );
+ ~NewTransaction();
+
+ QLabel *namelabel;
+ QHBox *transactionnamebox;
+ QComboBox* transactionname;
+ QPushButton* descriptionbutton;
+
+ QLabel *amountlabel;
+ QHBox *transactionamountbox;
+ QLineEdit* transactionamount;
+ QPushButton* calculatorbutton;
+
+ QLabel *datelabel;
+ QHBox *transactiondatebox;
+ QLineEdit* transactiondate;
+ QPushButton* datebutton;
+
+ QCheckBox *clearedcheckbox;
+
+ QLabel *numberlabel;
+ QLineEdit *transactionnumber;
+
+ QLabel *budgetlabel;
+ QComboBox *budgetbox;
+
+ QLabel *lineitemlabel;
+ QComboBox *lineitembox;
+
+ QCheckBox *depositbox;
+
+ QGridLayout *layout;
+
+ int getDay ();
+ int getMonth ();
+ int getYear ();
+ QString getDescription ();
+ void setDescription ( QString );
+ void setComboBoxes ( int, int );
+
+ // When a user edits an transaction and edits the date, this flag
+ // is set to TRUE adding the new date to the transaction. Otherwise,
+ // the old date is used for the edited transaction. This prevents a date
+ // from reverting to 0/0/0 if the date is not edited
+ bool getDateEdited ();
+
+ public slots:
+
+ void showCalculator();
+ void showCalendar ();
+ void addTransactionDescription ();
+ int getNameIndex ( QString name );
+ int getCurrentBudget ();
+ int getCurrentLineItem ();
+ int getBudgetIndex ( int budgetid );
+ int getLineItemIndex ( int lineitemid );
+ void setLineItems ();
+
+ private slots:
+ void setCurrentBudget ( int index );
+ void setCurrentLineItem ( int index );
+
+ private:
+ bool dateedited;
+ int index, currentbudget, currentlineitem;
+ QString transactiondescription;
+ QStringList *budgetnameslist, *budgetidslist;
+ QStringList lineitemslist, lineitemidslist;
+
+};
+
+#endif