mirror of
https://github.com/YACReader/yacreader
synced 2025-06-04 01:28:55 -04:00
Remove old fitmode code and do some config and menu cleanup work
This commit is contained in:
parent
dffe34ba25
commit
3ad70c39fb
@ -114,7 +114,7 @@ HEADERS += ../common/comic.h \
|
|||||||
page_label_widget.h \
|
page_label_widget.h \
|
||||||
goto_flow_toolbar.h \
|
goto_flow_toolbar.h \
|
||||||
goto_flow_decorationbar.h \
|
goto_flow_decorationbar.h \
|
||||||
width_slider.h \
|
#width_slider.h \
|
||||||
notifications_label_widget.h \
|
notifications_label_widget.h \
|
||||||
../common/pictureflow.h \
|
../common/pictureflow.h \
|
||||||
../common/custom_widgets.h \
|
../common/custom_widgets.h \
|
||||||
@ -158,7 +158,7 @@ SOURCES += ../common/comic.cpp \
|
|||||||
page_label_widget.cpp \
|
page_label_widget.cpp \
|
||||||
goto_flow_toolbar.cpp \
|
goto_flow_toolbar.cpp \
|
||||||
goto_flow_decorationbar.cpp \
|
goto_flow_decorationbar.cpp \
|
||||||
width_slider.cpp \
|
#width_slider.cpp \
|
||||||
notifications_label_widget.cpp \
|
notifications_label_widget.cpp \
|
||||||
../common/pictureflow.cpp \
|
../common/pictureflow.cpp \
|
||||||
../common/custom_widgets.cpp \
|
../common/custom_widgets.cpp \
|
||||||
|
@ -33,26 +33,28 @@ void Configuration::load(QSettings * settings)
|
|||||||
settings->setValue(MAG_GLASS_SIZE,QSize(350,175));
|
settings->setValue(MAG_GLASS_SIZE,QSize(350,175));
|
||||||
if(!settings->contains(ZOOM_LEVEL))
|
if(!settings->contains(ZOOM_LEVEL))
|
||||||
settings->setValue(MAG_GLASS_SIZE,QSize(350,175));
|
settings->setValue(MAG_GLASS_SIZE,QSize(350,175));
|
||||||
if(!settings->contains(FIT))
|
|
||||||
settings->setValue(FIT,false);
|
|
||||||
if(!settings->contains(FLOW_TYPE))
|
if(!settings->contains(FLOW_TYPE))
|
||||||
settings->setValue(FLOW_TYPE,0);
|
settings->setValue(FLOW_TYPE,0);
|
||||||
if(!settings->contains(FULLSCREEN))
|
if(!settings->contains(FULLSCREEN))
|
||||||
settings->setValue(FULLSCREEN,false);
|
settings->setValue(FULLSCREEN,false);
|
||||||
if(!settings->contains(FIT_TO_WIDTH_RATIO))
|
|
||||||
settings->setValue(FIT_TO_WIDTH_RATIO,1);
|
|
||||||
if(!settings->contains(Y_WINDOW_SIZE))
|
if(!settings->contains(Y_WINDOW_SIZE))
|
||||||
settings->setValue(Y_WINDOW_SIZE,QSize(0,0));
|
settings->setValue(Y_WINDOW_SIZE,QSize(0,0));
|
||||||
if(!settings->contains(MAXIMIZED))
|
if(!settings->contains(MAXIMIZED))
|
||||||
settings->setValue(MAXIMIZED,false);
|
settings->setValue(MAXIMIZED,false);
|
||||||
if(!settings->contains(DOUBLE_PAGE))
|
if(!settings->contains(DOUBLE_PAGE))
|
||||||
settings->setValue(DOUBLE_PAGE,false);
|
settings->setValue(DOUBLE_PAGE,false);
|
||||||
if(!settings->contains(ADJUST_TO_FULL_SIZE))
|
|
||||||
settings->setValue(ADJUST_TO_FULL_SIZE,false);
|
|
||||||
if(!settings->contains(BACKGROUND_COLOR))
|
if(!settings->contains(BACKGROUND_COLOR))
|
||||||
settings->setValue(BACKGROUND_COLOR,QColor(40,40,40));
|
settings->setValue(BACKGROUND_COLOR,QColor(40,40,40));
|
||||||
if(!settings->contains(ALWAYS_ON_TOP))
|
if(!settings->contains(ALWAYS_ON_TOP))
|
||||||
settings->setValue(ALWAYS_ON_TOP,false);
|
settings->setValue(ALWAYS_ON_TOP,false);
|
||||||
if(!settings->contains(SHOW_TOOLBARS))
|
if(!settings->contains(SHOW_TOOLBARS))
|
||||||
settings->setValue(SHOW_TOOLBARS, true);
|
settings->setValue(SHOW_TOOLBARS, true);
|
||||||
}
|
//old fit stuff
|
||||||
|
/*if(!settings->contains(FIT))
|
||||||
|
settings->setValue(FIT,false);
|
||||||
|
if(!settings->contains(FIT_TO_WIDTH_RATIO))
|
||||||
|
settings->setValue(FIT_TO_WIDTH_RATIO,1);
|
||||||
|
if(!settings->contains(ADJUST_TO_FULL_SIZE))
|
||||||
|
settings->setValue(ADJUST_TO_FULL_SIZE,false);
|
||||||
|
*/
|
||||||
|
}
|
@ -66,12 +66,14 @@ using namespace YACReader;
|
|||||||
void setFitMode ( YACReader::FitMode fitMode ){ settings->setValue(FITMODE, static_cast<int>(fitMode)); }
|
void setFitMode ( YACReader::FitMode fitMode ){ settings->setValue(FITMODE, static_cast<int>(fitMode)); }
|
||||||
|
|
||||||
//Old fitmodes
|
//Old fitmodes
|
||||||
|
/*
|
||||||
bool getAdjustToWidth() {return settings->value(FIT).toBool();}
|
bool getAdjustToWidth() {return settings->value(FIT).toBool();}
|
||||||
void setAdjustToWidth(bool atw=true) {settings->setValue(FIT,atw);}
|
void setAdjustToWidth(bool atw=true) {settings->setValue(FIT,atw);}
|
||||||
float getFitToWidthRatio(){return settings->value(FIT_TO_WIDTH_RATIO).toFloat();}
|
float getFitToWidthRatio(){return settings->value(FIT_TO_WIDTH_RATIO).toFloat();}
|
||||||
void setFitToWidthRatio(float r){settings->setValue(FIT_TO_WIDTH_RATIO,r);}
|
void setFitToWidthRatio(float r){settings->setValue(FIT_TO_WIDTH_RATIO,r);}
|
||||||
bool getAdjustToFullSize(){return settings->value(ADJUST_TO_FULL_SIZE).toBool();}
|
bool getAdjustToFullSize(){return settings->value(ADJUST_TO_FULL_SIZE).toBool();}
|
||||||
void setAdjustToFullSize(bool b){settings->setValue(ADJUST_TO_FULL_SIZE,b);}
|
void setAdjustToFullSize(bool b){settings->setValue(ADJUST_TO_FULL_SIZE,b);}
|
||||||
|
*/
|
||||||
|
|
||||||
FlowType getFlowType(){return (FlowType)settings->value(FLOW_TYPE_SW).toInt();}
|
FlowType getFlowType(){return (FlowType)settings->value(FLOW_TYPE_SW).toInt();}
|
||||||
void setFlowType(FlowType type){settings->setValue(FLOW_TYPE_SW,type);}
|
void setFlowType(FlowType type){settings->setValue(FLOW_TYPE_SW,type);}
|
||||||
|
@ -81,7 +81,7 @@ MainWindowViewer::~MainWindowViewer()
|
|||||||
delete viewer;
|
delete viewer;
|
||||||
delete had;
|
delete had;
|
||||||
|
|
||||||
delete sliderAction;
|
//delete sliderAction;
|
||||||
delete openAction;
|
delete openAction;
|
||||||
delete openFolderAction;
|
delete openFolderAction;
|
||||||
delete saveImageAction;
|
delete saveImageAction;
|
||||||
@ -160,7 +160,6 @@ void MainWindowViewer::setupUI()
|
|||||||
|
|
||||||
optionsDialog = new OptionsDialog(this);
|
optionsDialog = new OptionsDialog(this);
|
||||||
connect(optionsDialog,SIGNAL(accepted()),viewer,SLOT(updateOptions()));
|
connect(optionsDialog,SIGNAL(accepted()),viewer,SLOT(updateOptions()));
|
||||||
connect(optionsDialog,SIGNAL(fitToWidthRatioChanged(float)),viewer,SLOT(updateFitToWidthRatio(float)));
|
|
||||||
connect(optionsDialog, SIGNAL(optionsChanged()),this,SLOT(reloadOptions()));
|
connect(optionsDialog, SIGNAL(optionsChanged()),this,SLOT(reloadOptions()));
|
||||||
connect(optionsDialog,SIGNAL(changedFilters(int,int,int)),viewer,SLOT(updateFilters(int,int,int)));
|
connect(optionsDialog,SIGNAL(changedFilters(int,int,int)),viewer,SLOT(updateFilters(int,int,int)));
|
||||||
|
|
||||||
@ -261,7 +260,6 @@ void MainWindowViewer::createActions()
|
|||||||
adjustHeightAction->setIcon(QIcon(":/images/viewer_toolbar/toHeight.png"));
|
adjustHeightAction->setIcon(QIcon(":/images/viewer_toolbar/toHeight.png"));
|
||||||
//adjustWidth->setCheckable(true);
|
//adjustWidth->setCheckable(true);
|
||||||
adjustHeightAction->setDisabled(true);
|
adjustHeightAction->setDisabled(true);
|
||||||
adjustHeightAction->setChecked(Configuration::getConfiguration().getAdjustToWidth());
|
|
||||||
adjustHeightAction->setToolTip(tr("Fit image to height"));
|
adjustHeightAction->setToolTip(tr("Fit image to height"));
|
||||||
//adjustWidth->setIcon(QIcon(":/images/fitWidth.png"));
|
//adjustWidth->setIcon(QIcon(":/images/fitWidth.png"));
|
||||||
adjustHeightAction->setData(ADJUST_HEIGHT_ACTION_Y);
|
adjustHeightAction->setData(ADJUST_HEIGHT_ACTION_Y);
|
||||||
@ -272,7 +270,6 @@ void MainWindowViewer::createActions()
|
|||||||
adjustWidthAction->setIcon(QIcon(":/images/viewer_toolbar/toWidth.png"));
|
adjustWidthAction->setIcon(QIcon(":/images/viewer_toolbar/toWidth.png"));
|
||||||
//adjustWidth->setCheckable(true);
|
//adjustWidth->setCheckable(true);
|
||||||
adjustWidthAction->setDisabled(true);
|
adjustWidthAction->setDisabled(true);
|
||||||
adjustWidthAction->setChecked(Configuration::getConfiguration().getAdjustToWidth());
|
|
||||||
adjustWidthAction->setToolTip(tr("Fit image to width"));
|
adjustWidthAction->setToolTip(tr("Fit image to width"));
|
||||||
//adjustWidth->setIcon(QIcon(":/images/fitWidth.png"));
|
//adjustWidth->setIcon(QIcon(":/images/fitWidth.png"));
|
||||||
adjustWidthAction->setData(ADJUST_WIDTH_ACTION_Y);
|
adjustWidthAction->setData(ADJUST_WIDTH_ACTION_Y);
|
||||||
@ -407,7 +404,6 @@ void MainWindowViewer::createActions()
|
|||||||
adjustToFullSizeAction->setIcon(QIcon(":/images/viewer_toolbar/full.png"));
|
adjustToFullSizeAction->setIcon(QIcon(":/images/viewer_toolbar/full.png"));
|
||||||
adjustToFullSizeAction->setCheckable(false);
|
adjustToFullSizeAction->setCheckable(false);
|
||||||
adjustToFullSizeAction->setDisabled(true);
|
adjustToFullSizeAction->setDisabled(true);
|
||||||
adjustToFullSizeAction->setChecked(Configuration::getConfiguration().getAdjustToFullSize());
|
|
||||||
adjustToFullSizeAction->setData(ADJUST_TO_FULL_SIZE_ACTION_Y);
|
adjustToFullSizeAction->setData(ADJUST_TO_FULL_SIZE_ACTION_Y);
|
||||||
adjustToFullSizeAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(ADJUST_TO_FULL_SIZE_ACTION_Y));
|
adjustToFullSizeAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(ADJUST_TO_FULL_SIZE_ACTION_Y));
|
||||||
connect(adjustToFullSizeAction,SIGNAL(triggered()),this,SLOT(adjustToFullSizeSwitch()));
|
connect(adjustToFullSizeAction,SIGNAL(triggered()),this,SLOT(adjustToFullSizeSwitch()));
|
||||||
@ -492,37 +488,37 @@ void MainWindowViewer::createToolBars()
|
|||||||
|
|
||||||
#ifdef Q_OS_MAC
|
#ifdef Q_OS_MAC
|
||||||
|
|
||||||
sliderAction = new YACReaderSlider(this);
|
//sliderAction = new YACReaderSlider(this);
|
||||||
sliderAction->hide();
|
//sliderAction->hide();
|
||||||
|
|
||||||
comicToolBar->addAction(adjustWidthAction);
|
comicToolBar->addAction(adjustWidthAction);
|
||||||
|
|
||||||
QAction * action = comicToolBar->addFitToWidthSlider(adjustWidthAction);
|
//QAction * action = comicToolBar->addFitToWidthSlider(adjustWidthAction);
|
||||||
|
|
||||||
connect(action,SIGNAL(triggered()),this,SLOT(toggleFitToWidthSlider()));
|
//connect(action,SIGNAL(triggered()),this,SLOT(toggleFitToWidthSlider()));
|
||||||
|
|
||||||
#else
|
#else
|
||||||
QMenu * menu = new QMenu();
|
//QMenu * menu = new QMenu();
|
||||||
|
|
||||||
sliderAction = new YACReaderSliderAction(this);
|
//sliderAction = new YACReaderSliderAction(this);
|
||||||
|
|
||||||
menu->setAutoFillBackground(false);
|
//menu->setAutoFillBackground(false);
|
||||||
menu->setStyleSheet(" QMenu {background:transparent; border: 0px;padding: 0px; }"
|
//menu->setStyleSheet(" QMenu {background:transparent; border: 0px;padding: 0px; }"
|
||||||
);
|
// );
|
||||||
menu->addAction(sliderAction);
|
//menu->addAction(sliderAction);
|
||||||
QToolButton * tb2 = new QToolButton();
|
//QToolButton * tb2 = new QToolButton();
|
||||||
tb2->addAction(adjustWidthAction);
|
//tb2->addAction(adjustWidthAction);
|
||||||
tb2->setMenu(menu);
|
//tb2->setMenu(menu);
|
||||||
|
|
||||||
//tb2->addAction();
|
//tb2->addAction();
|
||||||
tb2->setPopupMode(QToolButton::MenuButtonPopup);
|
//tb2->setPopupMode(QToolButton::MenuButtonPopup);
|
||||||
tb2->setDefaultAction(adjustWidthAction);
|
//tb2->setDefaultAction(adjustWidthAction);
|
||||||
comicToolBar->addWidget(tb2);
|
//comicToolBar->addWidget(tb2);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
connect(sliderAction,SIGNAL(fitToWidthRatioChanged(float)),viewer,SLOT(updateFitToWidthRatio(float)));
|
//connect(sliderAction,SIGNAL(fitToWidthRatioChanged(float)),viewer,SLOT(updateFitToWidthRatio(float)));
|
||||||
connect(optionsDialog,SIGNAL(fitToWidthRatioChanged(float)),sliderAction,SLOT(updateFitToWidthRatio(float)));
|
//connect(optionsDialog,SIGNAL(fitToWidthRatioChanged(float)),sliderAction,SLOT(updateFitToWidthRatio(float)));
|
||||||
|
comicToolBar->addAction(adjustWidthAction);
|
||||||
comicToolBar->addAction(adjustHeightAction);
|
comicToolBar->addAction(adjustHeightAction);
|
||||||
comicToolBar->addAction(adjustToFullSizeAction);
|
comicToolBar->addAction(adjustToFullSizeAction);
|
||||||
comicToolBar->addAction(leftRotationAction);
|
comicToolBar->addAction(leftRotationAction);
|
||||||
@ -881,11 +877,6 @@ void MainWindowViewer::keyPressEvent(QKeyEvent *event)
|
|||||||
toggleToolBars();
|
toggleToolBars();
|
||||||
event->accept();
|
event->accept();
|
||||||
}
|
}
|
||||||
else if (key == ShortcutsManager::getShortcutsManager().getShortcut(CHANGE_FIT_ACTION_Y))
|
|
||||||
{
|
|
||||||
changeFit();
|
|
||||||
event->accept();
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
QWidget::keyPressEvent(event);
|
QWidget::keyPressEvent(event);
|
||||||
}
|
}
|
||||||
@ -1149,6 +1140,7 @@ void MainWindowViewer::setUpShortcutsManagement()
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef Q_OS_MAC
|
#ifdef Q_OS_MAC
|
||||||
|
/*
|
||||||
void MainWindowViewer::toggleFitToWidthSlider()
|
void MainWindowViewer::toggleFitToWidthSlider()
|
||||||
{
|
{
|
||||||
if(sliderAction->isVisible())
|
if(sliderAction->isVisible())
|
||||||
@ -1160,16 +1152,9 @@ void MainWindowViewer::toggleFitToWidthSlider()
|
|||||||
sliderAction->move(250,0);
|
sliderAction->move(250,0);
|
||||||
sliderAction->show();
|
sliderAction->show();
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void MainWindowViewer::changeFit()
|
|
||||||
{
|
|
||||||
Configuration & conf = Configuration::getConfiguration();
|
|
||||||
conf.setAdjustToWidth(!conf.getAdjustToWidth());
|
|
||||||
viewer->updatePage();
|
|
||||||
}
|
|
||||||
|
|
||||||
void MainWindowViewer::newVersion()
|
void MainWindowViewer::newVersion()
|
||||||
{
|
{
|
||||||
QMessageBox msgBox;
|
QMessageBox msgBox;
|
||||||
|
@ -38,7 +38,6 @@ class EditShortcutsDialog;
|
|||||||
void toggleToolBars();
|
void toggleToolBars();
|
||||||
void hideToolBars();
|
void hideToolBars();
|
||||||
void showToolBars();
|
void showToolBars();
|
||||||
void changeFit();
|
|
||||||
void enableActions();
|
void enableActions();
|
||||||
void disableActions();
|
void disableActions();
|
||||||
void toggleFullScreen();
|
void toggleFullScreen();
|
||||||
|
@ -55,7 +55,7 @@ OptionsDialog::OptionsDialog(QWidget * parent)
|
|||||||
connect(pathFindButton,SIGNAL(clicked()),this,SLOT(findFolder()));
|
connect(pathFindButton,SIGNAL(clicked()),this,SLOT(findFolder()));
|
||||||
|
|
||||||
//fitToWidthRatioLabel = new QLabel(tr("Page width stretch"),this);
|
//fitToWidthRatioLabel = new QLabel(tr("Page width stretch"),this);
|
||||||
QGroupBox *fitBox = new QGroupBox(tr("Page width stretch"));
|
/*QGroupBox *fitBox = new QGroupBox(tr("Page width stretch"));
|
||||||
fitToWidthRatioS = new QSlider(this);
|
fitToWidthRatioS = new QSlider(this);
|
||||||
fitToWidthRatioS->setMinimum(50);
|
fitToWidthRatioS->setMinimum(50);
|
||||||
fitToWidthRatioS->setMaximum(100);
|
fitToWidthRatioS->setMaximum(100);
|
||||||
@ -64,7 +64,7 @@ OptionsDialog::OptionsDialog(QWidget * parent)
|
|||||||
//connect(fitToWidthRatioS,SIGNAL(valueChanged(int)),this,SLOT(fitToWidthRatio(int)));
|
//connect(fitToWidthRatioS,SIGNAL(valueChanged(int)),this,SLOT(fitToWidthRatio(int)));
|
||||||
QHBoxLayout * fitLayout = new QHBoxLayout;
|
QHBoxLayout * fitLayout = new QHBoxLayout;
|
||||||
fitLayout->addWidget(fitToWidthRatioS);
|
fitLayout->addWidget(fitToWidthRatioS);
|
||||||
fitBox->setLayout(fitLayout);
|
fitBox->setLayout(fitLayout);*/
|
||||||
|
|
||||||
QHBoxLayout * colorSelection = new QHBoxLayout;
|
QHBoxLayout * colorSelection = new QHBoxLayout;
|
||||||
backgroundColor = new QLabel();
|
backgroundColor = new QLabel();
|
||||||
@ -113,7 +113,7 @@ OptionsDialog::OptionsDialog(QWidget * parent)
|
|||||||
|
|
||||||
layoutGeneral->addWidget(pathBox);
|
layoutGeneral->addWidget(pathBox);
|
||||||
layoutGeneral->addWidget(slideSizeBox);
|
layoutGeneral->addWidget(slideSizeBox);
|
||||||
layoutGeneral->addWidget(fitBox);
|
//layoutGeneral->addWidget(fitBox);
|
||||||
layoutGeneral->addWidget(colorBox);
|
layoutGeneral->addWidget(colorBox);
|
||||||
layoutGeneral->addWidget(shortcutsBox);
|
layoutGeneral->addWidget(shortcutsBox);
|
||||||
layoutGeneral->addStretch();
|
layoutGeneral->addStretch();
|
||||||
@ -190,7 +190,7 @@ void OptionsDialog::saveOptions()
|
|||||||
settings->setValue(PATH,pathEdit->text());
|
settings->setValue(PATH,pathEdit->text());
|
||||||
|
|
||||||
settings->setValue(BACKGROUND_COLOR,colorDialog->currentColor());
|
settings->setValue(BACKGROUND_COLOR,colorDialog->currentColor());
|
||||||
settings->setValue(FIT_TO_WIDTH_RATIO,fitToWidthRatioS->sliderPosition()/100.0);
|
//settings->setValue(FIT_TO_WIDTH_RATIO,fitToWidthRatioS->sliderPosition()/100.0);
|
||||||
|
|
||||||
YACReaderOptionsDialog::saveOptions();
|
YACReaderOptionsDialog::saveOptions();
|
||||||
}
|
}
|
||||||
@ -219,7 +219,7 @@ void OptionsDialog::restoreOptions(QSettings * settings)
|
|||||||
pathEdit->setText(settings->value(PATH).toString());
|
pathEdit->setText(settings->value(PATH).toString());
|
||||||
|
|
||||||
updateColor(settings->value(BACKGROUND_COLOR).value<QColor>());
|
updateColor(settings->value(BACKGROUND_COLOR).value<QColor>());
|
||||||
fitToWidthRatioS->setSliderPosition(settings->value(FIT_TO_WIDTH_RATIO).toFloat()*100);
|
//fitToWidthRatioS->setSliderPosition(settings->value(FIT_TO_WIDTH_RATIO).toFloat()*100);
|
||||||
|
|
||||||
brightnessS->setValue(settings->value(BRIGHTNESS,0).toInt());
|
brightnessS->setValue(settings->value(BRIGHTNESS,0).toInt());
|
||||||
contrastS->setValue(settings->value(CONTRAST,100).toInt());
|
contrastS->setValue(settings->value(CONTRAST,100).toInt());
|
||||||
@ -240,11 +240,11 @@ void OptionsDialog::updateColor(const QColor & color)
|
|||||||
emit(changedOptions());
|
emit(changedOptions());
|
||||||
}
|
}
|
||||||
|
|
||||||
void OptionsDialog::fitToWidthRatio(int value)
|
/*void OptionsDialog::fitToWidthRatio(int value)
|
||||||
{
|
{
|
||||||
Configuration::getConfiguration().setFitToWidthRatio(value/100.0);
|
Configuration::getConfiguration().setFitToWidthRatio(value/100.0);
|
||||||
emit(fitToWidthRatioChanged(value/100.0));
|
emit(fitToWidthRatioChanged(value/100.0));
|
||||||
}
|
}*/
|
||||||
|
|
||||||
void OptionsDialog::brightnessChanged(int value)
|
void OptionsDialog::brightnessChanged(int value)
|
||||||
{
|
{
|
||||||
@ -287,9 +287,9 @@ void OptionsDialog::show()
|
|||||||
{
|
{
|
||||||
//TODO solucionar el tema de las settings, esto sólo debería aparecer en una única línea de código
|
//TODO solucionar el tema de las settings, esto sólo debería aparecer en una única línea de código
|
||||||
QSettings *s = new QSettings(YACReader::getSettingsPath()+"/YACReader.ini",QSettings::IniFormat);
|
QSettings *s = new QSettings(YACReader::getSettingsPath()+"/YACReader.ini",QSettings::IniFormat);
|
||||||
fitToWidthRatioS->disconnect();
|
//fitToWidthRatioS->disconnect();
|
||||||
fitToWidthRatioS->setSliderPosition(settings->value(FIT_TO_WIDTH_RATIO).toFloat()*100);
|
//fitToWidthRatioS->setSliderPosition(settings->value(FIT_TO_WIDTH_RATIO).toFloat()*100);
|
||||||
connect(fitToWidthRatioS,SIGNAL(valueChanged(int)),this,SLOT(fitToWidthRatio(int)));
|
//connect(fitToWidthRatioS,SIGNAL(valueChanged(int)),this,SLOT(fitToWidthRatio(int)));
|
||||||
QDialog::show();
|
QDialog::show();
|
||||||
delete s;
|
delete s;
|
||||||
}
|
}
|
||||||
|
@ -32,7 +32,7 @@ Q_OBJECT
|
|||||||
QSlider * slideSize;
|
QSlider * slideSize;
|
||||||
|
|
||||||
//QLabel * fitToWidthRatioLabel;
|
//QLabel * fitToWidthRatioLabel;
|
||||||
QSlider * fitToWidthRatioS;
|
//QSlider * fitToWidthRatioS;
|
||||||
|
|
||||||
QLabel * backgroundColor;
|
QLabel * backgroundColor;
|
||||||
QPushButton * selectBackgroundColorButton;
|
QPushButton * selectBackgroundColorButton;
|
||||||
@ -50,7 +50,7 @@ Q_OBJECT
|
|||||||
void restoreOptions(QSettings * settings);
|
void restoreOptions(QSettings * settings);
|
||||||
void findFolder();
|
void findFolder();
|
||||||
void updateColor(const QColor & color);
|
void updateColor(const QColor & color);
|
||||||
void fitToWidthRatio(int value);
|
//void fitToWidthRatio(int value);
|
||||||
void brightnessChanged(int value);
|
void brightnessChanged(int value);
|
||||||
void contrastChanged(int value);
|
void contrastChanged(int value);
|
||||||
void gammaChanged(int value);
|
void gammaChanged(int value);
|
||||||
@ -62,7 +62,7 @@ signals:
|
|||||||
void changedOptions();
|
void changedOptions();
|
||||||
void changedImageOptions();
|
void changedImageOptions();
|
||||||
void changedFilters(int brightness, int contrast, int gamma);
|
void changedFilters(int brightness, int contrast, int gamma);
|
||||||
void fitToWidthRatioChanged(float ratio);
|
//void fitToWidthRatioChanged(float ratio);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -885,13 +885,6 @@ void Viewer::mouseReleaseEvent ( QMouseEvent * event )
|
|||||||
event->accept();
|
event->accept();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Viewer::updateFitToWidthRatio(float ratio)
|
|
||||||
{
|
|
||||||
Configuration::getConfiguration().setAdjustToWidth(true);
|
|
||||||
adjustToWidthRatio = ratio;
|
|
||||||
updateContentSize();
|
|
||||||
}
|
|
||||||
|
|
||||||
void Viewer::updateConfig(QSettings * settings)
|
void Viewer::updateConfig(QSettings * settings)
|
||||||
{
|
{
|
||||||
goToFlow->updateConfig(settings);
|
goToFlow->updateConfig(settings);
|
||||||
|
@ -80,7 +80,6 @@ class NotificationsLabelWidget;
|
|||||||
virtual void mousePressEvent ( QMouseEvent * event );
|
virtual void mousePressEvent ( QMouseEvent * event );
|
||||||
virtual void mouseReleaseEvent ( QMouseEvent * event );
|
virtual void mouseReleaseEvent ( QMouseEvent * event );
|
||||||
void updateBackgroundColor(const QColor & color);
|
void updateBackgroundColor(const QColor & color);
|
||||||
void updateFitToWidthRatio(float ratio);
|
|
||||||
void updateConfig(QSettings * settings);
|
void updateConfig(QSettings * settings);
|
||||||
void showMessageErrorOpening();
|
void showMessageErrorOpening();
|
||||||
void showMessageErrorOpening(QString);
|
void showMessageErrorOpening(QString);
|
||||||
|
@ -12,23 +12,27 @@
|
|||||||
|
|
||||||
#define VERSION "8.0.0"
|
#define VERSION "8.0.0"
|
||||||
|
|
||||||
|
//old fitmode defines
|
||||||
|
/*
|
||||||
|
#define ADJUST_TO_FULL_SIZE "ADJUST_TO_FULL_SIZE"
|
||||||
|
#define FIT "FIT"
|
||||||
|
#define FIT_TO_WIDTH_RATIO "FIT_TO_WIDTH_RATIO"
|
||||||
|
*/
|
||||||
|
|
||||||
#define PATH "PATH"
|
#define PATH "PATH"
|
||||||
#define MAG_GLASS_SIZE "MAG_GLASS_SIZE"
|
#define MAG_GLASS_SIZE "MAG_GLASS_SIZE"
|
||||||
#define ZOOM_LEVEL "ZOOM_LEVEL"
|
#define ZOOM_LEVEL "ZOOM_LEVEL"
|
||||||
#define SLIDE_SIZE "SLIDE_SIZE"
|
#define SLIDE_SIZE "SLIDE_SIZE"
|
||||||
#define GO_TO_FLOW_SIZE "GO_TO_FLOW_SIZE"
|
#define GO_TO_FLOW_SIZE "GO_TO_FLOW_SIZE"
|
||||||
#define FLOW_TYPE_SW "FLOW_TYPE_SW"
|
#define FLOW_TYPE_SW "FLOW_TYPE_SW"
|
||||||
#define FIT "FIT"
|
|
||||||
#define FITMODE "FITMODE"
|
#define FITMODE "FITMODE"
|
||||||
#define FLOW_TYPE "FLOW_TYPE"
|
#define FLOW_TYPE "FLOW_TYPE"
|
||||||
#define FULLSCREEN "FULLSCREEN"
|
#define FULLSCREEN "FULLSCREEN"
|
||||||
#define FIT_TO_WIDTH_RATIO "FIT_TO_WIDTH_RATIO"
|
|
||||||
#define Y_WINDOW_POS "POS"
|
#define Y_WINDOW_POS "POS"
|
||||||
#define Y_WINDOW_SIZE "SIZE"
|
#define Y_WINDOW_SIZE "SIZE"
|
||||||
#define MAXIMIZED "MAXIMIZED"
|
#define MAXIMIZED "MAXIMIZED"
|
||||||
#define DOUBLE_PAGE "DOUBLE_PAGE"
|
#define DOUBLE_PAGE "DOUBLE_PAGE"
|
||||||
#define DOUBLE_MANGA_PAGE "DOUBLE_MANGA_PAGE"
|
#define DOUBLE_MANGA_PAGE "DOUBLE_MANGA_PAGE"
|
||||||
#define ADJUST_TO_FULL_SIZE "ADJUST_TO_FULL_SIZE"
|
|
||||||
#define BACKGROUND_COLOR "BACKGROUND_COLOR"
|
#define BACKGROUND_COLOR "BACKGROUND_COLOR"
|
||||||
#define ALWAYS_ON_TOP "ALWAYS_ON_TOP"
|
#define ALWAYS_ON_TOP "ALWAYS_ON_TOP"
|
||||||
#define SHOW_TOOLBARS "SHOW_TOOLBARS"
|
#define SHOW_TOOLBARS "SHOW_TOOLBARS"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user