From 5e5dc826a4f796a8fdcd6daec176413ab14d873d Mon Sep 17 00:00:00 2001 From: Claudio Valerio Date: Fri, 30 Aug 2013 09:53:36 +0200 Subject: [PATCH 01/13] updated version --- OpenBoard.pro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenBoard.pro b/OpenBoard.pro index 53d63d2b..e4264b64 100644 --- a/OpenBoard.pro +++ b/OpenBoard.pro @@ -11,7 +11,7 @@ CONFIG += debug_and_release \ VERSION_MAJ = 1 VERSION_MIN = 00 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 = $$replace(VERSION, "\\.r", "") From 22f69ee10a27007097e8ab329e86e0407b75e0b3 Mon Sep 17 00:00:00 2001 From: Claudio Valerio Date: Fri, 30 Aug 2013 09:54:09 +0200 Subject: [PATCH 02/13] fixed issue 93 --- src/document/UBDocumentController.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/document/UBDocumentController.cpp b/src/document/UBDocumentController.cpp index f7243ae3..8367cff3 100644 --- a/src/document/UBDocumentController.cpp +++ b/src/document/UBDocumentController.cpp @@ -1618,6 +1618,7 @@ void UBDocumentController::deletePages(QList itemsToDelete) minIndex = qMin(i, minIndex); mDocumentUI->thumbnailWidget->selectItemAt(minIndex); + UBApplication::boardController->setActiveDocumentScene(minIndex); } } } From f4dd64d288d00a19f35c205b92d84e1ebc5325c4 Mon Sep 17 00:00:00 2001 From: Claudio Valerio Date: Fri, 30 Aug 2013 10:32:58 +0200 Subject: [PATCH 03/13] fixed issue 92 --- src/board/UBBoardController.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/board/UBBoardController.cpp b/src/board/UBBoardController.cpp index d2d301d4..6c3facf3 100644 --- a/src/board/UBBoardController.cpp +++ b/src/board/UBBoardController.cpp @@ -349,6 +349,8 @@ void UBBoardController::setupToolbar() connectToolbar(); initToolbarTexts(); + + UBApplication::app()->toolBarDisplayTextChanged(QVariant(settings->appToolBarDisplayText->get().toBool())); } From a4b01dd416fab0218c57f7614ff8d4fe85d2145b Mon Sep 17 00:00:00 2001 From: Claudio Valerio Date: Fri, 30 Aug 2013 11:45:17 +0200 Subject: [PATCH 04/13] fixed issue 94 --- src/tools/UBGraphicsCurtainItemDelegate.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/tools/UBGraphicsCurtainItemDelegate.cpp b/src/tools/UBGraphicsCurtainItemDelegate.cpp index 23796aba..5525e69e 100644 --- a/src/tools/UBGraphicsCurtainItemDelegate.cpp +++ b/src/tools/UBGraphicsCurtainItemDelegate.cpp @@ -94,8 +94,10 @@ QVariant UBGraphicsCurtainItemDelegate::itemChange(QGraphicsItem::GraphicsItemCh void UBGraphicsCurtainItemDelegate::positionHandles() { UBGraphicsItemDelegate::positionHandles(); - mZOrderUpButton->hide(); - mZOrderDownButton->hide(); + if(mZOrderUpButton) + mZOrderUpButton->hide(); + if(mZOrderDownButton) + mZOrderDownButton->hide(); } void UBGraphicsCurtainItemDelegate::remove(bool checked, bool canUndo) From 2bc3ecd4285aab4df13aa95755646276d6388d15 Mon Sep 17 00:00:00 2001 From: Claudio Valerio Date: Fri, 30 Aug 2013 11:51:53 +0200 Subject: [PATCH 05/13] update git url --- resources/forms/preferences.ui | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/forms/preferences.ui b/resources/forms/preferences.ui index fb71b20b..32288c36 100644 --- a/resources/forms/preferences.ui +++ b/resources/forms/preferences.ui @@ -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=" 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=" 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 &quot;OpenSSL&quot; library (or with modified versions of it that use the same license as the &quot;OpenSSL&quot; library). You can find the source code of this software at &lt;https://github.com/uniboard&gt;</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 &quot;OpenSSL&quot; library (or with modified versions of it that use the same license as the &quot;OpenSSL&quot; library). You can find the source code of this software at &lt;https://github.com/OpenEducationFoundation&gt;</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=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Contact :</p> From 1c251fae8be973cac1fab8bd30034e3bff6811a1 Mon Sep 17 00:00:00 2001 From: Claudio Valerio Date: Fri, 30 Aug 2013 15:39:20 +0200 Subject: [PATCH 06/13] fix rules --- src/board/UBBoardView.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/board/UBBoardView.cpp b/src/board/UBBoardView.cpp index de0a2dcd..d9903cc7 100644 --- a/src/board/UBBoardView.cpp +++ b/src/board/UBBoardView.cpp @@ -1067,20 +1067,20 @@ void UBBoardView::mousePressEvent (QMouseEvent *event) default: if(UBDrawingController::drawingController()->mActiveRuler==NULL) { viewport()->setCursor (QCursor (Qt::BlankCursor)); - - if (scene () && !mTabletStylusIsPressed) { - if (currentTool == UBStylusTool::Eraser) { - connect(&mLongPressTimer, SIGNAL(timeout()), this, SLOT(longPressEvent())); - mLongPressTimer.start(); - } - scene()->inputDevicePress(mapToScene(UBGeometryUtils::pointConstrainedInRect(event->pos(), rect()))); + } + if (scene () && !mTabletStylusIsPressed) { + if (currentTool == UBStylusTool::Eraser) { + connect(&mLongPressTimer, SIGNAL(timeout()), this, SLOT(longPressEvent())); + mLongPressTimer.start(); } - event->accept (); + scene()->inputDevicePress(mapToScene(UBGeometryUtils::pointConstrainedInRect(event->pos(), rect()))); } + event->accept (); } } } + void UBBoardView::mouseMoveEvent (QMouseEvent *event) { // static QTime lastCallTime; From 1df0122f25e50d2887af3e5dcca1ba7a8afd3711 Mon Sep 17 00:00:00 2001 From: Claudio Valerio Date: Fri, 30 Aug 2013 16:51:47 +0200 Subject: [PATCH 07/13] fixed strokes with pressure on rules and triangle --- src/tools/UBGraphicsRuler.cpp | 13 ++++++++----- src/tools/UBGraphicsRuler.h | 4 +++- src/tools/UBGraphicsTriangle.cpp | 14 ++++++++------ src/tools/UBGraphicsTriangle.h | 1 + 4 files changed, 20 insertions(+), 12 deletions(-) diff --git a/src/tools/UBGraphicsRuler.cpp b/src/tools/UBGraphicsRuler.cpp index 0abc02b5..be2871f7 100644 --- a/src/tools/UBGraphicsRuler.cpp +++ b/src/tools/UBGraphicsRuler.cpp @@ -449,12 +449,14 @@ void UBGraphicsRuler::StartLine(const QPointF& scenePos, qreal width) { QPointF itemPos = mapFromScene(scenePos); + mStrokeWidth = width; + qreal y; if (itemPos.y() > rect().y() + rect().height() / 2) { drawLineDirection = 0; - y = rect().y() + rect().height() + width / 2; + y = rect().y() + rect().height() + mStrokeWidth / 2; } else { @@ -471,21 +473,22 @@ void UBGraphicsRuler::StartLine(const QPointF& scenePos, qreal width) itemPos = mapToScene(itemPos); scene()->moveTo(itemPos); - scene()->drawLineTo(itemPos, width, true); + scene()->drawLineTo(itemPos, mStrokeWidth, true); } void UBGraphicsRuler::DrawLine(const QPointF& scenePos, qreal width) { + Q_UNUSED(width); QPointF itemPos = mapFromScene(scenePos); qreal y; if (drawLineDirection == 0) { - y = rect().y() + rect().height() + width / 2; + y = rect().y() + rect().height() + mStrokeWidth / 2; } else { - y = rect().y() - width /2; + y = rect().y() - mStrokeWidth /2; } if (itemPos.x() < rect().x() + sLeftEdgeMargin) itemPos.setX(rect().x() + sLeftEdgeMargin); @@ -496,7 +499,7 @@ void UBGraphicsRuler::DrawLine(const QPointF& scenePos, qreal width) itemPos = mapToScene(itemPos); // 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() diff --git a/src/tools/UBGraphicsRuler.h b/src/tools/UBGraphicsRuler.h index 61dbe57d..4b37571b 100644 --- a/src/tools/UBGraphicsRuler.h +++ b/src/tools/UBGraphicsRuler.h @@ -60,7 +60,7 @@ class UBGraphicsRuler : public UBAbstractDrawRuler, public QGraphicsRectItem, pu virtual void EndLine(); protected: - + virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *styleOption, QWidget *widget); virtual QVariant itemChange(GraphicsItemChange change, const QVariant &value); @@ -105,6 +105,8 @@ class UBGraphicsRuler : public UBAbstractDrawRuler, public QGraphicsRectItem, pu static const int sMinLength = 150; // 3sm static const int sMaxLength = 35000; // 700sm + + qreal mStrokeWidth; }; #endif /* UBGRAPHICSRULER_H_ */ diff --git a/src/tools/UBGraphicsTriangle.cpp b/src/tools/UBGraphicsTriangle.cpp index d1b5cf1b..821420bd 100644 --- a/src/tools/UBGraphicsTriangle.cpp +++ b/src/tools/UBGraphicsTriangle.cpp @@ -855,13 +855,14 @@ void UBGraphicsTriangle::hoverMoveEvent(QGraphicsSceneHoverEvent *event) void UBGraphicsTriangle::StartLine(const QPointF &scenePos, qreal width) { QPointF itemPos = mapFromScene(scenePos); + mStrokeWidth = width; qreal y; 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) { - y = rect().y() - width / 2; + y = rect().y() - mStrokeWidth / 2; } if (itemPos.x() < rect().x() + sLeftEdgeMargin) @@ -873,19 +874,20 @@ void UBGraphicsTriangle::StartLine(const QPointF &scenePos, qreal width) itemPos = mapToScene(itemPos); scene()->moveTo(itemPos); - scene()->drawLineTo(itemPos, width, true); + scene()->drawLineTo(itemPos, mStrokeWidth, true); } void UBGraphicsTriangle::DrawLine(const QPointF &scenePos, qreal width) { + Q_UNUSED(width); QPointF itemPos = mapFromScene(scenePos); qreal y; 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) { - y = rect().y() - width / 2; + y = rect().y() - mStrokeWidth / 2; } if (itemPos.x() < rect().x() + sLeftEdgeMargin) @@ -897,7 +899,7 @@ void UBGraphicsTriangle::DrawLine(const QPointF &scenePos, qreal width) itemPos = mapToScene(itemPos); // We have to use "pointed" line for marker tool - scene()->drawLineTo(itemPos, width, + scene()->drawLineTo(itemPos, mStrokeWidth, UBDrawingController::drawingController()->stylusTool() != UBStylusTool::Marker); } diff --git a/src/tools/UBGraphicsTriangle.h b/src/tools/UBGraphicsTriangle.h index ca5131ef..44b8e455 100644 --- a/src/tools/UBGraphicsTriangle.h +++ b/src/tools/UBGraphicsTriangle.h @@ -168,6 +168,7 @@ class UBGraphicsTriangle : public UBAbstractDrawRuler, public QGraphicsPolygonIt static const int sArrowLength = 30; static const int sMinWidth = 380; static const int sMinHeight = 200; + qreal mStrokeWidth; }; #endif /* UBGRAPHICSTRIANGLE_H_ */ From 20ca1383a97408cae1ccee8a26ef5316932b2083 Mon Sep 17 00:00:00 2001 From: Claudio Valerio Date: Mon, 2 Sep 2013 08:42:36 +0200 Subject: [PATCH 08/13] fixed issue 96 --- src/gui/UBMainWindow.cpp | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/gui/UBMainWindow.cpp b/src/gui/UBMainWindow.cpp index 680ed93d..93292c26 100644 --- a/src/gui/UBMainWindow.cpp +++ b/src/gui/UBMainWindow.cpp @@ -202,14 +202,6 @@ bool UBMainWindow::yesNoQuestion(QString windowTitle, QString text) #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 ... 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 messageBox.setWindowFlags(Qt::Dialog); #endif From 1b3295188b8a0110385f4085bff61ceaccfae474 Mon Sep 17 00:00:00 2001 From: Claudio Valerio Date: Mon, 2 Sep 2013 14:11:24 +0200 Subject: [PATCH 09/13] storkes realized using the ruler and the triangle doesn't support pressure --- src/tools/UBGraphicsRuler.cpp | 6 ++++-- src/tools/UBGraphicsTriangle.cpp | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/tools/UBGraphicsRuler.cpp b/src/tools/UBGraphicsRuler.cpp index be2871f7..45c50093 100644 --- a/src/tools/UBGraphicsRuler.cpp +++ b/src/tools/UBGraphicsRuler.cpp @@ -447,9 +447,11 @@ UBGraphicsScene* UBGraphicsRuler::scene() const void UBGraphicsRuler::StartLine(const QPointF& scenePos, qreal width) { + Q_UNUSED(width); + QPointF itemPos = mapFromScene(scenePos); - mStrokeWidth = width; + mStrokeWidth = UBDrawingController::drawingController()->currentToolWidth(); qreal y; @@ -461,7 +463,7 @@ void UBGraphicsRuler::StartLine(const QPointF& scenePos, qreal width) else { drawLineDirection = 1; - y = rect().y() - width /2; + y = rect().y() - mStrokeWidth /2; } if (itemPos.x() < rect().x() + sLeftEdgeMargin) diff --git a/src/tools/UBGraphicsTriangle.cpp b/src/tools/UBGraphicsTriangle.cpp index 821420bd..32fd17d1 100644 --- a/src/tools/UBGraphicsTriangle.cpp +++ b/src/tools/UBGraphicsTriangle.cpp @@ -854,8 +854,9 @@ void UBGraphicsTriangle::hoverMoveEvent(QGraphicsSceneHoverEvent *event) } void UBGraphicsTriangle::StartLine(const QPointF &scenePos, qreal width) { + Q_UNUSED(width); QPointF itemPos = mapFromScene(scenePos); - mStrokeWidth = width; + mStrokeWidth = UBDrawingController::drawingController()->currentToolWidth(); qreal y; From 552de9966bf214244d3d22bc67f4edaf824b10ed Mon Sep 17 00:00:00 2001 From: Claudio Valerio Date: Mon, 2 Sep 2013 16:35:51 +0200 Subject: [PATCH 10/13] fixed issue 95 --- src/document/UBDocumentController.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/document/UBDocumentController.cpp b/src/document/UBDocumentController.cpp index 8367cff3..59473f6a 100644 --- a/src/document/UBDocumentController.cpp +++ b/src/document/UBDocumentController.cpp @@ -970,7 +970,7 @@ void UBDocumentController::importFile() QString groupName = group->groupName(); - if (groupName == mDefaultDocumentGroupName || fileInfo.suffix() != "ubz") + if (groupName == mDefaultDocumentGroupName || fileInfo.suffix() == "ubz") groupName = ""; showMessage(tr("Importing file %1...").arg(fileInfo.baseName()), true); From 1f5c8ddb20fc349e86bb2c02afbd6bb08a69b8ea Mon Sep 17 00:00:00 2001 From: Claudio Valerio Date: Mon, 9 Sep 2013 09:53:33 +0200 Subject: [PATCH 11/13] fixed windows path --- release.win7.vc9.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release.win7.vc9.bat b/release.win7.vc9.bat index cfa52588..8a308438 100644 --- a/release.win7.vc9.bat +++ b/release.win7.vc9.bat @@ -38,7 +38,7 @@ echo %PATH% REM Third party impoter application set IMPORTER_NAME=OpenBoardImporter -set IMPORTER_PATH="%cd%\..\OpenSankoreToOpenBoard" +set IMPORTER_PATH="%cd%\..\OpenBoard-Importer" IF NOT EXIST "%IMPORTER_PATH%" GOTO EXIT_WITH_ERROR set HOME_DIR="%cd%" From 67e4b321099cff9d1d6dd39910e85ef5f71ad405 Mon Sep 17 00:00:00 2001 From: Claudio Valerio Date: Mon, 9 Sep 2013 18:30:53 +0200 Subject: [PATCH 12/13] fixed trasparency problem --- src/tools/UBGraphicsCurtainItem.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/UBGraphicsCurtainItem.cpp b/src/tools/UBGraphicsCurtainItem.cpp index 0e35f0e3..93389975 100644 --- a/src/tools/UBGraphicsCurtainItem.cpp +++ b/src/tools/UBGraphicsCurtainItem.cpp @@ -124,7 +124,7 @@ void UBGraphicsCurtainItem::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) void UBGraphicsCurtainItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) { QColor color = drawColor(); - + painter->setCompositionMode(QPainter::CompositionMode_SourceOver); if(widget == UBApplication::boardController->controlView()->viewport()) { color = UBSettings::paletteColor; From 2379101adb01db35d9dcb5ceed37278871751546 Mon Sep 17 00:00:00 2001 From: Claudio Valerio Date: Tue, 10 Sep 2013 12:58:00 +0200 Subject: [PATCH 13/13] fixed path for importer --- OpenBoard.iss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenBoard.iss b/OpenBoard.iss index e023cf97..d8756ae9 100644 --- a/OpenBoard.iss +++ b/OpenBoard.iss @@ -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 ;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\QtCore4.dll"; DestDir: "c:\OpenBoard\Importer"; Flags: ignoreversion