Changeset View
Changeset View
Standalone View
Standalone View
kmymoney/dialogs/daterangedlg.h
- This file was added.
1 | /*************************************************************************** | ||||
---|---|---|---|---|---|
2 | kfindtransactiondlg.h | ||||
3 | ------------------- | ||||
4 | copyright : (C) 2003 by Thomas Baumgart | ||||
5 | email : ipwizard@users.sourceforge.net | ||||
6 | ***************************************************************************/ | ||||
7 | | ||||
8 | /*************************************************************************** | ||||
9 | * * | ||||
10 | * This program is free software; you can redistribute it and/or modify * | ||||
11 | * it under the terms of the GNU General Public License as published by * | ||||
12 | * the Free Software Foundation; either version 2 of the License, or * | ||||
13 | * (at your option) any later version. * | ||||
14 | * * | ||||
15 | ***************************************************************************/ | ||||
16 | | ||||
17 | #ifndef DATERANGEDLG_H | ||||
18 | #define DATERANGEDLG_H | ||||
19 | | ||||
20 | // ---------------------------------------------------------------------------- | ||||
21 | // QT Includes | ||||
22 | | ||||
23 | #include <QDateTime> | ||||
24 | #include <QMap> | ||||
25 | #include <QResizeEvent> | ||||
26 | #include <QEvent> | ||||
27 | #include <QList> | ||||
28 | | ||||
29 | // ---------------------------------------------------------------------------- | ||||
30 | // KDE Includes | ||||
31 | | ||||
32 | #include <QWidget> | ||||
33 | | ||||
34 | // ---------------------------------------------------------------------------- | ||||
35 | // Project Includes | ||||
36 | | ||||
37 | #include "mymoneyutils.h" | ||||
38 | #include "mymoneytransactionfilter.h" | ||||
39 | | ||||
40 | namespace Ui | ||||
41 | { | ||||
42 | class DateRangeDlgDecl; | ||||
43 | } | ||||
44 | | ||||
45 | class DateRangeDlg : public QWidget | ||||
46 | { | ||||
47 | Q_OBJECT | ||||
48 | | ||||
49 | public: | ||||
50 | | ||||
51 | /* | ||||
52 | // Make sure to keep the following enum valus in sync with the values | ||||
53 | // used by the GUI in daterangedlgdecl.ui | ||||
54 | enum dateOptionE { | ||||
55 | allDates = 0, | ||||
56 | asOfToday, | ||||
57 | currentMonth, | ||||
58 | currentYear, | ||||
59 | monthToDate, | ||||
60 | yearToDate, | ||||
61 | yearToMonth, | ||||
62 | lastMonth, | ||||
63 | lastYear, | ||||
64 | last7Days, | ||||
65 | last30Days, | ||||
66 | last3Months, | ||||
67 | last6Months, | ||||
68 | last12Months, | ||||
69 | next7Days, | ||||
70 | next30Days, | ||||
71 | next3Months, | ||||
72 | next6Months, | ||||
73 | next12Months, | ||||
74 | userDefined, | ||||
75 | last3ToNext3Months, | ||||
76 | last11Months, | ||||
77 | next18Months, | ||||
78 | // insert new constants above of this line | ||||
79 | dateOptionCount | ||||
80 | }; | ||||
81 | */ | ||||
82 | DateRangeDlg(QWidget *parent = 0); | ||||
83 | ~DateRangeDlg(); | ||||
84 | Ui::DateRangeDlgDecl* m_ui; | ||||
85 | | ||||
86 | public slots: | ||||
87 | void slotReset(); | ||||
88 | void slotUpdateSelections(QString &txt); | ||||
89 | void slotDateRangeChanged(int); | ||||
90 | void slotDateChanged(); | ||||
91 | | ||||
92 | private: | ||||
93 | void setupDatePage(); | ||||
94 | | ||||
95 | QDate m_startDates[MyMoneyTransactionFilter::dateOptionCount]; | ||||
96 | QDate m_endDates[MyMoneyTransactionFilter::dateOptionCount]; | ||||
97 | }; | ||||
98 | | ||||
99 | #endif |