Merge branch 'master' of github.com:Sankore/Sankore-3.1

preferencesAboutTextFull
Ivan Ilin 13 years ago
commit 93e08950bc
  1. 68
      resources/i18n/sankore_es.ts
  2. 25
      src/adaptors/UBSvgSubsetAdaptor.cpp
  3. 6
      src/board/UBBoardController.cpp
  4. 52
      src/domain/UBGraphicsScene.cpp

@ -769,35 +769,35 @@
</message>
<message utf8="true">
<source>Open-Sankoré</source>
<translation type="unfinished"></translation>
<translation>Open-Sankoré</translation>
</message>
<message utf8="true">
<source>Quit Open-Sankoré</source>
<translation type="unfinished"></translation>
<translation>Salir de Open-Sankoré</translation>
</message>
<message utf8="true">
<source>Open-Sankoré Editor</source>
<translation type="unfinished"></translation>
<translation>Editor Open-Sankoré</translation>
</message>
<message utf8="true">
<source>Show Open-Sankoré Widgets Editor</source>
<translation type="unfinished"></translation>
<translation>Editor de widget Open-Sankoré</translation>
</message>
<message utf8="true">
<source>Hide Open-Sankoré</source>
<translation type="unfinished"></translation>
<translation>Ocultar Open-Sankoré</translation>
</message>
<message utf8="true">
<source>Hide Open-Sankoré Application</source>
<translation type="unfinished"></translation>
<translation>Ocultar aplicación Open-Sankoré</translation>
</message>
<message>
<source>Import Uniboard Documents</source>
<translation type="unfinished"></translation>
<translation>Importar documentos Uniboard</translation>
</message>
<message>
<source>Import old Sankore or Uniboard documents</source>
<translation type="unfinished"></translation>
<translation>Importar viejos documentos de Sankore o Uniboard</translation>
</message>
</context>
<context>
@ -855,7 +855,7 @@
<name>QuaZipFile</name>
<message>
<source>ZIP/UNZIP API error %1</source>
<translation type="unfinished"></translation>
<translation>Error en API ZIP/UNZIP %1</translation>
</message>
</context>
<context>
@ -1210,11 +1210,11 @@
<name>UBDownloadWidget</name>
<message>
<source>Downloading files</source>
<translation type="unfinished"></translation>
<translation>Descargando archivos</translation>
</message>
<message>
<source>Cancel</source>
<translation type="unfinished">Cancelar</translation>
<translation>Cancelar</translation>
</message>
</context>
<context>
@ -1343,7 +1343,7 @@
</message>
<message>
<source>Editable</source>
<translation type="unfinished"></translation>
<translation>Editable</translation>
</message>
</context>
<context>
@ -1780,7 +1780,7 @@ Do you want to ignore these errors for this host?</source>
<name>UBTeacherBarWidget</name>
<message>
<source>Title</source>
<translation type="unfinished">Título</translation>
<translation>Título</translation>
</message>
<message>
<source>Phasis</source>
@ -1788,15 +1788,15 @@ Do you want to ignore these errors for this host?</source>
</message>
<message>
<source>Duration</source>
<translation type="unfinished"></translation>
<translation>Duración</translation>
</message>
<message>
<source>Equipment</source>
<translation type="unfinished"></translation>
<translation>Equipamiento</translation>
</message>
<message>
<source>Activity</source>
<translation type="unfinished"></translation>
<translation>Actividad</translation>
</message>
<message>
<source></source>
@ -1804,62 +1804,62 @@ Do you want to ignore these errors for this host?</source>
</message>
<message>
<source>I discover</source>
<translation type="unfinished"></translation>
<translation>Yo descubro</translation>
</message>
<message>
<source>I experiment</source>
<translation type="unfinished"></translation>
<translation>Yo experimento</translation>
</message>
<message>
<source>I train myself</source>
<translation type="unfinished"></translation>
<translation>Yo aprendo sólo</translation>
</message>
<message>
<source>I play</source>
<translation type="unfinished"></translation>
<translation>Yo juego</translation>
</message>
<message>
<source>I memorize</source>
<translation type="unfinished"></translation>
<translation>Yo memorizo</translation>
</message>
<message>
<source>Short</source>
<translation type="unfinished"></translation>
<translation>Corto</translation>
</message>
<message>
<source>Middle</source>
<translation type="unfinished"></translation>
<translation>Medio</translation>
</message>
<message>
<source>Long</source>
<translation type="unfinished"></translation>
<translation>Largo</translation>
</message>
<message>
<source>Alone</source>
<translation type="unfinished"></translation>
<translation>Sólo</translation>
</message>
<message>
<source>By Group</source>
<translation type="unfinished"></translation>
<translation>En grupo</translation>
</message>
<message>
<source>All together</source>
<translation type="unfinished"></translation>
<translation>Todos juntos</translation>
</message>
</context>
<context>
<name>UBTeacherStudentAction</name>
<message>
<source>Action %0</source>
<translation type="unfinished"></translation>
<translation>Acción %0</translation>
</message>
<message>
<source>Teacher</source>
<translation type="unfinished"></translation>
<translation>Profesor</translation>
</message>
<message>
<source>Student</source>
<translation type="unfinished"></translation>
<translation>Alumno</translation>
</message>
</context>
<context>
@ -1965,7 +1965,7 @@ Por favor reinicie la aplicación para acceder a los documentos actualizados.</t
</message>
<message>
<source>Remind me later</source>
<translation type="unfinished"></translation>
<translation>Recordarme más tarde</translation>
</message>
</context>
<context>
@ -2085,11 +2085,11 @@ Por favor reinicie la aplicación para acceder a los documentos actualizados.</t
<name>UniboardSankoreTransition</name>
<message>
<source>Import old Uniboard/Sankore documents</source>
<translation type="unfinished"></translation>
<translation>Importar documentos antiguos de Uniboard/Sankore</translation>
</message>
<message>
<source>There are no documents that should be imported</source>
<translation type="unfinished"></translation>
<translation>No hay documentos a importar</translation>
</message>
</context>
<context>
@ -2603,7 +2603,7 @@ p, li { white-space: pre-wrap; }
</message>
<message utf8="true">
<source>Open-Sankoré</source>
<translation type="unfinished"></translation>
<translation>Open-Sankoré</translation>
</message>
<message utf8="true">
<source>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;

@ -2423,8 +2423,23 @@ void UBSvgSubsetAdaptor::UBSvgSubsetWriter::curtainItemToSvg(UBGraphicsCurtainIt
*/
mXmlWriter.writeStartElement(UBSettings::uniboardDocumentNamespaceUri, "curtain");
mXmlWriter.writeAttribute("x", QString("%1").arg(curtainItem->boundingRect().center().x()));
mXmlWriter.writeAttribute("y", QString("%1").arg(curtainItem->boundingRect().center().y()));
mXmlWriter.writeAttribute("width", QString("%1").arg(curtainItem->boundingRect().width()));
mXmlWriter.writeAttribute("height", QString("%1").arg(curtainItem->boundingRect().height()));
mXmlWriter.writeAttribute("transform", toSvgTransform(curtainItem->sceneMatrix()));
graphicsItemToSvg(curtainItem);
//graphicsItemToSvg(curtainItem);
QString zs;
zs.setNum(curtainItem->zValue(), 'f'); // 'f' keeps precision
mXmlWriter.writeAttribute(UBSettings::uniboardDocumentNamespaceUri, "z-value", zs);
UBItem* ubItem = dynamic_cast<UBItem*>(curtainItem);
if (ubItem)
{
mXmlWriter.writeAttribute(UBSettings::uniboardDocumentNamespaceUri, "uuid", UBStringUtils::toCanonicalUuid(ubItem->uuid()));
}
mXmlWriter.writeEndElement();
}
@ -2436,13 +2451,17 @@ UBGraphicsCurtainItem* UBSvgSubsetAdaptor::UBSvgSubsetReader::curtainItemFromSvg
graphicsItemFromSvg(curtainItem);
QStringRef svgX = mXmlReader.attributes().value("x");
QStringRef svgY = mXmlReader.attributes().value("y");
QStringRef svgWidth = mXmlReader.attributes().value("width");
QStringRef svgHeight = mXmlReader.attributes().value("height");
QRectF rect = curtainItem->rect();
QRect rect;
rect.setX(svgX.toString().toFloat()-svgWidth.toString().toFloat()/2);
rect.setY(svgY.toString().toFloat()-svgHeight.toString().toFloat()/2);
rect.setWidth(svgWidth.toString().toFloat());
rect.setHeight(svgHeight.toString().toFloat());
rect.translate(- rect.center());
curtainItem->setRect(rect);

@ -1517,6 +1517,10 @@ void UBBoardController::updateSystemScaleFactor()
if (mActiveScene)
{
QSize pageNominalSize = mActiveScene->nominalSize();
//we're going to keep scale factor untouched if the size is custom
QMap<DocumentSizeRatio::Enum, QSize> sizesMap = UBSettings::settings()->documentSizes;
if(pageNominalSize == sizesMap.value(DocumentSizeRatio::Ratio16_9) || pageNominalSize == sizesMap.value(DocumentSizeRatio::Ratio4_3))
{
QSize controlSize = controlViewport();
qreal hFactor = ((qreal)controlSize.width()) / ((qreal)pageNominalSize.width());
@ -1524,6 +1528,7 @@ void UBBoardController::updateSystemScaleFactor()
newScaleFactor = qMin(hFactor, vFactor);
}
}
if (mSystemScaleFactor != newScaleFactor)
{
@ -1541,7 +1546,6 @@ void UBBoardController::updateSystemScaleFactor()
mControlView->setTransform(scalingTransform);
mControlView->horizontalScrollBar()->setValue(viewState.horizontalPosition);
mControlView->verticalScrollBar()->setValue(viewState.verticalPostition);
}

@ -1765,23 +1765,14 @@ void UBGraphicsScene::addMask(const QPointF &center)
{
UBGraphicsCurtainItem* curtain = new UBGraphicsCurtainItem(); // mem : owned and destroyed by the scene
mTools << curtain;
QGraphicsView* view;
if(UBApplication::applicationController->displayManager()->hasDisplay())
view = (QGraphicsView*)UBApplication::boardController->displayView();
else
view = (QGraphicsView*)UBApplication::boardController->controlView();
// curtain->setZValue(toolLayerStart + toolOffsetCurtain);
UBGraphicsItem::assignZValue(curtain, toolLayerStart + toolOffsetCurtain);
addItem(curtain);
QRectF rect = UBApplication::boardController->activeScene()->normalizedSceneRect();
rect.setSize(QSizeF(rect.width()/2, rect.height()/2));
rect.setRect(center.x() - rect.width()/4, center.y() - rect.height()/4, rect.width()/2 , rect.height()/2);
QPointF origin = center.isNull() ? rect.bottomRight() : center;
curtain->setRect(rect.translated(origin - rect.topLeft() / 2));
addItem(curtain);
curtain->setRect(rect);
UBGraphicsItem::assignZValue(curtain, toolLayerStart + toolOffsetCurtain);
curtain->setVisible(true);
curtain->setSelected(true);
@ -1948,10 +1939,41 @@ void UBGraphicsScene::keyReleaseEvent(QKeyEvent * keyEvent)
{
foreach(QGraphicsItem* item, si)
{
UBGraphicsItem *ubgi = dynamic_cast<UBGraphicsItem*>(item);
if (ubgi)
switch (item->type())
{
case UBGraphicsW3CWidgetItem::Type:
{
UBGraphicsW3CWidgetItem *wc3_widget = dynamic_cast<UBGraphicsW3CWidgetItem*>(item);
if (0 != wc3_widget)
if (!wc3_widget->hasFocus())
wc3_widget->remove();
break;
}
case UBGraphicsAppleWidgetItem::Type:
{
UBGraphicsAppleWidgetItem *Apple_widget = dynamic_cast<UBGraphicsAppleWidgetItem*>(item);
if (0 !=Apple_widget)
if (!Apple_widget->hasFocus())
Apple_widget->remove();
break;
}
case UBGraphicsTextItem::Type:
{
UBGraphicsTextItem *text_item = dynamic_cast<UBGraphicsTextItem*>(item);
if (0 != text_item)
if (!text_item->hasFocus())
text_item->remove();
break;
}
default:
{
UBGraphicsItem *ubgi = dynamic_cast<UBGraphicsItem*>(item);
if (0 != ubgi)
ubgi->remove();
else
UBCoreGraphicsScene::removeItem(item);
}
}
}
}

Loading…
Cancel
Save