[NaviCube]Add 'NaviStepByTurn' parameter to 'View' preferences

This commit is contained in:
0penBrain
2020-01-22 19:16:52 +01:00
committed by Yorik van Havre
parent 0ead4c5946
commit e49d553f1f
2 changed files with 49 additions and 0 deletions

View File

@@ -91,6 +91,48 @@ will be shown at the lower left corner in opened files</string>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="stepLabel">
<property name="text">
<string>Steps by turn</string>
</property>
</widget>
</item>
<item>
<widget class="Gui::PrefSpinBox" name="prefStepByTurn">
<property name="toolTip">
<string>Number of steps by turn when using arrows (default = 8 : step angle = 360/8 = 45 deg)</string>
</property>
<property name="value">
<number>8</number>
</property>
<property name="minimum">
<double>4</double>
</property>
<property name="maximum">
<double>36</double>
</property>
<property name="prefEntry" stdset="0">
<cstring>NaviStepByTurn</cstring>
</property>
<property name="prefPath" stdset="0">
<cstring>View</cstring>
</property>
</widget>
</item>
<item>
<spacer>
<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>
<widget class="QLabel" name="cornerLabel">
<property name="text">
@@ -849,6 +891,11 @@ bounding box size of the 3D object that is currently displayed. </string>
<header>Gui/PrefWidgets.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>Gui::PrefSpinBox</class>
<extends>QSpinBox</extends>
<header>Gui/PrefWidgets.h</header>
</customwidget>
</customwidgets>
<tabstops>
<tabstop>CheckBox_CornerCoordSystem</tabstop>

View File

@@ -113,6 +113,7 @@ void DlgSettings3DViewImp::saveSettings()
ui->radioPerspective->onSave();
ui->radioOrthographic->onSave();
ui->qspinNewDocScale->onSave();
ui->prefStepByTurn->onSave();
QVariant camera = ui->comboNewDocView->itemData(ui->comboNewDocView->currentIndex(), Qt::UserRole);
hGrp->SetASCII("NewDocumentCameraOrientation", (const char*)camera.toByteArray());
@@ -144,6 +145,7 @@ void DlgSettings3DViewImp::loadSettings()
ui->radioPerspective->onRestore();
ui->radioOrthographic->onRestore();
ui->qspinNewDocScale->onRestore();
ui->prefStepByTurn->onRestore();
ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath
("User parameter:BaseApp/Preferences/View");