alkimia
8.0.2
src
alkonlinequotesource.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 ALKONLINEQUOTESOURCE_H
21
#define ALKONLINEQUOTESOURCE_H
22
23
#include <alkimia/alkonlinequotesprofile.h>
24
25
#include <QString>
26
27
class
AlkOnlineQuotesProfile
;
28
35
class
ALK_EXPORT
AlkOnlineQuoteSource
36
{
37
public
:
38
39
AlkOnlineQuoteSource
();
40
explicit
AlkOnlineQuoteSource
(
const
QString &name,
AlkOnlineQuotesProfile
*profile);
41
explicit
AlkOnlineQuoteSource
(
const
QString &name,
const
QString &url,
const
QString &sym,
42
const
QString &price,
const
QString &date,
const
QString &dateformat,
43
bool
skipStripping =
false
);
44
~
AlkOnlineQuoteSource
();
45
46
AlkOnlineQuoteSource
(
const
AlkOnlineQuoteSource
&other);
47
AlkOnlineQuoteSource
&operator=(
AlkOnlineQuoteSource
other);
48
49
friend
void
swap
(
AlkOnlineQuoteSource
& first,
AlkOnlineQuoteSource
& second);
50
51
bool
isEmpty();
52
bool
isValid();
53
54
bool
read();
55
bool
write();
56
void
rename(
const
QString &name);
57
void
remove();
58
59
QString name()
const
;
60
QString url()
const
;
61
QString sym()
const
;
62
QString price()
const
;
63
QString date()
const
;
64
QString dateformat()
const
;
65
bool
skipStripping()
const
;
66
bool
isGHNS();
67
bool
isReadOnly();
68
69
void
setName(
const
QString &name);
70
void
setUrl(
const
QString &url);
71
void
setSym(
const
QString &symbol);
72
void
setPrice(
const
QString &price);
73
void
setDate(
const
QString &date);
74
void
setDateformat(
const
QString &dateformat);
75
void
setSkipStripping(
bool
state);
76
void
setGHNS(
bool
state);
77
78
QString ghnsWriteFileName();
79
void
setProfile(
AlkOnlineQuotesProfile
*profile);
80
AlkOnlineQuotesProfile
*profile();
81
82
protected
:
83
class
Private
;
84
Private
*
d
;
85
};
86
87
inline
void
swap
(
AlkOnlineQuoteSource
& first,
AlkOnlineQuoteSource
& second)
// krazy:exclude=inline
88
{
89
using
std::swap
;
90
swap
(first.
d
, second.
d
);
91
}
92
93
#endif // ALKONLINEQUOTESOURCE_H
swap
void swap(AlkOnlineQuoteSource &first, AlkOnlineQuoteSource &second)
Definition:
alkonlinequotesource.h:87
AlkOnlineQuoteSource::Private
Definition:
alkonlinequotesource.cpp:31
AlkOnlineQuoteSource
Definition:
alkonlinequotesource.h:35
AlkOnlineQuoteSource::d
Private * d
Definition:
alkonlinequotesource.h:83
AlkOnlineQuotesProfile
Definition:
alkonlinequotesprofile.h:34
Generated by
1.8.15