Crossfire Server, Trunk
CREReportDefinition.cpp
Go to the documentation of this file.
1 /*
2  * Crossfire -- cooperative multi-player graphical RPG and adventure game
3  *
4  * Copyright (c) 2022 the Crossfire Development Team
5  *
6  * Crossfire is free software and comes with ABSOLUTELY NO WARRANTY. You are
7  * welcome to redistribute it under certain conditions. For details, please
8  * see COPYING and LICENSE.
9  *
10  * The authors can be reached via e-mail at <crossfire@metalforge.org>.
11  */
12 
13 #include "CREReportDefinition.h"
14 
16 {
17 }
18 
20 {
21  setName(other.name());
22  setHeader(other.header());
23  setFooter(other.footer());
24  setItemSort(other.itemSort());
25  setItemDisplay(other.itemDisplay());
26 }
27 
29 {
30 }
31 
32 const QString& CREReportDefinition::name() const
33 {
34  return myName;
35 }
36 
37 void CREReportDefinition::setName(const QString& name)
38 {
39  myName = name;
40 }
41 
42 const QString& CREReportDefinition::header() const
43 {
44  return myHeader;
45 }
46 
48 {
49  myHeader = header;
50 }
51 
52 const QString& CREReportDefinition::itemSort() const
53 {
54  return myItemSort;
55 }
56 
57 void CREReportDefinition::setItemSort(const QString& sort)
58 {
59  myItemSort = sort;
60 }
61 
62 const QString& CREReportDefinition::itemDisplay() const
63 {
64  return myItemDisplay;
65 }
66 
67 void CREReportDefinition::setItemDisplay(const QString& display)
68 {
69  myItemDisplay = display;
70 }
71 
72 const QString& CREReportDefinition::footer() const
73 {
74  return myFooter;
75 }
76 
77 void CREReportDefinition::setFooter(const QString& footer)
78 {
79  myFooter = footer;
80 }
81 
82 QDataStream &operator<<(QDataStream &out, const CREReportDefinition &report)
83 {
84  out << report.name() << report.header() << report.itemSort() << report.itemDisplay() << report.footer();
85  return out;
86 }
87 
88 QDataStream &operator>>(QDataStream &in, CREReportDefinition &report)
89 {
90  QString data;
91  in >> data;
92  report.setName(data);
93  in >> data;
94  report.setHeader(data);
95  in >> data;
96  report.setItemSort(data);
97  in >> data;
98  report.setItemDisplay(data);
99  in >> data;
100  report.setFooter(data);
101  return in;
102 }
CREReportDefinition::footer
const QString & footer() const
Definition: CREReportDefinition.cpp:72
CREReportDefinition::myFooter
QString myFooter
Definition: CREReportDefinition.h:48
CREReportDefinition::myItemDisplay
QString myItemDisplay
Definition: CREReportDefinition.h:47
CREReportDefinition
Definition: CREReportDefinition.h:19
CREReportDefinition::~CREReportDefinition
virtual ~CREReportDefinition()
Definition: CREReportDefinition.cpp:28
CREReportDefinition::setName
void setName(const QString &name)
Definition: CREReportDefinition.cpp:37
CREReportDefinition::setItemDisplay
void setItemDisplay(const QString &display)
Definition: CREReportDefinition.cpp:67
CREReportDefinition.h
CREReportDefinition::setItemSort
void setItemSort(const QString &sort)
Definition: CREReportDefinition.cpp:57
CREReportDefinition::myItemSort
QString myItemSort
Definition: CREReportDefinition.h:46
CREReportDefinition::myHeader
QString myHeader
Definition: CREReportDefinition.h:45
CREReportDefinition::setHeader
void setHeader(const QString &header)
Definition: CREReportDefinition.cpp:47
navar-midane_time.data
data
Definition: navar-midane_time.py:11
CREReportDefinition::itemSort
const QString & itemSort() const
Definition: CREReportDefinition.cpp:52
CREReportDefinition::header
const QString & header() const
Definition: CREReportDefinition.cpp:42
make_face_from_files.out
out
Definition: make_face_from_files.py:81
CREReportDefinition::setFooter
void setFooter(const QString &footer)
Definition: CREReportDefinition.cpp:77
report
Definition: report.py:1
operator>>
QDataStream & operator>>(QDataStream &in, CREReportDefinition &report)
Definition: CREReportDefinition.cpp:88
CREReportDefinition::CREReportDefinition
CREReportDefinition()
Definition: CREReportDefinition.cpp:15
CREReportDefinition::myName
QString myName
Definition: CREReportDefinition.h:44
CREReportDefinition::itemDisplay
const QString & itemDisplay() const
Definition: CREReportDefinition.cpp:62
operator<<
QDataStream & operator<<(QDataStream &out, const CREReportDefinition &report)
Definition: CREReportDefinition.cpp:82
hall_of_fame.header
list header
Definition: hall_of_fame.py:38
CREReportDefinition::name
const QString & name() const
Definition: CREReportDefinition.cpp:32
give.name
name
Definition: give.py:27