alkimia  8.0.2
alkonlinequotesprofile.h
Go to the documentation of this file.
1 /***************************************************************************
2  * Copyright 2018 Ralf Habacker <ralf.habacker@freenet.de> *
3  * *
4  * This file is part of libalkimia. *
5  * *
6  * libalkimia is free software; you can redistribute it and/or *
7  * modify it under the terms of the GNU Lesser General Public License *
8  * as published by the Free Software Foundation; either version 2.1 of *
9  * the License or (at your option) version 3 or any later version. *
10  * *
11  * libalkimia 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, see <http://www.gnu.org/licenses/> *
18  ***************************************************************************/
19 
20 #ifndef ALKONLINEQUOTESPROFILE_H
21 #define ALKONLINEQUOTESPROFILE_H
22 
23 #include <alkimia/alk_export.h>
24 #include <alkimia/alkonlinequotesource.h>
25 
26 #include <QString>
27 #include <QMap>
28 
29 class KConfig;
30 
33 
34 class ALK_EXPORT AlkOnlineQuotesProfile
35 {
36 public:
37  typedef QMap<QString, AlkOnlineQuoteSource> Map;
38  enum class Type {
39  Undefined, None, Alkimia4, Alkimia5, KMyMoney4, KMyMoney5, Skrooge4, Skrooge5, Script
40  };
41  AlkOnlineQuotesProfile(const QString &name = "alkimia", Type type = Type::None,
42  const QString &ghnsConfigFile = QString());
44 
45  QString name() const;
46  QString hotNewStuffConfigFile() const;
47  QString hotNewStuffRelPath() const;
48  QStringList hotNewStuffReadPath() const;
49  QString hotNewStuffWriteDir() const;
50  QString hotNewStuffReadFilePath(const QString &fileName) const;
51  QString hotNewStuffWriteFilePath(const QString &fileName) const;
52  QString kConfigFile() const;
53  void setManager(AlkOnlineQuotesProfileManager *manager);
55  KConfig *kConfig() const;
56  Type type();
57  bool hasGHNSSupport();
58 
62  const Map defaultQuoteSources();
63 
67  const QStringList quoteSources();
68 
69 private:
70  class Private;
71  Private *const d;
72 };
73 
74 #endif // ALKONLINEQUOTESPROFILE_H
QMap< QString, AlkOnlineQuoteSource > Map