Sketcher: split huge settings page into two pages
This commit is contained in:
@@ -121,6 +121,7 @@ PyMOD_INIT_FUNC(SketcherGui)
|
||||
SketcherGui::PropertyConstraintListItem ::init();
|
||||
|
||||
(void)new Gui::PrefPageProducer<SketcherGui::SketcherSettings> ( QT_TRANSLATE_NOOP("QObject","Sketcher") );
|
||||
(void)new Gui::PrefPageProducer<SketcherGui::SketcherSettingsDisplay> ( QT_TRANSLATE_NOOP("QObject","Sketcher") );
|
||||
(void)new Gui::PrefPageProducer<SketcherGui::SketcherSettingsColors> ( QT_TRANSLATE_NOOP("QObject","Sketcher") );
|
||||
|
||||
// add resources and reloads the translators
|
||||
|
||||
@@ -62,6 +62,7 @@ set(SketcherGui_UIC_SRCS
|
||||
SketchMirrorDialog.ui
|
||||
SketcherSettings.ui
|
||||
SketcherSettingsColors.ui
|
||||
SketcherSettingsDisplay.ui
|
||||
SketchRectangularArrayDialog.ui
|
||||
SketcherRegularPolygonDialog.ui
|
||||
)
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
|
||||
#include "SketcherSettings.h"
|
||||
#include "ui_SketcherSettings.h"
|
||||
#include "ui_SketcherSettingsDisplay.h"
|
||||
#include "ui_SketcherSettingsColors.h"
|
||||
#include "TaskSketcherGeneral.h"
|
||||
#include <Base/Console.h>
|
||||
@@ -48,13 +49,60 @@ SketcherSettings::SketcherSettings(QWidget* parent)
|
||||
: PreferencePage(parent), ui(new Ui_SketcherSettings)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
QGroupBox* groupBox = new QGroupBox(this);
|
||||
QGridLayout* gridLayout = new QGridLayout(groupBox);
|
||||
QGridLayout* gridLayout = new QGridLayout(ui->placeholder);
|
||||
gridLayout->setSpacing(0);
|
||||
gridLayout->setMargin(0);
|
||||
form = new SketcherGeneralWidget(groupBox);
|
||||
form = new SketcherGeneralWidget(ui->placeholder);
|
||||
gridLayout->addWidget(form, 0, 0, 1, 1);
|
||||
ui->gridLayout_3->addWidget(groupBox, 1, 0, 1, 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Destroys the object and frees any allocated resources
|
||||
*/
|
||||
SketcherSettings::~SketcherSettings()
|
||||
{
|
||||
// no need to delete child widgets, Qt does it all for us
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void SketcherSettings::saveSettings()
|
||||
{
|
||||
// Sketch editing
|
||||
ui->checkBoxAdvancedSolverTaskBox->onSave();
|
||||
ui->checkBoxRecalculateInitialSolutionWhileDragging->onSave();
|
||||
ui->checkBoxNotifyConstraintSubstitutions->onSave();
|
||||
form->saveSettings();
|
||||
}
|
||||
|
||||
void SketcherSettings::loadSettings()
|
||||
{
|
||||
// Sketch editing
|
||||
ui->checkBoxAdvancedSolverTaskBox->onRestore();
|
||||
ui->checkBoxRecalculateInitialSolutionWhileDragging->onRestore();
|
||||
ui->checkBoxNotifyConstraintSubstitutions->onRestore();
|
||||
form->loadSettings();
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the strings of the subwidgets using the current language.
|
||||
*/
|
||||
void SketcherSettings::changeEvent(QEvent *e)
|
||||
{
|
||||
if (e->type() == QEvent::LanguageChange) {
|
||||
ui->retranslateUi(this);
|
||||
}
|
||||
else {
|
||||
QWidget::changeEvent(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* TRANSLATOR SketcherGui::SketcherSettingsDisplay */
|
||||
|
||||
SketcherSettingsDisplay::SketcherSettingsDisplay(QWidget* parent)
|
||||
: PreferencePage(parent), ui(new Ui_SketcherSettingsDisplay)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
QList < QPair<Qt::PenStyle, int> > styles;
|
||||
styles << qMakePair(Qt::SolidLine, 0xffff)
|
||||
@@ -86,29 +134,24 @@ SketcherSettings::SketcherSettings(QWidget* parent)
|
||||
/**
|
||||
* Destroys the object and frees any allocated resources
|
||||
*/
|
||||
SketcherSettings::~SketcherSettings()
|
||||
SketcherSettingsDisplay::~SketcherSettingsDisplay()
|
||||
{
|
||||
// no need to delete child widgets, Qt does it all for us
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void SketcherSettings::saveSettings()
|
||||
void SketcherSettingsDisplay::saveSettings()
|
||||
{
|
||||
// Sketch editing
|
||||
ui->EditSketcherFontSize->onSave();
|
||||
ui->SegmentsPerGeometry->onSave();
|
||||
ui->dialogOnDistanceConstraint->onSave();
|
||||
ui->continueMode->onSave();
|
||||
ui->constraintMode->onSave();
|
||||
ui->checkBoxHideUnits->onSave();
|
||||
ui->checkBoxAdvancedSolverTaskBox->onSave();
|
||||
ui->checkBoxRecalculateInitialSolutionWhileDragging->onSave();
|
||||
ui->checkBoxTVHideDependent->onSave();
|
||||
ui->checkBoxTVShowLinks->onSave();
|
||||
ui->checkBoxTVShowSupport->onSave();
|
||||
ui->checkBoxTVRestoreCamera->onSave();
|
||||
ui->checkBoxNotifyConstraintSubstitutions->onSave();
|
||||
form->saveSettings();
|
||||
|
||||
ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/Mod/Part");
|
||||
QVariant data = ui->comboBox->itemData(ui->comboBox->currentIndex());
|
||||
@@ -116,23 +159,18 @@ void SketcherSettings::saveSettings()
|
||||
hGrp->SetInt("GridLinePattern", pattern);
|
||||
}
|
||||
|
||||
void SketcherSettings::loadSettings()
|
||||
void SketcherSettingsDisplay::loadSettings()
|
||||
{
|
||||
// Sketch editing
|
||||
ui->EditSketcherFontSize->onRestore();
|
||||
ui->SegmentsPerGeometry->onRestore();
|
||||
ui->dialogOnDistanceConstraint->onRestore();
|
||||
ui->continueMode->onRestore();
|
||||
ui->constraintMode->onRestore();
|
||||
ui->checkBoxHideUnits->onRestore();
|
||||
ui->checkBoxAdvancedSolverTaskBox->onRestore();
|
||||
ui->checkBoxRecalculateInitialSolutionWhileDragging->onRestore();
|
||||
ui->checkBoxTVHideDependent->onRestore();
|
||||
ui->checkBoxTVShowLinks->onRestore();
|
||||
ui->checkBoxTVShowSupport->onRestore();
|
||||
ui->checkBoxTVRestoreCamera->onRestore();
|
||||
ui->checkBoxNotifyConstraintSubstitutions->onRestore();
|
||||
form->loadSettings();
|
||||
|
||||
ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/Mod/Part");
|
||||
int pattern = hGrp->GetInt("GridLinePattern", 0x0f0f);
|
||||
@@ -144,7 +182,7 @@ void SketcherSettings::loadSettings()
|
||||
/**
|
||||
* Sets the strings of the subwidgets using the current language.
|
||||
*/
|
||||
void SketcherSettings::changeEvent(QEvent *e)
|
||||
void SketcherSettingsDisplay::changeEvent(QEvent *e)
|
||||
{
|
||||
if (e->type() == QEvent::LanguageChange) {
|
||||
ui->retranslateUi(this);
|
||||
@@ -154,7 +192,7 @@ void SketcherSettings::changeEvent(QEvent *e)
|
||||
}
|
||||
}
|
||||
|
||||
void SketcherSettings::onBtnTVApplyClicked(bool)
|
||||
void SketcherSettingsDisplay::onBtnTVApplyClicked(bool)
|
||||
{
|
||||
QString errMsg;
|
||||
try{
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
|
||||
namespace SketcherGui {
|
||||
class Ui_SketcherSettings;
|
||||
class Ui_SketcherSettingsDisplay;
|
||||
class Ui_SketcherSettingsColors;
|
||||
class SketcherGeneralWidget;
|
||||
/**
|
||||
@@ -48,11 +49,34 @@ public:
|
||||
protected:
|
||||
void changeEvent(QEvent *e);
|
||||
|
||||
private:
|
||||
Ui_SketcherSettings* ui;
|
||||
SketcherGeneralWidget* form;
|
||||
};
|
||||
|
||||
/**
|
||||
* The SketcherSettings class implements a preference page to change sketcher display settings.
|
||||
* @author Werner Mayer
|
||||
*/
|
||||
class SketcherSettingsDisplay : public Gui::Dialog::PreferencePage
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
SketcherSettingsDisplay(QWidget* parent = 0);
|
||||
~SketcherSettingsDisplay();
|
||||
|
||||
void saveSettings();
|
||||
void loadSettings();
|
||||
|
||||
protected:
|
||||
void changeEvent(QEvent *e);
|
||||
|
||||
private Q_SLOTS:
|
||||
void onBtnTVApplyClicked(bool);
|
||||
|
||||
private:
|
||||
Ui_SketcherSettings* ui;
|
||||
Ui_SketcherSettingsDisplay* ui;
|
||||
SketcherGeneralWidget* form;
|
||||
};
|
||||
|
||||
|
||||
@@ -7,380 +7,21 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>602</width>
|
||||
<height>720</height>
|
||||
<height>614</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>General</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<widget class="QGroupBox" name="placeholder">
|
||||
<property name="title">
|
||||
<string>Sketch editing</string>
|
||||
<string>Sketcher</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="8" column="0" colspan="2">
|
||||
<widget class="QGroupBox" name="groupBox_5">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Minimum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="baseSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Notifications</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_22">
|
||||
<item>
|
||||
<widget class="Gui::PrefCheckBox" name="checkBoxNotifyConstraintSubstitutions">
|
||||
<property name="toolTip">
|
||||
<string>Notifies about automatic constraint substitutions</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Notify automatic constraint substitutions</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>NotifyConstraintSubstitutions</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>Mod/Sketcher/General</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>182</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Font size</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="Gui::PrefSpinBox" name="EditSketcherFontSize">
|
||||
<property name="toolTip">
|
||||
<string>Font size used for labels and constraints</string>
|
||||
</property>
|
||||
<property name="suffix">
|
||||
<string>px</string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>100</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>17</number>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>EditSketcherFontSize</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>View</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QComboBox" name="comboBox">
|
||||
<property name="toolTip">
|
||||
<string>Line pattern used for grid lines</string>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>-1</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0" colspan="2">
|
||||
<widget class="Gui::PrefCheckBox" name="dialogOnDistanceConstraint">
|
||||
<property name="toolTip">
|
||||
<string>A dialog will pop up to input a value for new dimensional constraints</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Ask for value after creating a dimensional constraint</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>ShowDialogOnDistanceConstraint</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>Mod/Sketcher</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_7">
|
||||
<property name="text">
|
||||
<string>Grid line pattern</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0" colspan="2">
|
||||
<widget class="Gui::PrefCheckBox" name="continueMode">
|
||||
<property name="toolTip">
|
||||
<string>Current sketcher creation tool will remain active after creation</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Geometry creation "Continue Mode"</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>ContinuousCreationMode</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>Mod/Sketcher</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0" colspan="2">
|
||||
<widget class="Gui::PrefCheckBox" name="constraintMode">
|
||||
<property name="toolTip">
|
||||
<string>Current constraint creation tool will remain active after creation</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Constraint creation "Continue Mode"</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>ContinuousConstraintMode</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>Mod/Sketcher</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="0" colspan="2">
|
||||
<widget class="QGroupBox" name="groupBox_3">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Minimum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="baseSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Visibility automation</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<widget class="Gui::PrefCheckBox" name="checkBoxTVHideDependent">
|
||||
<property name="toolTip">
|
||||
<string>When opening sketch, hide all features that depend on it</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Hide all objects that depend on the sketch</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>HideDependent</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>Mod/Sketcher/General</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Gui::PrefCheckBox" name="checkBoxTVShowLinks">
|
||||
<property name="toolTip">
|
||||
<string>When opening sketch, show sources for external geometry links</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Show objects used for external geometry</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>ShowLinks</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>Mod/Sketcher/General</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Gui::PrefCheckBox" name="checkBoxTVShowSupport">
|
||||
<property name="toolTip">
|
||||
<string>When opening sketch, show objects the sketch is attached to</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Show object(s) sketch is attached to</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>ShowSupport</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>Mod/Sketcher/General</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Gui::PrefCheckBox" name="checkBoxTVRestoreCamera">
|
||||
<property name="toolTip">
|
||||
<string>When closing sketch, move camera back to where it was before sketch was opened</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Restore camera position after editing</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>RestoreCamera</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>Mod/Sketcher/General</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_9">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Note: these settings are defaults applied to new sketches. The behavior is remembered for each sketch individually as properties on View tab.</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft</set>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="btnTVApply">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Applies current visibility automation settings to all sketches in open documents</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Apply to existing sketches</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_10">
|
||||
<property name="text">
|
||||
<string>Segments per geometry</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="Gui::PrefSpinBox" name="SegmentsPerGeometry">
|
||||
<property name="toolTip">
|
||||
<string>Number of polygons for geometry approximation</string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>50</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>1000</number>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>SegmentsPerGeometry</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>View</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<widget class="Gui::PrefCheckBox" name="checkBoxHideUnits">
|
||||
<property name="toolTip">
|
||||
<string>Base length units will not be displayed in constraints.
|
||||
Supports all unit systems except 'US customary' and 'Building US/Euro'.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Hide base length units for supported unit systems</string>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>HideUnits</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>Mod/Sketcher</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<item row="1" column="0">
|
||||
<widget class="QGroupBox" name="groupBox_2">
|
||||
<property name="title">
|
||||
<string>Sketcher solver</string>
|
||||
@@ -406,7 +47,7 @@ Supports all unit systems except 'US customary' and 'Building US/Euro'.</string>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<item row="2" column="0">
|
||||
<widget class="QGroupBox" name="groupBox_4">
|
||||
<property name="title">
|
||||
<string>Dragging performance</string>
|
||||
@@ -435,14 +76,77 @@ Requires to re-enter edit mode to take effect.</string>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QGroupBox" name="groupBox_5">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Minimum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="baseSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Notifications</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_22">
|
||||
<item>
|
||||
<widget class="Gui::PrefCheckBox" name="checkBoxNotifyConstraintSubstitutions">
|
||||
<property name="toolTip">
|
||||
<string>Notifies about automatic constraint substitutions</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Notify automatic constraint substitutions</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>NotifyConstraintSubstitutions</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>Mod/Sketcher/General</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>Gui::PrefSpinBox</class>
|
||||
<extends>QSpinBox</extends>
|
||||
<header>Gui/PrefWidgets.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>Gui::PrefCheckBox</class>
|
||||
<extends>QCheckBox</extends>
|
||||
@@ -450,15 +154,6 @@ Requires to re-enter edit mode to take effect.</string>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<tabstops>
|
||||
<tabstop>EditSketcherFontSize</tabstop>
|
||||
<tabstop>comboBox</tabstop>
|
||||
<tabstop>dialogOnDistanceConstraint</tabstop>
|
||||
<tabstop>continueMode</tabstop>
|
||||
<tabstop>checkBoxTVHideDependent</tabstop>
|
||||
<tabstop>checkBoxTVShowLinks</tabstop>
|
||||
<tabstop>checkBoxTVShowSupport</tabstop>
|
||||
<tabstop>checkBoxTVRestoreCamera</tabstop>
|
||||
<tabstop>btnTVApply</tabstop>
|
||||
<tabstop>checkBoxAdvancedSolverTaskBox</tabstop>
|
||||
</tabstops>
|
||||
<resources/>
|
||||
|
||||
368
src/Mod/Sketcher/Gui/SketcherSettingsDisplay.ui
Normal file
368
src/Mod/Sketcher/Gui/SketcherSettingsDisplay.ui
Normal file
@@ -0,0 +1,368 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>SketcherGui::SketcherSettingsDisplay</class>
|
||||
<widget class="QWidget" name="SketcherGui::SketcherSettingsDisplay">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>602</width>
|
||||
<height>608</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Display</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
<item row="2" column="0">
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="title">
|
||||
<string>Sketch editing</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="3" column="0" colspan="2">
|
||||
<widget class="Gui::PrefCheckBox" name="dialogOnDistanceConstraint">
|
||||
<property name="toolTip">
|
||||
<string>A dialog will pop up to input a value for new dimensional constraints</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Ask for value after creating a dimensional constraint</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>ShowDialogOnDistanceConstraint</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>Mod/Sketcher</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_10">
|
||||
<property name="text">
|
||||
<string>Segments per geometry</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0" colspan="2">
|
||||
<widget class="Gui::PrefCheckBox" name="constraintMode">
|
||||
<property name="toolTip">
|
||||
<string>Current constraint creation tool will remain active after creation</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Constraint creation "Continue Mode"</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>ContinuousConstraintMode</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>Mod/Sketcher</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QComboBox" name="comboBox">
|
||||
<property name="toolTip">
|
||||
<string>Line pattern used for grid lines</string>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>-1</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<widget class="Gui::PrefCheckBox" name="checkBoxHideUnits">
|
||||
<property name="toolTip">
|
||||
<string>Base length units will not be displayed in constraints.
|
||||
Supports all unit systems except 'US customary' and 'Building US/Euro'.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Hide base length units for supported unit systems</string>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>HideUnits</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>Mod/Sketcher</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>182</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Font size</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="0" colspan="2">
|
||||
<widget class="QGroupBox" name="groupBox_3">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Minimum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="baseSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Visibility automation</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<widget class="Gui::PrefCheckBox" name="checkBoxTVHideDependent">
|
||||
<property name="toolTip">
|
||||
<string>When opening sketch, hide all features that depend on it</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Hide all objects that depend on the sketch</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>HideDependent</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>Mod/Sketcher/General</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Gui::PrefCheckBox" name="checkBoxTVShowLinks">
|
||||
<property name="toolTip">
|
||||
<string>When opening sketch, show sources for external geometry links</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Show objects used for external geometry</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>ShowLinks</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>Mod/Sketcher/General</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Gui::PrefCheckBox" name="checkBoxTVShowSupport">
|
||||
<property name="toolTip">
|
||||
<string>When opening sketch, show objects the sketch is attached to</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Show object(s) sketch is attached to</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>ShowSupport</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>Mod/Sketcher/General</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Gui::PrefCheckBox" name="checkBoxTVRestoreCamera">
|
||||
<property name="toolTip">
|
||||
<string>When closing sketch, move camera back to where it was before sketch was opened</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Restore camera position after editing</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>RestoreCamera</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>Mod/Sketcher/General</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_9">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Note: these settings are defaults applied to new sketches. The behavior is remembered for each sketch individually as properties on View tab.</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft</set>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="btnTVApply">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Applies current visibility automation settings to all sketches in open documents</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Apply to existing sketches</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="Gui::PrefSpinBox" name="EditSketcherFontSize">
|
||||
<property name="toolTip">
|
||||
<string>Font size used for labels and constraints</string>
|
||||
</property>
|
||||
<property name="suffix">
|
||||
<string>px</string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>100</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>17</number>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>EditSketcherFontSize</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>View</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0" colspan="2">
|
||||
<widget class="Gui::PrefCheckBox" name="continueMode">
|
||||
<property name="toolTip">
|
||||
<string>Current sketcher creation tool will remain active after creation</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Geometry creation "Continue Mode"</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>ContinuousCreationMode</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>Mod/Sketcher</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_7">
|
||||
<property name="text">
|
||||
<string>Grid line pattern</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="Gui::PrefSpinBox" name="SegmentsPerGeometry">
|
||||
<property name="toolTip">
|
||||
<string>Number of polygons for geometry approximation</string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>50</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>1000</number>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>SegmentsPerGeometry</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>View</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>Gui::PrefSpinBox</class>
|
||||
<extends>QSpinBox</extends>
|
||||
<header>Gui/PrefWidgets.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>Gui::PrefCheckBox</class>
|
||||
<extends>QCheckBox</extends>
|
||||
<header>Gui/PrefWidgets.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<tabstops>
|
||||
<tabstop>EditSketcherFontSize</tabstop>
|
||||
<tabstop>comboBox</tabstop>
|
||||
<tabstop>dialogOnDistanceConstraint</tabstop>
|
||||
<tabstop>continueMode</tabstop>
|
||||
<tabstop>checkBoxTVHideDependent</tabstop>
|
||||
<tabstop>checkBoxTVShowLinks</tabstop>
|
||||
<tabstop>checkBoxTVShowSupport</tabstop>
|
||||
<tabstop>checkBoxTVRestoreCamera</tabstop>
|
||||
<tabstop>btnTVApply</tabstop>
|
||||
</tabstops>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
Reference in New Issue
Block a user