Merge branch 'master' of github.com:OpenEducationFoundation/OpenBoard

preferencesAboutTextFull
Ilia Ryabokon 11 years ago
commit eb883d1a74
  1. 2
      OpenBoard.iss
  2. 2
      OpenBoard.pro
  3. 2
      release.win7.vc9.bat
  4. 2
      resources/forms/preferences.ui
  5. 2
      src/board/UBBoardController.cpp
  6. 16
      src/board/UBBoardView.cpp
  7. 3
      src/document/UBDocumentController.cpp
  8. 8
      src/gui/UBMainWindow.cpp
  9. 2
      src/tools/UBGraphicsCurtainItem.cpp
  10. 6
      src/tools/UBGraphicsCurtainItemDelegate.cpp
  11. 17
      src/tools/UBGraphicsRuler.cpp
  12. 2
      src/tools/UBGraphicsRuler.h
  13. 15
      src/tools/UBGraphicsTriangle.cpp
  14. 1
      src/tools/UBGraphicsTriangle.h

@ -92,7 +92,7 @@ Source: "c:\OpenSankore\plugins\playlistformats\qtmultimediakit_m3u.dll"; DestDi
Source: "c:\OpenSankore\plugins\playlistformats\qtmultimediakit_m3ud.dll"; DestDir: "c:\OpenBoard\plugins\playlistformats"; Flags: ignoreversion Source: "c:\OpenSankore\plugins\playlistformats\qtmultimediakit_m3ud.dll"; DestDir: "c:\OpenBoard\plugins\playlistformats"; Flags: ignoreversion
;OpenBoardImporter ;OpenBoardImporter
Source: "..\OpenSankoreToOpenBoard\release\OpenBoardImporter.exe"; DestDir: "c:\OpenBoard\Importer"; Flags: ignoreversion Source: "..\OpenBoard-Importer\release\OpenBoardImporter.exe"; DestDir: "c:\OpenBoard\Importer"; Flags: ignoreversion
Source: "..\Qt-4.8\lib\QtGui4.dll"; DestDir: "c:\OpenBoard\Importer"; Flags: ignoreversion Source: "..\Qt-4.8\lib\QtGui4.dll"; DestDir: "c:\OpenBoard\Importer"; Flags: ignoreversion
Source: "..\Qt-4.8\lib\QtCore4.dll"; DestDir: "c:\OpenBoard\Importer"; Flags: ignoreversion Source: "..\Qt-4.8\lib\QtCore4.dll"; DestDir: "c:\OpenBoard\Importer"; Flags: ignoreversion

@ -11,7 +11,7 @@ CONFIG += debug_and_release \
VERSION_MAJ = 1 VERSION_MAJ = 1
VERSION_MIN = 00 VERSION_MIN = 00
VERSION_TYPE = r # a = alpha, b = beta, r = release, other => error VERSION_TYPE = r # a = alpha, b = beta, r = release, other => error
VERSION_PATCH = 00 VERSION_PATCH = 01
VERSION = "$${VERSION_MAJ}.$${VERSION_MIN}.$${VERSION_TYPE}.$${VERSION_PATCH}" VERSION = "$${VERSION_MAJ}.$${VERSION_MIN}.$${VERSION_TYPE}.$${VERSION_PATCH}"
VERSION = $$replace(VERSION, "\\.r", "") VERSION = $$replace(VERSION, "\\.r", "")

@ -38,7 +38,7 @@ echo %PATH%
REM Third party impoter application REM Third party impoter application
set IMPORTER_NAME=OpenBoardImporter set IMPORTER_NAME=OpenBoardImporter
set IMPORTER_PATH="%cd%\..\OpenSankoreToOpenBoard" set IMPORTER_PATH="%cd%\..\OpenBoard-Importer"
IF NOT EXIST "%IMPORTER_PATH%" GOTO EXIT_WITH_ERROR IF NOT EXIST "%IMPORTER_PATH%" GOTO EXIT_WITH_ERROR
set HOME_DIR="%cd%" set HOME_DIR="%cd%"

@ -2736,7 +2736,7 @@ p, li { white-space: pre-wrap; }
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">OpenBoard is derived from Open-Sankoré. Open-Sankoré is copyright © 2010-2013 Groupement d'Intérêt Public pour l'Education Numérique en Afrique (GIP ENA). All right reserved.</p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">OpenBoard is derived from Open-Sankoré. Open-Sankoré is copyright © 2010-2013 Groupement d'Intérêt Public pour l'Education Numérique en Afrique (GIP ENA). All right reserved.</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">OpenBoard is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 3 of the License, with a specific linking exception for the OpenSSL project's "OpenSSL" library (or with modified versions of it that use the same license as the "OpenSSL" library). You can find the source code of this software at <https://github.com/uniboard></p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">OpenBoard is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 3 of the License, with a specific linking exception for the OpenSSL project's "OpenSSL" library (or with modified versions of it that use the same license as the "OpenSSL" library). You can find the source code of this software at <https://github.com/OpenEducationFoundation></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">OpenBoard is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License below for more details.</p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">OpenBoard is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License below for more details.</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Contact :</p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Contact :</p>

@ -349,6 +349,8 @@ void UBBoardController::setupToolbar()
connectToolbar(); connectToolbar();
initToolbarTexts(); initToolbarTexts();
UBApplication::app()->toolBarDisplayTextChanged(QVariant(settings->appToolBarDisplayText->get().toBool()));
} }

@ -1067,20 +1067,20 @@ void UBBoardView::mousePressEvent (QMouseEvent *event)
default: default:
if(UBDrawingController::drawingController()->mActiveRuler==NULL) { if(UBDrawingController::drawingController()->mActiveRuler==NULL) {
viewport()->setCursor (QCursor (Qt::BlankCursor)); viewport()->setCursor (QCursor (Qt::BlankCursor));
}
if (scene () && !mTabletStylusIsPressed) { if (scene () && !mTabletStylusIsPressed) {
if (currentTool == UBStylusTool::Eraser) { if (currentTool == UBStylusTool::Eraser) {
connect(&mLongPressTimer, SIGNAL(timeout()), this, SLOT(longPressEvent())); connect(&mLongPressTimer, SIGNAL(timeout()), this, SLOT(longPressEvent()));
mLongPressTimer.start(); mLongPressTimer.start();
}
scene()->inputDevicePress(mapToScene(UBGeometryUtils::pointConstrainedInRect(event->pos(), rect())));
} }
event->accept (); scene()->inputDevicePress(mapToScene(UBGeometryUtils::pointConstrainedInRect(event->pos(), rect())));
} }
event->accept ();
} }
} }
} }
void UBBoardView::mouseMoveEvent (QMouseEvent *event) void UBBoardView::mouseMoveEvent (QMouseEvent *event)
{ {
// static QTime lastCallTime; // static QTime lastCallTime;

@ -970,7 +970,7 @@ void UBDocumentController::importFile()
QString groupName = group->groupName(); QString groupName = group->groupName();
if (groupName == mDefaultDocumentGroupName || fileInfo.suffix() != "ubz") if (groupName == mDefaultDocumentGroupName || fileInfo.suffix() == "ubz")
groupName = ""; groupName = "";
showMessage(tr("Importing file %1...").arg(fileInfo.baseName()), true); showMessage(tr("Importing file %1...").arg(fileInfo.baseName()), true);
@ -1618,6 +1618,7 @@ void UBDocumentController::deletePages(QList<QGraphicsItem *> itemsToDelete)
minIndex = qMin(i, minIndex); minIndex = qMin(i, minIndex);
mDocumentUI->thumbnailWidget->selectItemAt(minIndex); mDocumentUI->thumbnailWidget->selectItemAt(minIndex);
UBApplication::boardController->setActiveDocumentScene(minIndex);
} }
} }
} }

@ -202,14 +202,6 @@ bool UBMainWindow::yesNoQuestion(QString windowTitle, QString text)
#ifdef Q_WS_X11 #ifdef Q_WS_X11
// to avoid to be handled by x11. This allows us to keep to the back all the windows manager stuff like palette, toolbar ... // to avoid to be handled by x11. This allows us to keep to the back all the windows manager stuff like palette, toolbar ...
messageBox.setWindowFlags(Qt::Dialog | Qt::X11BypassWindowManagerHint); messageBox.setWindowFlags(Qt::Dialog | Qt::X11BypassWindowManagerHint);
//To calculate the correct size
messageBox.show();
QSize messageBoxSize=messageBox.size();
//to center on the screen because it's no more handled by X11
QRect controlScreenRect = UBApplication::applicationController->displayManager()->controlGeometry();
messageBox.move((controlScreenRect.width()/2) - (messageBoxSize.width()*0.5), (controlScreenRect.height()/2) - (messageBoxSize.height()*0.5));
#else #else
messageBox.setWindowFlags(Qt::Dialog); messageBox.setWindowFlags(Qt::Dialog);
#endif #endif

@ -124,7 +124,7 @@ void UBGraphicsCurtainItem::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
void UBGraphicsCurtainItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) void UBGraphicsCurtainItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
{ {
QColor color = drawColor(); QColor color = drawColor();
painter->setCompositionMode(QPainter::CompositionMode_SourceOver);
if(widget == UBApplication::boardController->controlView()->viewport()) if(widget == UBApplication::boardController->controlView()->viewport())
{ {
color = UBSettings::paletteColor; color = UBSettings::paletteColor;

@ -94,8 +94,10 @@ QVariant UBGraphicsCurtainItemDelegate::itemChange(QGraphicsItem::GraphicsItemCh
void UBGraphicsCurtainItemDelegate::positionHandles() void UBGraphicsCurtainItemDelegate::positionHandles()
{ {
UBGraphicsItemDelegate::positionHandles(); UBGraphicsItemDelegate::positionHandles();
mZOrderUpButton->hide(); if(mZOrderUpButton)
mZOrderDownButton->hide(); mZOrderUpButton->hide();
if(mZOrderDownButton)
mZOrderDownButton->hide();
} }
void UBGraphicsCurtainItemDelegate::remove(bool checked, bool canUndo) void UBGraphicsCurtainItemDelegate::remove(bool checked, bool canUndo)

@ -447,19 +447,23 @@ UBGraphicsScene* UBGraphicsRuler::scene() const
void UBGraphicsRuler::StartLine(const QPointF& scenePos, qreal width) void UBGraphicsRuler::StartLine(const QPointF& scenePos, qreal width)
{ {
Q_UNUSED(width);
QPointF itemPos = mapFromScene(scenePos); QPointF itemPos = mapFromScene(scenePos);
mStrokeWidth = UBDrawingController::drawingController()->currentToolWidth();
qreal y; qreal y;
if (itemPos.y() > rect().y() + rect().height() / 2) if (itemPos.y() > rect().y() + rect().height() / 2)
{ {
drawLineDirection = 0; drawLineDirection = 0;
y = rect().y() + rect().height() + width / 2; y = rect().y() + rect().height() + mStrokeWidth / 2;
} }
else else
{ {
drawLineDirection = 1; drawLineDirection = 1;
y = rect().y() - width /2; y = rect().y() - mStrokeWidth /2;
} }
if (itemPos.x() < rect().x() + sLeftEdgeMargin) if (itemPos.x() < rect().x() + sLeftEdgeMargin)
@ -471,21 +475,22 @@ void UBGraphicsRuler::StartLine(const QPointF& scenePos, qreal width)
itemPos = mapToScene(itemPos); itemPos = mapToScene(itemPos);
scene()->moveTo(itemPos); scene()->moveTo(itemPos);
scene()->drawLineTo(itemPos, width, true); scene()->drawLineTo(itemPos, mStrokeWidth, true);
} }
void UBGraphicsRuler::DrawLine(const QPointF& scenePos, qreal width) void UBGraphicsRuler::DrawLine(const QPointF& scenePos, qreal width)
{ {
Q_UNUSED(width);
QPointF itemPos = mapFromScene(scenePos); QPointF itemPos = mapFromScene(scenePos);
qreal y; qreal y;
if (drawLineDirection == 0) if (drawLineDirection == 0)
{ {
y = rect().y() + rect().height() + width / 2; y = rect().y() + rect().height() + mStrokeWidth / 2;
} }
else else
{ {
y = rect().y() - width /2; y = rect().y() - mStrokeWidth /2;
} }
if (itemPos.x() < rect().x() + sLeftEdgeMargin) if (itemPos.x() < rect().x() + sLeftEdgeMargin)
itemPos.setX(rect().x() + sLeftEdgeMargin); itemPos.setX(rect().x() + sLeftEdgeMargin);
@ -496,7 +501,7 @@ void UBGraphicsRuler::DrawLine(const QPointF& scenePos, qreal width)
itemPos = mapToScene(itemPos); itemPos = mapToScene(itemPos);
// We have to use "pointed" line for marker tool // We have to use "pointed" line for marker tool
scene()->drawLineTo(itemPos, width, UBDrawingController::drawingController()->stylusTool() != UBStylusTool::Marker); scene()->drawLineTo(itemPos, mStrokeWidth, UBDrawingController::drawingController()->stylusTool() != UBStylusTool::Marker);
} }
void UBGraphicsRuler::EndLine() void UBGraphicsRuler::EndLine()

@ -105,6 +105,8 @@ class UBGraphicsRuler : public UBAbstractDrawRuler, public QGraphicsRectItem, pu
static const int sMinLength = 150; // 3sm static const int sMinLength = 150; // 3sm
static const int sMaxLength = 35000; // 700sm static const int sMaxLength = 35000; // 700sm
qreal mStrokeWidth;
}; };
#endif /* UBGRAPHICSRULER_H_ */ #endif /* UBGRAPHICSRULER_H_ */

@ -854,14 +854,16 @@ void UBGraphicsTriangle::hoverMoveEvent(QGraphicsSceneHoverEvent *event)
} }
void UBGraphicsTriangle::StartLine(const QPointF &scenePos, qreal width) void UBGraphicsTriangle::StartLine(const QPointF &scenePos, qreal width)
{ {
Q_UNUSED(width);
QPointF itemPos = mapFromScene(scenePos); QPointF itemPos = mapFromScene(scenePos);
mStrokeWidth = UBDrawingController::drawingController()->currentToolWidth();
qreal y; qreal y;
if (mOrientation == 0 || mOrientation == 1) { if (mOrientation == 0 || mOrientation == 1) {
y = rect().y() + rect().height() + width / 2; y = rect().y() + rect().height() + mStrokeWidth / 2;
} else if (mOrientation == 2 || mOrientation == 3) { } else if (mOrientation == 2 || mOrientation == 3) {
y = rect().y() - width / 2; y = rect().y() - mStrokeWidth / 2;
} }
if (itemPos.x() < rect().x() + sLeftEdgeMargin) if (itemPos.x() < rect().x() + sLeftEdgeMargin)
@ -873,19 +875,20 @@ void UBGraphicsTriangle::StartLine(const QPointF &scenePos, qreal width)
itemPos = mapToScene(itemPos); itemPos = mapToScene(itemPos);
scene()->moveTo(itemPos); scene()->moveTo(itemPos);
scene()->drawLineTo(itemPos, width, true); scene()->drawLineTo(itemPos, mStrokeWidth, true);
} }
void UBGraphicsTriangle::DrawLine(const QPointF &scenePos, qreal width) void UBGraphicsTriangle::DrawLine(const QPointF &scenePos, qreal width)
{ {
Q_UNUSED(width);
QPointF itemPos = mapFromScene(scenePos); QPointF itemPos = mapFromScene(scenePos);
qreal y; qreal y;
if (mOrientation == 0 || mOrientation == 1) { if (mOrientation == 0 || mOrientation == 1) {
y = rect().y() + rect().height() + width / 2; y = rect().y() + rect().height() + mStrokeWidth / 2;
} else if (mOrientation == 2 || mOrientation == 3) { } else if (mOrientation == 2 || mOrientation == 3) {
y = rect().y() - width / 2; y = rect().y() - mStrokeWidth / 2;
} }
if (itemPos.x() < rect().x() + sLeftEdgeMargin) if (itemPos.x() < rect().x() + sLeftEdgeMargin)
@ -897,7 +900,7 @@ void UBGraphicsTriangle::DrawLine(const QPointF &scenePos, qreal width)
itemPos = mapToScene(itemPos); itemPos = mapToScene(itemPos);
// We have to use "pointed" line for marker tool // We have to use "pointed" line for marker tool
scene()->drawLineTo(itemPos, width, scene()->drawLineTo(itemPos, mStrokeWidth,
UBDrawingController::drawingController()->stylusTool() != UBStylusTool::Marker); UBDrawingController::drawingController()->stylusTool() != UBStylusTool::Marker);
} }

@ -168,6 +168,7 @@ class UBGraphicsTriangle : public UBAbstractDrawRuler, public QGraphicsPolygonIt
static const int sArrowLength = 30; static const int sArrowLength = 30;
static const int sMinWidth = 380; static const int sMinWidth = 380;
static const int sMinHeight = 200; static const int sMinHeight = 200;
qreal mStrokeWidth;
}; };
#endif /* UBGRAPHICSTRIANGLE_H_ */ #endif /* UBGRAPHICSTRIANGLE_H_ */

Loading…
Cancel
Save