mirror of
https://github.com/YACReader/yacreader
synced 2025-07-19 05:24:57 -04:00
corregido problema de lag con "check new version"
corregido bug que causaba que las marcas de leidos no se viesen bajo determinadas circustancias sincronizadas los sliders de ajustar a lo ancho corregido bug que causaba que los mensajes isCover e isLast no se mostrasen en modo de doble p?gina
This commit is contained in:
@ -16,6 +16,7 @@ GoToFlowGL::GoToFlowGL(QWidget* parent, FlowType flowType)
|
||||
{
|
||||
|
||||
flow = new YACReaderPageFlowGL(this);
|
||||
flow->setShowMarks(false);
|
||||
|
||||
imageSize = Configuration::getConfiguration().getGotoSlideSize();
|
||||
|
||||
|
@ -94,7 +94,7 @@ void MainWindowViewer::setupUI()
|
||||
connect(versionChecker,SIGNAL(newVersionDetected()),
|
||||
this,SLOT(newVersion()));
|
||||
|
||||
//versionChecker->get(); //TODO
|
||||
versionChecker->get(); //TODO
|
||||
|
||||
viewer->setFocusPolicy(Qt::StrongFocus);
|
||||
|
||||
@ -332,6 +332,8 @@ void MainWindowViewer::createToolBars()
|
||||
tb2->setMenu(menu);
|
||||
|
||||
connect(sliderAction,SIGNAL(fitToWidthRatioChanged(float)),viewer,SLOT(updateFitToWidthRatio(float)));
|
||||
connect(optionsDialog,SIGNAL(fitToWidthRatioChanged(float)),sliderAction,SLOT(updateFitToWidthRatio(float)));
|
||||
|
||||
|
||||
//tb2->addAction();
|
||||
tb2->setPopupMode(QToolButton::MenuButtonPopup);
|
||||
|
@ -263,4 +263,13 @@ void OptionsDialog::resetImageConfig()
|
||||
settings.setValue(CONTRAST,100);
|
||||
settings.setValue(GAMMA,100);
|
||||
emit(changedImageOptions());
|
||||
}
|
||||
|
||||
void OptionsDialog::show()
|
||||
{
|
||||
//TODO solucionar el tema de las settings, esto s<>lo deber<65>a aparecer en una <20>nica l<>nea de c<>digo
|
||||
QSettings *s = new QSettings(QCoreApplication::applicationDirPath()+"/YACReader.ini",QSettings::IniFormat);
|
||||
fitToWidthRatioS->setSliderPosition(settings->value(FIT_TO_WIDTH_RATIO).toFloat()*100);
|
||||
QDialog::show();
|
||||
delete s;
|
||||
}
|
@ -53,6 +53,7 @@ Q_OBJECT
|
||||
void contrastChanged(int value);
|
||||
void gammaChanged(int value);
|
||||
void resetImageConfig();
|
||||
void show();
|
||||
|
||||
signals:
|
||||
void changedOptions();
|
||||
|
@ -635,6 +635,8 @@ void Render::nextPage()
|
||||
currentIndex = nextPage;
|
||||
update();
|
||||
}
|
||||
else
|
||||
emit isLast();
|
||||
}
|
||||
//si se solicita la p<>gina anterior, se calcula cu<63>l debe ser en funci<63>n de si se lee en modo a doble p<>gina o no.
|
||||
//la p<>gina s<>lo se renderiza, si realmente ha cambiado.
|
||||
@ -663,6 +665,8 @@ void Render::previousPage()
|
||||
currentIndex = previousPage;
|
||||
update();
|
||||
}
|
||||
else
|
||||
emit isCover();
|
||||
}
|
||||
unsigned int Render::getIndex()
|
||||
{
|
||||
@ -742,8 +746,7 @@ void Render::goTo(int index)
|
||||
void Render::rotateRight()
|
||||
{
|
||||
imageRotation = (imageRotation+90) % 360;
|
||||
invalidate();
|
||||
update();
|
||||
reload();
|
||||
}
|
||||
void Render::rotateLeft()
|
||||
{
|
||||
@ -751,8 +754,7 @@ void Render::rotateLeft()
|
||||
imageRotation = 270;
|
||||
else
|
||||
imageRotation = imageRotation - 90;
|
||||
invalidate();
|
||||
update();
|
||||
reload();
|
||||
}
|
||||
|
||||
//Actualiza el buffer, a<>adiendo las im<69>genes (vac<61>as) necesarias para su posterior renderizado y
|
||||
@ -890,7 +892,7 @@ void Render::invalidate()
|
||||
{
|
||||
if(pageRenders[i]!=0)
|
||||
{
|
||||
pageRenders[i]->terminate();
|
||||
pageRenders[i]->wait();
|
||||
delete pageRenders[i];
|
||||
pageRenders[i] = 0;
|
||||
}
|
||||
|
@ -68,4 +68,11 @@ void YACReaderSliderAction::updateText(int value)
|
||||
percentageLabel->setText(QString("%1 %").arg(value));
|
||||
Configuration::getConfiguration().setFitToWidthRatio(value/100.0);
|
||||
emit(fitToWidthRatioChanged(value / 100.0f));
|
||||
}
|
||||
|
||||
void YACReaderSliderAction::updateFitToWidthRatio(float v)
|
||||
{
|
||||
int value = v*100;
|
||||
slider->setValue(value);
|
||||
percentageLabel->setText(QString("%1 %").arg(value));
|
||||
}
|
@ -12,12 +12,14 @@ class YACReaderSliderAction : public QWidgetAction
|
||||
private:
|
||||
QLabel * percentageLabel;
|
||||
QSlider * slider;
|
||||
|
||||
public:
|
||||
|
||||
YACReaderSliderAction (QWidget * parent = 0);
|
||||
|
||||
public slots:
|
||||
void updateText(int value);
|
||||
void updateFitToWidthRatio(float v);
|
||||
|
||||
|
||||
signals:
|
||||
|
Reference in New Issue
Block a user