mirror of
https://github.com/fralx/LimeReport.git
synced 2024-12-25 00:54:39 +03:00
ReportSetting has been added
ReportSetting has been added
This commit is contained in:
parent
7311f84b0e
commit
d07c44d6bb
@ -31,10 +31,24 @@
|
|||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include "lrglobal.h"
|
#include "lrglobal.h"
|
||||||
|
|
||||||
QString LimeReport::extractClassName(QString className)
|
namespace LimeReport {
|
||||||
|
|
||||||
|
QString extractClassName(QString className)
|
||||||
{
|
{
|
||||||
int startPos=className.lastIndexOf("::");
|
int startPos=className.lastIndexOf("::");
|
||||||
if(startPos==-1) startPos=0;
|
if(startPos==-1) startPos=0;
|
||||||
else startPos+=2;
|
else startPos+=2;
|
||||||
return className.right(className.length()-startPos);
|
return className.right(className.length()-startPos);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool ReportSettings::suppressAbsentFieldsAndVarsWarnings() const
|
||||||
|
{
|
||||||
|
return m_suppressAbsentFieldsAndVarsWarnings;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ReportSettings::setSuppressAbsentFieldsAndVarsWarnings(bool suppressAbsentFieldsAndVarsWarnings)
|
||||||
|
{
|
||||||
|
m_suppressAbsentFieldsAndVarsWarnings = suppressAbsentFieldsAndVarsWarnings;
|
||||||
|
}
|
||||||
|
|
||||||
|
} //namespace LimeReport
|
||||||
|
@ -84,6 +84,16 @@ namespace Const{
|
|||||||
ReportError(const QString& message):std::runtime_error(message.toStdString()){}
|
ReportError(const QString& message):std::runtime_error(message.toStdString()){}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class ReportSettings{
|
||||||
|
public:
|
||||||
|
ReportSettings():m_suppressAbsentFieldsAndVarsWarnings(false){}
|
||||||
|
void setDefaultValues(){m_suppressAbsentFieldsAndVarsWarnings = false;}
|
||||||
|
bool suppressAbsentFieldsAndVarsWarnings() const;
|
||||||
|
void setSuppressAbsentFieldsAndVarsWarnings(bool suppressAbsentFieldsAndVarsWarnings);
|
||||||
|
private:
|
||||||
|
bool m_suppressAbsentFieldsAndVarsWarnings;
|
||||||
|
};
|
||||||
|
|
||||||
} // namespace LimeReport
|
} // namespace LimeReport
|
||||||
|
|
||||||
|
|
||||||
|
@ -31,10 +31,24 @@
|
|||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include "lrglobal.h"
|
#include "lrglobal.h"
|
||||||
|
|
||||||
QString LimeReport::extractClassName(QString className)
|
namespace LimeReport {
|
||||||
|
|
||||||
|
QString extractClassName(QString className)
|
||||||
{
|
{
|
||||||
int startPos=className.lastIndexOf("::");
|
int startPos=className.lastIndexOf("::");
|
||||||
if(startPos==-1) startPos=0;
|
if(startPos==-1) startPos=0;
|
||||||
else startPos+=2;
|
else startPos+=2;
|
||||||
return className.right(className.length()-startPos);
|
return className.right(className.length()-startPos);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool ReportSettings::suppressAbsentFieldsAndVarsWarnings() const
|
||||||
|
{
|
||||||
|
return m_suppressAbsentFieldsAndVarsWarnings;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ReportSettings::setSuppressAbsentFieldsAndVarsWarnings(bool suppressAbsentFieldsAndVarsWarnings)
|
||||||
|
{
|
||||||
|
m_suppressAbsentFieldsAndVarsWarnings = suppressAbsentFieldsAndVarsWarnings;
|
||||||
|
}
|
||||||
|
|
||||||
|
} //namespace LimeReport
|
||||||
|
@ -84,6 +84,16 @@ namespace Const{
|
|||||||
ReportError(const QString& message):std::runtime_error(message.toStdString()){}
|
ReportError(const QString& message):std::runtime_error(message.toStdString()){}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class ReportSettings{
|
||||||
|
public:
|
||||||
|
ReportSettings():m_suppressAbsentFieldsAndVarsWarnings(false){}
|
||||||
|
void setDefaultValues(){m_suppressAbsentFieldsAndVarsWarnings = false;}
|
||||||
|
bool suppressAbsentFieldsAndVarsWarnings() const;
|
||||||
|
void setSuppressAbsentFieldsAndVarsWarnings(bool suppressAbsentFieldsAndVarsWarnings);
|
||||||
|
private:
|
||||||
|
bool m_suppressAbsentFieldsAndVarsWarnings;
|
||||||
|
};
|
||||||
|
|
||||||
} // namespace LimeReport
|
} // namespace LimeReport
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user