unificaci?n de las partes comunes en los di?logos de configuraci?n

This commit is contained in:
Luis Ángel San Martín
2012-10-09 07:25:28 +02:00
parent 5d13a4812a
commit c760120e39
15 changed files with 724 additions and 662 deletions

View File

@ -65,8 +65,16 @@ drag(false)
showCursor();
goToDialog = new GoToDialog(this);
QSettings * settings = new QSettings("YACReader.ini",QSettings::IniFormat);
settings->beginGroup("config");
//CONFIG GOTO_FLOW--------------------------------------------------------
if(settings->contains("useOpenGL") && settings->value("useOpenGL").toBool() == true)
goToFlow = new GoToFlowGL(this,Configuration::getConfiguration().getFlowType());
else
goToFlow = new GoToFlow(this,Configuration::getConfiguration().getFlowType());
goToFlow = new GoToFlowGL(this,Configuration::getConfiguration().getFlowType());
goToFlow->hide();
showGoToFlowAnimation = new QPropertyAnimation(goToFlow,"pos");
showGoToFlowAnimation->setDuration(150);
@ -673,4 +681,15 @@ void Viewer::mouseReleaseEvent ( QMouseEvent * event )
{
drag = false;
setCursor(Qt::OpenHandCursor);
}
void Viewer::updateFitToWidthRatio(float ratio)
{
adjustToWidthRatio = ratio;
updateContentSize();
}
void Viewer::updateConfig(QSettings * settings)
{
goToFlow->updateConfig(settings);
}