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 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", "") 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%" 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> 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())); } 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; diff --git a/src/document/UBDocumentController.cpp b/src/document/UBDocumentController.cpp index f7243ae3..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); @@ -1618,6 +1618,7 @@ void UBDocumentController::deletePages(QList itemsToDelete) minIndex = qMin(i, minIndex); mDocumentUI->thumbnailWidget->selectItemAt(minIndex); + UBApplication::boardController->setActiveDocumentScene(minIndex); } } } 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 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; 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) diff --git a/src/tools/UBGraphicsRuler.cpp b/src/tools/UBGraphicsRuler.cpp index 0abc02b5..45c50093 100644 --- a/src/tools/UBGraphicsRuler.cpp +++ b/src/tools/UBGraphicsRuler.cpp @@ -447,19 +447,23 @@ UBGraphicsScene* UBGraphicsRuler::scene() const void UBGraphicsRuler::StartLine(const QPointF& scenePos, qreal width) { + Q_UNUSED(width); + QPointF itemPos = mapFromScene(scenePos); + mStrokeWidth = UBDrawingController::drawingController()->currentToolWidth(); + 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 { drawLineDirection = 1; - y = rect().y() - width /2; + y = rect().y() - mStrokeWidth /2; } if (itemPos.x() < rect().x() + sLeftEdgeMargin) @@ -471,21 +475,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 +501,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..32fd17d1 100644 --- a/src/tools/UBGraphicsTriangle.cpp +++ b/src/tools/UBGraphicsTriangle.cpp @@ -854,14 +854,16 @@ void UBGraphicsTriangle::hoverMoveEvent(QGraphicsSceneHoverEvent *event) } void UBGraphicsTriangle::StartLine(const QPointF &scenePos, qreal width) { + Q_UNUSED(width); QPointF itemPos = mapFromScene(scenePos); + mStrokeWidth = UBDrawingController::drawingController()->currentToolWidth(); 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 +875,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 +900,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_ */