Merge branch 'dev' into 1.4-dev

preferencesAboutTextFull
Craig Watson 8 years ago
commit 12a91e8cf6
  1. 2
      OpenBoard.pro
  2. 2
      release_scripts/windows/OpenBoard.iss
  3. 21
      release_scripts/windows/release.win7.vc9.bat
  4. 1
      src/adaptors/UBSvgSubsetAdaptor.cpp
  5. 4
      src/board/UBBoardController.cpp
  6. 1
      src/board/UBBoardPaletteManager.cpp
  7. 2
      src/board/UBBoardView.cpp
  8. 2
      src/core/UB.h
  9. 9
      src/core/UBApplicationController.cpp
  10. 23
      src/core/UBDisplayManager.cpp
  11. 2
      src/core/UBDisplayManager.h
  12. 4
      src/core/UBSettings.cpp
  13. 4
      src/desktop/UBDesktopAnnotationController.cpp
  14. 1
      src/document/UBDocumentController.cpp
  15. 10
      src/domain/UBGraphicsMediaItem.h
  16. 7
      src/domain/UBGraphicsScene.cpp
  17. 7
      src/domain/UBGraphicsTextItem.cpp
  18. 2
      src/domain/UBItem.cpp
  19. 1
      src/gui/UBDockPalette.cpp
  20. 3
      src/gui/UBDockPalette.h
  21. 14
      src/gui/UBFeaturesWidget.cpp
  22. 2
      src/gui/UBZoomPalette.h

@ -10,7 +10,7 @@ CONFIG += debug_and_release \
VERSION_MAJ = 1
VERSION_MIN = 3
VERSION_PATCH = 3
VERSION_PATCH = 4
VERSION_TYPE = r # a = alpha, b = beta, rc = release candidate, r = release, other => error
VERSION_BUILD = 0

@ -158,7 +158,7 @@ Root: HKLM64; Subkey: "SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\Low Righ
Root: HKLM64; Subkey: "SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\Low Rights\DragDrop\{{E63D17F8-D9DA-479D-B9B5-0D101A03703B}"; ValueType: string; ValueName: "AppPath"; ValueData: "{app}"; Flags: uninsdeletevalue; Check: isProcessorX64
[Run]
Filename: "{tmp}\vcredist_x86.exe";WorkingDir:"{tmp}"; Parameters: "/q:a/c:""VCREDI~3.EXE /q:a /c:""""msiexec /i vcredist.msi /qn"""""""; StatusMsg: Installing CRT ...
Filename: "{tmp}\vcredist_x86.exe";WorkingDir:"{tmp}"; Parameters: "/q /norestart"; StatusMsg: Installing CRT...
Filename: "{app}\OpenBoard.exe"; Description: "{cm:LaunchProgram,OpenBoard}"; Flags: nowait postinstall skipifsilent
[UninstallDelete]

@ -19,17 +19,17 @@ set SCRIPT_PATH=%~dp0
set PROJECT_ROOT=%SCRIPT_PATH%\..\..
set APPLICATION_NAME=OpenBoard
set QT_DIR=C:\Qt\5.5\msvc2010
set QT_DIR=C:\Program Files\Qt\5.5\msvc2010
set QT_BIN=%QT_DIR%\bin
set PROGRAMS_FILE_PATH=C:\Program Files (x86)
set GIT_BIN=%PROGRAMS_FILE_PATH%\Git\bin
set GIT_BIN=C:\Program Files\Git\bin
set VS_BIN=%PROGRAMS_FILE_PATH%\Microsoft Visual Studio 10.0\VC\bin
set WIN_SDK_BIN=%PROGRAMS_FILE_PATH%\Microsoft SDKs\Windows\v6.0A\Bin
set INNO_EXE=%PROGRAMS_FILE_PATH%\Inno Setup 5\iscc.exe
set BUILD_DIR=%PROJECT_ROOT%\build\win32\release
set LRELEASE=%QT_DIR%\bin\lrelease
set LRELEASE=%QT_DIR%\bin\lrelease.exe
set BASE_QT_TRANSLATIONS_DIRECTORY=%QT_DIR%\translations
set PATH=%QT_BIN%;%PATH%;%WIN_SDK_BIN%;%GIT_BIN%
@ -68,34 +68,25 @@ rmdir /S /Q install
"%QT_BIN%\qmake.exe" %APPLICATION_NAME%.pro
%LRELEASE% %APPLICATION_NAME%.pro
%LRELEASE% %BASE_QT_TRANSLATIONS_DIRECTORY%\translations.pro
call "%LRELEASE%" "%APPLICATION_NAME%.pro"
set /p VERSION= < build\win32\release\version
REM remove the last character that is a space
set VERSION=%VERSION: =%
REM git rev-list --tags --max-count=1 > tmp
REM set /p LAST_TAG= < tmp
REM erase tmp
REM git describe %LAST_TAG% > tmp
REM set /p LAST_TAG_VERSION=< tmp
REM erase tmp
REM echo %VERSION%
REM echo %LAST_TAG_VERSION%
nmake release-install
IF NOT EXIST build\win32\release\product\%APPLICATION_NAME%.exe GOTO EXIT_WITH_ERROR
xcopy C:\%APPLICATION_NAME%\bin\*.dll build\win32\release\product\
xcopy %QT_DIR%\bin\Qt5OpenGL.dll build\win32\release\product\
xcopy "%QT_DIR%\bin\Qt5OpenGL.dll" build\win32\release\product\
set CUSTOMIZATIONS=build\win32\release\product\customizations
mkdir %CUSTOMIZATIONS%
xcopy /s resources\customizations %CUSTOMIZATIONS%
set I18n=build\win32\release\product\i18n
xcopy /s %BASE_QT_TRANSLATIONS_DIRECTORY%\qt_*.qm %I18n%\
xcopy /s "%BASE_QT_TRANSLATIONS_DIRECTORY%\qt_*.qm" %I18n%\
del build\win32\release\product\i18n\qt_help*

@ -891,6 +891,7 @@ UBGraphicsScene* UBSvgSubsetAdaptor::UBSvgSubsetReader::loadScene(UBDocumentProx
{
textItem->setFlag(QGraphicsItem::ItemIsMovable, true);
textItem->setFlag(QGraphicsItem::ItemIsSelectable, true);
textItem->activateTextEditor(false);
mScene->addItem(textItem);

@ -1684,8 +1684,10 @@ void UBBoardController::boardViewResized(QResizeEvent* event)
mControlView->centerOn(0,0);
if (mDisplayView)
if (mDisplayView) {
UBApplication::applicationController->adjustDisplayView();
mDisplayView->centerOn(0,0);
}
mPaletteManager->containerResized();

@ -502,6 +502,7 @@ void UBBoardPaletteManager::containerResized()
mZoomPalette->move(userLeft + userWidth - mZoomPalette->width()
, userTop + userHeight /*- mPageNumberPalette->height()*/ - innerMargin - mZoomPalette->height());
mZoomPalette->adjustSizeAndPosition();
mZoomPalette->refreshPalette();
}
if (isFirstResized && mKeyboardPalette && mKeyboardPalette->parent() == UBApplication::boardController->controlContainer())

@ -671,6 +671,8 @@ bool UBBoardView::itemShouldBeMoved(QGraphicsItem *item)
if (item->isSelected())
return false;
case UBGraphicsMediaItem::Type:
case UBGraphicsVideoItem::Type:
case UBGraphicsAudioItem::Type:
return true;
case UBGraphicsStrokesGroup::Type:
return false;

@ -151,6 +151,8 @@ struct UBGraphicsItemType
SvgItemType,
DelegateButtonType,
MediaItemType,
VideoItemType,
AudioItemType,
PDFItemType,
TextItemType,
CurtainItemType,

@ -113,7 +113,7 @@ UBApplicationController::UBApplicationController(UBBoardView *pControlView,
mBlackScene = new UBGraphicsScene(0); // deleted by UBApplicationController::destructor
mBlackScene->setBackground(true, UBPageBackground::plain);
if (mDisplayManager->numScreens() >= 2)
if (mDisplayManager->numScreens() >= 2 && mDisplayManager->useMultiScreen())
{
mMirror = new UBScreenMirror();
}
@ -721,6 +721,13 @@ void UBApplicationController::importFile(const QString& pFilePath)
void UBApplicationController::useMultiScreen(bool use)
{
if (use && !mMirror)
mMirror = new UBScreenMirror();
if (!use && mMirror) {
delete mMirror;
mMirror = NULL;
}
mDisplayManager->setUseMultiScreen(use);
mDisplayManager->adjustScreens(0);
UBSettings::settings()->appUseMultiscreen->set(use);

@ -55,7 +55,7 @@ UBDisplayManager::UBDisplayManager(QObject *parent)
{
mDesktop = qApp->desktop();
mUseMultiScreen = true;
mUseMultiScreen = UBSettings::settings()->appUseMultiscreen->get().toBool();
initScreenIndexes();
@ -73,7 +73,7 @@ void UBDisplayManager::initScreenIndexes()
if (screenCount > 0)
{
mControlScreenIndex = mDesktop->primaryScreen();
if (mDesktop->screenCount() > 1 && UBSettings::settings()->swapControlAndDisplayScreens->get().toBool())
if (screenCount > 1 && UBSettings::settings()->swapControlAndDisplayScreens->get().toBool())
{
mControlScreenIndex = mControlScreenIndex^1;
}
@ -85,7 +85,7 @@ void UBDisplayManager::initScreenIndexes()
mControlScreenIndex = -1;
}
if (screenCount > 1)
if (screenCount > 1 && mUseMultiScreen)
{
mDisplayScreenIndex = mControlScreenIndex != 0 ? 0 : 1;
mScreenIndexesRoles << Display;
@ -118,14 +118,17 @@ UBDisplayManager::~UBDisplayManager()
int UBDisplayManager::numScreens()
{
if (mUseMultiScreen)
{
return mDesktop->screenCount();
}
else
{
int screenCount = mDesktop->screenCount();
// Some window managers report two screens when the two monitors are in "cloned" mode; this hack ensures
// that we consider this as just one screen. On most desktops, at least one of the following conditions is
// a good indicator of the displays being in cloned or extended mode.
#ifdef Q_OS_LINUX
if (screenCount > 1
&& (mDesktop->screenNumber(mDesktop->screen(0)) == mDesktop->screenNumber(mDesktop->screen(1))
|| mDesktop->screenGeometry(0) == mDesktop->screenGeometry(1)))
return 1;
}
#endif
return screenCount;
}

@ -76,6 +76,8 @@ class UBDisplayManager : public QObject
None = 0, Control, Display, Previous1, Previous2, Previous3, Previous4, Previous5
};
bool useMultiScreen() { return mUseMultiScreen; }
void setUseMultiScreen(bool pUse);
int controleScreenIndex()

@ -82,8 +82,8 @@ QBrush UBSettings::eraserBrushLightBackground = QBrush(QColor(255, 255, 255, 30)
QPen UBSettings::eraserPenDarkBackground = QPen(QColor(255, 255, 255, 127));
QPen UBSettings::eraserPenLightBackground = QPen(QColor(0, 0, 0, 127));
QColor UBSettings::markerCircleBrushColorDarkBackground = QColor(127, 127, 127, 0);
QColor UBSettings::markerCircleBrushColorLightBackground = QColor(255, 255, 255, 0);
QColor UBSettings::markerCircleBrushColorDarkBackground = QColor(127, 127, 127, 80);
QColor UBSettings::markerCircleBrushColorLightBackground = QColor(255, 255, 255, 30);
QColor UBSettings::markerCirclePenColorDarkBackground = QColor(255, 255, 255, 127);
QColor UBSettings::markerCirclePenColorLightBackground = QColor(0, 0, 0, 127);

@ -85,7 +85,7 @@ UBDesktopAnnotationController::UBDesktopAnnotationController(QObject *parent, UB
#ifdef Q_OS_OSX
mTransparentDrawingView->setAttribute(Qt::WA_MacNoShadow, true);
#endif
mTransparentDrawingView->setWindowFlags(Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint | Qt::Window);
mTransparentDrawingView->setWindowFlags(Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint | Qt::Window | Qt::NoDropShadowWindowHint);
mTransparentDrawingView->setCacheMode(QGraphicsView::CacheNone);
mTransparentDrawingView->resize(UBApplication::desktop()->width(), UBApplication::desktop()->height());
@ -126,6 +126,8 @@ UBDesktopAnnotationController::UBDesktopAnnotationController(QObject *parent, UB
connect(UBApplication::mainWindow->actionSelector, SIGNAL(triggered()), this, SLOT(onToolClicked()));
connect(mDesktopPalette, SIGNAL(maximized()), this, SLOT(onDesktopPaletteMaximized()));
connect(mDesktopPalette, SIGNAL(minimizeStart(eMinimizedLocation)), this, SLOT(onDesktopPaletteMinimize()));
connect(mDesktopPalette, SIGNAL(mouseEntered()), mTransparentDrawingScene, SLOT(hideTool()));
connect(mRightPalette, SIGNAL(mouseEntered()), mTransparentDrawingScene, SLOT(hideTool()));
connect(mTransparentDrawingView, SIGNAL(resized(QResizeEvent*)), this, SLOT(onTransparentWidgetResized()));

@ -1018,6 +1018,7 @@ void UBDocumentController::itemChanged(QTreeWidgetItem * item, int column)
if (0 != (item->flags() & Qt::ItemIsEditable))
{
childItem->proxy()->setMetaData(UBSettings::documentGroupName, item->text(column));
UBPersistenceManager::persistenceManager()->persistDocumentMetadata(childItem->proxy());
}
}
}

@ -160,6 +160,11 @@ class UBGraphicsAudioItem: public UBGraphicsMediaItem
Q_OBJECT
public:
enum { Type = UBGraphicsItemType::AudioItemType};
virtual int type() const
{
return Type;
}
UBGraphicsAudioItem(const QUrl& pMediaFileUrl, QGraphicsItem *parent = 0);
mediaType getMediaType() const { return mediaType_Audio; }
@ -172,6 +177,11 @@ class UBGraphicsVideoItem: public UBGraphicsMediaItem
Q_OBJECT
public:
enum { Type = UBGraphicsItemType::VideoItemType};
virtual int type() const
{
return Type;
}
UBGraphicsVideoItem(const QUrl& pMediaFileUrl, QGraphicsItem *parent = 0);

@ -2705,20 +2705,19 @@ void UBGraphicsScene::updateMarkerCircleColor()
if (!mMarkerCircle)
return;
QBrush mcBrush = mMarkerCircle->brush();
QPen mcPen = mMarkerCircle->pen();
if (mDarkBackground) {
mcBrush.setColor(UBSettings::markerCircleBrushColorDarkBackground);
mcPen.setColor(UBSettings::markerCirclePenColorDarkBackground);
mMarkerCircle->setBrush(UBSettings::markerCircleBrushColorDarkBackground);
}
else {
mcBrush.setColor(UBSettings::markerCircleBrushColorLightBackground);
mcPen.setColor(UBSettings::markerCirclePenColorLightBackground);
mMarkerCircle->setBrush(UBSettings::markerCircleBrushColorLightBackground);
}
mMarkerCircle->setBrush(mcBrush);
mcPen.setStyle(Qt::DotLine);
mMarkerCircle->setPen(mcPen);
}

@ -102,7 +102,6 @@ QVariant UBGraphicsTextItem::itemChange(GraphicsItemChange change, const QVarian
void UBGraphicsTextItem::mousePressEvent(QGraphicsSceneMouseEvent *event)
{
setTextInteractionFlags(Qt::TextEditorInteraction);
// scene()->itemAt(pos) returns 0 if pos is not over text, but over text item, but mouse press comes.
// It is a cludge...
@ -135,8 +134,12 @@ void UBGraphicsTextItem::mousePressEvent(QGraphicsSceneMouseEvent *event)
}
}
if (!data(UBGraphicsItemData::ItemEditable).toBool())
if (!data(UBGraphicsItemData::ItemEditable).toBool()) {
setTextInteractionFlags(Qt::NoTextInteraction);
return;
}
setTextInteractionFlags(Qt::TextEditorInteraction);
int elapsed = mLastMousePressTime.msecsTo(QTime::currentTime());

@ -119,6 +119,8 @@ UBGraphicsItemDelegate *UBGraphicsItem::Delegate(QGraphicsItem *pItem)
result = (static_cast<UBGraphicsSvgItem*>(pItem))->Delegate();
break;
case UBGraphicsMediaItem::Type:
case UBGraphicsVideoItem::Type:
case UBGraphicsAudioItem::Type:
result = (static_cast<UBGraphicsMediaItem*>(pItem))->Delegate();
break;
case UBGraphicsStrokesGroup::Type :

@ -197,6 +197,7 @@ void UBDockPalette::enterEvent(QEvent *event)
Q_UNUSED(event);
// We want to set the cursor as an arrow everytime it enters the palette
setCursor(Qt::ArrowCursor);
emit mouseEntered();
}
/**

@ -150,6 +150,9 @@ public slots:
void onAllDownloadsFinished();
virtual void onDocumentSet(UBDocumentProxy* documentProxy);
signals:
void mouseEntered();
protected:
virtual int border();
virtual int radius();

@ -1224,7 +1224,7 @@ bool UBFeaturesModel::dropMimeData(const QMimeData *mimeData, Qt::DropAction act
UBFeature sourceElement;
if (dataFromSameModel) {
sourceElement = featList.at(i);
moveData(sourceElement, parentFeature, Qt::MoveAction);
moveData(sourceElement, parentFeature, Qt::MoveAction, true);
}
}
} else if (mimeData->hasUrls()) {
@ -1323,6 +1323,11 @@ void UBFeaturesModel::moveData(const UBFeature &source, const UBFeature &destina
UBFeatureElementType sourceType = source.getType();
QImage sourceIcon = source.getThumbnail();
if (sourceType == FEATURE_INTERNAL) {
qWarning() << "Built-in tools cannot be moved";
return;
}
Q_ASSERT( QFileInfo( sourcePath ).exists() );
QString name = QFileInfo( sourcePath ).fileName();
@ -1459,8 +1464,11 @@ bool UBFeaturesPathProxyModel::filterAcceptsRow( int sourceRow, const QModelInde
{
QModelIndex index = sourceModel()->index(sourceRow, 0, sourceParent);
UBFeature feature = sourceModel()->data(index, Qt::UserRole + 1).value<UBFeature>();
return feature.isFolder() && path.startsWith( feature.getFullVirtualPath()) ;
// We want to display parent folders up to and including the current one
return (feature.isFolder()
&& ( path.startsWith(feature.getFullVirtualPath() + "/")
|| path == feature.getFullVirtualPath()));
}

@ -45,6 +45,7 @@ class UBZoomPalette : public UBFloatingPalette
public slots:
void hide();
void refreshPalette();
private:
UBBoardController* mBoardController;
@ -55,7 +56,6 @@ class UBZoomPalette : public UBFloatingPalette
bool mIsExpanded;
private slots:
void refreshPalette();
void showHideExtraButton();
void goHundred();

Loading…
Cancel
Save