157 lines
3.9 KiB
C++
157 lines
3.9 KiB
C++
#include "ReportSettingsData.h"
|
|
|
|
CReportSettingsData::CReportSettingsData()
|
|
{
|
|
|
|
}
|
|
|
|
CReportProgramSettingsData::CReportProgramSettingsData()
|
|
{
|
|
mDataSourceDirectoryPaths.clear();
|
|
}
|
|
|
|
CReportProgramSettingsData& CReportProgramSettingsData::operator=(const CReportProgramSettingsData &source)
|
|
{
|
|
if(&source == this)
|
|
{
|
|
return *this;
|
|
}
|
|
|
|
this->mDataSourceDirectoryPaths = source.mDataSourceDirectoryPaths;
|
|
|
|
return *this;
|
|
}
|
|
|
|
|
|
bool CReportConfigData::IsAnyStationSelected()
|
|
{
|
|
if(mReportStationAngrignon == true ||
|
|
mReportStationBeaugrand == true ||
|
|
mReportStationVertu == true ||
|
|
mReportStationBourassa == true ||
|
|
mReportStationMontmorency == true ||
|
|
mReportStationBerri == true ||
|
|
mReportStationLongueuil == true ||
|
|
mReportStationStMichel == true ||
|
|
mReportStationSnowdon == true)
|
|
{
|
|
return true;
|
|
}
|
|
|
|
return false;
|
|
}
|
|
|
|
bool CReportConfigData::IsAnyFilterSelected()
|
|
{
|
|
if(mReportFilterIncludeFN == true ||
|
|
mReportfilterIncludePPI1 == true ||
|
|
mReportfilterIncludePPE1 == true ||
|
|
mReportfilterIncludePG == true ||
|
|
mReportfilterIncludeComptage1 == true ||
|
|
mReportfilterIncludePEQ1 == true ||
|
|
mReportfilterIncludePPI2 == true ||
|
|
mReportfilterIncludePPE2 == true ||
|
|
mReportfilterIncludeComptage2 == true ||
|
|
mReportfilterIncludePEQ2 == true ||
|
|
mReportIncludeSansDeclZT1 == true ||
|
|
mReportIncludeSansDeclZT2 == true )
|
|
{
|
|
return true;
|
|
}
|
|
|
|
return false;
|
|
}
|
|
|
|
bool CReportConfigData::IsDateRangeValid()
|
|
{
|
|
if(mReportEndDate < mReportStartDate)
|
|
{
|
|
return false;
|
|
}
|
|
|
|
return true;
|
|
}
|
|
|
|
CReportConfigData& CReportConfigData::operator=(const CReportConfigData &source)
|
|
{
|
|
if(&source == this)
|
|
{
|
|
return *this;
|
|
}
|
|
|
|
this->mReportStationAngrignon = source.mReportStationAngrignon;
|
|
this->mReportStationBeaugrand = source.mReportStationBeaugrand;
|
|
this->mReportStationVertu = source.mReportStationVertu;
|
|
this->mReportStationBourassa = source.mReportStationBourassa;
|
|
this->mReportStationMontmorency = source.mReportStationMontmorency;
|
|
this->mReportStationBerri = source.mReportStationBerri;
|
|
this->mReportStationLongueuil = source.mReportStationLongueuil;
|
|
this->mReportStationStMichel = source.mReportStationStMichel;
|
|
this->mReportStationSnowdon = source.mReportStationSnowdon;
|
|
this->mReportFilterIncludeFN = source.mReportFilterIncludeFN;
|
|
this->mReportfilterIncludePPI1 = source.mReportfilterIncludePPI1;
|
|
this->mReportfilterIncludePPE1 = source.mReportfilterIncludePPE1;
|
|
this->mReportfilterIncludePG = source.mReportfilterIncludePG;
|
|
this->mReportfilterIncludeComptage1 = source.mReportfilterIncludeComptage1;
|
|
this->mReportfilterIncludePEQ1 = source.mReportfilterIncludePEQ1;
|
|
this->mReportfilterIncludePPI2 = source.mReportfilterIncludePPI2;
|
|
this->mReportfilterIncludePPE2 = source.mReportfilterIncludePPE2;
|
|
this->mReportfilterIncludeComptage2 = source.mReportfilterIncludeComptage2;
|
|
this->mReportfilterIncludePEQ2 = source.mReportfilterIncludePEQ2;
|
|
this->mReportStartDate = source.mReportStartDate;
|
|
this->mReportEndDate = source.mReportEndDate;
|
|
this->mReportIncludeSansDeclZT1 = source.mReportIncludeSansDeclZT1;
|
|
this->mReportIncludeSansDeclZT2 = source.mReportIncludeSansDeclZT2;
|
|
|
|
|
|
return *this;
|
|
}
|
|
|
|
|
|
QDataStream &operator<<(QDataStream &out, const CReportProgramSettingsData &source)
|
|
{
|
|
out << source.mDataSourceDirectoryPaths.size();
|
|
|
|
for(int i = 0; i < source.mDataSourceDirectoryPaths.size(); i++)
|
|
{
|
|
out << source.mDataSourceDirectoryPaths.at(i);
|
|
}
|
|
|
|
return out;
|
|
}
|
|
|
|
|
|
|
|
|
|
QDataStream &operator>>(QDataStream &in, CReportProgramSettingsData &dest)
|
|
{
|
|
// unsigned int NbPaths;
|
|
// in >> NbPaths;
|
|
|
|
// // in >> NbPaths;
|
|
// for(int i = 0; i < NbPaths; i++)
|
|
// {
|
|
// QString Path;
|
|
// in >> Path;
|
|
// dest.mDataSourceDirectoryPaths.append(Path);
|
|
// }
|
|
|
|
// return in;
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|