Added settings for showing (or not) the eraser and highlighter preview circles

preferencesAboutTextFull
Craig Watson 9 years ago
parent 35000fe7d2
commit 9f3fa2fa86
  1. 3
      src/core/UBSettings.cpp
  2. 3
      src/core/UBSettings.h
  3. 5
      src/domain/UBGraphicsScene.cpp

@ -305,6 +305,9 @@ void UBSettings::init()
boardMarkerLightBackgroundSelectedColors = new UBColorListSetting(this, "Board", "MarkerLightBackgroundSelectedColors", markerLightBackgroundSelectedColors, boardMarkerAlpha->get().toDouble());
boardMarkerDarkBackgroundSelectedColors = new UBColorListSetting(this, "Board", "MarkerDarkBackgroundSelectedColors", markerDarkBackgroundSelectedColors, boardMarkerAlpha->get().toDouble());
showEraserPreviewCircle = new UBSetting(this, "Board", "ShowEraserPreviewCircle", true);
showMarkerPreviewCircle = new UBSetting(this, "Board", "ShowMarkerPreviewCircle", true);
webUseExternalBrowser = new UBSetting(this, "Web", "UseExternalBrowser", false);
bool defaultShowPageImmediatelyOnMirroredScreen = true;

@ -282,6 +282,9 @@ class UBSettings : public QObject
UBColorListSetting* boardMarkerDarkBackgroundColors;
UBColorListSetting* boardMarkerDarkBackgroundSelectedColors;
UBSetting* showEraserPreviewCircle;
UBSetting* showMarkerPreviewCircle;
UBSetting* webUseExternalBrowser;
UBSetting* webShowPageImmediatelyOnMirroredScreen;

@ -2529,6 +2529,7 @@ void UBGraphicsScene::setDocumentUpdated()
void UBGraphicsScene::createEraiser()
{
if (UBSettings::settings()->showEraserPreviewCircle->get().toBool()) {
mEraser = new QGraphicsEllipseItem(); // mem : owned and destroyed by the scene
mEraser->setRect(QRect(0, 0, 0, 0));
mEraser->setVisible(false);
@ -2538,7 +2539,7 @@ void UBGraphicsScene::createEraiser()
mTools << mEraser;
addItem(mEraser);
}
}
void UBGraphicsScene::createPointer()
@ -2559,6 +2560,7 @@ void UBGraphicsScene::createPointer()
void UBGraphicsScene::createMarkerCircle()
{
if (UBSettings::settings()->showMarkerPreviewCircle->get().toBool()) {
mMarkerCircle = new QGraphicsEllipseItem();
mMarkerCircle->setRect(QRect(0, 0, 0, 0));
@ -2571,6 +2573,7 @@ void UBGraphicsScene::createMarkerCircle()
mTools << mMarkerCircle;
addItem(mMarkerCircle);
}
}
void UBGraphicsScene::setToolCursor(int tool)

Loading…
Cancel
Save