GnuCash  5.6-150-g038405b370+
gnc-imp-settings-csv-price.hpp
Go to the documentation of this file.
1 /*******************************************************************\
2  * gnc-imp-settings-csv-price.hpp -- Price CSV Import Settings *
3  * *
4  * Copyright (C) 2017 Robert Fewell *
5  * *
6  * This program is free software; you can redistribute it and/or *
7  * modify it under the terms of the GNU General Public License as *
8  * published by the Free Software Foundation; either version 2 of *
9  * the License, or (at your option) any later version. *
10  * *
11  * This program is distributed in the hope that it will be useful, *
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
14  * GNU General Public License for more details. *
15  * *
16  * You should have received a copy of the GNU General Public License*
17  * along with this program; if not, contact: *
18  * *
19  * Free Software Foundation Voice: +1-617-542-5942 *
20  * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 *
21  * Boston, MA 02110-1301, USA gnu@gnu.org *
22 \********************************************************************/
28 #ifndef GNC_CSV_PRICE_IMPORT_SETTINGS_H
29 #define GNC_CSV_PRICE_IMPORT_SETTINGS_H
30 
31 #include <config.h>
32 #include "Account.h"
33 #include "gnc-commodity.h"
34 
35 #include <string>
36 #include <vector>
37 #include "gnc-imp-props-price.hpp"
38 #include "gnc-tokenizer.hpp"
39 #include "gnc-imp-settings-csv.hpp"
40 
42 {
43  CsvPriceImpSettings() : m_from_commodity {nullptr}, m_to_currency {nullptr} { }
44 
49 bool save (void);
50 
55 bool load (void);
56 
59 void remove (void);
60 
61 // Price Settings
62 gnc_commodity *m_from_commodity; // Price From Commodity
63 gnc_commodity *m_to_currency; // Price To Currency
64 std::vector<GncPricePropType> m_column_types_price; // The Price Column types in order
65 
66 protected:
67  const char* get_group_prefix (void) override;
68 };
69 
70 using preset_vec_price = std::vector<std::shared_ptr<CsvPriceImpSettings>>;
71 
78 const preset_vec_price& get_import_presets_price (void);
79 
80 #endif
bool load(void)
Load the widget properties from a key File.
CSV Import Settings.
Account handling public routines.
Class convert a file into vector of string vectors.
const preset_vec_price & get_import_presets_price(void)
Creates a vector of CsvPriceImpSettings which combines.
bool save(void)
Save the gathered widget properties to a key File.
Commodity handling public routines.