Gui: Refactor navigation animations
- Animations are played through an Animator - Standard animations have a fixed duration and inherit from QVariantAnimation - The animation duration can be changed in the preferences - Fix animations when using the two arrows above the NaviCube - Start an animation or start and wait for an animation - Replaces standard camera animations (e.g. by selecting standard views or NaviCube) with FixedTimeAnimation - Replace View3DInventorViewer's CameraAnimation with FixedTimeAnimation - Replace OpenInventor navigation style infinite spin animation with SpinningAnimation - Stops an active animation when a new animation is started - Stops an active animation when the user starts dragging, panning or zooming - Refactor reorientCamera so it can be used in animations - Enable animations by default
This commit is contained in:
@@ -88,7 +88,8 @@ void DlgSettingsNavigation::saveSettings()
|
||||
ui->rotationCenterSize->onSave();
|
||||
ui->rotationCenterColor->onSave();
|
||||
ui->spinBoxZoomStep->onSave();
|
||||
ui->checkBoxUseAutoRotation->onSave();
|
||||
ui->checkBoxNavigationAnimations->onSave();
|
||||
ui->spinBoxAnimationDuration->onSave();
|
||||
ui->qspinNewDocScale->onSave();
|
||||
ui->prefStepByTurn->onSave();
|
||||
ui->naviCubeCorner->onSave();
|
||||
@@ -115,7 +116,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");
|
||||
}
|
||||
@@ -129,7 +130,8 @@ void DlgSettingsNavigation::loadSettings()
|
||||
ui->rotationCenterSize->onRestore();
|
||||
ui->rotationCenterColor->onRestore();
|
||||
ui->spinBoxZoomStep->onRestore();
|
||||
ui->checkBoxUseAutoRotation->onRestore();
|
||||
ui->checkBoxNavigationAnimations->onRestore();
|
||||
ui->spinBoxAnimationDuration->onRestore();
|
||||
ui->qspinNewDocScale->onRestore();
|
||||
ui->prefStepByTurn->onRestore();
|
||||
ui->naviCubeCorner->onRestore();
|
||||
@@ -191,7 +193,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(
|
||||
|
||||
Reference in New Issue
Block a user