mirror of
https://github.com/YACReader/yacreader
synced 2025-06-03 09:08:20 -04:00
solucionados algunos problemas en la integraci?n de yacreader_flow_gl (comicFlow)
This commit is contained in:
parent
4e43e66df3
commit
98e5fc648c
@ -52,6 +52,7 @@ void LibraryWindow::doLayout()
|
||||
//TODO: flowType is a global variable
|
||||
//CONFIG COMIC_FLOW--------------------------------------------------------
|
||||
comicFlow = new ComicFlowWidgetGL(0);
|
||||
comicFlow->setFlowType(flowType);
|
||||
comicFlow->setFocusPolicy(Qt::StrongFocus);
|
||||
comicFlow->setShowMarks(true);
|
||||
QMatrix m;
|
||||
|
@ -200,7 +200,14 @@ void ComicFlowWidgetGL::updateMarks()
|
||||
}
|
||||
void ComicFlowWidgetGL::setFlowType(PictureFlow::FlowType flowType)
|
||||
{
|
||||
flow->setFlowType(flowType);
|
||||
if(flowType == PictureFlow::CoverFlowLike)
|
||||
flow->setPreset(presetYACReaderFlowClassicConfig);
|
||||
else if(flowType == PictureFlow::Strip)
|
||||
flow->setPreset(presetYACReaderFlowStripeConfig);
|
||||
else if(flowType == PictureFlow::StripOverlapped)
|
||||
flow->setPreset(presetYACReaderFlowOverlappedStripeConfig);
|
||||
else
|
||||
flow->setPreset(defaultYACReaderFlowConfig);
|
||||
}
|
||||
void ComicFlowWidgetGL::render()
|
||||
{
|
||||
|
@ -437,7 +437,7 @@ void YACReaderFlowGL::drawCover(CFImage *CF)
|
||||
glEnd();
|
||||
glDisable(GL_TEXTURE_2D);
|
||||
|
||||
if(loaded[CF->index] && marks[CF->index])
|
||||
if(showMarks && loaded[CF->index] && marks[CF->index])
|
||||
{
|
||||
glEnable(GL_TEXTURE_2D);
|
||||
glBindTexture(GL_TEXTURE_2D, markTexture);
|
||||
@ -898,10 +898,10 @@ void YACReaderFlowGL::updateMarks()
|
||||
{
|
||||
//do nothing
|
||||
}
|
||||
void YACReaderFlowGL::setFlowType(PictureFlow::FlowType flowType)
|
||||
/*void YACReaderFlowGL::setFlowType(PictureFlow::FlowType flowType)
|
||||
{
|
||||
//TODO esperar a que se reimplemente flowtype
|
||||
}
|
||||
}*/
|
||||
void YACReaderFlowGL::render()
|
||||
{
|
||||
//do nothing
|
||||
@ -965,7 +965,7 @@ void YACReaderFlowGL::mousePressEvent(QMouseEvent *event)
|
||||
|
||||
gluUnProject( winX, winY, winZ, modelview, projection, viewport, &posX, &posY, &posZ);
|
||||
|
||||
if(posX >= 0)
|
||||
if(posX >= 0.5)
|
||||
{
|
||||
//int index = currentSelected+1;
|
||||
//while((cfImages[index].current.x-cfImages[index].width/(2.0*config.rotation)) < posX)
|
||||
@ -973,7 +973,7 @@ void YACReaderFlowGL::mousePressEvent(QMouseEvent *event)
|
||||
//setCurrentIndex(index-1);
|
||||
showNext();
|
||||
}
|
||||
else
|
||||
else if(posX <=-0.5)
|
||||
showPrevious();
|
||||
} else if(event->button() == Qt::RightButton)
|
||||
{
|
||||
|
@ -228,7 +228,7 @@ public:
|
||||
void showSlide(int index);
|
||||
int centerIndex();
|
||||
void updateMarks();
|
||||
void setFlowType(PictureFlow::FlowType flowType);
|
||||
//void setFlowType(PictureFlow::FlowType flowType);
|
||||
void render();
|
||||
|
||||
//void paintEvent(QPaintEvent *event);
|
||||
|
Loading…
x
Reference in New Issue
Block a user