AusweisApp2
 Alle Klassen Namensbereiche Dateien Funktionen Variablen Typdefinitionen Aufzählungen Aufzählungswerte Propertys Freundbeziehungen Makrodefinitionen
CallCost.h
gehe zur Dokumentation dieser Datei
1 
7 #pragma once
8 
9 #include <QDebug>
10 #include <QJsonValue>
11 
12 
13 namespace governikus
14 {
15 
16 
17 class CallCost
18 {
19  friend bool operator==(const CallCost& pLeft, const CallCost& pRight);
20 
21  int mFreeSeconds;
22  double mLandlineCentsPerMinute, mLandlineCentsPerCall;
23  double mMobileCentsPerMinute, mMobileCentsPerCall;
24 
25  public:
26  CallCost(int pFreeSeconds = 0, double pLandlineCentsPerMinute = 0.0, double pLandlineCentsPerCall = 0.0, double pMobileCentsPerMinute = 0.0, double pMobileCentsPerCall = 0.0);
27  CallCost(const QJsonValue& pJson);
28 
29  void load();
30  void save();
31 
32  bool isNull() const;
33  int getFreeSeconds() const;
34  double getLandlineCentsPerMinute() const;
35  double getLandlineCentsPerCall() const;
36  double getMobileCentsPerMinute() const;
37  double getMobileCentsPerCall() const;
38 };
39 
40 
41 inline bool operator==(const CallCost& pLeft, const CallCost& pRight)
42 {
43  return &pLeft == &pRight || (
44  pLeft.mFreeSeconds == pRight.mFreeSeconds &&
45  pLeft.mLandlineCentsPerMinute == pRight.mLandlineCentsPerMinute &&
46  pLeft.mLandlineCentsPerCall == pRight.mLandlineCentsPerCall &&
47  pLeft.mMobileCentsPerMinute == pRight.mMobileCentsPerMinute &&
48  pLeft.mMobileCentsPerCall == pRight.mMobileCentsPerCall);
49 }
50 
51 
52 } /* namespace governikus */
53 
54 QDebug operator<<(QDebug pDbg, const governikus::CallCost& pCallCost);
double getLandlineCentsPerCall() const
Definition: CallCost.cpp:61
double getMobileCentsPerCall() const
Definition: CallCost.cpp:73
int getFreeSeconds() const
Definition: CallCost.cpp:49
QDebug operator<<(QDebug pDbg, const governikus::CVCertificate &pCvc)
Definition: CVCertificate.cpp:146
double getLandlineCentsPerMinute() const
Definition: CallCost.cpp:55
friend bool operator==(const CallCost &pLeft, const CallCost &pRight)
Definition: CallCost.h:41
double getMobileCentsPerMinute() const
Definition: CallCost.cpp:67
Definition: CallCost.h:17
bool operator==(const CVCertificate &pLeft, const CVCertificate &pRight)
Definition: CVCertificate.h:74
CallCost(int pFreeSeconds=0, double pLandlineCentsPerMinute=0.0, double pLandlineCentsPerCall=0.0, double pMobileCentsPerMinute=0.0, double pMobileCentsPerCall=0.0)
Definition: CallCost.cpp:23
bool isNull() const
Definition: CallCost.cpp:43