Commit 12a91e8c authored by Craig Watson's avatar Craig Watson

Merge branch 'dev' into 1.4-dev

parents def5f7f7 91f534e1
...@@ -10,7 +10,7 @@ CONFIG += debug_and_release \ ...@@ -10,7 +10,7 @@ CONFIG += debug_and_release \
VERSION_MAJ = 1 VERSION_MAJ = 1
VERSION_MIN = 3 VERSION_MIN = 3
VERSION_PATCH = 3 VERSION_PATCH = 4
VERSION_TYPE = r # a = alpha, b = beta, rc = release candidate, r = release, other => error VERSION_TYPE = r # a = alpha, b = beta, rc = release candidate, r = release, other => error
VERSION_BUILD = 0 VERSION_BUILD = 0
......
...@@ -158,7 +158,7 @@ Root: HKLM64; Subkey: "SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\Low Righ ...@@ -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 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] [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 Filename: "{app}\OpenBoard.exe"; Description: "{cm:LaunchProgram,OpenBoard}"; Flags: nowait postinstall skipifsilent
[UninstallDelete] [UninstallDelete]
......
...@@ -19,17 +19,17 @@ set SCRIPT_PATH=%~dp0 ...@@ -19,17 +19,17 @@ set SCRIPT_PATH=%~dp0
set PROJECT_ROOT=%SCRIPT_PATH%\..\.. set PROJECT_ROOT=%SCRIPT_PATH%\..\..
set APPLICATION_NAME=OpenBoard 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 QT_BIN=%QT_DIR%\bin
set PROGRAMS_FILE_PATH=C:\Program Files (x86) 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 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 WIN_SDK_BIN=%PROGRAMS_FILE_PATH%\Microsoft SDKs\Windows\v6.0A\Bin
set INNO_EXE=%PROGRAMS_FILE_PATH%\Inno Setup 5\iscc.exe set INNO_EXE=%PROGRAMS_FILE_PATH%\Inno Setup 5\iscc.exe
set BUILD_DIR=%PROJECT_ROOT%\build\win32\release 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 BASE_QT_TRANSLATIONS_DIRECTORY=%QT_DIR%\translations
set PATH=%QT_BIN%;%PATH%;%WIN_SDK_BIN%;%GIT_BIN% set PATH=%QT_BIN%;%PATH%;%WIN_SDK_BIN%;%GIT_BIN%
...@@ -68,34 +68,25 @@ rmdir /S /Q install ...@@ -68,34 +68,25 @@ rmdir /S /Q install
"%QT_BIN%\qmake.exe" %APPLICATION_NAME%.pro "%QT_BIN%\qmake.exe" %APPLICATION_NAME%.pro
%LRELEASE% %APPLICATION_NAME%.pro call "%LRELEASE%" "%APPLICATION_NAME%.pro"
%LRELEASE% %BASE_QT_TRANSLATIONS_DIRECTORY%\translations.pro
set /p VERSION= < build\win32\release\version set /p VERSION= < build\win32\release\version
REM remove the last character that is a space REM remove the last character that is a space
set VERSION=%VERSION: =% 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 nmake release-install
IF NOT EXIST build\win32\release\product\%APPLICATION_NAME%.exe GOTO EXIT_WITH_ERROR 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 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 set CUSTOMIZATIONS=build\win32\release\product\customizations
mkdir %CUSTOMIZATIONS% mkdir %CUSTOMIZATIONS%
xcopy /s resources\customizations %CUSTOMIZATIONS% xcopy /s resources\customizations %CUSTOMIZATIONS%
set I18n=build\win32\release\product\i18n 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* del build\win32\release\product\i18n\qt_help*
......
...@@ -891,6 +891,7 @@ UBGraphicsScene* UBSvgSubsetAdaptor::UBSvgSubsetReader::loadScene(UBDocumentProx ...@@ -891,6 +891,7 @@ UBGraphicsScene* UBSvgSubsetAdaptor::UBSvgSubsetReader::loadScene(UBDocumentProx
{ {
textItem->setFlag(QGraphicsItem::ItemIsMovable, true); textItem->setFlag(QGraphicsItem::ItemIsMovable, true);
textItem->setFlag(QGraphicsItem::ItemIsSelectable, true); textItem->setFlag(QGraphicsItem::ItemIsSelectable, true);
textItem->activateTextEditor(false);
mScene->addItem(textItem); mScene->addItem(textItem);
......
...@@ -1684,8 +1684,10 @@ void UBBoardController::boardViewResized(QResizeEvent* event) ...@@ -1684,8 +1684,10 @@ void UBBoardController::boardViewResized(QResizeEvent* event)
mControlView->centerOn(0,0); mControlView->centerOn(0,0);
if (mDisplayView) if (mDisplayView) {
UBApplication::applicationController->adjustDisplayView();
mDisplayView->centerOn(0,0); mDisplayView->centerOn(0,0);
}
mPaletteManager->containerResized(); mPaletteManager->containerResized();
......
...@@ -502,6 +502,7 @@ void UBBoardPaletteManager::containerResized() ...@@ -502,6 +502,7 @@ void UBBoardPaletteManager::containerResized()
mZoomPalette->move(userLeft + userWidth - mZoomPalette->width() mZoomPalette->move(userLeft + userWidth - mZoomPalette->width()
, userTop + userHeight /*- mPageNumberPalette->height()*/ - innerMargin - mZoomPalette->height()); , userTop + userHeight /*- mPageNumberPalette->height()*/ - innerMargin - mZoomPalette->height());
mZoomPalette->adjustSizeAndPosition(); mZoomPalette->adjustSizeAndPosition();
mZoomPalette->refreshPalette();
} }
if (isFirstResized && mKeyboardPalette && mKeyboardPalette->parent() == UBApplication::boardController->controlContainer()) if (isFirstResized && mKeyboardPalette && mKeyboardPalette->parent() == UBApplication::boardController->controlContainer())
......
...@@ -671,6 +671,8 @@ bool UBBoardView::itemShouldBeMoved(QGraphicsItem *item) ...@@ -671,6 +671,8 @@ bool UBBoardView::itemShouldBeMoved(QGraphicsItem *item)
if (item->isSelected()) if (item->isSelected())
return false; return false;
case UBGraphicsMediaItem::Type: case UBGraphicsMediaItem::Type:
case UBGraphicsVideoItem::Type:
case UBGraphicsAudioItem::Type:
return true; return true;
case UBGraphicsStrokesGroup::Type: case UBGraphicsStrokesGroup::Type:
return false; return false;
......
...@@ -151,6 +151,8 @@ struct UBGraphicsItemType ...@@ -151,6 +151,8 @@ struct UBGraphicsItemType
SvgItemType, SvgItemType,
DelegateButtonType, DelegateButtonType,
MediaItemType, MediaItemType,
VideoItemType,
AudioItemType,
PDFItemType, PDFItemType,
TextItemType, TextItemType,
CurtainItemType, CurtainItemType,
......
...@@ -113,7 +113,7 @@ UBApplicationController::UBApplicationController(UBBoardView *pControlView, ...@@ -113,7 +113,7 @@ UBApplicationController::UBApplicationController(UBBoardView *pControlView,
mBlackScene = new UBGraphicsScene(0); // deleted by UBApplicationController::destructor mBlackScene = new UBGraphicsScene(0); // deleted by UBApplicationController::destructor
mBlackScene->setBackground(true, UBPageBackground::plain); mBlackScene->setBackground(true, UBPageBackground::plain);
if (mDisplayManager->numScreens() >= 2) if (mDisplayManager->numScreens() >= 2 && mDisplayManager->useMultiScreen())
{ {
mMirror = new UBScreenMirror(); mMirror = new UBScreenMirror();
} }
...@@ -721,6 +721,13 @@ void UBApplicationController::importFile(const QString& pFilePath) ...@@ -721,6 +721,13 @@ void UBApplicationController::importFile(const QString& pFilePath)
void UBApplicationController::useMultiScreen(bool use) void UBApplicationController::useMultiScreen(bool use)
{ {
if (use && !mMirror)
mMirror = new UBScreenMirror();
if (!use && mMirror) {
delete mMirror;
mMirror = NULL;
}
mDisplayManager->setUseMultiScreen(use); mDisplayManager->setUseMultiScreen(use);
mDisplayManager->adjustScreens(0); mDisplayManager->adjustScreens(0);
UBSettings::settings()->appUseMultiscreen->set(use); UBSettings::settings()->appUseMultiscreen->set(use);
......
...@@ -55,7 +55,7 @@ UBDisplayManager::UBDisplayManager(QObject *parent) ...@@ -55,7 +55,7 @@ UBDisplayManager::UBDisplayManager(QObject *parent)
{ {
mDesktop = qApp->desktop(); mDesktop = qApp->desktop();
mUseMultiScreen = true; mUseMultiScreen = UBSettings::settings()->appUseMultiscreen->get().toBool();
initScreenIndexes(); initScreenIndexes();
...@@ -73,7 +73,7 @@ void UBDisplayManager::initScreenIndexes() ...@@ -73,7 +73,7 @@ void UBDisplayManager::initScreenIndexes()
if (screenCount > 0) if (screenCount > 0)
{ {
mControlScreenIndex = mDesktop->primaryScreen(); mControlScreenIndex = mDesktop->primaryScreen();
if (mDesktop->screenCount() > 1 && UBSettings::settings()->swapControlAndDisplayScreens->get().toBool()) if (screenCount > 1 && UBSettings::settings()->swapControlAndDisplayScreens->get().toBool())
{ {
mControlScreenIndex = mControlScreenIndex^1; mControlScreenIndex = mControlScreenIndex^1;
} }
...@@ -85,7 +85,7 @@ void UBDisplayManager::initScreenIndexes() ...@@ -85,7 +85,7 @@ void UBDisplayManager::initScreenIndexes()
mControlScreenIndex = -1; mControlScreenIndex = -1;
} }
if (screenCount > 1) if (screenCount > 1 && mUseMultiScreen)
{ {
mDisplayScreenIndex = mControlScreenIndex != 0 ? 0 : 1; mDisplayScreenIndex = mControlScreenIndex != 0 ? 0 : 1;
mScreenIndexesRoles << Display; mScreenIndexesRoles << Display;
...@@ -118,14 +118,17 @@ UBDisplayManager::~UBDisplayManager() ...@@ -118,14 +118,17 @@ UBDisplayManager::~UBDisplayManager()
int UBDisplayManager::numScreens() int UBDisplayManager::numScreens()
{ {
if (mUseMultiScreen) int screenCount = mDesktop->screenCount();
{ // Some window managers report two screens when the two monitors are in "cloned" mode; this hack ensures
return mDesktop->screenCount(); // 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.
else #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; return 1;
} #endif
return screenCount;
} }
......
...@@ -76,6 +76,8 @@ class UBDisplayManager : public QObject ...@@ -76,6 +76,8 @@ class UBDisplayManager : public QObject
None = 0, Control, Display, Previous1, Previous2, Previous3, Previous4, Previous5 None = 0, Control, Display, Previous1, Previous2, Previous3, Previous4, Previous5
}; };
bool useMultiScreen() { return mUseMultiScreen; }
void setUseMultiScreen(bool pUse); void setUseMultiScreen(bool pUse);
int controleScreenIndex() int controleScreenIndex()
......
...@@ -82,8 +82,8 @@ QBrush UBSettings::eraserBrushLightBackground = QBrush(QColor(255, 255, 255, 30) ...@@ -82,8 +82,8 @@ QBrush UBSettings::eraserBrushLightBackground = QBrush(QColor(255, 255, 255, 30)
QPen UBSettings::eraserPenDarkBackground = QPen(QColor(255, 255, 255, 127)); QPen UBSettings::eraserPenDarkBackground = QPen(QColor(255, 255, 255, 127));
QPen UBSettings::eraserPenLightBackground = QPen(QColor(0, 0, 0, 127)); QPen UBSettings::eraserPenLightBackground = QPen(QColor(0, 0, 0, 127));
QColor UBSettings::markerCircleBrushColorDarkBackground = QColor(127, 127, 127, 0); QColor UBSettings::markerCircleBrushColorDarkBackground = QColor(127, 127, 127, 80);
QColor UBSettings::markerCircleBrushColorLightBackground = QColor(255, 255, 255, 0); QColor UBSettings::markerCircleBrushColorLightBackground = QColor(255, 255, 255, 30);
QColor UBSettings::markerCirclePenColorDarkBackground = QColor(255, 255, 255, 127); QColor UBSettings::markerCirclePenColorDarkBackground = QColor(255, 255, 255, 127);
QColor UBSettings::markerCirclePenColorLightBackground = QColor(0, 0, 0, 127); QColor UBSettings::markerCirclePenColorLightBackground = QColor(0, 0, 0, 127);
......
...@@ -85,7 +85,7 @@ UBDesktopAnnotationController::UBDesktopAnnotationController(QObject *parent, UB ...@@ -85,7 +85,7 @@ UBDesktopAnnotationController::UBDesktopAnnotationController(QObject *parent, UB
#ifdef Q_OS_OSX #ifdef Q_OS_OSX
mTransparentDrawingView->setAttribute(Qt::WA_MacNoShadow, true); mTransparentDrawingView->setAttribute(Qt::WA_MacNoShadow, true);
#endif #endif
mTransparentDrawingView->setWindowFlags(Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint | Qt::Window); mTransparentDrawingView->setWindowFlags(Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint | Qt::Window | Qt::NoDropShadowWindowHint);
mTransparentDrawingView->setCacheMode(QGraphicsView::CacheNone); mTransparentDrawingView->setCacheMode(QGraphicsView::CacheNone);
mTransparentDrawingView->resize(UBApplication::desktop()->width(), UBApplication::desktop()->height()); mTransparentDrawingView->resize(UBApplication::desktop()->width(), UBApplication::desktop()->height());
...@@ -126,6 +126,8 @@ UBDesktopAnnotationController::UBDesktopAnnotationController(QObject *parent, UB ...@@ -126,6 +126,8 @@ UBDesktopAnnotationController::UBDesktopAnnotationController(QObject *parent, UB
connect(UBApplication::mainWindow->actionSelector, SIGNAL(triggered()), this, SLOT(onToolClicked())); connect(UBApplication::mainWindow->actionSelector, SIGNAL(triggered()), this, SLOT(onToolClicked()));
connect(mDesktopPalette, SIGNAL(maximized()), this, SLOT(onDesktopPaletteMaximized())); connect(mDesktopPalette, SIGNAL(maximized()), this, SLOT(onDesktopPaletteMaximized()));
connect(mDesktopPalette, SIGNAL(minimizeStart(eMinimizedLocation)), this, SLOT(onDesktopPaletteMinimize())); 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())); connect(mTransparentDrawingView, SIGNAL(resized(QResizeEvent*)), this, SLOT(onTransparentWidgetResized()));
......
...@@ -1018,6 +1018,7 @@ void UBDocumentController::itemChanged(QTreeWidgetItem * item, int column) ...@@ -1018,6 +1018,7 @@ void UBDocumentController::itemChanged(QTreeWidgetItem * item, int column)
if (0 != (item->flags() & Qt::ItemIsEditable)) if (0 != (item->flags() & Qt::ItemIsEditable))
{ {
childItem->proxy()->setMetaData(UBSettings::documentGroupName, item->text(column)); childItem->proxy()->setMetaData(UBSettings::documentGroupName, item->text(column));
UBPersistenceManager::persistenceManager()->persistDocumentMetadata(childItem->proxy());
} }
} }
} }
......
...@@ -160,6 +160,11 @@ class UBGraphicsAudioItem: public UBGraphicsMediaItem ...@@ -160,6 +160,11 @@ class UBGraphicsAudioItem: public UBGraphicsMediaItem
Q_OBJECT Q_OBJECT
public: public:
enum { Type = UBGraphicsItemType::AudioItemType};
virtual int type() const
{
return Type;
}
UBGraphicsAudioItem(const QUrl& pMediaFileUrl, QGraphicsItem *parent = 0); UBGraphicsAudioItem(const QUrl& pMediaFileUrl, QGraphicsItem *parent = 0);
mediaType getMediaType() const { return mediaType_Audio; } mediaType getMediaType() const { return mediaType_Audio; }
...@@ -172,6 +177,11 @@ class UBGraphicsVideoItem: public UBGraphicsMediaItem ...@@ -172,6 +177,11 @@ class UBGraphicsVideoItem: public UBGraphicsMediaItem
Q_OBJECT Q_OBJECT
public: public:
enum { Type = UBGraphicsItemType::VideoItemType};
virtual int type() const
{
return Type;
}
UBGraphicsVideoItem(const QUrl& pMediaFileUrl, QGraphicsItem *parent = 0); UBGraphicsVideoItem(const QUrl& pMediaFileUrl, QGraphicsItem *parent = 0);
......
...@@ -2705,20 +2705,19 @@ void UBGraphicsScene::updateMarkerCircleColor() ...@@ -2705,20 +2705,19 @@ void UBGraphicsScene::updateMarkerCircleColor()
if (!mMarkerCircle) if (!mMarkerCircle)
return; return;
QBrush mcBrush = mMarkerCircle->brush();
QPen mcPen = mMarkerCircle->pen(); QPen mcPen = mMarkerCircle->pen();
if (mDarkBackground) { if (mDarkBackground) {
mcBrush.setColor(UBSettings::markerCircleBrushColorDarkBackground);
mcPen.setColor(UBSettings::markerCirclePenColorDarkBackground); mcPen.setColor(UBSettings::markerCirclePenColorDarkBackground);
mMarkerCircle->setBrush(UBSettings::markerCircleBrushColorDarkBackground);
} }
else { else {
mcBrush.setColor(UBSettings::markerCircleBrushColorLightBackground);
mcPen.setColor(UBSettings::markerCirclePenColorLightBackground); mcPen.setColor(UBSettings::markerCirclePenColorLightBackground);
mMarkerCircle->setBrush(UBSettings::markerCircleBrushColorLightBackground);
} }
mMarkerCircle->setBrush(mcBrush); mcPen.setStyle(Qt::DotLine);
mMarkerCircle->setPen(mcPen); mMarkerCircle->setPen(mcPen);
} }
......
...@@ -102,7 +102,6 @@ QVariant UBGraphicsTextItem::itemChange(GraphicsItemChange change, const QVarian ...@@ -102,7 +102,6 @@ QVariant UBGraphicsTextItem::itemChange(GraphicsItemChange change, const QVarian
void UBGraphicsTextItem::mousePressEvent(QGraphicsSceneMouseEvent *event) 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. // scene()->itemAt(pos) returns 0 if pos is not over text, but over text item, but mouse press comes.
// It is a cludge... // It is a cludge...
...@@ -135,8 +134,12 @@ void UBGraphicsTextItem::mousePressEvent(QGraphicsSceneMouseEvent *event) ...@@ -135,8 +134,12 @@ void UBGraphicsTextItem::mousePressEvent(QGraphicsSceneMouseEvent *event)
} }
} }
if (!data(UBGraphicsItemData::ItemEditable).toBool()) if (!data(UBGraphicsItemData::ItemEditable).toBool()) {
setTextInteractionFlags(Qt::NoTextInteraction);
return; return;
}
setTextInteractionFlags(Qt::TextEditorInteraction);
int elapsed = mLastMousePressTime.msecsTo(QTime::currentTime()); int elapsed = mLastMousePressTime.msecsTo(QTime::currentTime());
......
...@@ -119,6 +119,8 @@ UBGraphicsItemDelegate *UBGraphicsItem::Delegate(QGraphicsItem *pItem) ...@@ -119,6 +119,8 @@ UBGraphicsItemDelegate *UBGraphicsItem::Delegate(QGraphicsItem *pItem)
result = (static_cast<UBGraphicsSvgItem*>(pItem))->Delegate(); result = (static_cast<UBGraphicsSvgItem*>(pItem))->Delegate();
break; break;
case UBGraphicsMediaItem::Type: case UBGraphicsMediaItem::Type:
case UBGraphicsVideoItem::Type:
case UBGraphicsAudioItem::Type:
result = (static_cast<UBGraphicsMediaItem*>(pItem))->Delegate(); result = (static_cast<UBGraphicsMediaItem*>(pItem))->Delegate();
break; break;
case UBGraphicsStrokesGroup::Type : case UBGraphicsStrokesGroup::Type :
......
...@@ -197,6 +197,7 @@ void UBDockPalette::enterEvent(QEvent *event) ...@@ -197,6 +197,7 @@ void UBDockPalette::enterEvent(QEvent *event)
Q_UNUSED(event); Q_UNUSED(event);
// We want to set the cursor as an arrow everytime it enters the palette // We want to set the cursor as an arrow everytime it enters the palette
setCursor(Qt::ArrowCursor); setCursor(Qt::ArrowCursor);
emit mouseEntered();
} }
/** /**
......
...@@ -150,6 +150,9 @@ public slots: ...@@ -150,6 +150,9 @@ public slots:
void onAllDownloadsFinished(); void onAllDownloadsFinished();
virtual void onDocumentSet(UBDocumentProxy* documentProxy); virtual void onDocumentSet(UBDocumentProxy* documentProxy);
signals:
void mouseEntered();
protected: protected:
virtual int border(); virtual int border();
virtual int radius(); virtual int radius();
......
...@@ -1224,7 +1224,7 @@ bool UBFeaturesModel::dropMimeData(const QMimeData *mimeData, Qt::DropAction act ...@@ -1224,7 +1224,7 @@ bool UBFeaturesModel::dropMimeData(const QMimeData *mimeData, Qt::DropAction act
UBFeature sourceElement; UBFeature sourceElement;
if (dataFromSameModel) { if (dataFromSameModel) {
sourceElement = featList.at(i); sourceElement = featList.at(i);
moveData(sourceElement, parentFeature, Qt::MoveAction); moveData(sourceElement, parentFeature, Qt::MoveAction, true);
} }
} }
} else if (mimeData->hasUrls()) { } else if (mimeData->hasUrls()) {
...@@ -1323,6 +1323,11 @@ void UBFeaturesModel::moveData(const UBFeature &source, const UBFeature &destina ...@@ -1323,6 +1323,11 @@ void UBFeaturesModel::moveData(const UBFeature &source, const UBFeature &destina
UBFeatureElementType sourceType = source.getType(); UBFeatureElementType sourceType = source.getType();
QImage sourceIcon = source.getThumbnail(); QImage sourceIcon = source.getThumbnail();
if (sourceType == FEATURE_INTERNAL) {
qWarning() << "Built-in tools cannot be moved";
return;
}
Q_ASSERT( QFileInfo( sourcePath ).exists() ); Q_ASSERT( QFileInfo( sourcePath ).exists() );
QString name = QFileInfo( sourcePath ).fileName(); QString name = QFileInfo( sourcePath ).fileName();
...@@ -1460,7 +1465,10 @@ bool UBFeaturesPathProxyModel::filterAcceptsRow( int sourceRow, const QModelInde ...@@ -1460,7 +1465,10 @@ bool UBFeaturesPathProxyModel::filterAcceptsRow( int sourceRow, const QModelInde
QModelIndex index = sourceModel()->index(sourceRow, 0, sourceParent); QModelIndex index = sourceModel()->index(sourceRow, 0, sourceParent);
UBFeature feature = sourceModel()->data(index, Qt::UserRole + 1).value<UBFeature>(); 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 ...@@ -45,6 +45,7 @@ class UBZoomPalette : public UBFloatingPalette
public slots: public slots:
void hide(); void hide();
void refreshPalette();
private: private:
UBBoardController* mBoardController; UBBoardController* mBoardController;
...@@ -55,7 +56,6 @@ class UBZoomPalette : public UBFloatingPalette ...@@ -55,7 +56,6 @@ class UBZoomPalette : public UBFloatingPalette
bool mIsExpanded; bool mIsExpanded;
private slots: private slots:
void refreshPalette();
void showHideExtraButton(); void showHideExtraButton();
void goHundred(); void goHundred();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment