Add 2nd page of preferences
This commit is contained in:
committed by
Yorik van Havre
parent
906bffba8f
commit
bcb1534391
@@ -52,14 +52,18 @@ PROPERTY_SOURCE(TechDraw::DrawHatch, App::DocumentObject)
|
||||
DrawHatch::DrawHatch(void)
|
||||
{
|
||||
static const char *vgroup = "Hatch";
|
||||
Base::Reference<ParameterGrp> hGrp = App::GetApplication().GetUserParameter()
|
||||
.GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/TechDraw/Colors");
|
||||
App::Color fcColor;
|
||||
fcColor.setPackedValue(hGrp->GetUnsigned("Hatch", 0x00FF0000));
|
||||
|
||||
ADD_PROPERTY_TYPE(DirProjection ,(0,0,1.0) ,vgroup,App::Prop_None,"Projection direction when Hatch was defined"); //sb RO?
|
||||
ADD_PROPERTY_TYPE(Source,(0),vgroup,(App::PropertyType)(App::Prop_None),"The View + Face to be hatched");
|
||||
ADD_PROPERTY_TYPE(HatchPattern ,(""),vgroup,App::Prop_None,"The hatch pattern file for this area");
|
||||
ADD_PROPERTY_TYPE(HatchColor,(0.0f,0.0f,0.0f),vgroup,App::Prop_None,"The color of the hatch pattern");
|
||||
ADD_PROPERTY_TYPE(HatchColor,(fcColor),vgroup,App::Prop_None,"The color of the hatch pattern");
|
||||
|
||||
Base::Reference<ParameterGrp> hGrp = App::GetApplication().GetUserParameter()
|
||||
.GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/TechDraw");
|
||||
hGrp = App::GetApplication().GetUserParameter()
|
||||
.GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/TechDraw/Files");
|
||||
|
||||
std::string defaultDir = App::Application::getResourceDir() + "Mod/Drawing/patterns/";
|
||||
std::string defaultFileName = defaultDir + "simple.svg";
|
||||
|
||||
@@ -74,7 +74,7 @@ DrawPage::DrawPage(void)
|
||||
ProjectionType.setEnums(ProjectionTypeEnums);
|
||||
|
||||
Base::Reference<ParameterGrp> hGrp =
|
||||
App::GetApplication().GetUserParameter().GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/TechDraw");
|
||||
App::GetApplication().GetUserParameter().GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/TechDraw/General");
|
||||
|
||||
// In preferences, 0 -> First Angle 1 -> Third Angle
|
||||
int projType = hGrp->GetInt("ProjectionAngle", -1);
|
||||
|
||||
@@ -59,7 +59,7 @@ DrawViewAnnotation::DrawViewAnnotation(void)
|
||||
static const char *vgroup = "Annotation";
|
||||
|
||||
Base::Reference<ParameterGrp> hGrp = App::GetApplication().GetUserParameter()
|
||||
.GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/TechDraw");
|
||||
.GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/TechDraw/Labels");
|
||||
std::string fontName = hGrp->GetASCII("LabelFont", "Sans");
|
||||
|
||||
ADD_PROPERTY_TYPE(Text ,("Default Text"),vgroup,App::Prop_None,"The text to be displayed");
|
||||
|
||||
@@ -91,8 +91,9 @@ using namespace std;
|
||||
|
||||
PROPERTY_SOURCE(TechDraw::DrawViewDetail, TechDraw::DrawViewPart)
|
||||
|
||||
DrawViewDetail::DrawViewDetail() :
|
||||
m_mattingStyle(0)
|
||||
DrawViewDetail::DrawViewDetail()
|
||||
// :
|
||||
// m_mattingStyle(0)
|
||||
{
|
||||
static const char *dgroup = "Detail";
|
||||
|
||||
@@ -271,9 +272,9 @@ void DrawViewDetail::getParameters()
|
||||
// handleFaces
|
||||
// radiusFudge?
|
||||
|
||||
Base::Reference<ParameterGrp> hGrp = App::GetApplication().GetUserParameter()
|
||||
.GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/TechDraw");
|
||||
m_mattingStyle = hGrp->GetInt("MattingStyle", 0);
|
||||
// Base::Reference<ParameterGrp> hGrp = App::GetApplication().GetUserParameter()
|
||||
// .GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/TechDraw");
|
||||
// m_mattingStyle = hGrp->GetInt("MattingStyle", 0);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -69,12 +69,12 @@ public:
|
||||
}
|
||||
|
||||
public:
|
||||
int getMattingStyle() const {return m_mattingStyle;}
|
||||
//int getMattingStyle() const {return m_mattingStyle;}
|
||||
|
||||
protected:
|
||||
Base::Vector3d toR3(const gp_Ax2 fromSystem, const Base::Vector3d fromPoint);
|
||||
void getParameters(void);
|
||||
int m_mattingStyle;
|
||||
//int m_mattingStyle;
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -86,13 +86,16 @@ enum RefType{
|
||||
DrawViewDimension::DrawViewDimension(void)
|
||||
{
|
||||
Base::Reference<ParameterGrp> hGrp = App::GetApplication().GetUserParameter()
|
||||
.GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/TechDraw");
|
||||
.GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/TechDraw/Labels");
|
||||
std::string fontName = hGrp->GetASCII("LabelFont", "Sans");
|
||||
hGrp = App::GetApplication().GetUserParameter()
|
||||
.GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/TechDraw/Dimensions");
|
||||
double fontSize = hGrp->GetFloat("FontSize", 4.0);
|
||||
|
||||
ADD_PROPERTY_TYPE(References2D,(0,0),"",(App::PropertyType)(App::Prop_None),"Projected Geometry References");
|
||||
ADD_PROPERTY_TYPE(References3D,(0,0),"",(App::PropertyType)(App::Prop_None),"3D Geometry References");
|
||||
ADD_PROPERTY_TYPE(Font ,(fontName.c_str()),"Format",App::Prop_None, "The name of the font to use");
|
||||
ADD_PROPERTY_TYPE(Fontsize,(4) ,"Format",(App::PropertyType)(App::Prop_None),"Dimension text size in mm");
|
||||
ADD_PROPERTY_TYPE(Fontsize,(fontSize) ,"Format",(App::PropertyType)(App::Prop_None),"Dimension text size in mm");
|
||||
ADD_PROPERTY_TYPE(FormatSpec,("%value%") ,"Format",(App::PropertyType)(App::Prop_None),"Dimension Format");
|
||||
ADD_PROPERTY_TYPE(LineWidth,(0.5) ,"Format",(App::PropertyType)(App::Prop_None),"Dimension line weight");
|
||||
//ADD_PROPERTY_TYPE(CentreLines,(0) ,"Format",(App::PropertyType)(App::Prop_None),"Arc Dimension Center Mark");
|
||||
@@ -226,14 +229,6 @@ std::string DrawViewDimension::getFormatedValue() const
|
||||
return str.toUtf8().constData();
|
||||
}
|
||||
|
||||
bool DrawViewDimension::showUnits() const
|
||||
{
|
||||
bool result = false;
|
||||
Base::Reference<ParameterGrp> hGrp = App::GetApplication().GetUserParameter()
|
||||
.GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/TechDraw/Dimensions");
|
||||
result = hGrp->GetBool("ShowUnits", true);
|
||||
return result;
|
||||
}
|
||||
|
||||
double DrawViewDimension::getDimValue() const
|
||||
{
|
||||
@@ -561,6 +556,15 @@ bool DrawViewDimension::has3DReferences(void) const
|
||||
return (References3D.getSize() > 0);
|
||||
}
|
||||
|
||||
bool DrawViewDimension::showUnits() const
|
||||
{
|
||||
bool result = false;
|
||||
Base::Reference<ParameterGrp> hGrp = App::GetApplication().GetUserParameter()
|
||||
.GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/TechDraw/Dimensions");
|
||||
result = hGrp->GetBool("ShowUnits", true);
|
||||
return result;
|
||||
}
|
||||
|
||||
PyObject *DrawViewDimension::getPyObject(void)
|
||||
{
|
||||
if (PythonObject.is(Py::_None())) {
|
||||
|
||||
@@ -544,7 +544,7 @@ const std::vector<TechDrawGeometry::BaseGeom *> DrawViewPart::getVisibleFaceEdg
|
||||
void DrawViewPart::getRunControl()
|
||||
{
|
||||
Base::Reference<ParameterGrp> hGrp = App::GetApplication().GetUserParameter()
|
||||
.GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/TechDraw/RunControl");
|
||||
.GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/TechDraw/General");
|
||||
m_sectionEdges = hGrp->GetBool("ShowSectionEdges", 1l);
|
||||
m_handleFaces = hGrp->GetBool("HandleFaces", 1l);
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ DrawViewSpreadsheet::DrawViewSpreadsheet(void)
|
||||
static const char *vgroup = "Spreadsheet";
|
||||
|
||||
Base::Reference<ParameterGrp> hGrp = App::GetApplication().GetUserParameter()
|
||||
.GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/TechDraw");
|
||||
.GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/TechDraw/Labels");
|
||||
std::string fontName = hGrp->GetASCII("LabelFont", "Sans");
|
||||
|
||||
ADD_PROPERTY_TYPE(Source ,(0),vgroup,App::Prop_None,"Spreadsheet to view");
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
#include "Workbench.h"
|
||||
|
||||
#include "DlgPrefsTechDrawImp.h"
|
||||
#include "DlgPrefsTechDraw2Imp.h"
|
||||
#include "ViewProviderPage.h"
|
||||
#include "ViewProviderDrawingView.h"
|
||||
#include "ViewProviderDimension.h"
|
||||
@@ -106,6 +107,7 @@ void TechDrawGuiExport initTechDrawGui()
|
||||
|
||||
// register preferences pages
|
||||
new Gui::PrefPageProducer<TechDrawGui::DlgPrefsTechDrawImp> ("TechDraw");
|
||||
new Gui::PrefPageProducer<TechDrawGui::DlgPrefsTechDraw2Imp> ("TechDraw");
|
||||
|
||||
// add resources and reloads the translators
|
||||
loadTechDrawResource();
|
||||
|
||||
@@ -34,6 +34,7 @@ set(TechDrawGui_MOC_HDRS
|
||||
QGIViewDimension.h
|
||||
TaskProjGroup.h
|
||||
DlgPrefsTechDrawImp.h
|
||||
DlgPrefsTechDraw2Imp.h
|
||||
TaskLinkDim.h
|
||||
DlgTemplateField.h
|
||||
TaskSectionView.h
|
||||
@@ -46,6 +47,7 @@ qt4_add_resources(TechDrawGui_SRCS Resources/TechDraw.qrc)
|
||||
|
||||
set(TechDrawGui_UIC_SRCS
|
||||
DlgPrefsTechDraw.ui
|
||||
DlgPrefsTechDraw2.ui
|
||||
TaskProjGroup.ui
|
||||
TaskLinkDim.ui
|
||||
DlgTemplateField.ui
|
||||
@@ -72,6 +74,9 @@ SET(TechDrawGui_SRCS
|
||||
DlgPrefsTechDraw.ui
|
||||
DlgPrefsTechDrawImp.cpp
|
||||
DlgPrefsTechDrawImp.h
|
||||
DlgPrefsTechDraw2.ui
|
||||
DlgPrefsTechDraw2Imp.cpp
|
||||
DlgPrefsTechDraw2Imp.h
|
||||
TaskLinkDim.ui
|
||||
TaskLinkDim.cpp
|
||||
TaskLinkDim.h
|
||||
|
||||
@@ -99,7 +99,7 @@ void CmdTechDrawNewPageDef::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
Base::Reference<ParameterGrp> hGrp = App::GetApplication().GetUserParameter()
|
||||
.GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/TechDraw");
|
||||
.GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/TechDraw/Files");
|
||||
|
||||
std::string defaultDir = App::Application::getResourceDir() + "Mod/TechDraw/Templates/";
|
||||
std::string defaultFileName = defaultDir + "A4_LandscapeTD.svg";
|
||||
@@ -169,7 +169,7 @@ void CmdTechDrawNewPage::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
Base::Reference<ParameterGrp> hGrp = App::GetApplication().GetUserParameter()
|
||||
.GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/TechDraw");
|
||||
.GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/TechDraw/Files");
|
||||
|
||||
std::string defaultDir = App::Application::getResourceDir() + "Mod/TechDraw/Templates";
|
||||
QString templateDir = QString::fromStdString(hGrp->GetASCII("TemplateDir", defaultDir.c_str()));
|
||||
|
||||
@@ -6,32 +6,32 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>566</width>
|
||||
<height>538</height>
|
||||
<width>558</width>
|
||||
<height>610</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>TechDraw</string>
|
||||
<string>TechDraw 1</string>
|
||||
</property>
|
||||
<widget class="QGroupBox" name="gb_Templates">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>250</y>
|
||||
<x>10</x>
|
||||
<y>450</y>
|
||||
<width>531</width>
|
||||
<height>108</height>
|
||||
<height>151</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Templates</string>
|
||||
<string>Files</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="gridLayoutWidget_3">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<x>20</x>
|
||||
<y>30</y>
|
||||
<width>501</width>
|
||||
<height>71</height>
|
||||
<width>491</width>
|
||||
<height>118</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
@@ -49,7 +49,7 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1" colspan="2">
|
||||
<item row="1" column="1">
|
||||
<widget class="Gui::PrefFileChooser" name="pfc_DefDir">
|
||||
<property name="mode">
|
||||
<enum>Gui::FileChooser::Directory</enum>
|
||||
@@ -58,17 +58,34 @@
|
||||
<cstring>TemplateDir</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>/Mod/TechDraw</cstring>
|
||||
<cstring>/Mod/TechDraw/Files</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1" colspan="2">
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="lbl_Hatch">
|
||||
<property name="text">
|
||||
<string>Default Pattern File</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="Gui::PrefFileChooser" name="pfc_DefTemp">
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>TemplateFile</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>/Mod/TechDraw</cstring>
|
||||
<cstring>/Mod/TechDraw/Files</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="Gui::PrefFileChooser" name="pfc_HatchFile">
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>PatternFile</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>/Mod/TechDraw/Files</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -78,10 +95,10 @@
|
||||
<widget class="QGroupBox" name="gb_Font">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>160</y>
|
||||
<x>10</x>
|
||||
<y>330</y>
|
||||
<width>541</width>
|
||||
<height>91</height>
|
||||
<height>121</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
@@ -91,18 +108,31 @@
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Font</string>
|
||||
<string>Labels</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="gridLayoutWidget_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<x>20</x>
|
||||
<y>30</y>
|
||||
<width>501</width>
|
||||
<height>41</height>
|
||||
<width>491</width>
|
||||
<height>71</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<layout class="QGridLayout" name="gridLayout_2" columnstretch="1,0,0">
|
||||
<item row="1" column="2">
|
||||
<widget class="Gui::PrefDoubleSpinBox" name="dsb_LabelSize">
|
||||
<property name="minimum">
|
||||
<double>0.100000000000000</double>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>LabelSize</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>/Mod/TechDraw/Labels</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="lbl_LabelFont">
|
||||
<property name="text">
|
||||
@@ -110,16 +140,6 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="Gui::PrefLineEdit" name="le_LabelFont">
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>LabelFont</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>Mod/TechDraw</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
@@ -136,135 +156,164 @@
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="Gui::PrefLineEdit" name="le_LabelFont">
|
||||
<property name="text">
|
||||
<string>osifont</string>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>LabelFont</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>Mod/TechDraw/Labels</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="text">
|
||||
<string>Label Size</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QGroupBox" name="gbMisc">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>380</y>
|
||||
<width>531</width>
|
||||
<x>10</x>
|
||||
<y>10</y>
|
||||
<width>521</width>
|
||||
<height>141</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Misc</string>
|
||||
<string>General</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="gridLayoutWidget_4">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>30</y>
|
||||
<width>501</width>
|
||||
<height>95</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QFormLayout" name="formLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="lbl_Angle">
|
||||
<property name="text">
|
||||
<string>Projection Angle</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="Gui::PrefComboBox" name="cb_Angle">
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>ProjectionAngle</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>Mod/TechDraw</cstring>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<layout class="QFormLayout" name="formLayout">
|
||||
<property name="fieldGrowthPolicy">
|
||||
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="lbl_Angle">
|
||||
<property name="text">
|
||||
<string>First</string>
|
||||
<string>Projection Angle</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="Gui::PrefComboBox" name="cb_Angle">
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>ProjectionAngle</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>/Mod/TechDraw/General</cstring>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>First</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Third</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="lbl_HidLine">
|
||||
<property name="text">
|
||||
<string>Third</string>
|
||||
<string>Hidden Line</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="lbl_HidLine">
|
||||
<property name="text">
|
||||
<string>Hidden Line</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="Gui::PrefComboBox" name="cb_HidLine">
|
||||
<property name="currentIndex">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>HiddenLine</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>Mod/TechDraw</cstring>
|
||||
</property>
|
||||
<item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="Gui::PrefComboBox" name="cb_HidLine">
|
||||
<property name="currentIndex">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>HiddenLine</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>Mod/TechDraw/General</cstring>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>NeverShow</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Solid</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Dash</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Dot</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>DashDot</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>DashDotDot</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="Gui::PrefCheckBox" name="cb_Faces">
|
||||
<property name="text">
|
||||
<string>NeverShow</string>
|
||||
<string>Detect Faces</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>HandleFaces</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>/Mod/TechDraw/General</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="Gui::PrefCheckBox" name="cb_SectionEdges">
|
||||
<property name="text">
|
||||
<string>Solid</string>
|
||||
<string>Show Section Edges</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Dash</string>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>ShowSectionEdges</cstring>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Dot</string>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>/Mod/TechDraw/General</cstring>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>DashDot</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>DashDotDot</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="lbl_Hatch">
|
||||
<property name="text">
|
||||
<string>Default Pattern File</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="Gui::PrefFileChooser" name="pfc_HatchFile">
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>PatternFile</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>/Mod/TechDraw</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QGroupBox" name="gb_Colors">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>10</y>
|
||||
<width>531</width>
|
||||
<height>141</height>
|
||||
<y>160</y>
|
||||
<width>521</width>
|
||||
<height>164</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="title">
|
||||
@@ -273,10 +322,34 @@
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="lbl_Select">
|
||||
<item row="2" column="4">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string>Selected</string>
|
||||
<string>Section Hatch</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="4">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>Section Face</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="2">
|
||||
<widget class="Gui::PrefColorButton" name="pcb_Background">
|
||||
<property name="color">
|
||||
<color>
|
||||
<red>80</red>
|
||||
<green>80</green>
|
||||
<blue>80</blue>
|
||||
</color>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>Background</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>/Mod/TechDraw/Colors</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -314,6 +387,19 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="2" column="2">
|
||||
<widget class="Gui::PrefColorButton" name="pcb_Select">
|
||||
<property name="color">
|
||||
@@ -331,19 +417,6 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="0" column="5">
|
||||
<spacer name="horizontalSpacer_4">
|
||||
<property name="orientation">
|
||||
@@ -357,13 +430,6 @@
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="1" column="4">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>Section Face</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="Gui::PrefColorButton" name="pcb_Normal">
|
||||
<property name="color">
|
||||
@@ -404,7 +470,7 @@
|
||||
<item row="0" column="4">
|
||||
<widget class="QLabel" name="lbl_Hidden">
|
||||
<property name="text">
|
||||
<string>Hidden</string>
|
||||
<string>Hidden Line</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -425,6 +491,37 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="lbl_Select">
|
||||
<property name="text">
|
||||
<string>Selected</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="6">
|
||||
<widget class="Gui::PrefColorButton" name="pcb_Hatch">
|
||||
<property name="color">
|
||||
<color>
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</color>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>Hatch</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>/Mod/TechDraw/Colors</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>Background</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
@@ -451,6 +548,11 @@
|
||||
<extends>Gui::ColorButton</extends>
|
||||
<header>Gui/PrefWidgets.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>Gui::PrefCheckBox</class>
|
||||
<extends>QCheckBox</extends>
|
||||
<header>Gui/PrefWidgets.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>Gui::PrefComboBox</class>
|
||||
<extends>QComboBox</extends>
|
||||
@@ -461,6 +563,11 @@
|
||||
<extends>QLineEdit</extends>
|
||||
<header>Gui/PrefWidgets.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>Gui::PrefDoubleSpinBox</class>
|
||||
<extends>QDoubleSpinBox</extends>
|
||||
<header>Gui/PrefWidgets.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections/>
|
||||
|
||||
357
src/Mod/TechDraw/Gui/DlgPrefsTechDraw2.ui
Normal file
357
src/Mod/TechDraw/Gui/DlgPrefsTechDraw2.ui
Normal file
@@ -0,0 +1,357 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>TechDrawGui::DlgPrefsTechDraw2Imp</class>
|
||||
<widget class="QWidget" name="TechDrawGui::DlgPrefsTechDraw2Imp">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>521</width>
|
||||
<height>384</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>TechDraw 2</string>
|
||||
</property>
|
||||
<widget class="QGroupBox" name="gbDim">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>20</y>
|
||||
<width>501</width>
|
||||
<height>141</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Dimensions</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="gridLayoutWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>30</y>
|
||||
<width>471</width>
|
||||
<height>90</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout" columnstretch="1,2,1">
|
||||
<item row="0" column="0">
|
||||
<widget class="Gui::PrefCheckBox" name="cbShowUnits">
|
||||
<property name="text">
|
||||
<string>Show Units</string>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>ShowUnits</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>/Mod/TechDraw/Dimensions</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>Color</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Font Size</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="Gui::PrefDoubleSpinBox" name="dsbFontSize">
|
||||
<property name="decimals">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<double>4.000000000000000</double>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>FontSize</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>/Mod/TechDraw/Dimensions</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="2">
|
||||
<widget class="Gui::PrefColorButton" name="colDimColor">
|
||||
<property name="color">
|
||||
<color>
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</color>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>Color</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>/Mod/TechDraw/Dimensions</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>160</y>
|
||||
<width>501</width>
|
||||
<height>201</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Decorations</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="gridLayoutWidget_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>30</y>
|
||||
<width>471</width>
|
||||
<height>161</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2" columnstretch="1,2,1">
|
||||
<item row="0" column="2">
|
||||
<widget class="Gui::PrefComboBox" name="pcbMatting">
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>MattingStyle</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>/Mod/TechDraw/Decorations</cstring>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Round</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Square</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="text">
|
||||
<string>Section Line Style</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>Center Line Style</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Matting Style</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="2">
|
||||
<widget class="Gui::PrefColorButton" name="colCenterLine">
|
||||
<property name="color">
|
||||
<color>
|
||||
<red>175</red>
|
||||
<green>175</green>
|
||||
<blue>175</blue>
|
||||
</color>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>CenterColor</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>/Mod/TechDraw/Decorations</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="Gui::PrefComboBox" name="pcbCenterStyle">
|
||||
<property name="currentIndex">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>CenterLine</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>/Mod/TechDraw/Decorations</cstring>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>NeverShow</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Sollid</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Dash</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Dot</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>DashDot</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>DashDotDot</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="2">
|
||||
<widget class="Gui::PrefComboBox" name="pcbSectionStyle">
|
||||
<property name="currentIndex">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>SectionLine</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>/Mod/TechDraw/Decorations</cstring>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>NeverShow</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Solid</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Dash</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Dot</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>DashDot</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>DashDotDot</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string>Center Line Color</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="label_7">
|
||||
<property name="text">
|
||||
<string>Section Line Color</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="2">
|
||||
<widget class="Gui::PrefColorButton" name="colSectionLine">
|
||||
<property name="color">
|
||||
<color>
|
||||
<red>175</red>
|
||||
<green>175</green>
|
||||
<blue>175</blue>
|
||||
</color>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>SectionColor</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>/Mod/TechDraw/Decorations</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>Gui::ColorButton</class>
|
||||
<extends>QPushButton</extends>
|
||||
<header>Gui/Widgets.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>Gui::PrefColorButton</class>
|
||||
<extends>Gui::ColorButton</extends>
|
||||
<header>Gui/PrefWidgets.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>Gui::PrefCheckBox</class>
|
||||
<extends>QCheckBox</extends>
|
||||
<header>Gui/PrefWidgets.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>Gui::PrefComboBox</class>
|
||||
<extends>QComboBox</extends>
|
||||
<header>Gui/PrefWidgets.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>Gui::PrefDoubleSpinBox</class>
|
||||
<extends>QDoubleSpinBox</extends>
|
||||
<header>Gui/PrefWidgets.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
81
src/Mod/TechDraw/Gui/DlgPrefsTechDraw2Imp.cpp
Normal file
81
src/Mod/TechDraw/Gui/DlgPrefsTechDraw2Imp.cpp
Normal file
@@ -0,0 +1,81 @@
|
||||
/***************************************************************************
|
||||
* Copyright (c) 2015 FreeCAD Developers *
|
||||
* Author: WandererFan <wandererfan@gmail.com> *
|
||||
* Based on src/Mod/FEM/Gui/DlgSettingsFEMImp.cpp *
|
||||
* *
|
||||
* This file is part of the FreeCAD CAx development system. *
|
||||
* *
|
||||
* This library is free software; you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU Library General Public *
|
||||
* License as published by the Free Software Foundation; either *
|
||||
* version 2 of the License, or (at your option) any later version. *
|
||||
* *
|
||||
* This library is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU Library General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Library General Public *
|
||||
* License along with this library; see the file COPYING.LIB. If not, *
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place, *
|
||||
* Suite 330, Boston, MA 02111-1307, USA *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
#include "PreCompiled.h"
|
||||
|
||||
#include "DlgPrefsTechDraw2Imp.h"
|
||||
#include <Gui/PrefWidgets.h>
|
||||
|
||||
using namespace TechDrawGui;
|
||||
|
||||
DlgPrefsTechDraw2Imp::DlgPrefsTechDraw2Imp( QWidget* parent )
|
||||
: PreferencePage( parent )
|
||||
{
|
||||
this->setupUi(this);
|
||||
}
|
||||
|
||||
DlgPrefsTechDraw2Imp::~DlgPrefsTechDraw2Imp()
|
||||
{
|
||||
// no need to delete child widgets, Qt does it all for us
|
||||
}
|
||||
|
||||
void DlgPrefsTechDraw2Imp::saveSettings()
|
||||
{
|
||||
cbShowUnits->onSave();
|
||||
dsbFontSize->onSave();
|
||||
colDimColor->onSave();
|
||||
pcbMatting->onSave();
|
||||
pcbCenterStyle->onSave();
|
||||
colCenterLine->onSave();
|
||||
pcbSectionStyle->onSave();
|
||||
colSectionLine->onSave();
|
||||
}
|
||||
|
||||
void DlgPrefsTechDraw2Imp::loadSettings()
|
||||
{
|
||||
cbShowUnits->onRestore();
|
||||
dsbFontSize->onRestore();
|
||||
colDimColor->onRestore();
|
||||
pcbMatting->onRestore();
|
||||
pcbCenterStyle->onRestore();
|
||||
colCenterLine->onRestore();
|
||||
pcbSectionStyle->onRestore();
|
||||
colSectionLine->onRestore();
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the strings of the subwidgets using the current language.
|
||||
*/
|
||||
void DlgPrefsTechDraw2Imp::changeEvent(QEvent *e)
|
||||
{
|
||||
if (e->type() == QEvent::LanguageChange) {
|
||||
retranslateUi(this);
|
||||
}
|
||||
else {
|
||||
QWidget::changeEvent(e);
|
||||
}
|
||||
}
|
||||
|
||||
#include <Mod/TechDraw/Gui/moc_DlgPrefsTechDraw2Imp.cpp>
|
||||
50
src/Mod/TechDraw/Gui/DlgPrefsTechDraw2Imp.h
Normal file
50
src/Mod/TechDraw/Gui/DlgPrefsTechDraw2Imp.h
Normal file
@@ -0,0 +1,50 @@
|
||||
/**************************************************************************
|
||||
* Copyright (c) 2015 FreeCAD Developers *
|
||||
* Author: WandererFan <wandererfan@gmail.com> *
|
||||
* Based on src/Mod/FEM/Gui/DlgPrefsTechDraw2Imp.cpp *
|
||||
* *
|
||||
* This file is part of the FreeCAD CAx development system. *
|
||||
* *
|
||||
* This library is free software; you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU Library General Public *
|
||||
* License as published by the Free Software Foundation; either *
|
||||
* version 2 of the License, or (at your option) any later version. *
|
||||
* *
|
||||
* This library is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU Library General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Library General Public *
|
||||
* License along with this library; see the file COPYING.LIB. If not, *
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place, *
|
||||
* Suite 330, Boston, MA 02111-1307, USA *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
#ifndef DRAWINGGUI_DLGPREFSTECHDRAW2IMP_H
|
||||
#define DRAWINGGUI_DLGPREFSTECHDRAW2IMP_H
|
||||
|
||||
#include <Mod/TechDraw/Gui/ui_DlgPrefsTechDraw2.h>
|
||||
#include <Gui/PropertyPage.h>
|
||||
|
||||
namespace TechDrawGui {
|
||||
|
||||
class DlgPrefsTechDraw2Imp : public Gui::Dialog::PreferencePage, public Ui_DlgPrefsTechDraw2Imp
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
DlgPrefsTechDraw2Imp( QWidget* parent = 0 );
|
||||
~DlgPrefsTechDraw2Imp();
|
||||
|
||||
protected:
|
||||
void saveSettings();
|
||||
void loadSettings();
|
||||
void changeEvent(QEvent *e);
|
||||
};
|
||||
|
||||
} // namespace TechDrawGui
|
||||
|
||||
#endif // DRAWINGGUI_DLGPREFSTECHDRAW2IMP_H
|
||||
@@ -43,33 +43,51 @@ DlgPrefsTechDrawImp::~DlgPrefsTechDrawImp()
|
||||
|
||||
void DlgPrefsTechDrawImp::saveSettings()
|
||||
{
|
||||
cb_HidLine->onSave();
|
||||
cb_Angle->onSave();
|
||||
cb_Faces->onSave();
|
||||
cb_SectionEdges->onSave();
|
||||
|
||||
pcb_Normal->onSave();
|
||||
pcb_Select->onSave();
|
||||
pcb_PreSelect->onSave();
|
||||
pcb_Hidden->onSave();
|
||||
pcb_Surface->onSave();
|
||||
pcb_Background->onSave();
|
||||
pcb_Hatch->onSave();
|
||||
|
||||
le_LabelFont->onSave();
|
||||
dsb_LabelSize->onSave();
|
||||
|
||||
pfc_DefTemp->onSave();
|
||||
pfc_DefDir->onSave();
|
||||
cb_HidLine->onSave();
|
||||
cb_Angle->onSave();
|
||||
pfc_HatchFile->onSave();
|
||||
//pfc_HatchDir->onSave();
|
||||
}
|
||||
|
||||
void DlgPrefsTechDrawImp::loadSettings()
|
||||
{
|
||||
cb_HidLine->onRestore();
|
||||
cb_Angle->onRestore();
|
||||
cb_Faces->onRestore();
|
||||
cb_SectionEdges->onRestore();
|
||||
|
||||
pcb_Normal->onRestore();
|
||||
pcb_Select->onRestore();
|
||||
pcb_PreSelect->onRestore();
|
||||
pcb_Hidden->onRestore();
|
||||
pcb_Surface->onRestore();
|
||||
pcb_Background->onRestore();
|
||||
pcb_Hatch->onRestore();
|
||||
|
||||
le_LabelFont->onRestore();
|
||||
dsb_LabelSize->onRestore();
|
||||
|
||||
pfc_DefTemp->onRestore();
|
||||
pfc_DefDir->onRestore();
|
||||
cb_HidLine->onRestore();
|
||||
cb_Angle->onRestore();
|
||||
pfc_HatchFile->onRestore();
|
||||
|
||||
|
||||
//pfc_HatchDir->onRestore();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/**************************************************************************
|
||||
* Copyright (c) 2015 FreeCAD Developers *
|
||||
* Author: WandererFan <wandererfan@gmail.com> *
|
||||
* Based on src/Mod/FEM/Gui/DlgPrefsTechDrawImp.cpp *
|
||||
* Based on src/Mod/FEM/Gui/DlgPrefsTechDrawImp.cpp *
|
||||
* *
|
||||
* This file is part of the FreeCAD CAx development system. *
|
||||
* *
|
||||
|
||||
@@ -40,6 +40,7 @@
|
||||
|
||||
#include <qmath.h>
|
||||
#include <QRectF>
|
||||
#include "QGIView.h"
|
||||
#include "QGCustomText.h"
|
||||
|
||||
using namespace TechDrawGui;
|
||||
@@ -156,10 +157,24 @@ void QGCustomText::paint ( QPainter * painter, const QStyleOptionGraphicsItem *
|
||||
|
||||
QColor QGCustomText::getNormalColor()
|
||||
{
|
||||
Base::Reference<ParameterGrp> hGrp = getParmGroup();
|
||||
App::Color fcColor;
|
||||
fcColor.setPackedValue(hGrp->GetUnsigned("NormalColor", 0x00000000));
|
||||
return fcColor.asValue<QColor>();
|
||||
QColor result;
|
||||
QGIView *parent;
|
||||
QGraphicsItem* qparent = parentItem();
|
||||
if (qparent == nullptr) {
|
||||
parent = nullptr;
|
||||
} else {
|
||||
parent = dynamic_cast<QGIView *> (qparent);
|
||||
}
|
||||
|
||||
if (parent != nullptr) {
|
||||
result = parent->getNormalColor();
|
||||
} else {
|
||||
Base::Reference<ParameterGrp> hGrp = getParmGroup();
|
||||
App::Color fcColor;
|
||||
fcColor.setPackedValue(hGrp->GetUnsigned("NormalColor", 0x00000000));
|
||||
result = fcColor.asValue<QColor>();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
QColor QGCustomText::getPreColor()
|
||||
|
||||
@@ -54,15 +54,15 @@ public:
|
||||
virtual void paint(QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * widget = 0 );
|
||||
virtual void centerAt(QPointF centerPos);
|
||||
virtual void centerAt(double cX, double cY);
|
||||
virtual QColor getNormalColor(void);
|
||||
virtual QColor getPreColor(void);
|
||||
virtual QColor getSelectColor(void);
|
||||
|
||||
protected:
|
||||
virtual void hoverEnterEvent(QGraphicsSceneHoverEvent *event);
|
||||
virtual void hoverLeaveEvent(QGraphicsSceneHoverEvent *event);
|
||||
QVariant itemChange(GraphicsItemChange change, const QVariant &value);
|
||||
|
||||
QColor getNormalColor(void);
|
||||
QColor getPreColor(void);
|
||||
QColor getSelectColor(void);
|
||||
Base::Reference<ParameterGrp> getParmGroup(void);
|
||||
|
||||
bool isHighlighted;
|
||||
|
||||
@@ -69,7 +69,7 @@ void QGICenterLine::setBounds(double x1,double y1,double x2,double y2)
|
||||
QColor QGICenterLine::getCenterColor()
|
||||
{
|
||||
Base::Reference<ParameterGrp> hGrp = App::GetApplication().GetUserParameter()
|
||||
.GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/TechDraw/Colors");
|
||||
.GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/TechDraw/Decorations");
|
||||
App::Color fcColor = App::Color((uint32_t) hGrp->GetUnsigned("CenterColor", 0x08080800));
|
||||
return fcColor.asValue<QColor>();
|
||||
}
|
||||
@@ -77,7 +77,7 @@ QColor QGICenterLine::getCenterColor()
|
||||
Qt::PenStyle QGICenterLine::getCenterStyle()
|
||||
{
|
||||
Base::Reference<ParameterGrp> hGrp = App::GetApplication().GetUserParameter().GetGroup("BaseApp")->
|
||||
GetGroup("Preferences")->GetGroup("Mod/TechDraw");
|
||||
GetGroup("Preferences")->GetGroup("Mod/TechDraw/Decorations");
|
||||
Qt::PenStyle centerStyle = static_cast<Qt::PenStyle> (hGrp->GetInt("CenterLine",3));
|
||||
return centerStyle;
|
||||
}
|
||||
|
||||
@@ -104,7 +104,7 @@ QColor QGIEdge::getHiddenColor()
|
||||
Qt::PenStyle QGIEdge::getHiddenStyle()
|
||||
{
|
||||
Base::Reference<ParameterGrp> hGrp = App::GetApplication().GetUserParameter().GetGroup("BaseApp")->
|
||||
GetGroup("Preferences")->GetGroup("Mod/TechDraw");
|
||||
GetGroup("Preferences")->GetGroup("Mod/TechDraw/General");
|
||||
Qt::PenStyle hidStyle = static_cast<Qt::PenStyle> (hGrp->GetInt("HiddenLine",2));
|
||||
return hidStyle;
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ using namespace TechDrawGui;
|
||||
QGIMatting::QGIMatting() :
|
||||
m_height(10.0),
|
||||
m_width(10.0),
|
||||
m_holeStyle(0),
|
||||
//m_holeStyle(0),
|
||||
m_radius(5.0)
|
||||
|
||||
{
|
||||
@@ -103,7 +103,7 @@ void QGIMatting::draw()
|
||||
QPainterPath ppOut;
|
||||
ppOut.addRect(outline);
|
||||
QPainterPath ppCut;
|
||||
if (m_holeStyle == 0) {
|
||||
if (getHoleStyle() == 0) {
|
||||
QRectF roundCutout (-m_radius,-m_radius,2.0 * m_radius,2.0 * m_radius);
|
||||
ppCut.addEllipse(roundCutout);
|
||||
} else {
|
||||
@@ -116,6 +116,14 @@ void QGIMatting::draw()
|
||||
m_border->setPath(ppCut);
|
||||
}
|
||||
|
||||
int QGIMatting::getHoleStyle()
|
||||
{
|
||||
Base::Reference<ParameterGrp> hGrp = App::GetApplication().GetUserParameter()
|
||||
.GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/TechDraw/Decorations");
|
||||
int style = hGrp->GetInt("MattingStyle", 1l);
|
||||
return style;
|
||||
}
|
||||
|
||||
void QGIMatting::paint ( QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * widget) {
|
||||
QStyleOptionGraphicsItem myOption(*option);
|
||||
myOption.state &= ~QStyle::State_Selected;
|
||||
|
||||
@@ -53,15 +53,16 @@ public:
|
||||
virtual void centerAt(double cX, double cY);
|
||||
|
||||
virtual void setSize(double w, double h) {m_height = h; m_width = w;}
|
||||
virtual void setHoleStyle(int hs) {m_holeStyle = hs;}
|
||||
//virtual void setHoleStyle(int hs) {m_holeStyle = hs;}
|
||||
virtual void setRadius(double r) {m_radius = r;}
|
||||
virtual void draw(void);
|
||||
|
||||
protected:
|
||||
double m_height;
|
||||
double m_width;
|
||||
int m_holeStyle; //round or rect
|
||||
//int m_holeStyle; //round or rect
|
||||
double m_radius;
|
||||
int getHoleStyle(void);
|
||||
|
||||
QGraphicsPathItem* m_mat;
|
||||
QGraphicsPathItem* m_border;
|
||||
|
||||
@@ -130,26 +130,68 @@ void QGIPrimPath::paint ( QPainter * painter, const QStyleOptionGraphicsItem * o
|
||||
|
||||
QColor QGIPrimPath::getNormalColor()
|
||||
{
|
||||
Base::Reference<ParameterGrp> hGrp = getParmGroup();
|
||||
App::Color fcColor;
|
||||
fcColor.setPackedValue(hGrp->GetUnsigned("NormalColor", 0x00000000));
|
||||
return fcColor.asValue<QColor>();
|
||||
QColor result;
|
||||
QGIView *parent;
|
||||
QGraphicsItem* qparent = parentItem();
|
||||
if (qparent == nullptr) {
|
||||
parent = nullptr;
|
||||
} else {
|
||||
parent = dynamic_cast<QGIView *> (qparent);
|
||||
}
|
||||
|
||||
if (parent != nullptr) {
|
||||
result = parent->getNormalColor();
|
||||
} else {
|
||||
Base::Reference<ParameterGrp> hGrp = getParmGroup();
|
||||
App::Color fcColor;
|
||||
fcColor.setPackedValue(hGrp->GetUnsigned("NormalColor", 0x00000000));
|
||||
result = fcColor.asValue<QColor>();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
QColor QGIPrimPath::getPreColor()
|
||||
{
|
||||
Base::Reference<ParameterGrp> hGrp = getParmGroup();
|
||||
App::Color fcColor;
|
||||
fcColor.setPackedValue(hGrp->GetUnsigned("PreSelectColor", 0xFFFF0000));
|
||||
return fcColor.asValue<QColor>();
|
||||
QColor result;
|
||||
QGIView *parent;
|
||||
QGraphicsItem* qparent = parentItem();
|
||||
if (qparent == nullptr) {
|
||||
parent = nullptr;
|
||||
} else {
|
||||
parent = dynamic_cast<QGIView *> (qparent);
|
||||
}
|
||||
|
||||
if (parent != nullptr) {
|
||||
result = parent->getPreColor();
|
||||
} else {
|
||||
Base::Reference<ParameterGrp> hGrp = getParmGroup();
|
||||
App::Color fcColor;
|
||||
fcColor.setPackedValue(hGrp->GetUnsigned("PreSelectColor", 0xFFFF0000));
|
||||
result = fcColor.asValue<QColor>();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
QColor QGIPrimPath::getSelectColor()
|
||||
{
|
||||
Base::Reference<ParameterGrp> hGrp = getParmGroup();
|
||||
App::Color fcColor;
|
||||
fcColor.setPackedValue(hGrp->GetUnsigned("SelectColor", 0x00FF0000));
|
||||
return fcColor.asValue<QColor>();
|
||||
QColor result;
|
||||
QGIView *parent;
|
||||
QGraphicsItem* qparent = parentItem();
|
||||
if (qparent == nullptr) {
|
||||
parent = nullptr;
|
||||
} else {
|
||||
parent = dynamic_cast<QGIView *> (qparent);
|
||||
}
|
||||
|
||||
if (parent != nullptr) {
|
||||
result = parent->getSelectColor();
|
||||
} else {
|
||||
Base::Reference<ParameterGrp> hGrp = getParmGroup();
|
||||
App::Color fcColor;
|
||||
fcColor.setPackedValue(hGrp->GetUnsigned("SelectColor", 0x00FF0000));
|
||||
result = fcColor.asValue<QColor>();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
void QGIPrimPath::setWidth(double w)
|
||||
|
||||
@@ -61,9 +61,9 @@ protected:
|
||||
virtual void hoverLeaveEvent(QGraphicsSceneHoverEvent *event);
|
||||
virtual QVariant itemChange(GraphicsItemChange change, const QVariant &value);
|
||||
|
||||
QColor getNormalColor(void);
|
||||
QColor getPreColor(void);
|
||||
QColor getSelectColor(void);
|
||||
virtual QColor getNormalColor(void);
|
||||
virtual QColor getPreColor(void);
|
||||
virtual QColor getSelectColor(void);
|
||||
Base::Reference<ParameterGrp> getParmGroup(void);
|
||||
|
||||
bool isHighlighted;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
Derived QGraphicsItem Classes type() Values
|
||||
|
||||
Qt First UserType = 65536
|
||||
Qt First UserType>> QGraphicsItem::UserType = 65536
|
||||
|
||||
QGraphicsItemView : 101
|
||||
QGraphicsItemViewPart : 102
|
||||
|
||||
@@ -486,7 +486,7 @@ Base::Reference<ParameterGrp> QGIView::getParmGroupCol()
|
||||
QString QGIView::getPrefFont()
|
||||
{
|
||||
Base::Reference<ParameterGrp> hGrp = App::GetApplication().GetUserParameter().
|
||||
GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/TechDraw");
|
||||
GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/TechDraw/Labels");
|
||||
std::string fontName = hGrp->GetASCII("LabelFont", "Sans");
|
||||
return QString::fromStdString(fontName);
|
||||
}
|
||||
@@ -494,7 +494,7 @@ QString QGIView::getPrefFont()
|
||||
double QGIView::getPrefFontSize()
|
||||
{
|
||||
Base::Reference<ParameterGrp> hGrp = App::GetApplication().GetUserParameter().
|
||||
GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/TechDraw");
|
||||
GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/TechDraw/Labels");
|
||||
double fontSize = hGrp->GetFloat("LabelSize", 5.0);
|
||||
return fontSize;
|
||||
}
|
||||
|
||||
@@ -53,12 +53,19 @@ public:
|
||||
|
||||
enum {Type = QGraphicsItem::UserType + 101};
|
||||
int type() const override { return Type;}
|
||||
virtual QRectF boundingRect() const override;
|
||||
virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *event) override;
|
||||
virtual void paint( QPainter *painter,
|
||||
const QStyleOptionGraphicsItem *option,
|
||||
QWidget *widget = nullptr ) override;
|
||||
|
||||
const char * getViewName() const;
|
||||
void setViewFeature(TechDraw::DrawView *obj);
|
||||
TechDraw::DrawView * getViewObject() const;
|
||||
|
||||
virtual void toggleBorder(bool state = true);
|
||||
virtual void toggleCache(bool state);
|
||||
virtual void updateView(bool update = false);
|
||||
virtual void drawBorder(void);
|
||||
virtual void isVisible(bool state) { m_visibility = state; };
|
||||
virtual bool isVisible(void) {return m_visibility;};
|
||||
@@ -77,14 +84,9 @@ public:
|
||||
void alignTo(QGraphicsItem*, const QString &alignment);
|
||||
void setLocked(bool /*state*/ = true) { locked = true; }
|
||||
|
||||
virtual void toggleCache(bool state);
|
||||
virtual void updateView(bool update = false);
|
||||
virtual void paint( QPainter *painter,
|
||||
const QStyleOptionGraphicsItem *option,
|
||||
QWidget *widget = nullptr ) override;
|
||||
virtual QRectF boundingRect() const override;
|
||||
|
||||
virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *event) override;
|
||||
virtual QColor getNormalColor(void);
|
||||
virtual QColor getPreColor(void);
|
||||
virtual QColor getSelectColor(void);
|
||||
|
||||
protected:
|
||||
QGIView* getQGIVByName(std::string name);
|
||||
@@ -99,9 +101,6 @@ protected:
|
||||
virtual QRectF customChildrenBoundingRect(void);
|
||||
void dumpRect(char* text, QRectF r);
|
||||
|
||||
QColor getNormalColor(void);
|
||||
QColor getPreColor(void);
|
||||
QColor getSelectColor(void);
|
||||
QString getPrefFont(void);
|
||||
double getPrefFontSize(void);
|
||||
Base::Reference<ParameterGrp> getParmGroupCol(void);
|
||||
|
||||
@@ -146,6 +146,7 @@ QGIViewDimension::QGIViewDimension() :
|
||||
|
||||
datumLabel = new QGIDatumLabel();
|
||||
addToGroup(datumLabel);
|
||||
datumLabel->setPrettyNormal();
|
||||
dimLines = new QGIDimLines();
|
||||
addToGroup(dimLines);
|
||||
aHead1 = new QGIArrow();
|
||||
@@ -1257,4 +1258,15 @@ void QGIViewDimension::setPens(void)
|
||||
dimLines->setWidth(m_lineWidth);
|
||||
}
|
||||
|
||||
QColor QGIViewDimension::getNormalColor()
|
||||
{
|
||||
Base::Reference<ParameterGrp> hGrp = App::GetApplication().GetUserParameter()
|
||||
.GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/TechDraw/Dimensions");
|
||||
App::Color fcColor;
|
||||
fcColor.setPackedValue(hGrp->GetUnsigned("Color", 0x00000000));
|
||||
m_colNormal = fcColor.asValue<QColor>();
|
||||
return m_colNormal;
|
||||
}
|
||||
|
||||
|
||||
#include <Mod/TechDraw/Gui/moc_QGIViewDimension.cpp>
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
#include <QGraphicsView>
|
||||
#include <QStyleOptionGraphicsItem>
|
||||
#include <QGraphicsPathItem>
|
||||
#include <QColor>
|
||||
#include <Base/Vector3D.h>
|
||||
#include "QGIView.h"
|
||||
#include "QGCustomText.h"
|
||||
@@ -97,6 +98,7 @@ public:
|
||||
virtual void drawBorder();
|
||||
virtual void updateView(bool update = false) override;
|
||||
virtual void paint(QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * widget = 0 );
|
||||
virtual QColor getNormalColor(void);
|
||||
|
||||
public Q_SLOTS:
|
||||
void datumLabelDragged(void);
|
||||
|
||||
@@ -626,7 +626,7 @@ void QGIViewPart::drawMatting()
|
||||
mat->setRadius(radius);
|
||||
QRectF displayArea = customChildrenBoundingRect();
|
||||
mat->setSize(displayArea.width(),displayArea.height());
|
||||
mat->setHoleStyle(dvd->getMattingStyle());
|
||||
//mat->setHoleStyle(dvd->getMattingStyle());
|
||||
mat->draw();
|
||||
mat->show();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user