[TD]add style options for broken view

This commit is contained in:
wandererfan
2024-05-28 20:09:54 -04:00
committed by WandererFan
parent 23e4492a91
commit e2441c7079
11 changed files with 682 additions and 495 deletions

View File

@@ -98,6 +98,11 @@ using SU = ShapeUtils;
// DrawBrokenView
//===========================================================================
const char *DrawBrokenView::BreakTypeEnums[] = {
QT_TRANSLATE_NOOP("DrawBrokenView", "None"),
QT_TRANSLATE_NOOP("DrawBrokenView", "ZigZag"),
QT_TRANSLATE_NOOP("DrawBrokenView", "Simple"),
nullptr};
PROPERTY_SOURCE(TechDraw::DrawBrokenView, TechDraw::DrawViewPart)
DrawBrokenView::DrawBrokenView()

View File

@@ -60,6 +60,14 @@ class TechDrawExport DrawBrokenView: public TechDraw::DrawViewPart
PROPERTY_HEADER_WITH_OVERRIDE(TechDraw::DrawBrokenView);
public:
enum BreakType
{
NONE,
ZIGZAG,
SIMPLE
};
static const char* BreakTypeEnums[];
DrawBrokenView();
~DrawBrokenView() override;

View File

@@ -502,6 +502,11 @@ int Preferences::HiddenLineStyle()
return getPreferenceGroup("Decorations")->GetInt("LineStyleHidden", 1) + 1;
}
int Preferences::BreakLineStyle()
{
return getPreferenceGroup("Decorations")->GetInt("LineStyleBreak", 0) + 1;
}
int Preferences::LineSpacingISO()
{
return getPreferenceGroup("Dimensions")->GetInt("LineSpacingFactorISO", 2);
@@ -578,5 +583,9 @@ bool Preferences::useExactMatchOnDims()
return getPreferenceGroup("Dimensions")->GetBool("UseMatcher", true);
}
int Preferences::BreakType()
{
return getPreferenceGroup("Decorations")->GetInt("BreakType", 2);
}

View File

@@ -119,6 +119,7 @@ public:
static int CenterLineStyle();
static int HighlightLineStyle();
static int HiddenLineStyle();
static int BreakLineStyle();
static int LineCapStyle();
static int LineCapIndex();
@@ -131,6 +132,8 @@ public:
static bool showSectionLine();
static bool includeCutLine();
static int BreakType();
static bool useExactMatchOnDims();
};