Merge pull request #9446 from Rexbas/navigation-animation
Gui: Refactor navigation animations
This commit is contained in:
@@ -86,7 +86,8 @@ void DlgSettingsNavigation::saveSettings()
|
||||
ui->checkBoxDisableTilt->onSave();
|
||||
ui->checkBoxShowRotationCenter->onSave();
|
||||
ui->spinBoxZoomStep->onSave();
|
||||
ui->checkBoxUseAutoRotation->onSave();
|
||||
ui->checkBoxNavigationAnimations->onSave();
|
||||
ui->spinBoxAnimationDuration->onSave();
|
||||
ui->qspinNewDocScale->onSave();
|
||||
ui->prefStepByTurn->onSave();
|
||||
ui->naviCubeCorner->onSave();
|
||||
@@ -110,7 +111,7 @@ void DlgSettingsNavigation::saveSettings()
|
||||
hGrp = App::GetApplication().GetParameterGroupByPath(
|
||||
"User parameter:BaseApp/Preferences/NaviCube");
|
||||
if (ui->naviCubeFontName->currentIndex()) {
|
||||
hGrp->SetASCII("FontString", ui->naviCubeFontName->currentText().toLatin1());
|
||||
hGrp->SetASCII("FontString", ui->naviCubeFontName->currentText().toLatin1());
|
||||
} else {
|
||||
hGrp->RemoveASCII("FontString");
|
||||
}
|
||||
@@ -123,7 +124,8 @@ void DlgSettingsNavigation::loadSettings()
|
||||
ui->checkBoxDisableTilt->onRestore();
|
||||
ui->checkBoxShowRotationCenter->onRestore();
|
||||
ui->spinBoxZoomStep->onRestore();
|
||||
ui->checkBoxUseAutoRotation->onRestore();
|
||||
ui->checkBoxNavigationAnimations->onRestore();
|
||||
ui->spinBoxAnimationDuration->onRestore();
|
||||
ui->qspinNewDocScale->onRestore();
|
||||
ui->prefStepByTurn->onRestore();
|
||||
ui->naviCubeCorner->onRestore();
|
||||
@@ -182,7 +184,7 @@ void DlgSettingsNavigation::loadSettings()
|
||||
QStringList familyNames = QFontDatabase::families(QFontDatabase::Any);
|
||||
#endif
|
||||
ui->naviCubeFontName->addItems(familyNames);
|
||||
|
||||
|
||||
hGrp = App::GetApplication().GetParameterGroupByPath(
|
||||
"User parameter:BaseApp/Preferences/NaviCube");
|
||||
int indexFamilyNames = familyNames.indexOf(
|
||||
|
||||
@@ -473,27 +473,91 @@ The value is the diameter of the sphere to fit on the screen.</string>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<widget class="Gui::PrefCheckBox" name="checkBoxUseAutoRotation">
|
||||
<widget class="Gui::PrefCheckBox" name="checkBoxNavigationAnimations">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Enable animated rotations</string>
|
||||
<string>Enable navigation animations</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Enable animation</string>
|
||||
<string>Enable navigation animations</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>false</bool>
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>UseAutoRotation</cstring>
|
||||
<cstring>UseNavigationAnimations</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>View</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<widget class="QLabel" name="navigationAnimationsLabel">
|
||||
<property name="toolTip">
|
||||
<string>Duration of navigation animations that have a fixed duration</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Animation duration</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="2">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<item>
|
||||
<widget class="Gui::PrefSpinBox" name="spinBoxAnimationDuration">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>60</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>The duration of navigation animations in milliseconds</string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>100</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>10000</number>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<number>50</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>250</number>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>AnimationDuration</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>View</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_4">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::MinimumExpanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>10</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<widget class="Gui::PrefCheckBox" name="checkBoxZoomAtCursor">
|
||||
<property name="toolTip">
|
||||
@@ -516,7 +580,7 @@ The value is the diameter of the sphere to fit on the screen.</string>
|
||||
<item row="6" column="1">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string> Zoom step</string>
|
||||
<string>Zoom step</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
|
||||
Reference in New Issue
Block a user