Changeset View
Changeset View
Standalone View
Standalone View
kmymoney/plugins/csvimport/convdate.h
1 | /*************************************************************************** | 1 | /*************************************************************************** | ||
---|---|---|---|---|---|
2 | convDate.h | 2 | convdate.h | ||
3 | ------------------- | 3 | ------------------- | ||
4 | begin : Sat Jan 01 2010 | 4 | begin : Sat Jan 01 2010 | ||
5 | copyright : (C) 2010 by Allan Anderson | 5 | copyright : (C) 2010 by Allan Anderson | ||
6 | email : agander93@gmail.com | 6 | email : agander93@gmail.com | ||
7 | copyright : (C) 2017 by Łukasz Wojniłowicz | ||||
8 | email : lukasz.wojnilowicz@gmail.com | ||||
7 | ***************************************************************************/ | 9 | ***************************************************************************/ | ||
8 | 10 | | |||
9 | /************************************************************************** | 11 | /************************************************************************** | ||
10 | * * | 12 | * * | ||
11 | * This program is free software; you can redistribute it and/or modify * | 13 | * This program is free software; you can redistribute it and/or modify * | ||
12 | * it under the terms of the GNU General Public License as published by * | 14 | * it under the terms of the GNU General Public License as published by * | ||
13 | * the Free Software Foundation; either version 2 of the License, or * | 15 | * the Free Software Foundation; either version 2 of the License, or * | ||
14 | * (at your option) any later version. * | 16 | * (at your option) any later version. * | ||
15 | * * | 17 | * * | ||
16 | ***************************************************************************/ | 18 | ***************************************************************************/ | ||
17 | 19 | | |||
18 | #ifndef CONVDATE_H | 20 | #ifndef CONVDATE_H | ||
19 | #define CONVDATE_H | 21 | #define CONVDATE_H | ||
20 | 22 | | |||
21 | #include <QtCore/QObject> | 23 | #include <QDate> | ||
22 | #include <QtCore/QString> | 24 | #include "csvenums.h" | ||
23 | #include <QtCore/QDate> | | |||
24 | 25 | | |||
25 | class ConvertDate: public QObject | 26 | #include "csvimport/kmm_csvimport_core_export.h" | ||
27 | | ||||
28 | class KMM_CSVIMPORT_CORE_EXPORT ConvertDate | ||||
26 | { | 29 | { | ||
27 | Q_OBJECT | | |||
28 | 30 | | |||
29 | public: | 31 | public: | ||
30 | ConvertDate(); | 32 | ConvertDate(); | ||
31 | ~ConvertDate(); | 33 | ~ConvertDate(); | ||
32 | 34 | | |||
33 | /** | 35 | /** | ||
34 | * This method is used to convert a QString date into QDate() format. | 36 | * This method is used to convert a QString date into QDate() format. | ||
35 | * If the date is invalid, QDate() is returned. | 37 | * If the date is invalid, QDate() is returned. | ||
36 | */ | 38 | */ | ||
37 | QDate convertDate(const QString& txt); | 39 | QDate convertDate(const QString& txt); | ||
38 | 40 | | |||
39 | /** | 41 | /** | ||
40 | * This method converts the selected date setting into | 42 | * This method converts the selected date setting into | ||
41 | * a QString date format string. | 43 | * a QString date format string. | ||
42 | */ | 44 | */ | ||
43 | QString stringFormat(); | 45 | QString stringFormat(); | ||
44 | 46 | | |||
45 | void setDateFormatIndex(int index); | 47 | void setDateFormatIndex(const DateFormat _d); | ||
46 | 48 | | |||
47 | private: | 49 | private: | ||
48 | int m_dateFormatIndex; | 50 | DateFormat m_dateFormatIndex; | ||
49 | | ||||
50 | private slots: | | |||
51 | | ||||
52 | /** | | |||
53 | * This method is called when the user clicks the Date button and selects | | |||
54 | * the date format for the input file. | | |||
55 | */ | | |||
56 | void dateFormatSelected(int dateFormat); | | |||
57 | } | 51 | } | ||
58 | ; | 52 | ; | ||
59 | #endif | 53 | #endif |