This commit is contained in:
yanis60 2022-03-29 12:33:34 +00:00
parent 7a5d4971a9
commit 392b3acdfa
5 changed files with 279 additions and 265 deletions

View File

@ -80,7 +80,7 @@ void ShapeItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
painter->save(); painter->save();
QPen pen(m_shapeColor); QPen pen(m_shapeColor);
pen.setWidthF(m_lineWidth); pen.setWidthF(m_lineWidth+1);
pen.setStyle(m_penStyle); pen.setStyle(m_penStyle);
pen.setJoinStyle(Qt::MiterJoin); pen.setJoinStyle(Qt::MiterJoin);
painter->setPen(pen); painter->setPen(pen);
@ -89,6 +89,7 @@ void ShapeItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
painter->setBrush(brush); painter->setBrush(brush);
painter->setBackground(QBrush(Qt::NoBrush)); painter->setBackground(QBrush(Qt::NoBrush));
painter->setOpacity(qreal(opacity())/100); painter->setOpacity(qreal(opacity())/100);
QRectF rectangleRect = rect().adjusted((lineWidth() / 2), QRectF rectangleRect = rect().adjusted((lineWidth() / 2),
(lineWidth() / 2), (lineWidth() / 2),
-(lineWidth() / 2), -(lineWidth() / 2),

View File

@ -53,8 +53,8 @@ Q_DECLARE_METATYPE(LimeReport::ScriptEngineManager *)
#ifdef USE_QTSCRIPTENGINE #ifdef USE_QTSCRIPTENGINE
QScriptValue constructColor(QScriptContext *context, QScriptEngine *engine) QScriptValue constructColor(QScriptContext *context, QScriptEngine *engine)
{ {
QColor color(context->argument(0).toString()); QColor color(context->argument(0).toString());
return engine->toScriptValue(color); return engine->toScriptValue(color);
} }
#endif #endif
@ -71,7 +71,7 @@ ScriptEngineNode::~ScriptEngineNode()
} }
ScriptEngineNode*ScriptEngineNode::addChild(const QString& name, const QString& description, ScriptEngineNode*ScriptEngineNode::addChild(const QString& name, const QString& description,
ScriptEngineNode::NodeType type, const QIcon& icon) ScriptEngineNode::NodeType type, const QIcon& icon)
{ {
ScriptEngineNode* res = new ScriptEngineNode(name, description, type,this,icon); ScriptEngineNode* res = new ScriptEngineNode(name, description, type,this,icon);
m_childs.push_back(res); m_childs.push_back(res);
@ -218,12 +218,12 @@ ScriptEngineManager::~ScriptEngineManager()
bool ScriptEngineManager::isFunctionExists(const QString &functionName) const bool ScriptEngineManager::isFunctionExists(const QString &functionName) const
{ {
return m_functions.contains(functionName); return m_functions.contains(functionName);
// foreach (ScriptFunctionDesc desc, m_functions.values()) { // foreach (ScriptFunctionDesc desc, m_functions.values()) {
// if (desc.name.compare(functionName,Qt::CaseInsensitive)==0){ // if (desc.name.compare(functionName,Qt::CaseInsensitive)==0){
// return true; // return true;
// } // }
// } // }
// return false; // return false;
} }
void ScriptEngineManager::deleteFunction(const QString &functionsName) void ScriptEngineManager::deleteFunction(const QString &functionsName)
@ -244,7 +244,7 @@ bool ScriptEngineManager::addFunction(const JSFunctionDesc &functionDescriber)
scriptEngine()->globalObject().setProperty( scriptEngine()->globalObject().setProperty(
functionDescriber.managerName(), functionDescriber.managerName(),
functionManager functionManager
); );
} }
if (functionManager.toQObject() == functionDescriber.manager()){ if (functionManager.toQObject() == functionDescriber.manager()){
@ -275,9 +275,9 @@ bool ScriptEngineManager::addFunction(const JSFunctionDesc &functionDescriber)
Q_DECL_DEPRECATED Q_DECL_DEPRECATED
#endif #endif
bool ScriptEngineManager::addFunction(const QString& name, bool ScriptEngineManager::addFunction(const QString& name,
QScriptEngine::FunctionSignature function, QScriptEngine::FunctionSignature function,
const QString& category, const QString& category,
const QString& description) const QString& description)
{ {
if (!isFunctionExists(name)){ if (!isFunctionExists(name)){
ScriptFunctionDesc funct; ScriptFunctionDesc funct;
@ -310,7 +310,7 @@ bool ScriptEngineManager::addFunction(const QString& name, const QString& script
funct.description = description; funct.description = description;
funct.type = ScriptFunctionDesc::Script; funct.type = ScriptFunctionDesc::Script;
m_functions.insert(name, funct); m_functions.insert(name, funct);
m_model->updateModel(); m_model->updateModel();
return true; return true;
} else { } else {
m_lastError = functionValue.toString(); m_lastError = functionValue.toString();
@ -321,11 +321,11 @@ bool ScriptEngineManager::addFunction(const QString& name, const QString& script
QStringList ScriptEngineManager::functionsNames() QStringList ScriptEngineManager::functionsNames()
{ {
return m_functions.keys(); return m_functions.keys();
// QStringList res; // QStringList res;
// foreach(ScriptFunctionDesc func, m_functions){ // foreach(ScriptFunctionDesc func, m_functions){
// res<<func.name; // res<<func.name;
// } // }
// return res; // return res;
} }
void ScriptEngineManager::setDataManager(DataSourceManager *dataManager){ void ScriptEngineManager::setDataManager(DataSourceManager *dataManager){
@ -334,18 +334,18 @@ void ScriptEngineManager::setDataManager(DataSourceManager *dataManager){
if (m_dataManager){ if (m_dataManager){
foreach(QString func, m_dataManager->groupFunctionNames()){ foreach(QString func, m_dataManager->groupFunctionNames()){
JSFunctionDesc describer( JSFunctionDesc describer(
func, func,
tr("GROUP FUNCTIONS"), tr("GROUP FUNCTIONS"),
func+"(\""+tr("FieldName")+"\",\""+tr("BandName")+"\")", func+"(\""+tr("FieldName")+"\",\""+tr("BandName")+"\")",
LimeReport::Const::FUNCTION_MANAGER_NAME, LimeReport::Const::FUNCTION_MANAGER_NAME,
m_functionManager, m_functionManager,
QString("function %1(fieldName, bandName, pageitem){\ QString("function %1(fieldName, bandName, pageitem){\
if (typeof pageitem == 'undefined') return %2.calcGroupFunction(\"%1\", fieldName, bandName); \ if (typeof pageitem == 'undefined') return %2.calcGroupFunction(\"%1\", fieldName, bandName); \
else return %2.calcGroupFunction(\"%1\", fieldName, bandName, pageitem);}" else return %2.calcGroupFunction(\"%1\", fieldName, bandName, pageitem);}"
).arg(func) ).arg(func)
.arg(LimeReport::Const::FUNCTION_MANAGER_NAME) .arg(LimeReport::Const::FUNCTION_MANAGER_NAME)
); );
addFunction(describer); addFunction(describer);
} }
moveQObjectToScript(new DatasourceFunctions(dataManager), LimeReport::Const::DATAFUNCTIONS_MANAGER_NAME); moveQObjectToScript(new DatasourceFunctions(dataManager), LimeReport::Const::DATAFUNCTIONS_MANAGER_NAME);
} }
@ -368,13 +368,13 @@ QString ScriptEngineManager::expandUserVariables(QString context, RenderPass /*
switch (expandType){ switch (expandType){
case EscapeSymbols: case EscapeSymbols:
context.replace(rx.cap(0),escapeSimbols(varValue.toString())); context.replace(rx.cap(0),escapeSimbols(varValue.toString()));
break; break;
case NoEscapeSymbols: case NoEscapeSymbols:
context.replace(rx.cap(0),varValue.toString()); context.replace(rx.cap(0),varValue.toString());
break; break;
case ReplaceHTMLSymbols: case ReplaceHTMLSymbols:
context.replace(rx.cap(0),replaceHTMLSymbols(varValue.toString())); context.replace(rx.cap(0),replaceHTMLSymbols(varValue.toString()));
break; break;
} }
pos=0; pos=0;
@ -400,53 +400,53 @@ QString ScriptEngineManager::expandUserVariables(QString context, RenderPass /*
#else #else
QRegularExpression rx(Const::VARIABLE_RX); QRegularExpression rx(Const::VARIABLE_RX);
if (context.contains(rx)){ if (context.contains(rx)){
int pos = 0; int pos = 0;
QRegularExpressionMatch match = rx.match(context, pos); QRegularExpressionMatch match = rx.match(context, pos);
while (match.hasMatch()){ while (match.hasMatch()){
QString variable=match.captured(1); QString variable=match.captured(1);
pos = match.capturedEnd(); pos = match.capturedEnd();
if (dataManager()->containsVariable(variable) ){ if (dataManager()->containsVariable(variable) ){
try { try {
varValue = dataManager()->variable(variable); varValue = dataManager()->variable(variable);
switch (expandType){ switch (expandType){
case EscapeSymbols: case EscapeSymbols:
context.replace(match.captured(0), escapeSimbols(varValue.toString())); context.replace(match.captured(0), escapeSimbols(varValue.toString()));
break; break;
case NoEscapeSymbols: case NoEscapeSymbols:
context.replace(match.captured(0), varValue.toString()); context.replace(match.captured(0), varValue.toString());
break; break;
case ReplaceHTMLSymbols: case ReplaceHTMLSymbols:
context.replace(match.captured(0), replaceHTMLSymbols(varValue.toString())); context.replace(match.captured(0), replaceHTMLSymbols(varValue.toString()));
break; break;
} }
pos = 0; pos = 0;
} catch (ReportError &e){ } catch (ReportError &e){
dataManager()->putError(e.what()); dataManager()->putError(e.what());
if (!dataManager()->reportSettings() || dataManager()->reportSettings()->suppressAbsentFieldsAndVarsWarnings()) if (!dataManager()->reportSettings() || dataManager()->reportSettings()->suppressAbsentFieldsAndVarsWarnings())
context.replace(match.captured(0), e.what()); context.replace(match.captured(0), e.what());
else else
context.replace(match.captured(0), ""); context.replace(match.captured(0), "");
} }
} else { } else {
QString error; QString error;
error = tr("Variable %1 not found").arg(variable); error = tr("Variable %1 not found").arg(variable);
dataManager()->putError(error); dataManager()->putError(error);
if (!dataManager()->reportSettings() || dataManager()->reportSettings()->suppressAbsentFieldsAndVarsWarnings()) if (!dataManager()->reportSettings() || dataManager()->reportSettings()->suppressAbsentFieldsAndVarsWarnings())
context.replace(match.captured(0), error); context.replace(match.captured(0), error);
else else
context.replace(match.captured(0), ""); context.replace(match.captured(0), "");
} }
match = rx.match(context, pos); match = rx.match(context, pos);
} }
} }
return context; return context;
#endif #endif
} }
@ -694,7 +694,12 @@ int ScriptEngineManager::getPageFreeSpace(PageItemDesignIntf* page){
if (page){ if (page){
int height = 0; int height = 0;
foreach(BandDesignIntf* band, page->bands()){ foreach(BandDesignIntf* band, page->bands()){
height += band->height();
if(band->type() == BandDesignIntf::Data)
{
height += band->geometry().height() * m_dataManager->dataSource(band->datasourceName())->model()->rowCount();
}
else height += band->height();
} }
return page->height() - height; return page->height() - height;
} else return -1; } else return -1;
@ -717,7 +722,7 @@ void ScriptEngineManager::clearTableOfContents(){
} }
ScriptValueType ScriptEngineManager::moveQObjectToScript(QObject* object, const QString objectName) ScriptValueType ScriptEngineManager::moveQObjectToScript(QObject* object, const QString objectName)
{ {
ScriptValueType obj = scriptEngine()->globalObject().property(objectName); ScriptValueType obj = scriptEngine()->globalObject().property(objectName);
if (!obj.isNull()) delete obj.toQObject(); if (!obj.isNull()) delete obj.toQObject();
ScriptValueType result = scriptEngine()->newQObject(object); ScriptValueType result = scriptEngine()->newQObject(object);
@ -762,7 +767,7 @@ bool ScriptEngineManager::createNumberFomatFunction()
" if(typeof(precision)==='undefined') precision=2; " " if(typeof(precision)==='undefined') precision=2; "
" if(typeof(locale)==='undefined') locale=\"\"; " " if(typeof(locale)==='undefined') locale=\"\"; "
"return %1.numberFormat(value,format,precision,locale);}" "return %1.numberFormat(value,format,precision,locale);}"
).arg(LimeReport::Const::FUNCTION_MANAGER_NAME) ).arg(LimeReport::Const::FUNCTION_MANAGER_NAME)
); );
return addFunction(fd); return addFunction(fd);
} }
@ -778,7 +783,7 @@ bool ScriptEngineManager::createDateFormatFunction(){
fd.setScriptWrapper(QString("function dateFormat(value, format, locale){" fd.setScriptWrapper(QString("function dateFormat(value, format, locale){"
" if(typeof(format)==='undefined') format = \"dd.MM.yyyy\"; " " if(typeof(format)==='undefined') format = \"dd.MM.yyyy\"; "
"return %1.dateFormat(value,format, locale);}" "return %1.dateFormat(value,format, locale);}"
).arg(LimeReport::Const::FUNCTION_MANAGER_NAME) ).arg(LimeReport::Const::FUNCTION_MANAGER_NAME)
); );
return addFunction(fd); return addFunction(fd);
} }
@ -794,7 +799,7 @@ bool ScriptEngineManager::createTimeFormatFunction(){
fd.setScriptWrapper(QString("function timeFormat(value, format){" fd.setScriptWrapper(QString("function timeFormat(value, format){"
" if(typeof(format)==='undefined') format = \"hh:mm\"; " " if(typeof(format)==='undefined') format = \"hh:mm\"; "
"return %1.timeFormat(value,format);}" "return %1.timeFormat(value,format);}"
).arg(LimeReport::Const::FUNCTION_MANAGER_NAME) ).arg(LimeReport::Const::FUNCTION_MANAGER_NAME)
); );
return addFunction(fd); return addFunction(fd);
} }
@ -810,7 +815,7 @@ bool ScriptEngineManager::createDateTimeFormatFunction(){
fd.setScriptWrapper(QString("function dateTimeFormat(value, format, locale){" fd.setScriptWrapper(QString("function dateTimeFormat(value, format, locale){"
" if(typeof(format)==='undefined') format = \"dd.MM.yyyy hh:mm\"; " " if(typeof(format)==='undefined') format = \"dd.MM.yyyy hh:mm\"; "
"return %1.dateTimeFormat(value, format, locale);}" "return %1.dateTimeFormat(value, format, locale);}"
).arg(LimeReport::Const::FUNCTION_MANAGER_NAME) ).arg(LimeReport::Const::FUNCTION_MANAGER_NAME)
); );
return addFunction(fd); return addFunction(fd);
} }
@ -827,13 +832,13 @@ bool ScriptEngineManager::createSectotimeFormatFunction()
fd.setScriptWrapper(QString("function sectotimeFormat(value, format){" fd.setScriptWrapper(QString("function sectotimeFormat(value, format){"
" if(typeof(format)==='undefined') format = \"hh:mm:ss\"; " " if(typeof(format)==='undefined') format = \"hh:mm:ss\"; "
"return %1.sectotimeFormat(value,format);}" "return %1.sectotimeFormat(value,format);}"
).arg(LimeReport::Const::FUNCTION_MANAGER_NAME) ).arg(LimeReport::Const::FUNCTION_MANAGER_NAME)
); );
return addFunction(fd); return addFunction(fd);
} }
bool ScriptEngineManager::createDateFunction(){ bool ScriptEngineManager::createDateFunction(){
// addFunction("date",date,"DATE&TIME","date()"); // addFunction("date",date,"DATE&TIME","date()");
JSFunctionDesc fd; JSFunctionDesc fd;
fd.setManager(m_functionManager); fd.setManager(m_functionManager);
@ -843,14 +848,14 @@ bool ScriptEngineManager::createDateFunction(){
fd.setDescription("date()"); fd.setDescription("date()");
fd.setScriptWrapper(QString("function date(){" fd.setScriptWrapper(QString("function date(){"
"return %1.date();}" "return %1.date();}"
).arg(LimeReport::Const::FUNCTION_MANAGER_NAME) ).arg(LimeReport::Const::FUNCTION_MANAGER_NAME)
); );
return addFunction(fd); return addFunction(fd);
} }
bool ScriptEngineManager::createNowFunction(){ bool ScriptEngineManager::createNowFunction(){
// addFunction("now",now,"DATE&TIME","now()"); // addFunction("now",now,"DATE&TIME","now()");
JSFunctionDesc fd; JSFunctionDesc fd;
fd.setManager(m_functionManager); fd.setManager(m_functionManager);
@ -860,13 +865,13 @@ bool ScriptEngineManager::createNowFunction(){
fd.setDescription("now()"); fd.setDescription("now()");
fd.setScriptWrapper(QString("function now(){" fd.setScriptWrapper(QString("function now(){"
"return %1.now();}" "return %1.now();}"
).arg(LimeReport::Const::FUNCTION_MANAGER_NAME) ).arg(LimeReport::Const::FUNCTION_MANAGER_NAME)
); );
return addFunction(fd); return addFunction(fd);
} }
bool ScriptEngineManager::createCurrencyFormatFunction(){ bool ScriptEngineManager::createCurrencyFormatFunction(){
// addFunction("currencyFormat",currencyFormat,"NUMBER","currencyFormat(\""+tr("Value")+"\",\""+tr("Locale")+"\")"); // addFunction("currencyFormat",currencyFormat,"NUMBER","currencyFormat(\""+tr("Value")+"\",\""+tr("Locale")+"\")");
JSFunctionDesc fd; JSFunctionDesc fd;
fd.setManager(m_functionManager); fd.setManager(m_functionManager);
@ -877,13 +882,13 @@ bool ScriptEngineManager::createCurrencyFormatFunction(){
fd.setScriptWrapper(QString("function currencyFormat(value, locale){" fd.setScriptWrapper(QString("function currencyFormat(value, locale){"
" if(typeof(locale)==='undefined') locale = \"\"; " " if(typeof(locale)==='undefined') locale = \"\"; "
"return %1.currencyFormat(value,locale);}" "return %1.currencyFormat(value,locale);}"
).arg(LimeReport::Const::FUNCTION_MANAGER_NAME) ).arg(LimeReport::Const::FUNCTION_MANAGER_NAME)
); );
return addFunction(fd); return addFunction(fd);
} }
bool ScriptEngineManager::createCurrencyUSBasedFormatFunction(){ bool ScriptEngineManager::createCurrencyUSBasedFormatFunction(){
// addFunction("currencyUSBasedFormat",currencyUSBasedFormat,"NUMBER","currencyUSBasedFormat(\""+tr("Value")+",\""+tr("CurrencySymbol")+"\")"); // addFunction("currencyUSBasedFormat",currencyUSBasedFormat,"NUMBER","currencyUSBasedFormat(\""+tr("Value")+",\""+tr("CurrencySymbol")+"\")");
JSFunctionDesc fd; JSFunctionDesc fd;
fd.setManager(m_functionManager); fd.setManager(m_functionManager);
@ -894,13 +899,13 @@ bool ScriptEngineManager::createCurrencyUSBasedFormatFunction(){
fd.setScriptWrapper(QString("function currencyUSBasedFormat(value, currencySymbol){" fd.setScriptWrapper(QString("function currencyUSBasedFormat(value, currencySymbol){"
" if(typeof(currencySymbol)==='undefined') currencySymbol = \"\"; " " if(typeof(currencySymbol)==='undefined') currencySymbol = \"\"; "
"return %1.currencyUSBasedFormat(value,currencySymbol);}" "return %1.currencyUSBasedFormat(value,currencySymbol);}"
).arg(LimeReport::Const::FUNCTION_MANAGER_NAME) ).arg(LimeReport::Const::FUNCTION_MANAGER_NAME)
); );
return addFunction(fd); return addFunction(fd);
} }
bool ScriptEngineManager::createSetVariableFunction(){ bool ScriptEngineManager::createSetVariableFunction(){
// addFunction("setVariable", setVariable, "GENERAL", "setVariable(\""+tr("Name")+"\",\""+tr("Value")+"\")"); // addFunction("setVariable", setVariable, "GENERAL", "setVariable(\""+tr("Name")+"\",\""+tr("Value")+"\")");
JSFunctionDesc fd; JSFunctionDesc fd;
fd.setManager(m_functionManager); fd.setManager(m_functionManager);
@ -910,7 +915,7 @@ bool ScriptEngineManager::createSetVariableFunction(){
fd.setDescription("setVariable(\""+tr("Name")+"\",\""+tr("Value")+"\")"); fd.setDescription("setVariable(\""+tr("Name")+"\",\""+tr("Value")+"\")");
fd.setScriptWrapper(QString("function setVariable(name, value){" fd.setScriptWrapper(QString("function setVariable(name, value){"
"return %1.setVariable(name,value);}" "return %1.setVariable(name,value);}"
).arg(LimeReport::Const::FUNCTION_MANAGER_NAME) ).arg(LimeReport::Const::FUNCTION_MANAGER_NAME)
); );
return addFunction(fd); return addFunction(fd);
} }
@ -925,7 +930,7 @@ bool ScriptEngineManager::createGetVariableFunction()
fd.setDescription("getVariable(\""+tr("Name")+"\")"); fd.setDescription("getVariable(\""+tr("Name")+"\")");
fd.setScriptWrapper(QString("function getVariable(name){" fd.setScriptWrapper(QString("function getVariable(name){"
"return %1.getVariable(name);}" "return %1.getVariable(name);}"
).arg(LimeReport::Const::FUNCTION_MANAGER_NAME) ).arg(LimeReport::Const::FUNCTION_MANAGER_NAME)
); );
return addFunction(fd); return addFunction(fd);
} }
@ -940,7 +945,7 @@ bool ScriptEngineManager::createGetFieldFunction()
fd.setDescription("getField(\""+tr("Name")+"\")"); fd.setDescription("getField(\""+tr("Name")+"\")");
fd.setScriptWrapper(QString("function getField(name){" fd.setScriptWrapper(QString("function getField(name){"
"return %1.getField(name);}" "return %1.getField(name);}"
).arg(LimeReport::Const::FUNCTION_MANAGER_NAME) ).arg(LimeReport::Const::FUNCTION_MANAGER_NAME)
); );
return addFunction(fd); return addFunction(fd);
} }
@ -956,10 +961,10 @@ bool ScriptEngineManager::createGetFieldByKeyFunction()
tr("ValueField")+"\",\""+ tr("ValueField")+"\",\""+
tr("KeyField")+"\", \""+ tr("KeyField")+"\", \""+
tr("KeyFieldValue")+"\")" tr("KeyFieldValue")+"\")"
); );
fd.setScriptWrapper(QString("function getFieldByKeyField(datasource, valueFieldName, keyFieldName, keyValue){" fd.setScriptWrapper(QString("function getFieldByKeyField(datasource, valueFieldName, keyFieldName, keyValue){"
"return %1.getFieldByKeyField(datasource, valueFieldName, keyFieldName, keyValue);}" "return %1.getFieldByKeyField(datasource, valueFieldName, keyFieldName, keyValue);}"
).arg(LimeReport::Const::FUNCTION_MANAGER_NAME) ).arg(LimeReport::Const::FUNCTION_MANAGER_NAME)
); );
return addFunction(fd); return addFunction(fd);
} }
@ -973,10 +978,10 @@ bool ScriptEngineManager::createGetFieldByRowIndex()
fd.setName("getFieldByRowIndex"); fd.setName("getFieldByRowIndex");
fd.setDescription("getFieldByRowIndex(\""+tr("FieldName")+"\", \""+ fd.setDescription("getFieldByRowIndex(\""+tr("FieldName")+"\", \""+
tr("RowIndex")+"\")" tr("RowIndex")+"\")"
); );
fd.setScriptWrapper(QString("function getFieldByRowIndex(fieldName, rowIndex){" fd.setScriptWrapper(QString("function getFieldByRowIndex(fieldName, rowIndex){"
"return %1.getFieldByRowIndex(fieldName, rowIndex);}" "return %1.getFieldByRowIndex(fieldName, rowIndex);}"
).arg(LimeReport::Const::FUNCTION_MANAGER_NAME) ).arg(LimeReport::Const::FUNCTION_MANAGER_NAME)
); );
return addFunction(fd); return addFunction(fd);
} }
@ -991,7 +996,7 @@ bool ScriptEngineManager::createAddBookmarkFunction()
fd.setDescription("addBookmark(\""+tr("Unique identifier")+" \""+tr("Content")+"\")"); fd.setDescription("addBookmark(\""+tr("Unique identifier")+" \""+tr("Content")+"\")");
fd.setScriptWrapper(QString("function addBookmark(uniqKey, content){" fd.setScriptWrapper(QString("function addBookmark(uniqKey, content){"
"return %1.addBookmark(uniqKey, content);}" "return %1.addBookmark(uniqKey, content);}"
).arg(LimeReport::Const::FUNCTION_MANAGER_NAME) ).arg(LimeReport::Const::FUNCTION_MANAGER_NAME)
); );
return addFunction(fd); return addFunction(fd);
} }
@ -1006,7 +1011,7 @@ bool ScriptEngineManager::createFindPageIndexByBookmark()
fd.setDescription("findPageIndexByBookmark(\""+tr("Unique identifier")+"\")"); fd.setDescription("findPageIndexByBookmark(\""+tr("Unique identifier")+"\")");
fd.setScriptWrapper(QString("function findPageIndexByBookmark(uniqKey){" fd.setScriptWrapper(QString("function findPageIndexByBookmark(uniqKey){"
"return %1.findPageIndexByBookmark(uniqKey);}" "return %1.findPageIndexByBookmark(uniqKey);}"
).arg(LimeReport::Const::FUNCTION_MANAGER_NAME) ).arg(LimeReport::Const::FUNCTION_MANAGER_NAME)
); );
return addFunction(fd); return addFunction(fd);
} }
@ -1021,7 +1026,7 @@ bool ScriptEngineManager::createAddTableOfContentsItemFunction()
fd.setDescription("addTableOfContentsItem(\""+tr("Unique identifier")+" \""+tr("Content")+"\", \""+tr("Indent")+"\")"); fd.setDescription("addTableOfContentsItem(\""+tr("Unique identifier")+" \""+tr("Content")+"\", \""+tr("Indent")+"\")");
fd.setScriptWrapper(QString("function addTableOfContentsItem(uniqKey, content, indent){" fd.setScriptWrapper(QString("function addTableOfContentsItem(uniqKey, content, indent){"
"return %1.addTableOfContentsItem(uniqKey, content, indent);}" "return %1.addTableOfContentsItem(uniqKey, content, indent);}"
).arg(LimeReport::Const::FUNCTION_MANAGER_NAME) ).arg(LimeReport::Const::FUNCTION_MANAGER_NAME)
); );
return addFunction(fd); return addFunction(fd);
} }
@ -1036,7 +1041,7 @@ bool ScriptEngineManager::createClearTableOfContentsFunction()
fd.setDescription("clearTableOfContents()"); fd.setDescription("clearTableOfContents()");
fd.setScriptWrapper(QString("function clearTableOfContents(){" fd.setScriptWrapper(QString("function clearTableOfContents(){"
"return %1.clearTableOfContents();}" "return %1.clearTableOfContents();}"
).arg(LimeReport::Const::FUNCTION_MANAGER_NAME) ).arg(LimeReport::Const::FUNCTION_MANAGER_NAME)
); );
return addFunction(fd); return addFunction(fd);
} }
@ -1051,7 +1056,7 @@ bool ScriptEngineManager::createReopenDatasourceFunction()
fd.setDescription("reopenDatasource(\""+tr("datasourceName")+"\")"); fd.setDescription("reopenDatasource(\""+tr("datasourceName")+"\")");
fd.setScriptWrapper(QString("function reopenDatasource(datasourceName){" fd.setScriptWrapper(QString("function reopenDatasource(datasourceName){"
"return %1.reopenDatasource(datasourceName);}" "return %1.reopenDatasource(datasourceName);}"
).arg(LimeReport::Const::FUNCTION_MANAGER_NAME) ).arg(LimeReport::Const::FUNCTION_MANAGER_NAME)
); );
return addFunction(fd); return addFunction(fd);
} }
@ -1064,7 +1069,7 @@ ScriptEngineManager::ScriptEngineManager()
m_functionManager->setScriptEngineManager(this); m_functionManager->setScriptEngineManager(this);
#ifdef USE_QTSCRIPTENGINE #ifdef USE_QTSCRIPTENGINE
m_scriptEngine->setDefaultPrototype(qMetaTypeId<QComboBox*>(), m_scriptEngine->setDefaultPrototype(qMetaTypeId<QComboBox*>(),
m_scriptEngine->newQObject(new ComboBoxPrototype())); m_scriptEngine->newQObject(new ComboBoxPrototype()));
#endif #endif
createLineFunction(); createLineFunction();
createNumberFomatFunction(); createNumberFomatFunction();
@ -1117,7 +1122,7 @@ bool ScriptExtractor::parse(int &curPos, const State& state, ScriptNode::Ptr scr
return true; return true;
} else { } else {
if (m_context[curPos]=='{') if (m_context[curPos]=='{')
extractBracket(curPos, scriptNode); extractBracket(curPos, scriptNode);
} }
case None: case None:
if (m_context[curPos]=='$'){ if (m_context[curPos]=='$'){
@ -1522,16 +1527,16 @@ void ScriptEngineContext::qobjectToScript(const QString& name, QObject *item)
{ {
ScriptEngineType* engine = ScriptEngineManager::instance().scriptEngine(); ScriptEngineType* engine = ScriptEngineManager::instance().scriptEngine();
#ifdef USE_QJSENGINE #ifdef USE_QJSENGINE
ScriptValueType sItem = getJSValue(*engine, item); ScriptValueType sItem = getJSValue(*engine, item);
engine->globalObject().setProperty(name, sItem); engine->globalObject().setProperty(name, sItem);
#else #else
ScriptValueType sItem = engine->globalObject().property(name); ScriptValueType sItem = engine->globalObject().property(name);
if (sItem.isValid()){ if (sItem.isValid()){
engine->newQObject(sItem, item); engine->newQObject(sItem, item);
} else { } else {
sItem = engine->newQObject(item); sItem = engine->newQObject(item);
engine->globalObject().setProperty(name,sItem); engine->globalObject().setProperty(name,sItem);
} }
#endif #endif
} }
@ -1574,17 +1579,17 @@ bool ScriptEngineContext::runInitScript(){
#ifdef USE_QJSENGINE #ifdef USE_QJSENGINE
if (res.isError()){ if (res.isError()){
QMessageBox::critical(0,tr("Error"), QMessageBox::critical(0,tr("Error"),
QString("Line %1: %2 ").arg(res.property("lineNumber").toString()) QString("Line %1: %2 ").arg(res.property("lineNumber").toString())
.arg(res.toString()) .arg(res.toString())
); );
return false; return false;
} }
#else #else
if (engine->hasUncaughtException()) { if (engine->hasUncaughtException()) {
QMessageBox::critical(0,tr("Error"), QMessageBox::critical(0,tr("Error"),
QString("Line %1: %2 ").arg(engine->uncaughtExceptionLineNumber()) QString("Line %1: %2 ").arg(engine->uncaughtExceptionLineNumber())
.arg(engine->uncaughtException().toString()) .arg(engine->uncaughtException().toString())
); );
return false; return false;
} }
#endif #endif
@ -1987,28 +1992,28 @@ void TableOfContents::slotOneSlotDS(CallbackInfo info, QVariant& data)
columns << "Content" << "Page number" << "Content Key"; columns << "Content" << "Page number" << "Content Key";
switch (info.dataType) { switch (info.dataType) {
case LimeReport::CallbackInfo::RowCount: case LimeReport::CallbackInfo::RowCount:
data = m_tableOfContents.count(); data = m_tableOfContents.count();
break; break;
case LimeReport::CallbackInfo::ColumnCount: case LimeReport::CallbackInfo::ColumnCount:
data = columns.size(); data = columns.size();
break; break;
case LimeReport::CallbackInfo::ColumnHeaderData: { case LimeReport::CallbackInfo::ColumnHeaderData: {
data = columns.at(info.index); data = columns.at(info.index);
break; break;
}
case LimeReport::CallbackInfo::ColumnData:
if (info.index < m_tableOfContents.count()){
ContentItem* item = m_tableOfContents.at(info.index);
if (info.columnName.compare("Content",Qt::CaseInsensitive) == 0)
data = item->content.rightJustified(item->indent+item->content.size());
if (info.columnName.compare("Content Key",Qt::CaseInsensitive) == 0)
data = item->uniqKey;
if (info.columnName.compare("Page number",Qt::CaseInsensitive) == 0)
data = QString::number(item->pageNumber);
} }
case LimeReport::CallbackInfo::ColumnData: break;
if (info.index < m_tableOfContents.count()){ default: break;
ContentItem* item = m_tableOfContents.at(info.index);
if (info.columnName.compare("Content",Qt::CaseInsensitive) == 0)
data = item->content.rightJustified(item->indent+item->content.size());
if (info.columnName.compare("Content Key",Qt::CaseInsensitive) == 0)
data = item->uniqKey;
if (info.columnName.compare("Page number",Qt::CaseInsensitive) == 0)
data = QString::number(item->pageNumber);
}
break;
default: break;
} }
} }
@ -2060,6 +2065,13 @@ bool DatasourceFunctions::isEOF(const QString &datasourceName)
return true; return true;
} }
int DatasourceFunctions::rowCount(const QString &datasourceName)
{
if (m_dataManager && m_dataManager->dataSource(datasourceName))
return m_dataManager->dataSource(datasourceName)->model()->rowCount();
return 0;
}
bool DatasourceFunctions::invalidate(const QString& datasourceName) bool DatasourceFunctions::invalidate(const QString& datasourceName)
{ {
if (m_dataManager && m_dataManager->dataSource(datasourceName)){ if (m_dataManager && m_dataManager->dataSource(datasourceName)){

View File

@ -209,7 +209,7 @@ public:
bool hasChanges(){ return m_hasChanges;} bool hasChanges(){ return m_hasChanges;}
ReportPages* reportPages() const; ReportPages* reportPages() const;
void setReportPages(ReportPages* value); void setReportPages(ReportPages* value);
#ifdef HAVE_UI_LOADER #ifdef HAVE_UI_LOADER
signals: signals:
void dialogNameChanged(QString dialogName); void dialogNameChanged(QString dialogName);
void dialogDeleted(QString dialogName); void dialogDeleted(QString dialogName);
@ -337,6 +337,7 @@ public:
Q_INVOKABLE bool next(const QString& datasourceName); Q_INVOKABLE bool next(const QString& datasourceName);
Q_INVOKABLE bool prior(const QString& datasourceName); Q_INVOKABLE bool prior(const QString& datasourceName);
Q_INVOKABLE bool isEOF(const QString& datasourceName); Q_INVOKABLE bool isEOF(const QString& datasourceName);
Q_INVOKABLE int rowCount(const QString& datasourceName);
Q_INVOKABLE bool invalidate(const QString& datasourceName); Q_INVOKABLE bool invalidate(const QString& datasourceName);
Q_INVOKABLE QObject *createTableBuilder(QObject *horizontalLayout); Q_INVOKABLE QObject *createTableBuilder(QObject *horizontalLayout);
private: private:
@ -441,7 +442,7 @@ private:
}; };
class ScriptEngineManager : public QObject, public Singleton<ScriptEngineManager>, public IScriptEngineManager class ScriptEngineManager : public QObject, public Singleton<ScriptEngineManager>, public IScriptEngineManager
{ {
Q_OBJECT Q_OBJECT
public: public:
friend class Singleton<ScriptEngineManager>; friend class Singleton<ScriptEngineManager>;

View File

@ -3422,13 +3422,13 @@ Cet aperçu n&apos;est plus valide.</translation>
<context> <context>
<name>LimeReport::ScriptEngineContext</name> <name>LimeReport::ScriptEngineContext</name>
<message> <message>
<location filename="../limereport/lrscriptenginemanager.cpp" line="1288"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="1293"/>
<source>Dialog with name: %1 can`t be created</source> <source>Dialog with name: %1 can`t be created</source>
<translation>Le dialogue avec le nom &quot;%1&quot; ne peut pas être crée</translation> <translation>Le dialogue avec le nom &quot;%1&quot; ne peut pas être crée</translation>
</message> </message>
<message> <message>
<location filename="../limereport/lrscriptenginemanager.cpp" line="1576"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="1581"/>
<location filename="../limereport/lrscriptenginemanager.cpp" line="1584"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="1589"/>
<source>Error</source> <source>Error</source>
<translation>Erreur</translation> <translation>Erreur</translation>
</message> </message>
@ -3441,20 +3441,20 @@ Cet aperçu n&apos;est plus valide.</translation>
<translation>Fonctions de groupe</translation> <translation>Fonctions de groupe</translation>
</message> </message>
<message> <message>
<location filename="../limereport/lrscriptenginemanager.cpp" line="756"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="761"/>
<location filename="../limereport/lrscriptenginemanager.cpp" line="777"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="782"/>
<location filename="../limereport/lrscriptenginemanager.cpp" line="793"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="798"/>
<location filename="../limereport/lrscriptenginemanager.cpp" line="809"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="814"/>
<location filename="../limereport/lrscriptenginemanager.cpp" line="826"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="831"/>
<location filename="../limereport/lrscriptenginemanager.cpp" line="876"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="881"/>
<location filename="../limereport/lrscriptenginemanager.cpp" line="893"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="898"/>
<location filename="../limereport/lrscriptenginemanager.cpp" line="910"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="915"/>
<source>Value</source> <source>Value</source>
<translation>Valeur</translation> <translation>Valeur</translation>
</message> </message>
<message> <message>
<location filename="../limereport/lrscriptenginemanager.cpp" line="339"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="339"/>
<location filename="../limereport/lrscriptenginemanager.cpp" line="741"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="746"/>
<source>BandName</source> <source>BandName</source>
<translation>Nom de la bande</translation> <translation>Nom de la bande</translation>
</message> </message>
@ -3465,7 +3465,7 @@ Cet aperçu n&apos;est plus valide.</translation>
</message> </message>
<message> <message>
<location filename="../limereport/lrscriptenginemanager.cpp" line="339"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="339"/>
<location filename="../limereport/lrscriptenginemanager.cpp" line="974"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="979"/>
<source>FieldName</source> <source>FieldName</source>
<translation>Nom du champ</translation> <translation>Nom du champ</translation>
</message> </message>
@ -3482,120 +3482,120 @@ Cet aperçu n&apos;est plus valide.</translation>
<translation>Champ &quot;%1 introuvable dans %2!</translation> <translation>Champ &quot;%1 introuvable dans %2!</translation>
</message> </message>
<message> <message>
<location filename="../limereport/lrscriptenginemanager.cpp" line="739"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="744"/>
<source>SYSTEM</source> <source>SYSTEM</source>
<translation>Système</translation> <translation>Système</translation>
</message> </message>
<message> <message>
<location filename="../limereport/lrscriptenginemanager.cpp" line="754"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="759"/>
<location filename="../limereport/lrscriptenginemanager.cpp" line="874"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="879"/>
<location filename="../limereport/lrscriptenginemanager.cpp" line="891"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="896"/>
<source>NUMBER</source> <source>NUMBER</source>
<translation>Nombre</translation> <translation>Nombre</translation>
</message> </message>
<message> <message>
<location filename="../limereport/lrscriptenginemanager.cpp" line="756"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="761"/>
<location filename="../limereport/lrscriptenginemanager.cpp" line="777"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="782"/>
<location filename="../limereport/lrscriptenginemanager.cpp" line="793"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="798"/>
<location filename="../limereport/lrscriptenginemanager.cpp" line="809"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="814"/>
<location filename="../limereport/lrscriptenginemanager.cpp" line="826"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="831"/>
<source>Format</source> <source>Format</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../limereport/lrscriptenginemanager.cpp" line="757"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="762"/>
<source>Precision</source> <source>Precision</source>
<translation>Précision</translation> <translation>Précision</translation>
</message> </message>
<message> <message>
<location filename="../limereport/lrscriptenginemanager.cpp" line="758"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="763"/>
<location filename="../limereport/lrscriptenginemanager.cpp" line="777"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="782"/>
<location filename="../limereport/lrscriptenginemanager.cpp" line="809"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="814"/>
<location filename="../limereport/lrscriptenginemanager.cpp" line="876"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="881"/>
<source>Locale</source> <source>Locale</source>
<translation>Local</translation> <translation>Local</translation>
</message> </message>
<message> <message>
<location filename="../limereport/lrscriptenginemanager.cpp" line="775"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="780"/>
<location filename="../limereport/lrscriptenginemanager.cpp" line="791"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="796"/>
<location filename="../limereport/lrscriptenginemanager.cpp" line="807"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="812"/>
<location filename="../limereport/lrscriptenginemanager.cpp" line="824"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="829"/>
<location filename="../limereport/lrscriptenginemanager.cpp" line="841"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="846"/>
<location filename="../limereport/lrscriptenginemanager.cpp" line="858"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="863"/>
<source>DATE&amp;TIME</source> <source>DATE&amp;TIME</source>
<translation>Date&amp;Heure</translation> <translation>Date&amp;Heure</translation>
</message> </message>
<message> <message>
<location filename="../limereport/lrscriptenginemanager.cpp" line="893"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="898"/>
<source>CurrencySymbol</source> <source>CurrencySymbol</source>
<translation>Symbolde de la monnaie</translation> <translation>Symbolde de la monnaie</translation>
</message> </message>
<message> <message>
<location filename="../limereport/lrscriptenginemanager.cpp" line="908"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="913"/>
<location filename="../limereport/lrscriptenginemanager.cpp" line="923"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="928"/>
<location filename="../limereport/lrscriptenginemanager.cpp" line="938"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="943"/>
<location filename="../limereport/lrscriptenginemanager.cpp" line="953"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="958"/>
<location filename="../limereport/lrscriptenginemanager.cpp" line="972"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="977"/>
<location filename="../limereport/lrscriptenginemanager.cpp" line="989"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="994"/>
<location filename="../limereport/lrscriptenginemanager.cpp" line="1004"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="1009"/>
<location filename="../limereport/lrscriptenginemanager.cpp" line="1019"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="1024"/>
<location filename="../limereport/lrscriptenginemanager.cpp" line="1034"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="1039"/>
<location filename="../limereport/lrscriptenginemanager.cpp" line="1049"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="1054"/>
<source>GENERAL</source> <source>GENERAL</source>
<translation>General</translation> <translation>General</translation>
</message> </message>
<message> <message>
<location filename="../limereport/lrscriptenginemanager.cpp" line="910"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="915"/>
<location filename="../limereport/lrscriptenginemanager.cpp" line="925"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="930"/>
<location filename="../limereport/lrscriptenginemanager.cpp" line="940"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="945"/>
<source>Name</source> <source>Name</source>
<translation>Nom</translation> <translation>Nom</translation>
</message> </message>
<message> <message>
<location filename="../limereport/lrscriptenginemanager.cpp" line="955"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="960"/>
<source>Datasource</source> <source>Datasource</source>
<translation>Source de donnée</translation> <translation>Source de donnée</translation>
</message> </message>
<message> <message>
<location filename="../limereport/lrscriptenginemanager.cpp" line="956"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="961"/>
<source>ValueField</source> <source>ValueField</source>
<translation>Valeur</translation> <translation>Valeur</translation>
</message> </message>
<message> <message>
<location filename="../limereport/lrscriptenginemanager.cpp" line="957"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="962"/>
<source>KeyField</source> <source>KeyField</source>
<translation>Clé</translation> <translation>Clé</translation>
</message> </message>
<message> <message>
<location filename="../limereport/lrscriptenginemanager.cpp" line="958"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="963"/>
<source>KeyFieldValue</source> <source>KeyFieldValue</source>
<translation>Valeur de la clé</translation> <translation>Valeur de la clé</translation>
</message> </message>
<message> <message>
<location filename="../limereport/lrscriptenginemanager.cpp" line="975"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="980"/>
<source>RowIndex</source> <source>RowIndex</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../limereport/lrscriptenginemanager.cpp" line="991"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="996"/>
<location filename="../limereport/lrscriptenginemanager.cpp" line="1006"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="1011"/>
<location filename="../limereport/lrscriptenginemanager.cpp" line="1021"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="1026"/>
<source>Unique identifier</source> <source>Unique identifier</source>
<translation>Identifiant unique</translation> <translation>Identifiant unique</translation>
</message> </message>
<message> <message>
<location filename="../limereport/lrscriptenginemanager.cpp" line="991"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="996"/>
<location filename="../limereport/lrscriptenginemanager.cpp" line="1021"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="1026"/>
<source>Content</source> <source>Content</source>
<translation>Contenu</translation> <translation>Contenu</translation>
</message> </message>
<message> <message>
<location filename="../limereport/lrscriptenginemanager.cpp" line="1021"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="1026"/>
<source>Indent</source> <source>Indent</source>
<translation>Indenter</translation> <translation>Indenter</translation>
</message> </message>
<message> <message>
<location filename="../limereport/lrscriptenginemanager.cpp" line="1051"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="1056"/>
<source>datasourceName</source> <source>datasourceName</source>
<translation>Nom de source de donnée</translation> <translation>Nom de source de donnée</translation>
</message> </message>
@ -4202,12 +4202,12 @@ Cet aperçu n&apos;est plus valide.</translation>
<translation>L&apos;objet avec le nom &quot;%1&quot; existe déja!</translation> <translation>L&apos;objet avec le nom &quot;%1&quot; existe déja!</translation>
</message> </message>
<message> <message>
<location filename="../limereport/lrscriptenginemanager.cpp" line="1688"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="1693"/>
<source>Function %1 not found or have wrong arguments</source> <source>Function %1 not found or have wrong arguments</source>
<translation>La fonction %1 est introuvable ou contient des paramètres incorrects</translation> <translation>La fonction %1 est introuvable ou contient des paramètres incorrects</translation>
</message> </message>
<message> <message>
<location filename="../limereport/lrscriptenginemanager.cpp" line="1691"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="1696"/>
<source>Datasource manager not found</source> <source>Datasource manager not found</source>
<translation>Gestionnaire de source de donnée introuvable</translation> <translation>Gestionnaire de source de donnée introuvable</translation>
</message> </message>

View File

@ -3434,13 +3434,13 @@ Ten podgląd nie jest już prawidłowy.</translation>
<context> <context>
<name>LimeReport::ScriptEngineContext</name> <name>LimeReport::ScriptEngineContext</name>
<message> <message>
<location filename="../limereport/lrscriptenginemanager.cpp" line="1288"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="1293"/>
<source>Dialog with name: %1 can`t be created</source> <source>Dialog with name: %1 can`t be created</source>
<translation>Okno dialogowe z nazwą:%1 nie można utworzyć</translation> <translation>Okno dialogowe z nazwą:%1 nie można utworzyć</translation>
</message> </message>
<message> <message>
<location filename="../limereport/lrscriptenginemanager.cpp" line="1576"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="1581"/>
<location filename="../limereport/lrscriptenginemanager.cpp" line="1584"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="1589"/>
<source>Error</source> <source>Error</source>
<translation>Błąd</translation> <translation>Błąd</translation>
</message> </message>
@ -3453,20 +3453,20 @@ Ten podgląd nie jest już prawidłowy.</translation>
<translation>FUNKCJE GRUPUJĄCE</translation> <translation>FUNKCJE GRUPUJĄCE</translation>
</message> </message>
<message> <message>
<location filename="../limereport/lrscriptenginemanager.cpp" line="756"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="761"/>
<location filename="../limereport/lrscriptenginemanager.cpp" line="777"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="782"/>
<location filename="../limereport/lrscriptenginemanager.cpp" line="793"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="798"/>
<location filename="../limereport/lrscriptenginemanager.cpp" line="809"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="814"/>
<location filename="../limereport/lrscriptenginemanager.cpp" line="826"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="831"/>
<location filename="../limereport/lrscriptenginemanager.cpp" line="876"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="881"/>
<location filename="../limereport/lrscriptenginemanager.cpp" line="893"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="898"/>
<location filename="../limereport/lrscriptenginemanager.cpp" line="910"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="915"/>
<source>Value</source> <source>Value</source>
<translation>Wartość</translation> <translation>Wartość</translation>
</message> </message>
<message> <message>
<location filename="../limereport/lrscriptenginemanager.cpp" line="339"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="339"/>
<location filename="../limereport/lrscriptenginemanager.cpp" line="741"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="746"/>
<source>BandName</source> <source>BandName</source>
<translation>Nazwa sekcji</translation> <translation>Nazwa sekcji</translation>
</message> </message>
@ -3477,7 +3477,7 @@ Ten podgląd nie jest już prawidłowy.</translation>
</message> </message>
<message> <message>
<location filename="../limereport/lrscriptenginemanager.cpp" line="339"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="339"/>
<location filename="../limereport/lrscriptenginemanager.cpp" line="974"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="979"/>
<source>FieldName</source> <source>FieldName</source>
<translation>Nazwa pola</translation> <translation>Nazwa pola</translation>
</message> </message>
@ -3494,120 +3494,120 @@ Ten podgląd nie jest już prawidłowy.</translation>
<translation>Pole %1 nie znalezione w %2!</translation> <translation>Pole %1 nie znalezione w %2!</translation>
</message> </message>
<message> <message>
<location filename="../limereport/lrscriptenginemanager.cpp" line="739"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="744"/>
<source>SYSTEM</source> <source>SYSTEM</source>
<translation>SYSTEM</translation> <translation>SYSTEM</translation>
</message> </message>
<message> <message>
<location filename="../limereport/lrscriptenginemanager.cpp" line="754"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="759"/>
<location filename="../limereport/lrscriptenginemanager.cpp" line="874"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="879"/>
<location filename="../limereport/lrscriptenginemanager.cpp" line="891"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="896"/>
<source>NUMBER</source> <source>NUMBER</source>
<translation>LICZBA</translation> <translation>LICZBA</translation>
</message> </message>
<message> <message>
<location filename="../limereport/lrscriptenginemanager.cpp" line="756"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="761"/>
<location filename="../limereport/lrscriptenginemanager.cpp" line="777"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="782"/>
<location filename="../limereport/lrscriptenginemanager.cpp" line="793"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="798"/>
<location filename="../limereport/lrscriptenginemanager.cpp" line="809"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="814"/>
<location filename="../limereport/lrscriptenginemanager.cpp" line="826"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="831"/>
<source>Format</source> <source>Format</source>
<translation>Format</translation> <translation>Format</translation>
</message> </message>
<message> <message>
<location filename="../limereport/lrscriptenginemanager.cpp" line="757"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="762"/>
<source>Precision</source> <source>Precision</source>
<translation>Precyzja</translation> <translation>Precyzja</translation>
</message> </message>
<message> <message>
<location filename="../limereport/lrscriptenginemanager.cpp" line="758"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="763"/>
<location filename="../limereport/lrscriptenginemanager.cpp" line="777"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="782"/>
<location filename="../limereport/lrscriptenginemanager.cpp" line="809"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="814"/>
<location filename="../limereport/lrscriptenginemanager.cpp" line="876"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="881"/>
<source>Locale</source> <source>Locale</source>
<translation>Ustawienia lokalne</translation> <translation>Ustawienia lokalne</translation>
</message> </message>
<message> <message>
<location filename="../limereport/lrscriptenginemanager.cpp" line="775"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="780"/>
<location filename="../limereport/lrscriptenginemanager.cpp" line="791"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="796"/>
<location filename="../limereport/lrscriptenginemanager.cpp" line="807"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="812"/>
<location filename="../limereport/lrscriptenginemanager.cpp" line="824"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="829"/>
<location filename="../limereport/lrscriptenginemanager.cpp" line="841"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="846"/>
<location filename="../limereport/lrscriptenginemanager.cpp" line="858"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="863"/>
<source>DATE&amp;TIME</source> <source>DATE&amp;TIME</source>
<translation>Data i czas</translation> <translation>Data i czas</translation>
</message> </message>
<message> <message>
<location filename="../limereport/lrscriptenginemanager.cpp" line="955"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="960"/>
<source>Datasource</source> <source>Datasource</source>
<translation>Źródło danych</translation> <translation>Źródło danych</translation>
</message> </message>
<message> <message>
<location filename="../limereport/lrscriptenginemanager.cpp" line="956"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="961"/>
<source>ValueField</source> <source>ValueField</source>
<translation>Pole wartości</translation> <translation>Pole wartości</translation>
</message> </message>
<message> <message>
<location filename="../limereport/lrscriptenginemanager.cpp" line="957"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="962"/>
<source>KeyField</source> <source>KeyField</source>
<translation>Pole klucza</translation> <translation>Pole klucza</translation>
</message> </message>
<message> <message>
<location filename="../limereport/lrscriptenginemanager.cpp" line="958"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="963"/>
<source>KeyFieldValue</source> <source>KeyFieldValue</source>
<translation>Wartość pola klucza</translation> <translation>Wartość pola klucza</translation>
</message> </message>
<message> <message>
<location filename="../limereport/lrscriptenginemanager.cpp" line="975"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="980"/>
<source>RowIndex</source> <source>RowIndex</source>
<translation>Indeks wiersza</translation> <translation>Indeks wiersza</translation>
</message> </message>
<message> <message>
<location filename="../limereport/lrscriptenginemanager.cpp" line="991"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="996"/>
<location filename="../limereport/lrscriptenginemanager.cpp" line="1006"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="1011"/>
<location filename="../limereport/lrscriptenginemanager.cpp" line="1021"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="1026"/>
<source>Unique identifier</source> <source>Unique identifier</source>
<translation>Unikalny identyfikator</translation> <translation>Unikalny identyfikator</translation>
</message> </message>
<message> <message>
<location filename="../limereport/lrscriptenginemanager.cpp" line="991"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="996"/>
<location filename="../limereport/lrscriptenginemanager.cpp" line="1021"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="1026"/>
<source>Content</source> <source>Content</source>
<translation>Zawartość</translation> <translation>Zawartość</translation>
</message> </message>
<message> <message>
<location filename="../limereport/lrscriptenginemanager.cpp" line="1021"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="1026"/>
<source>Indent</source> <source>Indent</source>
<translation>Akapit</translation> <translation>Akapit</translation>
</message> </message>
<message> <message>
<location filename="../limereport/lrscriptenginemanager.cpp" line="1051"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="1056"/>
<source>datasourceName</source> <source>datasourceName</source>
<translation>Nazwa źródła danych</translation> <translation>Nazwa źródła danych</translation>
</message> </message>
<message> <message>
<location filename="../limereport/lrscriptenginemanager.cpp" line="893"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="898"/>
<source>CurrencySymbol</source> <source>CurrencySymbol</source>
<translation>Symbol waluty</translation> <translation>Symbol waluty</translation>
</message> </message>
<message> <message>
<location filename="../limereport/lrscriptenginemanager.cpp" line="908"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="913"/>
<location filename="../limereport/lrscriptenginemanager.cpp" line="923"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="928"/>
<location filename="../limereport/lrscriptenginemanager.cpp" line="938"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="943"/>
<location filename="../limereport/lrscriptenginemanager.cpp" line="953"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="958"/>
<location filename="../limereport/lrscriptenginemanager.cpp" line="972"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="977"/>
<location filename="../limereport/lrscriptenginemanager.cpp" line="989"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="994"/>
<location filename="../limereport/lrscriptenginemanager.cpp" line="1004"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="1009"/>
<location filename="../limereport/lrscriptenginemanager.cpp" line="1019"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="1024"/>
<location filename="../limereport/lrscriptenginemanager.cpp" line="1034"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="1039"/>
<location filename="../limereport/lrscriptenginemanager.cpp" line="1049"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="1054"/>
<source>GENERAL</source> <source>GENERAL</source>
<translation>OGÓLNY</translation> <translation>OGÓLNY</translation>
</message> </message>
<message> <message>
<location filename="../limereport/lrscriptenginemanager.cpp" line="910"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="915"/>
<location filename="../limereport/lrscriptenginemanager.cpp" line="925"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="930"/>
<location filename="../limereport/lrscriptenginemanager.cpp" line="940"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="945"/>
<source>Name</source> <source>Name</source>
<translation>Nazwa</translation> <translation>Nazwa</translation>
</message> </message>
@ -4214,12 +4214,12 @@ Ten podgląd nie jest już prawidłowy.</translation>
<translation>Obiekt o nazwie %1 już istnieje!</translation> <translation>Obiekt o nazwie %1 już istnieje!</translation>
</message> </message>
<message> <message>
<location filename="../limereport/lrscriptenginemanager.cpp" line="1688"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="1693"/>
<source>Function %1 not found or have wrong arguments</source> <source>Function %1 not found or have wrong arguments</source>
<translation>Funkcja %1 nie znaleziona lub ma błędne argumenty</translation> <translation>Funkcja %1 nie znaleziona lub ma błędne argumenty</translation>
</message> </message>
<message> <message>
<location filename="../limereport/lrscriptenginemanager.cpp" line="1691"/> <location filename="../limereport/lrscriptenginemanager.cpp" line="1696"/>
<source>Datasource manager not found</source> <source>Datasource manager not found</source>
<translation>Nie znaleziono menedżera źródła danych</translation> <translation>Nie znaleziono menedżera źródła danych</translation>
</message> </message>