Commit f797f884 authored by Ivan Ilin's avatar Ivan Ilin

hotfix linux-g++-64 build

parent fbbcb0a9
......@@ -4,8 +4,11 @@ TEMPLATE = app
THIRD_PARTY_PATH=../Sankore-ThirdParty
CONFIG += debug_and_release \
no_include_pwd \
link_prl
no_include_pwd
linux-g++-64 {
CONFIG += link_prl
}
VERSION_MAJ = 1
VERSION_MIN = 40
......
......@@ -140,6 +140,7 @@ class UBBoardController : public QObject
void setBoxing(QRect displayRect);
void setToolbarTexts();
static QUrl expandWidgetToTempDir(const QByteArray& pZipedData, const QString& pExtension = QString("wgt"));
// static QRect freeRectInGlobalPos() const {return ;}
void setPageSize(QSize newSize);
UBBoardPaletteManager *paletteManager()
{
......
......@@ -1027,3 +1027,27 @@ void UBBoardPaletteManager::stopDownloads()
mRightPalette->removeTab(mpDownloadWidget->name());
}
}
QRect UBBoardPaletteManager::GetFreeRectGlobalCoords() const
{
QPoint topLeft, bottomRight;
if (mLeftPalette) {
int x = mLeftPalette->getTabPaletteRect().topRight().x();
int y = 0;
if (x || y) {
topLeft.setX(x);
topLeft.setY(y);
topLeft = mContainer->mapToGlobal(topLeft);
}
}
if (mRightPalette) {
int x = mRightPalette->getTabPaletteRect().topLeft().x();
int y = mRightPalette->height();
if (x || y) {
bottomRight.setX(x);
bottomRight.setY(y);
bottomRight = mContainer->mapToGlobal(bottomRight);
}
}
return QRect(topLeft, bottomRight);
}
......@@ -65,6 +65,7 @@ class UBBoardPaletteManager : public QObject
void changeMode(eUBDockPaletteWidgetMode newMode, bool isInit = false);
void startDownloads();
void stopDownloads();
QRect GetFreeRectGlobalCoords() const;
signals:
void connectToDocController();
......
......@@ -695,16 +695,20 @@ void UBLibraryController::addVideosToCurrentPage(const QList<QUrl>& videos)
void UBLibraryController::addAudiosToCurrentPage(const QList<QUrl>& sounds)
{
QPointF topLeftPos = visibleSceneRect().topLeft();
QPointF centerPos = visibleSceneRect().center();
QPointF pos = topLeftPos;
QPointF pos = centerPos;
//move it a little higher for convenience
centerPos.setX(pos.x() - 200);
centerPos.setY(pos.y() - 100);
foreach(const QUrl url, sounds)
{
mLastItemOffsetIndex++;
mLastItemOffsetIndex = qMin(mLastItemOffsetIndex, 5);
pos = QPointF(topLeftPos.x() + 50 * mLastItemOffsetIndex,
topLeftPos.y() + 50 * mLastItemOffsetIndex);
pos = QPointF(centerPos.x() + 50 * mLastItemOffsetIndex,
centerPos.y() + 50 * mLastItemOffsetIndex);
UBApplication::boardController->addAudio(url, false, pos);
}
}
......
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