diff --git a/common.pri b/common.pri index c2e872d..2807fea 100644 --- a/common.pri +++ b/common.pri @@ -70,7 +70,7 @@ RCC_DIR = $${ARCH_DIR}/$${BUILD_TYPE}/rcc LIMEREPORT_VERSION_MAJOR = 1 LIMEREPORT_VERSION_MINOR = 4 -LIMEREPORT_VERSION_RELEASE = 55 +LIMEREPORT_VERSION_RELEASE = 56 LIMEREPORT_VERSION = '$${LIMEREPORT_VERSION_MAJOR}.$${LIMEREPORT_VERSION_MINOR}.$${LIMEREPORT_VERSION_RELEASE}' DEFINES *= LIMEREPORT_VERSION_STR=\\\"$${LIMEREPORT_VERSION}\\\" diff --git a/limereport/items/lrsubitemparentpropitem.cpp b/limereport/items/lrsubitemparentpropitem.cpp index 1b1380c..1587bc9 100644 --- a/limereport/items/lrsubitemparentpropitem.cpp +++ b/limereport/items/lrsubitemparentpropitem.cpp @@ -48,8 +48,8 @@ namespace{ LimeReport::ItemLocationPropItem::ItemLocationPropItem(QObject* object, ObjectsList* objects, const QString &name, const QString &displayName, const QVariant &value, ObjectPropItem* parent, bool readonly) :LimeReport::ObjectPropItem(object, objects, name, displayName, value, parent, readonly){ - m_locationMap.insert("Band",LimeReport::ItemDesignIntf::Band); - m_locationMap.insert("Page",LimeReport::ItemDesignIntf::Page); + m_locationMap.insert(tr("Band"),LimeReport::ItemDesignIntf::Band); + m_locationMap.insert(tr("Page"),LimeReport::ItemDesignIntf::Page); } diff --git a/limereport/objectinspector/propertyItems/lrenumpropitem.cpp b/limereport/objectinspector/propertyItems/lrenumpropitem.cpp index dcd7937..36ebe26 100644 --- a/limereport/objectinspector/propertyItems/lrenumpropitem.cpp +++ b/limereport/objectinspector/propertyItems/lrenumpropitem.cpp @@ -54,10 +54,10 @@ QWidget *EnumPropItem::createProperyEditor(QWidget *parent) const QStringList enumValues; QMetaEnum propEnum = object()->metaObject()->property(object()->metaObject()->indexOfProperty(propertyName().toLatin1())).enumerator(); for (int i=0;imetaObject()->property(object()->metaObject()->indexOfProperty(propertyName().toLatin1())).enumerator(); + for (int i=0;i(propertyEditor); @@ -90,13 +149,13 @@ void EnumPropItem::setModelData(QWidget *propertyEditor, QAbstractItemModel *mod QString EnumPropItem::nameByType(int value) const { QMetaEnum propEnum = object()->metaObject()->property(object()->metaObject()->indexOfProperty(propertyName().toLatin1())).enumerator(); - return propEnum.valueToKey(value); + return tr(propEnum.valueToKey(value)); } int EnumPropItem::typeByName(const QString &value) const { QMetaEnum propEnum = object()->metaObject()->property(object()->metaObject()->indexOfProperty(propertyName().toLatin1())).enumerator(); - return propEnum.keyToValue(value.toLatin1()); + return propEnum.keyToValue(m_translation.value(value).toLatin1()); } QString EnumPropItem::displayValue() const diff --git a/limereport/objectinspector/propertyItems/lrenumpropitem.h b/limereport/objectinspector/propertyItems/lrenumpropitem.h index 268cc3d..4553d10 100644 --- a/limereport/objectinspector/propertyItems/lrenumpropitem.h +++ b/limereport/objectinspector/propertyItems/lrenumpropitem.h @@ -31,17 +31,18 @@ #define LRENUMPROPITEM_H #include "lrobjectpropitem.h" +#include namespace LimeReport{ class EnumPropItem : public ObjectPropItem { Q_OBJECT public: - EnumPropItem():ObjectPropItem(), m_settingValue(false){} + EnumPropItem():ObjectPropItem(), m_settingValue(false){initTranslation();} EnumPropItem(QObject* object, ObjectsList* objects, const QString& name, const QString& displayName, const QVariant& value,ObjectPropItem* parent, bool readonly) - :ObjectPropItem(object, objects, name, displayName, value, parent, readonly),m_settingValue(false){} + :ObjectPropItem(object, objects, name, displayName, value, parent, readonly),m_settingValue(false){initTranslation();} EnumPropItem(QObject* object, ObjectsList* objects, const QString& name, const QString& displayName, const QVariant& value,ObjectPropItem* parent, bool readonly, QVector acceptableValues) - :ObjectPropItem(object, objects, name, displayName, value, parent, readonly),m_acceptableValues(acceptableValues),m_settingValue(false){} + :ObjectPropItem(object, objects, name, displayName, value, parent, readonly),m_acceptableValues(acceptableValues),m_settingValue(false){initTranslation();} QWidget* createProperyEditor(QWidget *parent) const; QString displayValue() const; void setPropertyEditorData(QWidget * propertyEditor, const QModelIndex &) const; @@ -52,9 +53,13 @@ protected: int typeByName(const QString& propertyValue) const; private slots: void slotEnumChanged(const QString& text); +private: + void initTranslation(); + void translateEnumItemName(); private: QVector m_acceptableValues; bool m_settingValue; + QMap m_translation; }; } #endif // LRENUMPROPITEM_H diff --git a/limereport/objectinspector/propertyItems/lrflagspropitem.cpp b/limereport/objectinspector/propertyItems/lrflagspropitem.cpp index 5b56e85..987ec94 100644 --- a/limereport/objectinspector/propertyItems/lrflagspropitem.cpp +++ b/limereport/objectinspector/propertyItems/lrflagspropitem.cpp @@ -59,12 +59,14 @@ void FlagsPropItem::createChildren() QMetaEnum propEnum = object()->metaObject()->property(object()->metaObject()->indexOfProperty(propertyName().toLatin1())).enumerator(); for (int i=0;iappendItem(new LimeReport::FlagPropItem( - object(), objects(), QString(propEnum.key(i)), QString(propEnum.key(i)), - bool((propertyValue().toInt() & propEnum.keyToValue(propEnum.key(i)))==propEnum.keyToValue(propEnum.key(i))), - this, false - ) - ); + if ( propEnum.keyToValue(propEnum.key(i)) !=0 ) { + this->appendItem(new LimeReport::FlagPropItem( + object(), objects(), QString(propEnum.key(i)), tr(propEnum.key(i)), + bool((propertyValue().toInt() & propEnum.keyToValue(propEnum.key(i)))==propEnum.keyToValue(propEnum.key(i))), + this, false + ) + ); + } } } @@ -94,10 +96,10 @@ QString FlagsPropItem::displayValue() const QMetaEnum propEnum = object()->metaObject()->property(object()->metaObject()->indexOfProperty(propertyName().toLatin1())).enumerator(); for (int i=0;i(propertyEditor)->isChecked(); model->setData(index,value); int flags = object()->property(parent()->propertyName().toLatin1()).toInt(); - if (value) flags=flags | valueByName(displayName()); - else if (flags&valueByName(displayName())) flags=flags ^ valueByName(displayName()); + if (value) flags = flags | valueByName(propertyName()); + else if (flags & valueByName(propertyName())) flags = flags ^ valueByName(propertyName()); setValueToObject(parent()->propertyName(),flags); parent()->setPropertyValue(flags); } diff --git a/limereport/objectinspector/propertyItems/lrflagspropitem.h b/limereport/objectinspector/propertyItems/lrflagspropitem.h index 7213d4d..1005a8b 100644 --- a/limereport/objectinspector/propertyItems/lrflagspropitem.h +++ b/limereport/objectinspector/propertyItems/lrflagspropitem.h @@ -46,6 +46,8 @@ public: virtual void setPropertyValue(QVariant propertyValue); private slots: void slotEnumChanged(QString); +private: + void translateFlagsItem(); private: QSet m_acceptableValues; QString nameByType(int propertyValue) const; diff --git a/translations/limereport_fr.ts b/translations/limereport_fr.ts index 7a7bf3d..f893b30 100644 --- a/translations/limereport_fr.ts +++ b/translations/limereport_fr.ts @@ -725,6 +725,272 @@ p, li { white-space: pre-wrap; } Variables externe + + LimeReport::EnumPropItem + + + Default + + + + + Portrait + + + + + Landscape + + + + + NoneAutoWidth + + + + + MaxWordLength + + + + + MaxStringLength + + + + + TransparentMode + + + + + OpaqueMode + + + + + Angle0 + + + + + Angle90 + + + + + Angle180 + + + + + Angle270 + + + + + Angle45 + + + + + Angle315 + + + + + DateTime + + + + + Double + + + + + NoBrush + + + + + SolidPattern + + + + + Dense1Pattern + + + + + Dense2Pattern + + + + + Dense3Pattern + + + + + Dense4Pattern + + + + + Dense5Pattern + + + + + Dense6Pattern + + + + + Dense7Pattern + + + + + HorPattern + + + + + VerPattern + + + + + CrossPattern + + + + + BDiagPattern + + + + + FDiagPattern + + + + + LeftToRight + + + + + RightToLeft + + + + + LayoutDirectionAuto + + + + + LeftItemAlign + + + + + RightItemAlign + + + + + CenterItemAlign + + + + + ParentWidthItemAlign + + + + + DesignedItemAlign + + + + + HorizontalLine + + + + + VerticalLine + + + + + Ellipse + + + + + Rectangle + + + + + Page + + + + + Band + + + + + Horizontal + + + + + Vertical + + + + + VerticalUniform + + + + + LimeReport::FlagsPropItem + + + NoLine + + + + + TopLine + Ligne supérieur + + + + BottomLine + Ligne inférieur + + + + LeftLine + Ligne gauche + + + + RightLine + Ligne droite + + LimeReport::FontEditorWidget @@ -828,6 +1094,19 @@ p, li { white-space: pre-wrap; } Image + + LimeReport::ItemLocationPropItem + + + Band + + + + + Page + + + LimeReport::ItemsAlignmentEditorWidget diff --git a/translations/limereport_ru.ts b/translations/limereport_ru.ts index 305a698..3c64e9f 100644 --- a/translations/limereport_ru.ts +++ b/translations/limereport_ru.ts @@ -260,7 +260,7 @@ p, li { white-space: pre-wrap; } <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'monospace'; font-style:italic;">signature of Ty Coon</span><span style=" font-family:'monospace';">, 1 April 1990</span></p> <p style=" margin-top:0px; margin-bottom:15px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'monospace';">Ty Coon, President of Vice</span></p> <p style=" margin-top:19px; margin-bottom:19px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'sans-serif';">That's all there is to it!</span></p></body></html> - + @@ -730,6 +730,220 @@ p, li { white-space: pre-wrap; } Редактор действий + + LimeReport::EnumPropItem + + Default + По умолчанию + + + Portrait + Портретная + + + Landscape + Альбомная + + + NoneAutoWidth + Нет + + + MaxWordLength + По ширине слова + + + MaxStringLength + По ширине строки + + + TransparentMode + Прозрачный + + + OpaqueMode + Заливка + + + Angle0 + 0 + + + Angle90 + 90 + + + Angle180 + 180 + + + Angle270 + 270 + + + Angle45 + 45 + + + Angle315 + 315 + + + DateTime + Дата и время + + + Double + Число + + + NoBrush + Нет заливки + + + SolidPattern + Сплошная заливка + + + Dense1Pattern + + + + Dense2Pattern + + + + Dense3Pattern + + + + Dense4Pattern + + + + Dense5Pattern + + + + Dense6Pattern + + + + Dense7Pattern + + + + HorPattern + + + + VerPattern + + + + CrossPattern + + + + BDiagPattern + + + + FDiagPattern + + + + LeftToRight + С лева на право + + + RightToLeft + С права на лево + + + LayoutDirectionAuto + Авто + + + LeftItemAlign + С лева + + + RightItemAlign + С права + + + CenterItemAlign + По центру + + + ParentWidthItemAlign + По ширине родителя + + + DesignedItemAlign + Заданный положение + + + HorizontalLine + Горизонтальная линия + + + VerticalLine + Вертикальная линия + + + Ellipse + Элипс + + + Rectangle + Прямоугольник + + + Page + Страница + + + Band + Раздел + + + Horizontal + Горизонтально + + + Vertical + Вертикально + + + VerticalUniform + Вертикально равномерно + + + + LimeReport::FlagsPropItem + + NoLine + Нет границ + + + TopLine + Верхняя граница + + + BottomLine + Нижняя граница + + + LeftLine + Левая граница + + + RightLine + Правая граница + + LimeReport::FontEditorWidget @@ -816,6 +1030,17 @@ p, li { white-space: pre-wrap; } Изображение + + LimeReport::ItemLocationPropItem + + Band + Раздел + + + Page + Страница + + LimeReport::ItemsAlignmentEditorWidget @@ -1421,7 +1646,7 @@ p, li { white-space: pre-wrap; } securityLevel - Уровень безопасности + Уровень безопасности testValue @@ -1429,11 +1654,11 @@ p, li { white-space: pre-wrap; } whitespace - Отступ + Отступ cornerRadius - Радиус закругления + Радиус закругления shapeColor