hotfix linux-g++-64 build

preferencesAboutTextFull
Ivan Ilin 13 years ago
parent fbbcb0a9bc
commit f797f8848b
  1. 7
      Sankore_3.1.pro
  2. 1
      src/board/UBBoardController.h
  3. 24
      src/board/UBBoardPaletteManager.cpp
  4. 1
      src/board/UBBoardPaletteManager.h
  5. 12
      src/board/UBLibraryController.cpp

@ -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);
}
}

Loading…
Cancel
Save