StelMovementMgr.cpp   StelMovementMgr.cpp 
skipping to change at line 106 skipping to change at line 106
flagEnableZoomKeys = conf->value("navigation/flag_enable_zoom_keys") .toBool(); flagEnableZoomKeys = conf->value("navigation/flag_enable_zoom_keys") .toBool();
flagEnableMoveKeys = conf->value("navigation/flag_enable_move_keys") .toBool(); flagEnableMoveKeys = conf->value("navigation/flag_enable_move_keys") .toBool();
keyMoveSpeed = conf->value("navigation/move_speed",0.0004f).toFloat( ); keyMoveSpeed = conf->value("navigation/move_speed",0.0004f).toFloat( );
keyZoomSpeed = conf->value("navigation/zoom_speed", 0.0004f).toFloat (); keyZoomSpeed = conf->value("navigation/zoom_speed", 0.0004f).toFloat ();
autoMoveDuration = conf->value ("navigation/auto_move_duration",1.5f ).toFloat(); autoMoveDuration = conf->value ("navigation/auto_move_duration",1.5f ).toFloat();
flagManualZoom = conf->value("navigation/flag_manual_zoom").toBool() ; flagManualZoom = conf->value("navigation/flag_manual_zoom").toBool() ;
flagAutoZoomOutResetsDirection = conf->value("navigation/auto_zoom_o ut_resets_direction", true).toBool(); flagAutoZoomOutResetsDirection = conf->value("navigation/auto_zoom_o ut_resets_direction", true).toBool();
flagEnableMouseNavigation = conf->value("navigation/flag_enable_mous e_navigation",true).toBool(); flagEnableMouseNavigation = conf->value("navigation/flag_enable_mous e_navigation",true).toBool();
minFov = 0.001389; // minimal FOV = 5" minFov = 0.001389; // minimal FOV = 5"
// GZ: This value should be configurable! Zooming in too much is use
less for archaeoastronomy.
minFov = conf->value("navigation/min_fov",minFov).toDouble();
maxFov = 100.; maxFov = 100.;
initFov = conf->value("navigation/init_fov",60.f).toFloat(); initFov = conf->value("navigation/init_fov",60.f).toFloat();
currentFov = initFov; currentFov = initFov;
setInitConstellationIntensity(conf->value("viewing/constellation_art _intensity", 0.5f).toFloat()); setInitConstellationIntensity(conf->value("viewing/constellation_art _intensity", 0.5f).toFloat());
Vec3f tmp = StelUtils::strToVec3f(conf->value("navigation/init_view_ pos").toString()); Vec3f tmp = StelUtils::strToVec3f(conf->value("navigation/init_view_ pos").toString());
initViewPos.set(tmp[0], tmp[1], tmp[2]); initViewPos.set(tmp[0], tmp[1], tmp[2]);
viewDirectionJ2000 = core->altAzToJ2000(initViewPos, StelCore::Refra ctionOff); viewDirectionJ2000 = core->altAzToJ2000(initViewPos, StelCore::Refra ctionOff);
QString tmpstr = conf->value("navigation/viewing_mode", "horizon").t oString(); QString tmpstr = conf->value("navigation/viewing_mode", "horizon").t oString();
skipping to change at line 211 skipping to change at line 213
setFlagTracking(false); setFlagTracking(false);
dragView(previousX, previousY, x, y); dragView(previousX, previousY, x, y);
previousX = x; previousX = x;
previousY = y; previousY = y;
return true; return true;
} }
} }
return false; return false;
} }
double StelMovementMgr::getCallOrder(StelModuleActionName actionName) const
{
// GZ: allow a few plugins to intercept keys!
if (actionName == StelModule::ActionHandleKeys)
return 5;
return 0;
}
void StelMovementMgr::handleKeys(QKeyEvent* event) void StelMovementMgr::handleKeys(QKeyEvent* event)
{ {
if (event->type() == QEvent::KeyPress) if (event->type() == QEvent::KeyPress)
{ {
// Direction and zoom deplacements // Direction and zoom deplacements
switch (event->key()) switch (event->key())
{ {
case Qt::Key_Left: case Qt::Key_Left:
turnLeft(true); break; turnLeft(true); break;
case Qt::Key_Right: case Qt::Key_Right:
turnRight(true); break; turnRight(true); break;
case Qt::Key_Up: case Qt::Key_Up:
if (event->modifiers().testFlag(Qt::ControlM odifier)){ if (event->modifiers().testFlag(Qt::ControlM odifier)){
 End of changes. 3 change blocks. 
1 lines changed or deleted 12 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/