Merge branch 'OEFUniboard' of github.com:stayonshadow/PrivateBoard into OEFUniboard

preferencesAboutTextFull
Didier Clerc 12 years ago
commit 94407ff160
  1. 2
      OpenBoard.pro
  2. 8
      buildDebianPackage.sh
  3. 11
      release.macx.sh
  4. 4
      release.win7.vc9.bat
  5. 44
      src/board/UBBoardView.cpp
  6. 1
      src/board/UBBoardView.h
  7. 5
      src/core/UBDisplayManager.cpp
  8. 3
      src/domain/UBGraphicsDelegateFrame.cpp
  9. 23
      src/domain/UBGraphicsItemDelegate.cpp
  10. 2
      src/domain/UBGraphicsItemDelegate.h
  11. 88
      src/domain/UBGraphicsMediaItemDelegate.cpp
  12. 2
      src/domain/UBGraphicsMediaItemDelegate.h
  13. 3
      src/tools/UBGraphicsCompass.cpp
  14. 1
      src/tools/UBGraphicsProtractor.cpp
  15. 1
      src/tools/UBGraphicsRuler.cpp

@ -11,7 +11,7 @@ CONFIG += debug_and_release \
VERSION_MAJ = 0 VERSION_MAJ = 0
VERSION_MIN = 08 VERSION_MIN = 08
VERSION_TYPE = b # a = alpha, b = beta, r = release, other => error VERSION_TYPE = b # a = alpha, b = beta, r = release, other => error
VERSION_PATCH = 01 VERSION_PATCH = 02
VERSION = "$${VERSION_MAJ}.$${VERSION_MIN}.$${VERSION_TYPE}.$${VERSION_PATCH}" VERSION = "$${VERSION_MAJ}.$${VERSION_MIN}.$${VERSION_TYPE}.$${VERSION_PATCH}"
VERSION = $$replace(VERSION, "\\.r", "") VERSION = $$replace(VERSION, "\\.r", "")

@ -132,6 +132,14 @@ buildImporter(){
IMPORTER_NAME="OpenBoardImporter" IMPORTER_NAME="OpenBoardImporter"
checkDir $IMPORTER_DIR checkDir $IMPORTER_DIR
cd ${IMPORTER_DIR} cd ${IMPORTER_DIR}
rm moc_*
rm -rf debug release
rm *.o
git reset --hard
git pull
$QMAKE_PATH ${IMPORTER_NAME}.pro $QMAKE_PATH ${IMPORTER_NAME}.pro
make clean make clean
make -j4 make -j4

@ -90,6 +90,12 @@ function addImporter {
fi fi
cd ${importerDir} cd ${importerDir}
git reset --hard
git pull
rm -rf ${importerName}.app
rm moc_*
rm MakeFile*
rm *.o
$QMAKE ${importerName}.pro $QMAKE ${importerName}.pro
make -j4 make -j4
$MACDEPLOYQT ${importerName}.app $MACDEPLOYQT ${importerName}.app
@ -218,7 +224,7 @@ notify "Creating dmg ..."
umount "$VOLUME" 2> /dev/null umount "$VOLUME" 2> /dev/null
$DMGUTIL --open --volume="$APPLICATION_NAME" "$DMG" $DMGUTIL --open --volume="$APPLICATION_NAME" "$DMG"
cp *.pdf "$VOLUME" #cp *.pdf "$VOLUME"
cp -R "$APP" "$VOLUME" cp -R "$APP" "$VOLUME"
ln -s /Applications "$VOLUME" ln -s /Applications "$VOLUME"
@ -226,8 +232,7 @@ $DMGUTIL --set --iconsize=96 --toolbar=false --icon=resources/macx/OpenBoard.icn
$DMGUTIL --set --x=20 --y=60 --width=580 --height=440 "$VOLUME" $DMGUTIL --set --x=20 --y=60 --width=580 --height=440 "$VOLUME"
$DMGUTIL --set --x=180 --y=120 "$VOLUME/`basename \"$APP\"`" $DMGUTIL --set --x=180 --y=120 "$VOLUME/`basename \"$APP\"`"
$DMGUTIL --set --x=400 --y=120 "$VOLUME/Applications" $DMGUTIL --set --x=400 --y=120 "$VOLUME/Applications"
$DMGUTIL --set --x=180 --y=280 "$VOLUME/ReleaseNotes.pdf" #$DMGUTIL --set --x=180 --y=280 "$VOLUME/ReleaseNotes.pdf"
$DMGUTIL --set --x=400 --y=280 "$VOLUME/JournalDesModifications.pdf"
$DMGUTIL --close --volume="$APPLICATION_NAME" "$DMG" $DMGUTIL --close --volume="$APPLICATION_NAME" "$DMG"

@ -44,6 +44,10 @@ IF NOT EXIST "%IMPORTER_PATH%" GOTO EXIT_WITH_ERROR
set HOME_DIR="%cd%" set HOME_DIR="%cd%"
cd %IMPORTER_PATH% cd %IMPORTER_PATH%
IF EXIST "release" (del "release\*.*" /Q) IF EXIST "release" (del "release\*.*" /Q)
IF EXIST "debug" (del "debug\*.*" /Q)
IF EXIST "MakeFile" (del "MakeFile*" /Q)
IF EXIST "MakeFile" (del "MakeFile*" /Q)
IF EXIST "%IMPORTER_NAME%.exe" (del "%IMPORTER_NAME%.exe" /Q)
"%QT_BIN%\qmake.exe" %IMPORTER_NAME%.pro "%QT_BIN%\qmake.exe" %IMPORTER_NAME%.pro
nmake release nmake release
cd %HOME_DIR% cd %HOME_DIR%

@ -349,18 +349,17 @@ void UBBoardView::tabletEvent (QTabletEvent * event)
} }
} }
// if event are not Pen events, we drop the tablet stuff and route everything through mouse event
if (currentTool != UBStylusTool::Pen && currentTool != UBStylusTool::Line && currentTool != UBStylusTool::Marker && !mMarkerPressureSensitive){
event->setAccepted (false);
return;
}
QPointF scenePos = viewportTransform ().inverted ().map (tabletPos); QPointF scenePos = viewportTransform ().inverted ().map (tabletPos);
qreal pressure = 1.0; qreal pressure = 1.0;
if (((currentTool == UBStylusTool::Pen || currentTool == UBStylusTool::Line) && mPenPressureSensitive) || (currentTool == UBStylusTool::Marker && mMarkerPressureSensitive)) if (((currentTool == UBStylusTool::Pen || currentTool == UBStylusTool::Line) && mPenPressureSensitive) ||
(currentTool == UBStylusTool::Marker && mMarkerPressureSensitive))
pressure = event->pressure (); pressure = event->pressure ();
else{
//Explanation: rerouting to mouse event
event->setAccepted (false);
return;
}
bool acceptEvent = true; bool acceptEvent = true;
#ifdef Q_WS_MAC #ifdef Q_WS_MAC
@ -534,18 +533,28 @@ Here we determines cases when items should to get mouse press event at pressing
case UBGraphicsTriangle::Type: case UBGraphicsTriangle::Type:
case UBGraphicsCompass::Type: case UBGraphicsCompass::Type:
case UBGraphicsCache::Type: case UBGraphicsCache::Type:
return true;
case UBGraphicsDelegateFrame::Type: case UBGraphicsDelegateFrame::Type:
if (currentTool == UBStylusTool::Play)
return false;
return true;
case UBGraphicsPixmapItem::Type:
case UBGraphicsSvgItem::Type:
if (currentTool == UBStylusTool::Play)
return true;
if (item->isSelected())
return true;
else
return false;
case DelegateButton::Type: case DelegateButton::Type:
return true; return true;
case UBGraphicsMediaItem::Type: case UBGraphicsMediaItem::Type:
return false; return false;
case UBGraphicsSvgItem::Type:
case UBGraphicsPixmapItem::Type:
case UBGraphicsTextItem::Type: case UBGraphicsTextItem::Type:
if (currentTool == UBStylusTool::Play) if (currentTool == UBStylusTool::Play)
return false; return true;
if ((currentTool == UBStylusTool::Selector) && item->isSelected()) if ((currentTool == UBStylusTool::Selector) && item->isSelected())
return true; return true;
if ((currentTool == UBStylusTool::Selector) && item->parentItem() && item->parentItem()->isSelected()) if ((currentTool == UBStylusTool::Selector) && item->parentItem() && item->parentItem()->isSelected())
@ -553,8 +562,13 @@ Here we determines cases when items should to get mouse press event at pressing
if (currentTool != UBStylusTool::Selector) if (currentTool != UBStylusTool::Selector)
return false; return false;
break; break;
case UBGraphicsItemType::StrokeItemType:
if (currentTool == UBStylusTool::Play)
return true;
break;
// Groups shouldn't reacts on any presses and moves for Play tool.
case UBGraphicsGroupContainerItem::Type: case UBGraphicsGroupContainerItem::Type:
// Groups shouldn't reacts on any presses and moves for Play tool.
if(currentTool == UBStylusTool::Play) if(currentTool == UBStylusTool::Play)
{ {
movingItem = NULL; movingItem = NULL;
@ -594,6 +608,7 @@ bool UBBoardView::itemShouldReceiveSuspendedMousePressEvent(QGraphicsItem *item)
case QGraphicsWebView::Type: case QGraphicsWebView::Type:
return false; return false;
case UBGraphicsPixmapItem::Type: case UBGraphicsPixmapItem::Type:
case UBGraphicsSvgItem::Type:
case UBGraphicsTextItem::Type: case UBGraphicsTextItem::Type:
case UBGraphicsWidgetItem::Type: case UBGraphicsWidgetItem::Type:
if (currentTool == UBStylusTool::Selector && !item->isSelected() && item->parentItem()) if (currentTool == UBStylusTool::Selector && !item->isSelected() && item->parentItem())
@ -644,6 +659,8 @@ bool UBBoardView::itemShouldBeMoved(QGraphicsItem *item)
case UBGraphicsSvgItem::Type: case UBGraphicsSvgItem::Type:
case UBGraphicsPixmapItem::Type: case UBGraphicsPixmapItem::Type:
if (currentTool == UBStylusTool::Play || !item->isSelected())
return true;
if (item->isSelected()) if (item->isSelected())
return false; return false;
case UBGraphicsMediaItem::Type: case UBGraphicsMediaItem::Type:
@ -943,9 +960,6 @@ void UBBoardView::mousePressEvent (QMouseEvent *event)
mMouseDownPos = event->pos (); mMouseDownPos = event->pos ();
movingItem = scene()->itemAt(this->mapToScene(event->posF().toPoint())); movingItem = scene()->itemAt(this->mapToScene(event->posF().toPoint()));
if (!movingItem)
emit clickOnBoard();
if (event->button () == Qt::LeftButton && isInteractive()) if (event->button () == Qt::LeftButton && isInteractive())
{ {
int currentTool = (UBStylusTool::Enum)UBDrawingController::drawingController ()->stylusTool (); int currentTool = (UBStylusTool::Enum)UBDrawingController::drawingController ()->stylusTool ();

@ -63,7 +63,6 @@ public:
signals: signals:
void resized(QResizeEvent* event); void resized(QResizeEvent* event);
void shown(); void shown();
void clickOnBoard();
void mouseReleased(); void mouseReleased();
protected: protected:

@ -29,6 +29,7 @@
#include "core/UBSettings.h" #include "core/UBSettings.h"
#include "board/UBBoardView.h" #include "board/UBBoardView.h"
#include "board/UBBoardController.h"
#include "gui/UBBlackoutWidget.h" #include "gui/UBBlackoutWidget.h"
@ -277,7 +278,6 @@ void UBDisplayManager::blackout()
} }
} }
void UBDisplayManager::unBlackout() void UBDisplayManager::unBlackout()
{ {
while (!mBlackoutWidgets.isEmpty()) while (!mBlackoutWidgets.isEmpty())
@ -287,6 +287,9 @@ void UBDisplayManager::unBlackout()
} }
UBPlatformUtils::fadeDisplayIn(); UBPlatformUtils::fadeDisplayIn();
UBApplication::boardController->freezeW3CWidgets(false);
} }

@ -237,9 +237,6 @@ void UBGraphicsDelegateFrame::mousePressEvent(QGraphicsSceneMouseEvent *event)
mCurrentTool = toolFromPos(event->pos()); mCurrentTool = toolFromPos(event->pos());
setCursorFromAngle(QString::number((int)mAngle % 360)); setCursorFromAngle(QString::number((int)mAngle % 360));
event->accept(); event->accept();
// if (moving())
// prepareFramesToMove(getLinkedFrames());
} }
void UBGraphicsDelegateFrame::setCursorFromAngle(QString angle) void UBGraphicsDelegateFrame::setCursorFromAngle(QString angle)

@ -1120,8 +1120,7 @@ void MediaTimer::addPoint(QPolygon &a, const QPoint &p)
a.setPoint(n, p); a.setPoint(n, p);
} }
void MediaTimer::paint(QPainter *p, void MediaTimer::paint(QPainter *p, const QStyleOptionGraphicsItem *option, QWidget *widget)
const QStyleOptionGraphicsItem *option, QWidget *widget)
{ {
Q_UNUSED(option); Q_UNUSED(option);
Q_UNUSED(widget); Q_UNUSED(widget);
@ -1300,10 +1299,6 @@ QPainterPath DelegateMediaControl::shape() const
void DelegateMediaControl::positionHandles() void DelegateMediaControl::positionHandles()
{ {
QRectF selfRect = rect();
selfRect.setHeight(parentItem()->boundingRect().height());
setRect(selfRect);
QTime tTotal; QTime tTotal;
tTotal = tTotal.addMSecs(mTotalTimeInMs); tTotal = tTotal.addMSecs(mTotalTimeInMs);
mLCDTimerArea.setHeight(parentItem()->boundingRect().height()); mLCDTimerArea.setHeight(parentItem()->boundingRect().height());
@ -1312,12 +1307,11 @@ void DelegateMediaControl::positionHandles()
mDisplayFormat = "ss"; mDisplayFormat = "ss";
if (tTotal.minute() > 0)
{ //Explanation at least the second and minutes are diplayed
mDisplayFormat = "mm:" + mDisplayFormat; mDisplayFormat = "mm:" + mDisplayFormat;
digitsCount += 3; digitsCount += 3;
timerWidth += mLCDTimerArea.height()*0.5; timerWidth += mLCDTimerArea.height();
}
if (tTotal.hour() > 0) if (tTotal.hour() > 0)
{ {
@ -1330,10 +1324,6 @@ void DelegateMediaControl::positionHandles()
mLCDTimerArea.setWidth(timerWidth); mLCDTimerArea.setWidth(timerWidth);
lcdTimer->setRect(mLCDTimerArea); lcdTimer->setRect(mLCDTimerArea);
// not the best solution, but it works.
lcdTimer->positionHandles();
mLCDTimerArea = lcdTimer->rect();
// -------------------------------------
lcdTimer->setPos(rect().width() - mLCDTimerArea.width(), 0); lcdTimer->setPos(rect().width() - mLCDTimerArea.width(), 0);
@ -1348,6 +1338,7 @@ void DelegateMediaControl::update()
QTime tCurrent; QTime tCurrent;
tCurrent = tCurrent.addMSecs(mCurrentTimeInMs < 0 ? 0 : mCurrentTimeInMs); tCurrent = tCurrent.addMSecs(mCurrentTimeInMs < 0 ? 0 : mCurrentTimeInMs);
lcdTimer->display(tCurrent.toString(mDisplayFormat)); lcdTimer->display(tCurrent.toString(mDisplayFormat));
QGraphicsRectItem::update(); QGraphicsRectItem::update();

@ -174,7 +174,6 @@ class DelegateMediaControl: public QObject, public QGraphicsRectItem
void positionHandles(); void positionHandles();
void updateTicker(qint64 time); void updateTicker(qint64 time);
void totalTimeChanged(qint64 newTotalTime); void totalTimeChanged(qint64 newTotalTime);
QSizeF lcdAreaSize() {return mLCDTimerArea.size();}
signals: signals:
void used(); void used();
@ -286,7 +285,6 @@ class UBGraphicsItemDelegate : public QObject
UBGraphicsFlags ubflags() const {return mFlags;} UBGraphicsFlags ubflags() const {return mFlags;}
bool testUBFlags(UBGraphicsFlags pf) const {return mFlags & pf;} bool testUBFlags(UBGraphicsFlags pf) const {return mFlags & pf;}
void setUBFlags(UBGraphicsFlags pf); void setUBFlags(UBGraphicsFlags pf);
// void addUBFlags(UBGraphicsFlags pf) {setUBFlags(ubflags() | pf);}
void setUBFlag(UBGraphicsFlags pf, bool set = true); void setUBFlag(UBGraphicsFlags pf, bool set = true);
signals: signals:

@ -44,6 +44,7 @@ UBGraphicsMediaItemDelegate::UBGraphicsMediaItemDelegate(UBGraphicsMediaItem* pD
| GF_RESPECT_RATIO | GF_RESPECT_RATIO
| GF_TOOLBAR_USED | GF_TOOLBAR_USED
| GF_SHOW_CONTENT_SOURCE) | GF_SHOW_CONTENT_SOURCE)
, mPlayPauseButton(NULL)
, mMedia(pMedia) , mMedia(pMedia)
, mToolBarShowTimer(NULL) , mToolBarShowTimer(NULL)
, m_iToolBarShowingInterval(5000) , m_iToolBarShowingInterval(5000)
@ -73,6 +74,7 @@ bool UBGraphicsMediaItemDelegate::mousePressEvent(QGraphicsSceneMouseEvent *even
{ {
Q_UNUSED(event); Q_UNUSED(event);
mToolBarItem->show(); mToolBarItem->show();
positionHandles();
if (mToolBarShowTimer) if (mToolBarShowTimer)
mToolBarShowTimer->start(); mToolBarShowTimer->start();
@ -87,52 +89,50 @@ void UBGraphicsMediaItemDelegate::hideToolBar()
void UBGraphicsMediaItemDelegate::buildButtons() void UBGraphicsMediaItemDelegate::buildButtons()
{ {
mPlayPauseButton = new DelegateButton(":/images/play.svg", mDelegated, mToolBarItem, Qt::TitleBarArea); if(!mPlayPauseButton){
connect(mPlayPauseButton, SIGNAL(clicked(bool)), this, SLOT(togglePlayPause())); mPlayPauseButton = new DelegateButton(":/images/play.svg", mDelegated, mToolBarItem, Qt::TitleBarArea);
connect(mPlayPauseButton, SIGNAL(clicked(bool)), this, SLOT(togglePlayPause()));
mStopButton = new DelegateButton(":/images/stop.svg", mDelegated, mToolBarItem, Qt::TitleBarArea); mStopButton = new DelegateButton(":/images/stop.svg", mDelegated, mToolBarItem, Qt::TitleBarArea);
connect(mStopButton, SIGNAL(clicked(bool)), mMedia, SLOT(stop())); connect(mStopButton, SIGNAL(clicked(bool)), mMedia, SLOT(stop()));
mMediaControl = new DelegateMediaControl(delegated(), mToolBarItem); mMediaControl = new DelegateMediaControl(delegated(), mToolBarItem);
mMediaControl->setFlag(QGraphicsItem::ItemIsSelectable, true); mMediaControl->setFlag(QGraphicsItem::ItemIsSelectable, true);
UBGraphicsItem::assignZValue(mMediaControl, delegated()->zValue()); UBGraphicsItem::assignZValue(mMediaControl, delegated()->zValue());
if (delegated()->isMuted()) if (delegated()->isMuted())
mMuteButton = new DelegateButton(":/images/soundOff.svg", mDelegated, mToolBarItem, Qt::TitleBarArea); mMuteButton = new DelegateButton(":/images/soundOff.svg", mDelegated, mToolBarItem, Qt::TitleBarArea);
else else
mMuteButton = new DelegateButton(":/images/soundOn.svg", mDelegated, mToolBarItem, Qt::TitleBarArea); mMuteButton = new DelegateButton(":/images/soundOn.svg", mDelegated, mToolBarItem, Qt::TitleBarArea);
connect(mMuteButton, SIGNAL(clicked(bool)), delegated(), SLOT(toggleMute())); connect(mMuteButton, SIGNAL(clicked(bool)), delegated(), SLOT(toggleMute()));
connect(mMuteButton, SIGNAL(clicked(bool)), this, SLOT(toggleMute())); // for changing button image connect(mMuteButton, SIGNAL(clicked(bool)), this, SLOT(toggleMute())); // for changing button image
mToolBarButtons << mPlayPauseButton << mStopButton << mMuteButton; mToolBarButtons << mPlayPauseButton << mStopButton << mMuteButton;
mToolBarItem->setItemsOnToolBar(QList<QGraphicsItem*>() << mPlayPauseButton << mStopButton << mMediaControl << mMuteButton); mToolBarItem->setItemsOnToolBar(QList<QGraphicsItem*>() << mPlayPauseButton << mStopButton << mMediaControl << mMuteButton );
mToolBarItem->setVisibleOnBoard(true); mToolBarItem->setVisibleOnBoard(true);
mToolBarItem->setShifting(false); mToolBarItem->setShifting(false);
if (mToolBarShowTimer) if (mToolBarShowTimer)
{ {
connect(mPlayPauseButton, SIGNAL(clicked(bool)), mToolBarShowTimer, SLOT(start())); connect(mPlayPauseButton, SIGNAL(clicked(bool)), mToolBarShowTimer, SLOT(start()));
connect(mStopButton, SIGNAL(clicked(bool)), mToolBarShowTimer, SLOT(start())); connect(mStopButton, SIGNAL(clicked(bool)), mToolBarShowTimer, SLOT(start()));
connect(mMediaControl, SIGNAL(used()), mToolBarShowTimer, SLOT(start())); connect(mMediaControl, SIGNAL(used()), mToolBarShowTimer, SLOT(start()));
connect(mMuteButton, SIGNAL(clicked(bool)), mToolBarShowTimer, SLOT(start())); connect(mMuteButton, SIGNAL(clicked(bool)), mToolBarShowTimer, SLOT(start()));
} }
// UBGraphicsMediaItem *audioItem = dynamic_cast<UBGraphicsMediaItem*>(mDelegated);
// if (audioItem) positionHandles();
// { }
// if (audioItem->getMediaType() == UBGraphicsMediaItem::mediaType_Audio)
// {
positionHandles();
// }
// }
} }
UBGraphicsMediaItemDelegate::~UBGraphicsMediaItemDelegate() UBGraphicsMediaItemDelegate::~UBGraphicsMediaItemDelegate()
{ {
if (mToolBarShowTimer) if (mToolBarShowTimer){
delete mToolBarShowTimer; delete mToolBarShowTimer;
mToolBarShowTimer = NULL;
}
} }
void UBGraphicsMediaItemDelegate::positionHandles() void UBGraphicsMediaItemDelegate::positionHandles()
@ -144,32 +144,20 @@ void UBGraphicsMediaItemDelegate::positionHandles()
{ {
QRectF toolBarRect = mToolBarItem->rect(); QRectF toolBarRect = mToolBarItem->rect();
mToolBarItem->setPos(0, delegated()->boundingRect().height()-mToolBarItem->rect().height()); mToolBarItem->setPos(0, mediaItem->boundingRect().height()-mToolBarItem->rect().height());
toolBarRect.setWidth(delegated()->boundingRect().width()); toolBarRect.setWidth(mediaItem->boundingRect().width());
mToolBarItem->show(); mToolBarItem->show();
mToolBarItem->setRect(toolBarRect); mToolBarItem->setRect(toolBarRect);
} }
int toolBarMinimumWidth = 0; int toolBarButtonsWidth = 0;
int mediaItemWidth = mToolBarItem->boundingRect().width();
foreach (DelegateButton* button, mToolBarButtons) foreach (DelegateButton* button, mToolBarButtons)
{ toolBarButtonsWidth += button->boundingRect().width() + mToolBarItem->getElementsPadding();
mediaItemWidth -= button->boundingRect().width() + mToolBarItem->getElementsPadding();
toolBarMinimumWidth += button->boundingRect().width() + mToolBarItem->getElementsPadding();
}
toolBarMinimumWidth += mToolBarItem->boundingRect().height();
QWidget* pAudioWidget = delegated()->widget();
if (pAudioWidget)
{
pAudioWidget->setMinimumSize(toolBarMinimumWidth + (int)mMediaControl->lcdAreaSize().width() + (int)mMediaControl->rect().height(),26);
}
QRectF mediaItemRect = mMediaControl->rect(); QRectF mediaItemRect = mMediaControl->rect();
mediaItemRect.setWidth(mediaItemWidth); mediaItemRect.setWidth(mediaItem->boundingRect().width() - toolBarButtonsWidth);
mediaItemRect.setHeight(mToolBarItem->boundingRect().height()); mediaItemRect.setHeight(mToolBarItem->boundingRect().height());
mMediaControl->setRect(mediaItemRect); mMediaControl->setRect(mediaItemRect);

@ -81,4 +81,4 @@ class UBGraphicsMediaItemDelegate : public UBGraphicsItemDelegate
int m_iToolBarShowingInterval; int m_iToolBarShowingInterval;
}; };
#endif /* UBGRAPHICSMEDIAITEMDELEGATE_H_ */ #endif /* UBGRAPHICSMEDIAITEMDELEGATE_H_ */

@ -122,6 +122,9 @@ void UBGraphicsCompass::paint(QPainter *painter, const QStyleOptionGraphicsItem
Q_UNUSED(styleOption); Q_UNUSED(styleOption);
Q_UNUSED(widget); Q_UNUSED(widget);
painter->setBrush(edgeFillColor());
mAntiScaleRatio = 1 / (UBApplication::boardController->systemScaleFactor() * UBApplication::boardController->currentZoom()); mAntiScaleRatio = 1 / (UBApplication::boardController->systemScaleFactor() * UBApplication::boardController->currentZoom());
QTransform antiScaleTransform; QTransform antiScaleTransform;
antiScaleTransform.scale(mAntiScaleRatio, mAntiScaleRatio); antiScaleTransform.scale(mAntiScaleRatio, mAntiScaleRatio);

@ -488,7 +488,6 @@ void UBGraphicsProtractor::paintButtons(QPainter *painter)
void UBGraphicsProtractor::paintAngleMarker(QPainter *painter) void UBGraphicsProtractor::paintAngleMarker(QPainter *painter)
{ {
painter->save(); painter->save();
painter->translate(rect().center()); painter->translate(rect().center());
painter->rotate(-mStartAngle); painter->rotate(-mStartAngle);
painter->translate(-rect().center().x(), -rect().center().y()); painter->translate(-rect().center().x(), -rect().center().y());

@ -121,6 +121,7 @@ void UBGraphicsRuler::paint(QPainter *painter, const QStyleOptionGraphicsItem *s
painter->setPen(drawColor()); painter->setPen(drawColor());
painter->setBrush(edgeFillColor());
painter->setRenderHint(QPainter::Antialiasing, true); painter->setRenderHint(QPainter::Antialiasing, true);
painter->drawRoundedRect(rect(), sRoundingRadius, sRoundingRadius); painter->drawRoundedRect(rect(), sRoundingRadius, sRoundingRadius);
fillBackground(painter); fillBackground(painter);

Loading…
Cancel
Save