mirror of
https://github.com/YACReader/yacreader
synced 2025-06-04 01:28:55 -04:00
creado yacreader_global.h
reestructuraci?n de parte del c?digo cambio a Qt 4.8.3 uso de QSettings en YACReader, falta leer la configuraci?n desde qsettings
This commit is contained in:
parent
c760120e39
commit
a4ecda4ae9
@ -18,10 +18,6 @@ HEADERS += comic.h \
|
||||
magnifying_glass.h \
|
||||
main_window_viewer.h \
|
||||
viewer.h \
|
||||
../common/pictureflow.h \
|
||||
../common/custom_widgets.h \
|
||||
../common/check_new_version.h \
|
||||
../common/qnaturalsorting.h \
|
||||
goto_flow.h \
|
||||
options_dialog.h \
|
||||
bookmarks.h \
|
||||
@ -29,9 +25,14 @@ HEADERS += comic.h \
|
||||
render.h \
|
||||
shortcuts_dialog.h \
|
||||
translator.h \
|
||||
../common/goto_flow_widget.h \
|
||||
goto_flow_gl.h \
|
||||
../common/yacreader_flow_gl.h
|
||||
goto_flow_widget.h \
|
||||
../common/pictureflow.h \
|
||||
../common/custom_widgets.h \
|
||||
../common/check_new_version.h \
|
||||
../common/qnaturalsorting.h \
|
||||
../common/yacreader_flow_gl.h \
|
||||
../common/yacreader_global.h
|
||||
|
||||
SOURCES += comic.cpp \
|
||||
configuration.cpp \
|
||||
@ -40,10 +41,6 @@ SOURCES += comic.cpp \
|
||||
main.cpp \
|
||||
main_window_viewer.cpp \
|
||||
viewer.cpp \
|
||||
../common/pictureflow.cpp \
|
||||
../common/custom_widgets.cpp \
|
||||
../common/check_new_version.cpp \
|
||||
../common/qnaturalsorting.cpp \
|
||||
goto_flow.cpp \
|
||||
options_dialog.cpp \
|
||||
bookmarks.cpp \
|
||||
@ -51,8 +48,12 @@ SOURCES += comic.cpp \
|
||||
render.cpp \
|
||||
shortcuts_dialog.cpp \
|
||||
translator.cpp \
|
||||
../common/goto_flow_widget.cpp \
|
||||
goto_flow_gl.cpp \
|
||||
goto_flow_widget.cpp \
|
||||
../common/pictureflow.cpp \
|
||||
../common/custom_widgets.cpp \
|
||||
../common/check_new_version.cpp \
|
||||
../common/qnaturalsorting.cpp \
|
||||
../common/yacreader_flow_gl.cpp
|
||||
|
||||
RESOURCES += images.qrc \
|
||||
|
@ -47,7 +47,7 @@ void Configuration::load(const QString & path)
|
||||
//gotoSlideSize = QSize(220,350); //huge
|
||||
zoomLevel = 0.5;
|
||||
adjustToWidth = true;
|
||||
flowType = PictureFlow::Strip;
|
||||
flowType = Strip;
|
||||
fullScreen = false;
|
||||
fitToWidthRatio = 1;
|
||||
windowSize = QSize(0,0);
|
||||
@ -95,7 +95,7 @@ void Configuration::load(const QString & path)
|
||||
adjustToWidth = line.toInt();
|
||||
else
|
||||
if(name==FLOW_TYPE)
|
||||
flowType = (PictureFlow::FlowType)line.toInt();
|
||||
flowType = (FlowType)line.toInt();
|
||||
else
|
||||
if(name==FULLSCREEN)
|
||||
fullScreen = line.toInt();
|
||||
|
@ -3,7 +3,9 @@
|
||||
#include <QString>
|
||||
#include <QSize>
|
||||
#include <QObject>
|
||||
#include "pictureflow.h"
|
||||
#include <QPoint>
|
||||
#include <QColor>
|
||||
#include "yacreader_global.h"
|
||||
|
||||
#define CONF_FILE_PATH "."
|
||||
#define SLIDE_ASPECT_RATIO 1.585
|
||||
@ -20,7 +22,7 @@
|
||||
float zoomLevel;
|
||||
bool adjustToWidth;
|
||||
bool fullScreen;
|
||||
PictureFlow::FlowType flowType;
|
||||
FlowType flowType;
|
||||
float fitToWidthRatio;
|
||||
QPoint windowPos;
|
||||
QSize windowSize;
|
||||
@ -50,8 +52,8 @@
|
||||
void setZoomLevel(float zl) { zoomLevel = zl;};
|
||||
bool getAdjustToWidth() {return adjustToWidth;};
|
||||
void setAdjustToWidth(bool atw=true) {adjustToWidth = atw;};
|
||||
PictureFlow::FlowType getFlowType(){return flowType;};
|
||||
void setFlowType(PictureFlow::FlowType type){flowType = type;};
|
||||
FlowType getFlowType(){return flowType;};
|
||||
void setFlowType(FlowType type){flowType = type;};
|
||||
bool getFullScreen(){return fullScreen;};
|
||||
void setFullScreen(bool f){fullScreen = f;};
|
||||
float getFitToWidthRatio(){return fitToWidthRatio;};
|
||||
|
@ -18,7 +18,7 @@ QMutex mutexGoToFlow;
|
||||
|
||||
|
||||
|
||||
GoToFlow::GoToFlow(QWidget *parent,PictureFlow::FlowType flowType)
|
||||
GoToFlow::GoToFlow(QWidget *parent,FlowType flowType)
|
||||
:GoToFlowWidget(parent),ready(false)
|
||||
{
|
||||
updateTimer = new QTimer;
|
||||
@ -269,7 +269,7 @@ void GoToFlow::wheelEvent(QWheelEvent * event)
|
||||
event->accept();
|
||||
}
|
||||
|
||||
void GoToFlow::setFlowType(PictureFlow::FlowType flowType)
|
||||
void GoToFlow::setFlowType(FlowType flowType)
|
||||
{
|
||||
flow->setFlowType(flowType);
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ class GoToFlow : public GoToFlowWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
GoToFlow(QWidget* parent = 0,PictureFlow::FlowType flowType = PictureFlow::CoverFlowLike);
|
||||
GoToFlow(QWidget* parent = 0,FlowType flowType = CoverFlowLike);
|
||||
bool ready; //comic is ready for read.
|
||||
void keyPressEvent(QKeyEvent* event);
|
||||
bool eventFilter(QObject *target, QEvent *event);
|
||||
@ -56,7 +56,7 @@ private:
|
||||
void reset();
|
||||
void setNumSlides(unsigned int slides);
|
||||
void setImageReady(int index,const QByteArray & image);
|
||||
void setFlowType(PictureFlow::FlowType flowType);
|
||||
void setFlowType(FlowType flowType);
|
||||
void updateSize();
|
||||
void updateConfig(QSettings * settings);
|
||||
signals:
|
||||
|
@ -19,6 +19,8 @@ MainWindowViewer::MainWindowViewer()
|
||||
|
||||
void MainWindowViewer::loadConfiguration()
|
||||
{
|
||||
settings = new QSettings("YACReader.ini",QSettings::IniFormat);
|
||||
|
||||
Configuration & config = Configuration::getConfiguration();
|
||||
currentDirectory = config.getDefaultPath();
|
||||
fullscreen = config.getFullScreen();
|
||||
@ -26,9 +28,6 @@ void MainWindowViewer::loadConfiguration()
|
||||
|
||||
void MainWindowViewer::setupUI()
|
||||
{
|
||||
settings = new QSettings("YACReader.ini",QSettings::IniFormat);
|
||||
settings->beginGroup("config");
|
||||
|
||||
setWindowIcon(QIcon(":/images/icon.png"));
|
||||
|
||||
viewer = new Viewer(this);
|
||||
|
@ -109,6 +109,7 @@ class ShortcutsDialog;
|
||||
void dragEnterEvent(QDragEnterEvent *event);
|
||||
|
||||
QSettings * settings;
|
||||
|
||||
protected:
|
||||
virtual void closeEvent ( QCloseEvent * event );
|
||||
public:
|
||||
|
@ -96,18 +96,19 @@ void OptionsDialog::findFolder()
|
||||
|
||||
void OptionsDialog::saveOptions()
|
||||
{
|
||||
Configuration & conf = Configuration::getConfiguration();
|
||||
conf.setDefaultPath(pathEdit->text());
|
||||
conf.setGotoSlideSize(QSize(static_cast<int>(slideSize->sliderPosition()*SLIDE_ASPECT_RATIO),slideSize->sliderPosition()));
|
||||
settings->setValue("goToFlowSize",QSize(static_cast<int>(slideSize->sliderPosition()*SLIDE_ASPECT_RATIO),slideSize->sliderPosition()));
|
||||
if(sw->radio1->isChecked())
|
||||
conf.setFlowType(PictureFlow::CoverFlowLike);
|
||||
settings->setValue("flowTypeSW",0);
|
||||
if(sw->radio2->isChecked())
|
||||
conf.setFlowType(PictureFlow::Strip);
|
||||
settings->setValue("flowTypeSW",1);
|
||||
if(sw->radio3->isChecked())
|
||||
conf.setFlowType(PictureFlow::StripOverlapped);
|
||||
conf.setFitToWidthRatio(fitToWidthRatioS->sliderPosition()/100.0);
|
||||
conf.setBackgroundColor(colorDialog->currentColor());
|
||||
conf.save();
|
||||
settings->setValue("flowTypeSW",2);
|
||||
|
||||
settings->setValue("path",pathEdit->text());
|
||||
|
||||
settings->setValue("color",colorDialog->currentColor());
|
||||
settings->setValue("adjustToWidthRatio",fitToWidthRatioS->sliderPosition()/100.0);
|
||||
|
||||
close();
|
||||
emit(accepted());
|
||||
}
|
||||
@ -115,24 +116,28 @@ void OptionsDialog::saveOptions()
|
||||
void OptionsDialog::restoreOptions(QSettings * settings)
|
||||
{
|
||||
YACReaderOptionsDialog::restoreOptions(settings);
|
||||
|
||||
Configuration & conf = Configuration::getConfiguration();
|
||||
|
||||
slideSize->setSliderPosition(conf.getGotoSlideSize().height());
|
||||
fitToWidthRatioS->setSliderPosition(conf.getFitToWidthRatio()*100);
|
||||
pathEdit->setText(conf.getDefaultPath());
|
||||
updateColor(Configuration::getConfiguration().getBackgroundColor());
|
||||
switch(conf.getFlowType()){
|
||||
case PictureFlow::CoverFlowLike:
|
||||
|
||||
slideSize->setSliderPosition(settings->value("goToFlowSize").toSize().height());
|
||||
switch(settings->value("flowTypeSW").toInt())
|
||||
{
|
||||
case 0:
|
||||
sw->radio1->setChecked(true);
|
||||
break;
|
||||
case PictureFlow::Strip:
|
||||
case 1:
|
||||
sw->radio2->setChecked(true);
|
||||
break;
|
||||
case PictureFlow::StripOverlapped:
|
||||
case 2:
|
||||
sw->radio3->setChecked(true);
|
||||
break;
|
||||
default:
|
||||
sw->radio1->setChecked(true);
|
||||
break;
|
||||
}
|
||||
|
||||
pathEdit->setText(settings->value("path").toString());
|
||||
|
||||
updateColor(settings->value("color").value<QColor>());
|
||||
fitToWidthRatioS->setSliderPosition(settings->value("adjustToWidthRatio").toFloat()*100);
|
||||
}
|
||||
|
||||
|
||||
|
@ -19,17 +19,18 @@ HEADERS += comic_flow.h \
|
||||
create_library_dialog.h \
|
||||
library_creator.h \
|
||||
library_window.h \
|
||||
../common/pictureflow.h \
|
||||
add_library_dialog.h \
|
||||
../common/custom_widgets.h \
|
||||
rename_library_dialog.h \
|
||||
properties_dialog.h \
|
||||
options_dialog.h \
|
||||
export_library_dialog.h \
|
||||
import_library_dialog.h \
|
||||
package_manager.h \
|
||||
../common/qnaturalsorting.h \
|
||||
bundle_creator.h \
|
||||
export_comics_info_dialog.h \
|
||||
import_comics_info_dialog.h \
|
||||
server_config_dialog.h \
|
||||
comic_flow_widget.h \
|
||||
./db/data_base_management.h \
|
||||
./db/treeitem.h \
|
||||
./db/treemodel.h \
|
||||
@ -38,31 +39,31 @@ HEADERS += comic_flow.h \
|
||||
./db/comic_db.h \
|
||||
./db/folder.h \
|
||||
./db/library_item.h \
|
||||
export_comics_info_dialog.h \
|
||||
import_comics_info_dialog.h \
|
||||
../common/check_new_version.h \
|
||||
../YACReader/comic.h \
|
||||
../YACReader/bookmarks.h \
|
||||
server_config_dialog.h \
|
||||
comic_flow_widget.h \
|
||||
../common/yacreader_flow_gl.h
|
||||
../common/pictureflow.h \
|
||||
../common/custom_widgets.h \
|
||||
../common/qnaturalsorting.h \
|
||||
../common/yacreader_flow_gl.h \
|
||||
../common/yacreader_global.h
|
||||
|
||||
SOURCES += comic_flow.cpp \
|
||||
create_library_dialog.cpp \
|
||||
library_creator.cpp \
|
||||
library_window.cpp \
|
||||
main.cpp \
|
||||
../common/pictureflow.cpp \
|
||||
add_library_dialog.cpp \
|
||||
../common/custom_widgets.cpp \
|
||||
rename_library_dialog.cpp \
|
||||
properties_dialog.cpp \
|
||||
options_dialog.cpp \
|
||||
export_library_dialog.cpp \
|
||||
import_library_dialog.cpp \
|
||||
package_manager.cpp \
|
||||
../common/qnaturalsorting.cpp \
|
||||
bundle_creator.cpp \
|
||||
export_comics_info_dialog.cpp \
|
||||
import_comics_info_dialog.cpp \
|
||||
server_config_dialog.cpp \
|
||||
comic_flow_widget.cpp \
|
||||
./db/data_base_management.cpp \
|
||||
./db/treeitem.cpp \
|
||||
./db/treemodel.cpp \
|
||||
@ -71,13 +72,11 @@ SOURCES += comic_flow.cpp \
|
||||
./db/comic_db.cpp \
|
||||
./db/folder.cpp \
|
||||
./db/library_item.cpp \
|
||||
export_comics_info_dialog.cpp \
|
||||
import_comics_info_dialog.cpp \
|
||||
../common/check_new_version.cpp \
|
||||
../YACReader/comic.cpp \
|
||||
../YACReader/bookmarks.cpp \
|
||||
server_config_dialog.cpp \
|
||||
comic_flow_widget.cpp \
|
||||
../common/pictureflow.cpp \
|
||||
../common/custom_widgets.cpp \
|
||||
../common/qnaturalsorting.cpp \
|
||||
../common/yacreader_flow_gl.cpp
|
||||
|
||||
include(./server/server.pri)
|
||||
|
@ -18,7 +18,7 @@
|
||||
#include <iterator>
|
||||
|
||||
#include "data_base_management.h"
|
||||
#include "check_new_version.h"
|
||||
#include "yacreader_global.h"
|
||||
|
||||
//
|
||||
|
||||
|
@ -13,7 +13,7 @@
|
||||
#include "custom_widgets.h"
|
||||
#include "yacreader_flow_gl.h"
|
||||
|
||||
PictureFlow::FlowType flowType = PictureFlow::Strip;
|
||||
FlowType flowType = Strip;
|
||||
|
||||
OptionsDialog::OptionsDialog(QWidget * parent)
|
||||
:YACReaderOptionsDialog(parent)
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
#include "custom_widgets.h"
|
||||
|
||||
extern PictureFlow::FlowType flowType;
|
||||
extern FlowType flowType;
|
||||
|
||||
class OptionsDialog : public YACReaderOptionsDialog
|
||||
{
|
||||
|
@ -6,7 +6,7 @@
|
||||
#include <QHttpResponseHeader>
|
||||
#include <QByteArray>
|
||||
|
||||
#define VERSION "5.0.0"
|
||||
#include "yacreader_global.h"
|
||||
|
||||
class HttpVersionChecker : public QWidget
|
||||
{
|
||||
|
@ -535,6 +535,11 @@ YACReaderOptionsDialog::YACReaderOptionsDialog(QWidget * parent)
|
||||
useGL = useGL = new QCheckBox(tr("Use hardware acceleration (restart needed)"));
|
||||
connect(useGL,SIGNAL(stateChanged(int)),this,SLOT(saveUseGL(int)));
|
||||
|
||||
//sw CONNECTIONS
|
||||
connect(sw->radio1,SIGNAL(toggled(bool)),this,SLOT(setClassicConfig()));
|
||||
connect(sw->radio2,SIGNAL(toggled(bool)),this,SLOT(setStripeConfig()));
|
||||
connect(sw->radio3,SIGNAL(toggled(bool)),this,SLOT(setOverlappedStripeConfig()));
|
||||
|
||||
//gl CONNECTIONS
|
||||
connect(gl->radioClassic,SIGNAL(toggled(bool)),this,SLOT(setClassicConfig()));
|
||||
connect(gl->radioStripe,SIGNAL(toggled(bool)),this,SLOT(setStripeConfig()));
|
||||
@ -604,63 +609,65 @@ void YACReaderOptionsDialog::saveUseGL(int b)
|
||||
sw->setVisible(true);
|
||||
}
|
||||
resize(0,0);
|
||||
|
||||
settings->setValue("useOpenGL",b);
|
||||
|
||||
}
|
||||
|
||||
void YACReaderOptionsDialog::saveXRotation(int value)
|
||||
{
|
||||
settings->setValue("flowType",PictureFlow::Custom);
|
||||
settings->setValue("flowType",Custom);
|
||||
settings->setValue("xRotation",gl->xRotation->getValue());
|
||||
}
|
||||
void YACReaderOptionsDialog::saveYPosition(int value)
|
||||
{
|
||||
settings->setValue("flowType",PictureFlow::Custom);
|
||||
settings->setValue("flowType",Custom);
|
||||
settings->setValue("yPosition",gl->yPosition->getValue());
|
||||
}
|
||||
void YACReaderOptionsDialog::saveCoverDistance(int value)
|
||||
{
|
||||
settings->setValue("flowType",PictureFlow::Custom);
|
||||
settings->setValue("flowType",Custom);
|
||||
settings->setValue("coverDistance",gl->coverDistance->getValue());
|
||||
}
|
||||
void YACReaderOptionsDialog::saveCentralDistance(int value)
|
||||
{
|
||||
settings->setValue("flowType",PictureFlow::Custom);
|
||||
settings->setValue("flowType",Custom);
|
||||
settings->setValue("centralDistance",gl->centralDistance->getValue());
|
||||
}
|
||||
void YACReaderOptionsDialog::saveZoomLevel(int value)
|
||||
{
|
||||
settings->setValue("flowType",PictureFlow::Custom);
|
||||
settings->setValue("flowType",Custom);
|
||||
settings->setValue("zoomLevel",gl->zoomLevel->getValue());
|
||||
}
|
||||
void YACReaderOptionsDialog::saveYCoverOffset(int value)
|
||||
{
|
||||
settings->setValue("flowType",PictureFlow::Custom);
|
||||
settings->setValue("flowType",Custom);
|
||||
settings->setValue("yCoverOffset",gl->yCoverOffset->getValue());
|
||||
}
|
||||
void YACReaderOptionsDialog::saveZCoverOffset(int value)
|
||||
{
|
||||
settings->setValue("flowType",PictureFlow::Custom);
|
||||
settings->setValue("flowType",Custom);
|
||||
settings->setValue("zCoverOffset",gl->zCoverOffset->getValue());
|
||||
}
|
||||
void YACReaderOptionsDialog::saveCoverRotation(int value)
|
||||
{
|
||||
settings->setValue("flowType",PictureFlow::Custom);
|
||||
settings->setValue("flowType",Custom);
|
||||
settings->setValue("coverRotation",gl->coverRotation->getValue());
|
||||
}
|
||||
void YACReaderOptionsDialog::saveFadeOutDist(int value)
|
||||
{
|
||||
settings->setValue("flowType",PictureFlow::Custom);
|
||||
settings->setValue("flowType",Custom);
|
||||
settings->setValue("fadeOutDist",gl->fadeOutDist->getValue());
|
||||
}
|
||||
void YACReaderOptionsDialog::saveLightStrength(int value)
|
||||
{
|
||||
settings->setValue("flowType",PictureFlow::Custom);
|
||||
settings->setValue("flowType",Custom);
|
||||
settings->setValue("lightStrength",gl->lightStrength->getValue());
|
||||
}
|
||||
|
||||
void YACReaderOptionsDialog::saveMaxAngle(int value)
|
||||
{
|
||||
settings->setValue("flowType",PictureFlow::Custom);
|
||||
settings->setValue("flowType",Custom);
|
||||
settings->setValue("maxAngle",gl->maxAngle->getValue());
|
||||
}
|
||||
|
||||
@ -668,6 +675,8 @@ void YACReaderOptionsDialog::restoreOptions(QSettings * settings)
|
||||
{
|
||||
this->settings = settings;
|
||||
|
||||
//FLOW CONFIG
|
||||
|
||||
if(settings->contains("useOpenGL") && settings->value("useOpenGL").toInt() == Qt::Checked)
|
||||
{
|
||||
sw->setVisible(false);
|
||||
@ -691,70 +700,72 @@ void YACReaderOptionsDialog::restoreOptions(QSettings * settings)
|
||||
}
|
||||
|
||||
gl->performanceSlider->setValue(settings->value("performance").toInt());
|
||||
PictureFlow::FlowType flowType;
|
||||
FlowType flowType;
|
||||
switch(settings->value("flowType").toInt())
|
||||
{
|
||||
case 0:
|
||||
flowType = PictureFlow::CoverFlowLike;
|
||||
flowType = CoverFlowLike;
|
||||
break;
|
||||
case 1:
|
||||
flowType = PictureFlow::Strip;
|
||||
flowType = Strip;
|
||||
break;
|
||||
case 2:
|
||||
flowType = PictureFlow::StripOverlapped;
|
||||
flowType = StripOverlapped;
|
||||
break;
|
||||
case 3:
|
||||
flowType = PictureFlow::Modern;
|
||||
flowType = Modern;
|
||||
break;
|
||||
case 4:
|
||||
flowType = PictureFlow::Roulette;
|
||||
flowType = Roulette;
|
||||
break;
|
||||
case 5:
|
||||
flowType = PictureFlow::Custom;
|
||||
flowType = Custom;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
if(flowType == PictureFlow::Custom)
|
||||
if(flowType == Custom)
|
||||
{
|
||||
loadConfig();
|
||||
return;
|
||||
}
|
||||
|
||||
if(flowType == PictureFlow::CoverFlowLike)
|
||||
if(flowType == CoverFlowLike)
|
||||
{
|
||||
setClassicConfig();
|
||||
gl->radioClassic->setChecked(true);
|
||||
return;
|
||||
}
|
||||
|
||||
if(flowType == PictureFlow::Strip)
|
||||
if(flowType == Strip)
|
||||
{
|
||||
setStripeConfig();
|
||||
gl->radioStripe->setChecked(true);
|
||||
return;
|
||||
}
|
||||
|
||||
if(flowType == PictureFlow::StripOverlapped)
|
||||
if(flowType == StripOverlapped)
|
||||
{
|
||||
setOverlappedStripeConfig();
|
||||
gl->radioOver->setChecked(true);
|
||||
return;
|
||||
}
|
||||
|
||||
if(flowType == PictureFlow::Modern)
|
||||
if(flowType == Modern)
|
||||
{
|
||||
setModernConfig();
|
||||
gl->radionModern->setChecked(true);
|
||||
return;
|
||||
}
|
||||
|
||||
if(flowType == PictureFlow::Roulette)
|
||||
if(flowType == Roulette)
|
||||
{
|
||||
setRouletteConfig();
|
||||
gl->radioDown->setChecked(true);
|
||||
return;
|
||||
}
|
||||
|
||||
//END FLOW CONFIG
|
||||
}
|
||||
|
||||
void YACReaderOptionsDialog::loadConfig()
|
||||
@ -773,35 +784,35 @@ void YACReaderOptionsDialog::loadConfig()
|
||||
}
|
||||
void YACReaderOptionsDialog::setClassicConfig()
|
||||
{
|
||||
settings->setValue("flowType",PictureFlow::CoverFlowLike);
|
||||
settings->setValue("flowType",CoverFlowLike);
|
||||
|
||||
gl->setValues(presetYACReaderFlowClassicConfig);
|
||||
}
|
||||
|
||||
void YACReaderOptionsDialog::setStripeConfig()
|
||||
{
|
||||
settings->setValue("flowType",PictureFlow::Strip);
|
||||
settings->setValue("flowType",Strip);
|
||||
|
||||
gl->setValues(presetYACReaderFlowStripeConfig);
|
||||
}
|
||||
|
||||
void YACReaderOptionsDialog::setOverlappedStripeConfig()
|
||||
{
|
||||
settings->setValue("flowType",PictureFlow::StripOverlapped);
|
||||
settings->setValue("flowType",StripOverlapped);
|
||||
|
||||
gl->setValues(presetYACReaderFlowOverlappedStripeConfig);
|
||||
}
|
||||
|
||||
void YACReaderOptionsDialog::setModernConfig()
|
||||
{
|
||||
settings->setValue("flowType",PictureFlow::Modern);
|
||||
settings->setValue("flowType",Modern);
|
||||
|
||||
gl->setValues(defaultYACReaderFlowConfig);
|
||||
}
|
||||
|
||||
void YACReaderOptionsDialog::setRouletteConfig()
|
||||
{
|
||||
settings->setValue("flowType",PictureFlow::Roulette);
|
||||
settings->setValue("flowType",Roulette);
|
||||
|
||||
gl->setValues(pressetYACReaderFlowDownConfig);
|
||||
}
|
||||
|
@ -26,6 +26,8 @@
|
||||
#include <QSlider>
|
||||
#include <QRadioButton>
|
||||
|
||||
#include "yacreader_global.h"
|
||||
|
||||
#include "pictureflow.h"
|
||||
|
||||
#include "yacreader_flow_gl.h"
|
||||
@ -269,28 +271,28 @@ protected:
|
||||
public:
|
||||
YACReaderOptionsDialog(QWidget * parent);
|
||||
public slots:
|
||||
void restoreOptions(QSettings * settings);
|
||||
void saveOptions();
|
||||
virtual void restoreOptions(QSettings * settings);
|
||||
virtual void saveOptions();
|
||||
protected slots:
|
||||
void savePerformance(int value);
|
||||
void saveUseGL(int b);
|
||||
void saveXRotation(int value);
|
||||
void saveYPosition(int value);
|
||||
void saveCoverDistance(int value);
|
||||
void saveCentralDistance(int value);
|
||||
void saveZoomLevel(int value);
|
||||
void saveYCoverOffset(int value);
|
||||
void saveZCoverOffset(int value);
|
||||
void saveCoverRotation(int value);
|
||||
void saveFadeOutDist(int value);
|
||||
void saveLightStrength(int value);
|
||||
void saveMaxAngle(int value);
|
||||
void loadConfig();
|
||||
void setClassicConfig();
|
||||
void setStripeConfig();
|
||||
void setOverlappedStripeConfig();
|
||||
void setModernConfig();
|
||||
void setRouletteConfig();
|
||||
virtual void savePerformance(int value);
|
||||
virtual void saveUseGL(int b);
|
||||
virtual void saveXRotation(int value);
|
||||
virtual void saveYPosition(int value);
|
||||
virtual void saveCoverDistance(int value);
|
||||
virtual void saveCentralDistance(int value);
|
||||
virtual void saveZoomLevel(int value);
|
||||
virtual void saveYCoverOffset(int value);
|
||||
virtual void saveZCoverOffset(int value);
|
||||
virtual void saveCoverRotation(int value);
|
||||
virtual void saveFadeOutDist(int value);
|
||||
virtual void saveLightStrength(int value);
|
||||
virtual void saveMaxAngle(int value);
|
||||
virtual void loadConfig();
|
||||
virtual void setClassicConfig();
|
||||
virtual void setStripeConfig();
|
||||
virtual void setOverlappedStripeConfig();
|
||||
virtual void setModernConfig();
|
||||
virtual void setRouletteConfig();
|
||||
|
||||
signals:
|
||||
void optionsChanged();
|
||||
|
@ -28,6 +28,7 @@
|
||||
#define PICTUREFLOW_H
|
||||
|
||||
#include <qwidget.h>
|
||||
#include "yacreader_global.h" //FlowType
|
||||
|
||||
class PictureFlowPrivate;
|
||||
|
||||
@ -59,15 +60,7 @@ public:
|
||||
BlurredReflection
|
||||
};
|
||||
|
||||
enum FlowType
|
||||
{
|
||||
CoverFlowLike,
|
||||
Strip,
|
||||
StripOverlapped,
|
||||
Modern,
|
||||
Roulette,
|
||||
Custom
|
||||
};
|
||||
|
||||
|
||||
/*!
|
||||
Creates a new PictureFlow widget.
|
||||
|
@ -871,7 +871,7 @@ void YACReaderFlowGL::updateMarks()
|
||||
{
|
||||
//do nothing
|
||||
}
|
||||
/*void YACReaderFlowGL::setFlowType(PictureFlow::FlowType flowType)
|
||||
/*void YACReaderFlowGL::setFlowType(FlowType flowType)
|
||||
{
|
||||
//TODO esperar a que se reimplemente flowtype
|
||||
}*/
|
||||
|
@ -1,6 +1,6 @@
|
||||
//OpenGL Coverflow API by J.Roth
|
||||
|
||||
#pragma once
|
||||
#ifndef __YACREADER_FLOW_GL_H
|
||||
#define __YACREADER_FLOW_GL_H
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@ -380,4 +380,6 @@ private:
|
||||
//protected:
|
||||
// void run();
|
||||
//
|
||||
//};
|
||||
//};
|
||||
|
||||
#endif
|
@ -1,10 +1,10 @@
|
||||
|
||||
echo Setting up a Qt environment...
|
||||
|
||||
set QTDIR=D:\Desarrollo\Qt\4.8.0
|
||||
echo -- QTDIR set to D:\Desarrollo\Qt\4.8.0
|
||||
set PATH=D:\Desarrollo\Qt\4.8.0\bin;%PATH%
|
||||
echo -- Added D:\Desarrollo\Qt\4.8.0\bin to PATH
|
||||
set QTDIR=D:\Desarrollo\Qt\4.8.3
|
||||
echo -- QTDIR set to D:\Desarrollo\Qt\4.8.3
|
||||
set PATH=D:\Desarrollo\Qt\4.8.3\bin;%PATH%
|
||||
echo -- Added D:\Desarrollo\Qt\4.8.3\bin to PATH
|
||||
set QMAKESPEC=win32-msvc2010
|
||||
echo -- QMAKESPEC set to "win32-msvc2010"
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user