TechDraw: hard type enums, part 3 (#19418)

* Remove magic number and hard type enums in LineNameEnum.h

- Remove currently present magic numbers
- Hard type enums, so magic numbers can no longer be introduced. We don't want people to introduce magic numbers.

* Remove magic number and hard type enums in QGIFace.h

- Remove currently present magic numbers
- Hard type enums, so magic numbers can no longer be introduced. We don't want people to introduce magic numbers.

* Remove magic number and hard type enums in Enums.h

- Remove currently present magic numbers
- Hard type enums, so magic numbers can no longer be introduced. We don't want people to introduce magic numbers.

* Remove magic number and hard type enums in QGVPage.h

- Remove currently present magic numbers
- Hard type enums, so magic numbers can no longer be introduced. We don't want people to introduce magic numbers.

* Remove magic number and hard type enums in TaskSurfaceFinishSymbols.h

- Remove currently present magic numbers
- Hard type enums, so magic numbers can no longer be introduced. We don't want people to introduce magic numbers.

* Remove magic number and hard type enums in QGTracker.h

- Remove currently present magic numbers
- Hard type enums, so magic numbers can no longer be introduced. We don't want people to introduce magic numbers.
This commit is contained in:
Benjamin Bræstrup Sayoc
2025-02-24 17:58:05 +01:00
committed by GitHub
parent 38797d1fa4
commit bf1f99c070
19 changed files with 161 additions and 107 deletions

View File

@@ -34,6 +34,7 @@
using namespace TechDrawGui;
using FillMode = QGIFace::FillMode;
void QGIViewSection::draw()
{
@@ -91,10 +92,10 @@ void QGIViewSection::drawSectionFace()
QColor faceColor = (sectionVp->CutSurfaceColor.getValue()).asValue<QColor>();
faceColor.setAlpha((100 - sectionVp->CutSurfaceTransparency.getValue())*255/100);
newFace->setFillColor(faceColor);
newFace->setFillMode(faceColor.alpha() ? QGIFace::PlainFill : QGIFace::NoFill);
newFace->setFillMode(faceColor.alpha() ? FillMode::PlainFill : FillMode::NoFill);
} else if (section->CutSurfaceDisplay.isValue("SvgHatch")) {
newFace->isHatched(true);
newFace->setFillMode(QGIFace::SvgFill);
newFace->setFillMode(FillMode::SvgFill);
newFace->setHatchColor(sectionVp->HatchColor.getValue());
newFace->setHatchScale(section->HatchScale.getValue());
newFace->setHatchRotation(section->HatchRotation.getValue());
@@ -103,7 +104,7 @@ void QGIViewSection::drawSectionFace()
newFace->setHatchFile(hatchSpec);
} else if (section->CutSurfaceDisplay.isValue("PatHatch")) {
newFace->isHatched(true);
newFace->setFillMode(QGIFace::GeomHatchFill);
newFace->setFillMode(FillMode::GeomHatchFill);
newFace->setHatchColor(sectionVp->GeomHatchColor.getValue());
newFace->setHatchScale(section->HatchScale.getValue());
newFace->setHatchRotation(section->HatchRotation.getValue());