[TD]add preference for progress reporting
This commit is contained in:
committed by
WandererFan
parent
f12846599d
commit
b1dd0bd2d0
@@ -582,8 +582,10 @@ void DrawView::requestPaint()
|
||||
}
|
||||
|
||||
void DrawView::showProgressMessage(std::string featureName, std::string text)
|
||||
{
|
||||
signalProgressMessage(this, featureName, text);
|
||||
{
|
||||
if (Preferences::reportProgress()) {
|
||||
signalProgressMessage(this, featureName, text);
|
||||
}
|
||||
}
|
||||
|
||||
PyObject *DrawView::getPyObject(void)
|
||||
|
||||
@@ -339,3 +339,12 @@ double Preferences::GapASME()
|
||||
double factor = hGrp->GetFloat("GapASME", 6.0);
|
||||
return factor;
|
||||
}
|
||||
|
||||
bool Preferences::reportProgress()
|
||||
{
|
||||
Base::Reference<ParameterGrp> hGrp = App::GetApplication().GetUserParameter().
|
||||
GetGroup("BaseApp")->GetGroup("Preferences")->
|
||||
GetGroup("Mod/TechDraw/General");
|
||||
bool report = hGrp->GetBool("ReportProgress", false);
|
||||
return report;
|
||||
}
|
||||
|
||||
@@ -81,6 +81,7 @@ static std::string bitmapFill();
|
||||
static double GapISO();
|
||||
static double GapASME();
|
||||
|
||||
static bool reportProgress();
|
||||
};
|
||||
|
||||
} //end namespace TechDraw
|
||||
|
||||
@@ -242,7 +242,7 @@ can be a performance penalty in complex models.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
@@ -499,7 +499,23 @@ when hatching a face with a PAT pattern</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
<item row="3" column="2">
|
||||
<widget class="Gui::PrefCheckBox" name="cbReportProgress">
|
||||
<property name="toolTip">
|
||||
<string>Issue progress messages while building View geometry</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Report Progress</string>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>ReportProgress</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>/Mod/TechDraw/General</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
@@ -513,7 +529,7 @@ when hatching a face with a PAT pattern</string>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string><html><head/><body><p><span style=" font-weight:600;">Note:</span> Items in <span style=" font-style:italic;">italics</span> are default values for new objects. They have no effect on existing objects.</p></body></html></string>
|
||||
<string><html><head/><body><p><span style=" font-weight:600;">Note:</span> Items in <span style=" font-style:italic;">italics</span> are default values for new objects. They have no effect on existing objects.</p></body></html></string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::RichText</enum>
|
||||
|
||||
@@ -57,6 +57,7 @@ void DlgPrefsTechDrawAdvancedImp::saveSettings()
|
||||
ui->cbEndCap->onSave();
|
||||
ui->sbMaxTiles->onSave();
|
||||
ui->sbMaxPat->onSave();
|
||||
ui->cbReportProgress->onSave();
|
||||
}
|
||||
|
||||
void DlgPrefsTechDrawAdvancedImp::loadSettings()
|
||||
@@ -73,6 +74,7 @@ void DlgPrefsTechDrawAdvancedImp::loadSettings()
|
||||
ui->cbEndCap->onRestore();
|
||||
ui->sbMaxTiles->onRestore();
|
||||
ui->sbMaxPat->onRestore();
|
||||
ui->cbReportProgress->onRestore();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user