[TD]add style options for broken view
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -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();
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user