diff --git a/src/app/valentina/dialogs/vabstractlayoutdialog.h b/src/app/valentina/dialogs/vabstractlayoutdialog.h index 289c3ef76..49320ce44 100644 --- a/src/app/valentina/dialogs/vabstractlayoutdialog.h +++ b/src/app/valentina/dialogs/vabstractlayoutdialog.h @@ -32,28 +32,30 @@ #include #include -enum class Unit : char; +enum class Unit : qint8; class VAbstractLayoutDialog : public QDialog { public: - enum class PaperSizeTemplate : char { A0 = 0, - A1, - A2, - A3, - A4, - Letter, - Legal, - Tabloid, - Roll24in, // Be carefull when change order for roll types - Roll30in, // Used also for showing icon - Roll36in, - Roll42in, - Roll44in, - Roll48in, - Roll62in, - Roll72in, - Custom}; + enum class PaperSizeTemplate : qint8 { + A0 = 0, + A1, + A2, + A3, + A4, + Letter, + Legal, + Tabloid, + Roll24in, // Be carefull when change order for roll types + Roll30in, // Used also for showing icon + Roll36in, + Roll42in, + Roll44in, + Roll48in, + Roll62in, + Roll72in, + Custom + }; explicit VAbstractLayoutDialog(QWidget *parent = nullptr); diff --git a/src/app/valentina/mainwindowsnogui.h b/src/app/valentina/mainwindowsnogui.h index 0db57b567..288822146 100644 --- a/src/app/valentina/mainwindowsnogui.h +++ b/src/app/valentina/mainwindowsnogui.h @@ -192,7 +192,7 @@ private: void PrintPreview(); void LayoutPrint(); - enum class PrintType : char {PrintPDF, PrintPreview, PrintNative}; + enum class PrintType : qint8 {PrintPDF, PrintPreview, PrintNative}; void SetPrinterSettings(QPrinter *printer, const PrintType &printType); QPageSize::PageSizeId FindPageSizeId(const QSizeF &size) const; diff --git a/src/libs/ifc/xml/vabstractpattern.h b/src/libs/ifc/xml/vabstractpattern.h index 1da118d76..65f50fee4 100644 --- a/src/libs/ifc/xml/vabstractpattern.h +++ b/src/libs/ifc/xml/vabstractpattern.h @@ -49,14 +49,14 @@ class QDomElement; class VPiecePath; class VPieceNode; -enum class Document : char { FullLiteParse, LiteParse, LitePPParse, FullParse }; -enum class LabelType : char {NewPatternPiece, NewLabel}; +enum class Document : qint8 { FullLiteParse, LiteParse, LitePPParse, FullParse }; +enum class LabelType : qint8 {NewPatternPiece, NewLabel}; // Don't touch values!!!. Same values stored in xml. -enum class CrossCirclesPoint : char {FirstPoint = 1, SecondPoint = 2}; -enum class VCrossCurvesPoint : char {HighestPoint = 1, LowestPoint = 2}; -enum class HCrossCurvesPoint : char {LeftmostPoint = 1, RightmostPoint = 2}; -enum class AxisType : char {VerticalAxis = 1, HorizontalAxis = 2}; +enum class CrossCirclesPoint : qint8 {FirstPoint = 1, SecondPoint = 2}; +enum class VCrossCurvesPoint : qint8 {HighestPoint = 1, LowestPoint = 2}; +enum class HCrossCurvesPoint : qint8 {LeftmostPoint = 1, RightmostPoint = 2}; +enum class AxisType : qint8 {VerticalAxis = 1, HorizontalAxis = 2}; class VContainer; class VDataTool; diff --git a/src/libs/vdxf/dxfdef.h b/src/libs/vdxf/dxfdef.h index 6ea5c72eb..457610359 100644 --- a/src/libs/vdxf/dxfdef.h +++ b/src/libs/vdxf/dxfdef.h @@ -32,10 +32,10 @@ #include #include -enum class VarMeasurement : unsigned char { English=0, Metric=1 }; +enum class VarMeasurement : quint8 { English=0, Metric=1 }; //Default drawing units for AutoCAD DesignCenter blocks: -enum class VarInsunits : unsigned char { Inches=1, Millimeters=4, Centimeters=5 }; +enum class VarInsunits : quint8 { Inches=1, Millimeters=4, Centimeters=5 }; // Helps mark end of string. See VDxfEngine::drawTextItem for more details extern const QString endStringPlaceholder; diff --git a/src/libs/vformat/vmeasurements.h b/src/libs/vformat/vmeasurements.h index 214e00519..c25084d27 100644 --- a/src/libs/vformat/vmeasurements.h +++ b/src/libs/vformat/vmeasurements.h @@ -41,7 +41,7 @@ class VContainer; -enum class GenderType : char { Male, Female, Unknown }; +enum class GenderType : qint8 { Male, Female, Unknown }; class VMeasurements : public VDomDocument { diff --git a/src/libs/vgeometry/vgeometrydef.h b/src/libs/vgeometry/vgeometrydef.h index 87154ef56..62711defa 100644 --- a/src/libs/vgeometry/vgeometrydef.h +++ b/src/libs/vgeometry/vgeometrydef.h @@ -35,7 +35,7 @@ #include "../ifc/ifcdef.h" -enum class GOType : char +enum class GOType : qint8 { Point, Arc, @@ -47,10 +47,10 @@ enum class GOType : char PlaceLabel, Unknown }; -enum class SplinePointPosition : char { FirstPoint, LastPoint }; +enum class SplinePointPosition : qint8 { FirstPoint, LastPoint }; // Keep synchronized with XSD schema -enum class PlaceLabelType : unsigned char +enum class PlaceLabelType : quint8 { Segment= 0, Rectangle = 1, diff --git a/src/libs/vlayout/vbank.h b/src/libs/vlayout/vbank.h index b564b95c7..ce5606cec 100644 --- a/src/libs/vlayout/vbank.h +++ b/src/libs/vlayout/vbank.h @@ -49,7 +49,7 @@ Q_DECLARE_LOGGING_CATEGORY(lBank) -enum class Cases : char { CaseThreeGroup = 0, CaseTwoGroup, CaseDesc, UnknownCase}; +enum class Cases : qint8 { CaseThreeGroup = 0, CaseTwoGroup, CaseDesc, UnknownCase}; class VBank { diff --git a/src/libs/vlayout/vlayoutdef.h b/src/libs/vlayout/vlayoutdef.h index ee6aba976..cec0823c6 100644 --- a/src/libs/vlayout/vlayoutdef.h +++ b/src/libs/vlayout/vlayoutdef.h @@ -35,7 +35,7 @@ #include "../vmisc/typedef.h" -enum class LayoutExportFormats : char +enum class LayoutExportFormats : qint8 { SVG = 0, PDF = 1, @@ -75,7 +75,7 @@ enum class LayoutExportFormats : char COUNT /*Use only for validation*/ }; -enum class LayoutErrors : char +enum class LayoutErrors : qint8 { NoError, PrepareLayoutError, @@ -85,7 +85,7 @@ enum class LayoutErrors : char TerminatedByException }; -enum class BestFrom : char +enum class BestFrom : qint8 { Rotation = 0, Combine = 1 diff --git a/src/libs/vlayout/vposition.h b/src/libs/vlayout/vposition.h index c723996d8..e47ba0ad7 100644 --- a/src/libs/vlayout/vposition.h +++ b/src/libs/vlayout/vposition.h @@ -82,14 +82,14 @@ private: */ qreal angle_between{0}; - enum class CrossingType : char + enum class CrossingType : qint8 { NoIntersection = 0, Intersection = 1, EdgeError = 2 }; - enum class InsideType : char + enum class InsideType : qint8 { Outside = 0, Inside = 1, diff --git a/src/libs/vmisc/def.h b/src/libs/vmisc/def.h index 44400d76e..642113056 100644 --- a/src/libs/vmisc/def.h +++ b/src/libs/vmisc/def.h @@ -80,17 +80,17 @@ extern const qreal maxCurveApproximationScale; extern const int minLabelFontSize; extern const int maxLabelFontSize; -enum class NodeDetail : char { Contour, Modeling }; -enum class SceneObject : char { Point, Line, Spline, Arc, ElArc, SplinePath, Detail, Unknown }; -enum class MeasurementsType : char { Multisize, Individual , Unknown}; -enum class Unit : char { Mm = 0, Cm, Inch, Px, LAST_UNIT_DO_NOT_USE}; -enum class Source : char { FromGui, FromFile, FromTool }; +enum class NodeDetail : qint8 { Contour, Modeling }; +enum class SceneObject : qint8 { Point, Line, Spline, Arc, ElArc, SplinePath, Detail, Unknown }; +enum class MeasurementsType : qint8 { Multisize, Individual , Unknown}; +enum class Unit : qint8 { Mm = 0, Cm, Inch, Px, LAST_UNIT_DO_NOT_USE}; +enum class Source : qint8 { FromGui, FromFile, FromTool }; enum class NodeUsage : bool {NotInUse = false, InUse = true}; enum class SelectionType : bool {ByMousePress, ByMouseRelease}; enum class PageOrientation : bool {Portrait = true, Landscape = false}; -enum class Draw : char { Calculation, Modeling, Layout }; +enum class Draw : qint8 { Calculation, Modeling, Layout }; -enum class PieceNodeAngle : unsigned char +enum class PieceNodeAngle : quint8 { ByLength = 0, ByPointsIntersection = 1, @@ -102,7 +102,7 @@ enum class PieceNodeAngle : unsigned char LAST_ONE_DO_NOT_USE }; -enum class PassmarkLineType : unsigned char +enum class PassmarkLineType : quint8 { OneLine = 0, // Default TwoLines, @@ -118,7 +118,7 @@ enum class PassmarkLineType : unsigned char QString PassmarkLineTypeToString(PassmarkLineType type); PassmarkLineType StringToPassmarkLineType(const QString &value); -enum class PassmarkAngleType : unsigned char +enum class PassmarkAngleType : quint8 { Straightforward = 0, // Default Bisector, @@ -139,13 +139,13 @@ Unit StrToUnits(const QString &unit); QString UnitsToStr(const Unit &unit, const bool translate = false); -enum class PiecePathIncludeType : unsigned char +enum class PiecePathIncludeType : quint8 { AsMainPath = 0, AsCustomSA = 1 }; -enum class PiecePathType : unsigned char {PiecePath = 0, CustomSeamAllowance = 1, InternalPath = 2, Unknown = 3}; +enum class PiecePathType : quint8 {PiecePath = 0, CustomSeamAllowance = 1, InternalPath = 2, Unknown = 3}; typedef int ToolVisHolderType; enum class Tool : ToolVisHolderType @@ -267,26 +267,26 @@ enum class Vis : ToolVisHolderType LAST_ONE_DO_NOT_USE //add new stuffs above this, this constant must be last and never used }; -enum class VarType : char { Measurement, Increment, IncrementSeparator, LineLength, CurveLength, CurveCLength, - LineAngle, CurveAngle, ArcRadius, Unknown }; +enum class VarType : qint8 { Measurement, Increment, IncrementSeparator, LineLength, CurveLength, CurveCLength, + LineAngle, CurveAngle, ArcRadius, Unknown }; -enum class IncrementType : char { Increment, Separator }; +enum class IncrementType : qint8 { Increment, Separator }; QString IncrementTypeToString(IncrementType type); IncrementType StringToIncrementType(const QString &value); static const int heightStep = 6; -enum class GHeights : unsigned char { ALL, - H50=50, H56=56, H62=62, H68=68, H74=74, H80=80, H86=86, H92=92, - H98=98, H104=104, H110=110, H116=116, H122=122, H128=128, H134=134, H140=140, - H146=146, H152=152, H158=158, H164=164, H170=170, H176=176, H182=182, H188=188, - H194=194, H200=200}; +enum class GHeights : quint8 { ALL, + H50=50, H56=56, H62=62, H68=68, H74=74, H80=80, H86=86, H92=92, + H98=98, H104=104, H110=110, H116=116, H122=122, H128=128, H134=134, H140=140, + H146=146, H152=152, H158=158, H164=164, H170=170, H176=176, H182=182, H188=188, + H194=194, H200=200}; static const int sizeStep = 2; -enum class GSizes : unsigned char { ALL, - S22=22, S24=24, S26=26, S28=28, S30=30, S32=32, S34=34, S36=36, S38=38, S40=40, - S42=42, S44=44, S46=46, S48=48, S50=50, S52=52, S54=54, S56=56, S58=58, S60=60, - S62=62, S64=64, S66=66, S68=68, S70=70, S72=72 }; +enum class GSizes : quint8 { ALL, + S22=22, S24=24, S26=26, S28=28, S30=30, S32=32, S34=34, S36=36, S38=38, S40=40, + S42=42, S44=44, S46=46, S48=48, S50=50, S52=52, S54=54, S56=56, S58=58, S60=60, + S62=62, S64=64, S66=66, S68=68, S70=70, S72=72 }; /* QImage supports a maximum of 32768x32768 px images (signed short). * This follows from the condition: width * height * colordepth < INT_MAX (4 billion) -> 32768 * 32768 * 4 = 4 billion. diff --git a/src/libs/vpatterndb/floatItemData/floatitemdef.h b/src/libs/vpatterndb/floatItemData/floatitemdef.h index 26ac8d0fb..cc605ceda 100644 --- a/src/libs/vpatterndb/floatItemData/floatitemdef.h +++ b/src/libs/vpatterndb/floatItemData/floatitemdef.h @@ -33,7 +33,7 @@ #include // denotes the type of arrow for the grainline -enum class ArrowType : char +enum class ArrowType : qint8 { atBoth, atFront, diff --git a/src/libs/vpatterndb/variables/vcurveangle.h b/src/libs/vpatterndb/variables/vcurveangle.h index bd410549b..71afc6d9e 100644 --- a/src/libs/vpatterndb/variables/vcurveangle.h +++ b/src/libs/vpatterndb/variables/vcurveangle.h @@ -39,7 +39,7 @@ class VAbstractCurve; class VSpline; class VEllipticalArc; -enum class CurveAngle : char { StartAngle, EndAngle }; +enum class CurveAngle : qint8 { StartAngle, EndAngle }; class VCurveAngle : public VCurveVariable { diff --git a/src/libs/vpatterndb/variables/vcurveclength.h b/src/libs/vpatterndb/variables/vcurveclength.h index a5a165a93..867b91a7c 100644 --- a/src/libs/vpatterndb/variables/vcurveclength.h +++ b/src/libs/vpatterndb/variables/vcurveclength.h @@ -35,7 +35,7 @@ #include "vcurvevariable.h" -enum class CurveCLength : char { C1, C2 }; +enum class CurveCLength : qint8 { C1, C2 }; class VAbstractBezier; class VSpline; diff --git a/src/libs/vpatterndb/vformula.h b/src/libs/vpatterndb/vformula.h index 5f5eb4cf8..41cea9cea 100644 --- a/src/libs/vpatterndb/vformula.h +++ b/src/libs/vpatterndb/vformula.h @@ -36,7 +36,7 @@ #include #include -enum class FormulaType : char +enum class FormulaType : qint8 { ToUser = 0, FromUser = 1, diff --git a/src/libs/vpatterndb/vpassmark.h b/src/libs/vpatterndb/vpassmark.h index 59eecc549..8ff287d29 100644 --- a/src/libs/vpatterndb/vpassmark.h +++ b/src/libs/vpatterndb/vpassmark.h @@ -68,7 +68,7 @@ Q_DECLARE_TYPEINFO(VPiecePassmarkData, Q_MOVABLE_TYPE); QT_WARNING_POP -enum class PassmarkSide : char { All=0, Left=1, Right=2 }; +enum class PassmarkSide : qint8 { All=0, Left=1, Right=2 }; class VPassmark { diff --git a/src/libs/vpropertyexplorer/vproperty.h b/src/libs/vpropertyexplorer/vproperty.h index ee6343513..ffc6a0d6b 100644 --- a/src/libs/vpropertyexplorer/vproperty.h +++ b/src/libs/vpropertyexplorer/vproperty.h @@ -43,7 +43,7 @@ template class QList; namespace VPE { -enum class Property : char{Simple, Complex}; +enum class Property : qint8 {Simple, Complex}; static const int MyCustomEventType = 1099; diff --git a/src/libs/vtest/abstracttest.h b/src/libs/vtest/abstracttest.h index ca9bb70c3..1b4db42c7 100644 --- a/src/libs/vtest/abstracttest.h +++ b/src/libs/vtest/abstracttest.h @@ -59,7 +59,7 @@ class VContainer; class VPointF; class VSplinePoint; class VPieceNode; -enum class GOType : char; +enum class GOType : qint8; struct VPiecePassmarkData; class AbstractTest : public QObject diff --git a/src/libs/vtools/dialogs/tools/dialogtool.h b/src/libs/vtools/dialogs/tools/dialogtool.h index 2f8d4d822..26654e544 100644 --- a/src/libs/vtools/dialogs/tools/dialogtool.h +++ b/src/libs/vtools/dialogs/tools/dialogtool.h @@ -68,7 +68,7 @@ class QLabel; class QPlainTextEdit; class VAbstractTool; -enum class FillComboBox : char { Whole, NoChildren}; +enum class FillComboBox : qint8 { Whole, NoChildren}; /** * @brief The DialogTool class parent for all dialog of tools. diff --git a/src/libs/vtools/undocommands/label/movedoublelabel.h b/src/libs/vtools/undocommands/label/movedoublelabel.h index f934fc770..55e39e8c0 100644 --- a/src/libs/vtools/undocommands/label/movedoublelabel.h +++ b/src/libs/vtools/undocommands/label/movedoublelabel.h @@ -37,7 +37,7 @@ #include "moveabstractlabel.h" -enum class MoveDoublePoint: char { FirstPoint, SecondPoint }; +enum class MoveDoublePoint: qint8 { FirstPoint, SecondPoint }; class MoveDoubleLabel : public MoveAbstractLabel { diff --git a/src/libs/vtools/undocommands/label/showdoublelabel.h b/src/libs/vtools/undocommands/label/showdoublelabel.h index 1703bcf2d..20d6d84ef 100644 --- a/src/libs/vtools/undocommands/label/showdoublelabel.h +++ b/src/libs/vtools/undocommands/label/showdoublelabel.h @@ -33,7 +33,7 @@ class QGraphicsScene; -enum class ShowDoublePoint: char { FirstPoint, SecondPoint }; +enum class ShowDoublePoint: qint8 { FirstPoint, SecondPoint }; class ShowDoubleLabel : public VUndoCommand { diff --git a/src/libs/vtools/undocommands/vundocommand.h b/src/libs/vtools/undocommands/vundocommand.h index 37491251e..10f3732e0 100644 --- a/src/libs/vtools/undocommands/vundocommand.h +++ b/src/libs/vtools/undocommands/vundocommand.h @@ -42,7 +42,7 @@ Q_DECLARE_LOGGING_CATEGORY(vUndo) -enum class UndoCommand: char +enum class UndoCommand: qint8 { AddPatternPiece, AddToCalc, diff --git a/src/libs/vtools/visualization/visualization.h b/src/libs/vtools/visualization/visualization.h index 2a20ff4c0..0594f48ab 100644 --- a/src/libs/vtools/visualization/visualization.h +++ b/src/libs/vtools/visualization/visualization.h @@ -49,7 +49,7 @@ class VScaledLine; class VContainer; class VInternalVariable; -enum class Mode : char {Creation, Show}; +enum class Mode : qint8 {Creation, Show}; class Visualization : public QObject {