gl flow: clean up includes

This commit is contained in:
Felix Kauselmann 2019-05-05 11:17:45 +02:00
parent 7bd04ca7d5
commit d9d93c6481
2 changed files with 78 additions and 89 deletions

View File

@ -2,7 +2,6 @@
#include <QtGui> #include <QtGui>
#include <QtOpenGL> #include <QtOpenGL>
//#include <math.h>
#ifdef Q_OS_MAC #ifdef Q_OS_MAC
#include <OpenGL/glu.h> #include <OpenGL/glu.h>
@ -10,10 +9,8 @@
#include <GL/glu.h> #include <GL/glu.h>
#endif #endif
#include <QGLContext>
#include <QGLPixelBuffer>
#include <cmath> #include <cmath>
#include <iostream>
/*** Animation Settings ***/ /*** Animation Settings ***/
/*** Position Configuration ***/ /*** Position Configuration ***/
@ -24,15 +21,15 @@ struct Preset defaultYACReaderFlowConfig = {
0.08f, //Animation_step sets the speed of the animation 0.08f, //Animation_step sets the speed of the animation
1.5f, //Animation_speedup sets the acceleration of the animation 1.5f, //Animation_speedup sets the acceleration of the animation
0.1f, //Animation_step_max sets the maximum speed of the animation 0.1f, //Animation_step_max sets the maximum speed of the animation
3.f, //Animation_Fade_out_dis sets the distance of view 3.f, //Animation_Fade_out_dis sets the distance of view
1.5f, //pre_rotation sets the rotation increasion 1.5f, //pre_rotation sets the rotation increasion
3.f, //View_rotate_light_strenght sets the light strenght on rotation 3.f, //View_rotate_light_strenght sets the light strenght on rotation
0.01f, //View_rotate_add sets the speed of the rotation 0.01f, //View_rotate_add sets the speed of the rotation
0.02f, //View_rotate_sub sets the speed of reversing the rotation 0.02f, //View_rotate_sub sets the speed of reversing the rotation
20.f, //View_angle sets the maximum view angle 20.f, //View_angle sets the maximum view angle
0.f, //CF_X the X Position of the Coverflow 0.f, //CF_X the X Position of the Coverflow
0.f, //CF_Y the Y Position of the Coverflow 0.f, //CF_Y the Y Position of the Coverflow
-8.f, //CF_Z the Z Position of the Coverflow -8.f, //CF_Z the Z Position of the Coverflow
@ -43,7 +40,7 @@ struct Preset defaultYACReaderFlowConfig = {
-50.f, //Rotation sets the rotation of each cover -50.f, //Rotation sets the rotation of each cover
0.18f, //X_Distance sets the distance between the covers 0.18f, //X_Distance sets the distance between the covers
1.f, //Center_Distance sets the distance between the centered and the non centered covers 1.f, //Center_Distance sets the distance between the centered and the non centered covers
0.1f, //Z_Distance sets the pushback amount 0.1f, //Z_Distance sets the pushback amount
0.0f, //Y_Distance sets the elevation amount 0.0f, //Y_Distance sets the elevation amount
30.f //zoom level 30.f //zoom level
@ -54,15 +51,15 @@ struct Preset presetYACReaderFlowClassicConfig = {
0.08f, //Animation_step sets the speed of the animation 0.08f, //Animation_step sets the speed of the animation
1.5f, //Animation_speedup sets the acceleration of the animation 1.5f, //Animation_speedup sets the acceleration of the animation
0.1f, //Animation_step_max sets the maximum speed of the animation 0.1f, //Animation_step_max sets the maximum speed of the animation
2.f, //Animation_Fade_out_dis sets the distance of view 2.f, //Animation_Fade_out_dis sets the distance of view
1.5f, //pre_rotation sets the rotation increasion 1.5f, //pre_rotation sets the rotation increasion
3.f, //View_rotate_light_strenght sets the light strenght on rotation 3.f, //View_rotate_light_strenght sets the light strenght on rotation
0.08f, //View_rotate_add sets the speed of the rotation 0.08f, //View_rotate_add sets the speed of the rotation
0.08f, //View_rotate_sub sets the speed of reversing the rotation 0.08f, //View_rotate_sub sets the speed of reversing the rotation
30.f, //View_angle sets the maximum view angle 30.f, //View_angle sets the maximum view angle
0.f, //CF_X the X Position of the Coverflow 0.f, //CF_X the X Position of the Coverflow
-0.2f, //CF_Y the Y Position of the Coverflow -0.2f, //CF_Y the Y Position of the Coverflow
-7.f, //CF_Z the Z Position of the Coverflow -7.f, //CF_Z the Z Position of the Coverflow
@ -73,9 +70,9 @@ struct Preset presetYACReaderFlowClassicConfig = {
-40.f, //Rotation sets the rotation of each cover -40.f, //Rotation sets the rotation of each cover
0.18f, //X_Distance sets the distance between the covers 0.18f, //X_Distance sets the distance between the covers
1.f, //Center_Distance sets the distance between the centered and the non centered covers 1.f, //Center_Distance sets the distance between the centered and the non centered covers
0.1f, //Z_Distance sets the pushback amount 0.1f, //Z_Distance sets the pushback amount
0.0f, //Y_Distance sets the elevation amount 0.0f, //Y_Distance sets the elevation amount
22.f //zoom level 22.f //zoom level
}; };
@ -84,15 +81,15 @@ struct Preset presetYACReaderFlowStripeConfig = {
0.08f, //Animation_step sets the speed of the animation 0.08f, //Animation_step sets the speed of the animation
1.5f, //Animation_speedup sets the acceleration of the animation 1.5f, //Animation_speedup sets the acceleration of the animation
0.1f, //Animation_step_max sets the maximum speed of the animation 0.1f, //Animation_step_max sets the maximum speed of the animation
6.f, //Animation_Fade_out_dis sets the distance of view 6.f, //Animation_Fade_out_dis sets the distance of view
1.5f, //pre_rotation sets the rotation increasion 1.5f, //pre_rotation sets the rotation increasion
4.f, //View_rotate_light_strenght sets the light strenght on rotation 4.f, //View_rotate_light_strenght sets the light strenght on rotation
0.08f, //View_rotate_add sets the speed of the rotation 0.08f, //View_rotate_add sets the speed of the rotation
0.08f, //View_rotate_sub sets the speed of reversing the rotation 0.08f, //View_rotate_sub sets the speed of reversing the rotation
30.f, //View_angle sets the maximum view angle 30.f, //View_angle sets the maximum view angle
0.f, //CF_X the X Position of the Coverflow 0.f, //CF_X the X Position of the Coverflow
-0.2f, //CF_Y the Y Position of the Coverflow -0.2f, //CF_Y the Y Position of the Coverflow
-7.f, //CF_Z the Z Position of the Coverflow -7.f, //CF_Z the Z Position of the Coverflow
@ -103,7 +100,7 @@ struct Preset presetYACReaderFlowStripeConfig = {
0.f, //Rotation sets the rotation of each cover 0.f, //Rotation sets the rotation of each cover
1.1f, //X_Distance sets the distance between the covers 1.1f, //X_Distance sets the distance between the covers
0.2f, //Center_Distance sets the distance between the centered and the non centered covers 0.2f, //Center_Distance sets the distance between the centered and the non centered covers
0.01f, //Z_Distance sets the pushback amount 0.01f, //Z_Distance sets the pushback amount
0.0f, //Y_Distance sets the elevation amount 0.0f, //Y_Distance sets the elevation amount
22.f //zoom level 22.f //zoom level
@ -114,15 +111,15 @@ struct Preset presetYACReaderFlowOverlappedStripeConfig = {
0.08f, //Animation_step sets the speed of the animation 0.08f, //Animation_step sets the speed of the animation
1.5f, //Animation_speedup sets the acceleration of the animation 1.5f, //Animation_speedup sets the acceleration of the animation
0.1f, //Animation_step_max sets the maximum speed of the animation 0.1f, //Animation_step_max sets the maximum speed of the animation
2.f, //Animation_Fade_out_dis sets the distance of view 2.f, //Animation_Fade_out_dis sets the distance of view
1.5f, //pre_rotation sets the rotation increasion 1.5f, //pre_rotation sets the rotation increasion
3.f, //View_rotate_light_strenght sets the light strenght on rotation 3.f, //View_rotate_light_strenght sets the light strenght on rotation
0.08f, //View_rotate_add sets the speed of the rotation 0.08f, //View_rotate_add sets the speed of the rotation
0.08f, //View_rotate_sub sets the speed of reversing the rotation 0.08f, //View_rotate_sub sets the speed of reversing the rotation
30.f, //View_angle sets the maximum view angle 30.f, //View_angle sets the maximum view angle
0.f, //CF_X the X Position of the Coverflow 0.f, //CF_X the X Position of the Coverflow
-0.2f, //CF_Y the Y Position of the Coverflow -0.2f, //CF_Y the Y Position of the Coverflow
-7.f, //CF_Z the Z Position of the Coverflow -7.f, //CF_Z the Z Position of the Coverflow
@ -133,7 +130,7 @@ struct Preset presetYACReaderFlowOverlappedStripeConfig = {
0.f, //Rotation sets the rotation of each cover 0.f, //Rotation sets the rotation of each cover
0.18f, //X_Distance sets the distance between the covers 0.18f, //X_Distance sets the distance between the covers
1.f, //Center_Distance sets the distance between the centered and the non centered covers 1.f, //Center_Distance sets the distance between the centered and the non centered covers
0.1f, //Z_Distance sets the pushback amount 0.1f, //Z_Distance sets the pushback amount
0.0f, //Y_Distance sets the elevation amount 0.0f, //Y_Distance sets the elevation amount
22.f //zoom level 22.f //zoom level
@ -144,15 +141,15 @@ struct Preset pressetYACReaderFlowUpConfig = {
0.08f, //Animation_step sets the speed of the animation 0.08f, //Animation_step sets the speed of the animation
1.5f, //Animation_speedup sets the acceleration of the animation 1.5f, //Animation_speedup sets the acceleration of the animation
0.1f, //Animation_step_max sets the maximum speed of the animation 0.1f, //Animation_step_max sets the maximum speed of the animation
2.5f, //Animation_Fade_out_dis sets the distance of view 2.5f, //Animation_Fade_out_dis sets the distance of view
1.5f, //pre_rotation sets the rotation increasion 1.5f, //pre_rotation sets the rotation increasion
3.f, //View_rotate_light_strenght sets the light strenght on rotation 3.f, //View_rotate_light_strenght sets the light strenght on rotation
0.08f, //View_rotate_add sets the speed of the rotation 0.08f, //View_rotate_add sets the speed of the rotation
0.08f, //View_rotate_sub sets the speed of reversing the rotation 0.08f, //View_rotate_sub sets the speed of reversing the rotation
5.f, //View_angle sets the maximum view angle 5.f, //View_angle sets the maximum view angle
0.f, //CF_X the X Position of the Coverflow 0.f, //CF_X the X Position of the Coverflow
-0.2f, //CF_Y the Y Position of the Coverflow -0.2f, //CF_Y the Y Position of the Coverflow
-7.f, //CF_Z the Z Position of the Coverflow -7.f, //CF_Z the Z Position of the Coverflow
@ -163,7 +160,7 @@ struct Preset pressetYACReaderFlowUpConfig = {
-50.f, //Rotation sets the rotation of each cover -50.f, //Rotation sets the rotation of each cover
0.18f, //X_Distance sets the distance between the covers 0.18f, //X_Distance sets the distance between the covers
1.f, //Center_Distance sets the distance between the centered and the non centered covers 1.f, //Center_Distance sets the distance between the centered and the non centered covers
0.1f, //Z_Distance sets the pushback amount 0.1f, //Z_Distance sets the pushback amount
-0.1f, //Y_Distance sets the elevation amount -0.1f, //Y_Distance sets the elevation amount
22.f //zoom level 22.f //zoom level
@ -174,15 +171,15 @@ struct Preset pressetYACReaderFlowDownConfig = {
0.08f, //Animation_step sets the speed of the animation 0.08f, //Animation_step sets the speed of the animation
1.5f, //Animation_speedup sets the acceleration of the animation 1.5f, //Animation_speedup sets the acceleration of the animation
0.1f, //Animation_step_max sets the maximum speed of the animation 0.1f, //Animation_step_max sets the maximum speed of the animation
2.5f, //Animation_Fade_out_dis sets the distance of view 2.5f, //Animation_Fade_out_dis sets the distance of view
1.5f, //pre_rotation sets the rotation increasion 1.5f, //pre_rotation sets the rotation increasion
3.f, //View_rotate_light_strenght sets the light strenght on rotation 3.f, //View_rotate_light_strenght sets the light strenght on rotation
0.08f, //View_rotate_add sets the speed of the rotation 0.08f, //View_rotate_add sets the speed of the rotation
0.08f, //View_rotate_sub sets the speed of reversing the rotation 0.08f, //View_rotate_sub sets the speed of reversing the rotation
5.f, //View_angle sets the maximum view angle 5.f, //View_angle sets the maximum view angle
0.f, //CF_X the X Position of the Coverflow 0.f, //CF_X the X Position of the Coverflow
-0.2f, //CF_Y the Y Position of the Coverflow -0.2f, //CF_Y the Y Position of the Coverflow
-7.f, //CF_Z the Z Position of the Coverflow -7.f, //CF_Z the Z Position of the Coverflow
@ -193,7 +190,7 @@ struct Preset pressetYACReaderFlowDownConfig = {
-50.f, //Rotation sets the rotation of each cover -50.f, //Rotation sets the rotation of each cover
0.18f, //X_Distance sets the distance between the covers 0.18f, //X_Distance sets the distance between the covers
1.f, //Center_Distance sets the distance between the centered and the non centered covers 1.f, //Center_Distance sets the distance between the centered and the non centered covers
0.1f, //Z_Distance sets the pushback amount 0.1f, //Z_Distance sets the pushback amount
0.1f, //Y_Distance sets the elevation amount 0.1f, //Y_Distance sets the elevation amount
22.f //zoom level 22.f //zoom level
@ -253,7 +250,7 @@ void YACReaderFlowGL::timerEvent(QTimerEvent * event)
{ {
if(timerId == event->timerId()) if(timerId == event->timerId())
update(); update();
//if(!worker->isRunning()) //if(!worker->isRunning())
//worker->start(); //worker->start();
} }
@ -449,7 +446,7 @@ void YACReaderFlowGL::drawCover(const YACReader3DImage & image)
float w = image.width; float w = image.width;
float h = image.height; float h = image.height;
//fadeout //fadeout
float opacity = 1-1/(config.animationFadeOutDist+config.viewRotateLightStrenght*fabs(viewRotate))*fabs(0-image.current.x); float opacity = 1-1/(config.animationFadeOutDist+config.viewRotateLightStrenght*fabs(viewRotate))*fabs(0-image.current.x);
glLoadIdentity(); glLoadIdentity();
@ -527,7 +524,7 @@ void YACReaderFlowGL::drawCover(const YACReader3DImage & image)
glEnd(); glEnd();
glDisable(GL_TEXTURE_2D); glDisable(GL_TEXTURE_2D);
if(showMarks && loaded[image.index] && marks[image.index] != Unread) if(showMarks && loaded[image.index] && marks[image.index] != Unread)
{ {
glEnable(GL_TEXTURE_2D); glEnable(GL_TEXTURE_2D);
@ -561,7 +558,7 @@ void YACReaderFlowGL::drawCover(const YACReader3DImage & image)
glDisable(GL_TEXTURE_2D); glDisable(GL_TEXTURE_2D);
} }
glPopMatrix(); glPopMatrix();
} }
@ -618,7 +615,7 @@ void YACReaderFlowGL::showPrevious()
viewRotateActive = 1; viewRotateActive = 1;
} }
} }
void YACReaderFlowGL::showNext() void YACReaderFlowGL::showNext()
@ -708,7 +705,7 @@ void YACReaderFlowGL::insert(char *name, QOpenGLTexture * texture, float x, floa
startAnimationTimer(); startAnimationTimer();
Q_UNUSED(name) Q_UNUSED(name)
//set a new entry //set a new entry
if(item == -1){ if(item == -1){
images.push_back(YACReader3DImage()); images.push_back(YACReader3DImage());
@ -786,7 +783,7 @@ void YACReaderFlowGL::populate(int n)
float x = 1; float x = 1;
float y = 1 * (700.f/480.0f); float y = 1 * (700.f/480.0f);
int i; int i;
for(i = 0;i<n;i++){ for(i = 0;i<n;i++){
QString s = "cover"; QString s = "cover";
insert(s.toLocal8Bit().data(), defaultTexture, x, y); insert(s.toLocal8Bit().data(), defaultTexture, x, y);
@ -803,7 +800,7 @@ void YACReaderFlowGL::populate(int n)
loaded = QVector<bool>(n,false); loaded = QVector<bool>(n,false);
//marks = QVector<bool>(n,false); //marks = QVector<bool>(n,false);
//worker->start(); //worker->start();
} }
@ -824,7 +821,7 @@ void YACReaderFlowGL::reset()
numObjects = 0; numObjects = 0;
images.clear(); images.clear();
if(!hasBeenInitialized) if(!hasBeenInitialized)
lazyPopulateObjects = -1; lazyPopulateObjects = -1;
@ -899,7 +896,7 @@ void YACReaderFlowGL::setCenter_Distance(int distance)
config.centerDistance = distance/100.0; config.centerDistance = distance/100.0;
} }
//sets the pushback amount //sets the pushback amount
void YACReaderFlowGL::setZ_Distance(int distance) void YACReaderFlowGL::setZ_Distance(int distance)
{ {
startAnimationTimer(); startAnimationTimer();
@ -1240,7 +1237,7 @@ void YACReaderComicFlowGL::updateImageData()
} }
} }
// try to load only few images on the left and right side // try to load only few images on the left and right side
// i.e. all visible ones plus some extra // i.e. all visible ones plus some extra
int count=8; int count=8;
switch(performance) switch(performance)
@ -1265,7 +1262,7 @@ void YACReaderComicFlowGL::updateImageData()
{ {
indexes[j*2+1] = center+j+1; indexes[j*2+1] = center+j+1;
indexes[j*2+2] = center-j-1; indexes[j*2+2] = center-j-1;
} }
for(int c = 0; c < 2*count+1; c++) for(int c = 0; c < 2*count+1; c++)
{ {
int i = indexes[c]; int i = indexes[c];
@ -1396,7 +1393,7 @@ void YACReaderPageFlowGL::updateImageData()
} }
} }
// try to load only few images on the left and right side // try to load only few images on the left and right side
// i.e. all visible ones plus some extra // i.e. all visible ones plus some extra
int count=8; int count=8;
switch(performance) switch(performance)
@ -1421,17 +1418,17 @@ void YACReaderPageFlowGL::updateImageData()
{ {
indexes[j*2+1] = center+j+1; indexes[j*2+1] = center+j+1;
indexes[j*2+2] = center-j-1; indexes[j*2+2] = center-j-1;
} }
for(int c = 0; c < 2*count+1; c++) for(int c = 0; c < 2*count+1; c++)
{ {
int i = indexes[c]; int i = indexes[c];
if((i >= 0) && (i < numObjects)) if((i >= 0) && (i < numObjects))
if(rawImages.size()>0) if(rawImages.size()>0)
if(!loaded[i]&&imagesReady[i])//slide(i).isNull()) if(!loaded[i]&&imagesReady[i])//slide(i).isNull())
{ {
worker->generate(i, rawImages.at(i)); worker->generate(i, rawImages.at(i));
delete[] indexes; delete[] indexes;
return; return;
} }
@ -1481,7 +1478,7 @@ QImage ImageLoaderGL::loadImage(const QString& fileName)
return image; return image;
} }
ImageLoaderGL::ImageLoaderGL(YACReaderFlowGL * flow): ImageLoaderGL::ImageLoaderGL(YACReaderFlowGL * flow):
QThread(),flow(flow),restart(false), working(false), idx(-1) QThread(),flow(flow),restart(false), working(false), idx(-1)
{ {
@ -1498,7 +1495,7 @@ ImageLoaderGL::~ImageLoaderGL()
bool ImageLoaderGL::busy() const bool ImageLoaderGL::busy() const
{ {
return isRunning() ? working : false; return isRunning() ? working : false;
} }
void ImageLoaderGL::generate(int index, const QString& fileName) void ImageLoaderGL::generate(int index, const QString& fileName)
{ {
@ -1556,9 +1553,9 @@ void ImageLoaderGL::run()
} }
} }
QImage ImageLoaderGL::result() QImage ImageLoaderGL::result()
{ {
return img; return img;
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
@ -1591,7 +1588,7 @@ QImage ImageLoaderByteArrayGL::loadImage(const QByteArray& raw)
return image; return image;
} }
ImageLoaderByteArrayGL::ImageLoaderByteArrayGL(YACReaderFlowGL * flow): ImageLoaderByteArrayGL::ImageLoaderByteArrayGL(YACReaderFlowGL * flow):
QThread(),flow(flow),restart(false), working(false), idx(-1) QThread(),flow(flow),restart(false), working(false), idx(-1)
{ {
@ -1608,7 +1605,7 @@ ImageLoaderByteArrayGL::~ImageLoaderByteArrayGL()
bool ImageLoaderByteArrayGL::busy() const bool ImageLoaderByteArrayGL::busy() const
{ {
return isRunning() ? working : false; return isRunning() ? working : false;
} }
void ImageLoaderByteArrayGL::generate(int index, const QByteArray& raw) void ImageLoaderByteArrayGL::generate(int index, const QByteArray& raw)
{ {
@ -1656,7 +1653,7 @@ void ImageLoaderByteArrayGL::run()
} }
} }
QImage ImageLoaderByteArrayGL::result() QImage ImageLoaderByteArrayGL::result()
{ {
return img; return img;
} }

View File

@ -2,11 +2,6 @@
#ifndef __YACREADER_FLOW_GL_H #ifndef __YACREADER_FLOW_GL_H
#define __YACREADER_FLOW_GL_H #define __YACREADER_FLOW_GL_H
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <QOpenGLWidget> #include <QOpenGLWidget>
#include <QOpenGLFunctions> #include <QOpenGLFunctions>
#include <QOpenGLTexture> #include <QOpenGLTexture>
@ -16,8 +11,6 @@
#include "scroll_management.h" #include "scroll_management.h"
class ImageLoaderGL; class ImageLoaderGL;
class QGLContext;
class WidgetLoader;
class ImageLoaderByteArrayGL; class ImageLoaderByteArrayGL;
enum Performance enum Performance
@ -58,13 +51,13 @@ struct Preset{
float animationSpeedUp; float animationSpeedUp;
//sets the maximum speed of the animation //sets the maximum speed of the animation
float animationStepMax; float animationStepMax;
//sets the distance of view //sets the distance of view
float animationFadeOutDist; float animationFadeOutDist;
//sets the rotation increasion //sets the rotation increasion
float preRotation; float preRotation;
//sets the light strenght on rotation //sets the light strenght on rotation
float viewRotateLightStrenght; float viewRotateLightStrenght;
//sets the speed of the rotation //sets the speed of the rotation
float viewRotateAdd; float viewRotateAdd;
//sets the speed of reversing the rotation //sets the speed of reversing the rotation
float viewRotateSub; float viewRotateSub;
@ -72,17 +65,17 @@ struct Preset{
float viewAngle; float viewAngle;
/*** Position Configuration ***/ /*** Position Configuration ***/
//the X Position of the Coverflow //the X Position of the Coverflow
float cfX; float cfX;
//the Y Position of the Coverflow //the Y Position of the Coverflow
float cfY; float cfY;
//the Z Position of the Coverflow //the Z Position of the Coverflow
float cfZ; float cfZ;
//the X Rotation of the Coverflow //the X Rotation of the Coverflow
float cfRX; float cfRX;
//the Y Rotation of the Coverflow //the Y Rotation of the Coverflow
float cfRY; float cfRY;
//the Z Rotation of the Coverflow //the Z Rotation of the Coverflow
float cfRZ; float cfRZ;
//sets the rotation of each cover //sets the rotation of each cover
float rotation; float rotation;
@ -90,7 +83,7 @@ struct Preset{
float xDistance; float xDistance;
//sets the distance between the centered and the non centered covers //sets the distance between the centered and the non centered covers
float centerDistance; float centerDistance;
//sets the pushback amount //sets the pushback amount
float zDistance; float zDistance;
//sets the elevation amount //sets the elevation amount
float yDistance; float yDistance;
@ -123,9 +116,8 @@ protected:
void drawCover(const YACReader3DImage & image); void drawCover(const YACReader3DImage & image);
void udpatePerspective(int width, int height); void udpatePerspective(int width, int height);
int updateCount; int updateCount;
WidgetLoader * loader;
int fontSize; int fontSize;
QOpenGLTexture * defaultTexture; QOpenGLTexture * defaultTexture;
@ -152,10 +144,10 @@ protected:
/*** Animation Settings ***/ /*** Animation Settings ***/
Preset config; Preset config;
//sets/returns the curent selected cover //sets/returns the curent selected cover
int currentSelected; int currentSelected;
//defines the position of the centered cover //defines the position of the centered cover
YACReader3DVector centerPos; YACReader3DVector centerPos;
/*** Style ***/ /*** Style ***/
@ -174,11 +166,11 @@ protected:
static int updateInterval; static int updateInterval;
// sets flow direction right-to-left (manga mode) // sets flow direction right-to-left (manga mode)
bool flowRightToLeft; bool flowRightToLeft;
void startAnimationTimer(); void startAnimationTimer();
void stopAnimationTimer(); void stopAnimationTimer();
public: public:
@ -204,7 +196,7 @@ public:
void draw(); void draw();
//updates the coverflow //updates the coverflow
void updatePositions(); void updatePositions();
//inserts a new item to the coverflow //inserts a new item to the coverflow
//if item is set to a value > -1 it updates a already set value //if item is set to a value > -1 it updates a already set value
//otherwise a new entry is set //otherwise a new entry is set
void insert(char *name, QOpenGLTexture * texture, float x, float y, int item = -1); void insert(char *name, QOpenGLTexture * texture, float x, float y, int item = -1);
@ -221,9 +213,9 @@ public:
public slots: public slots:
void setCF_RX(int value); void setCF_RX(int value);
//the Y Rotation of the Coverflow //the Y Rotation of the Coverflow
void setCF_RY(int value); void setCF_RY(int value);
//the Z Rotation of the Coverflow //the Z Rotation of the Coverflow
void setCF_RZ(int value); void setCF_RZ(int value);
//perspective //perspective
@ -234,7 +226,7 @@ public:
void setX_Distance(int distance); void setX_Distance(int distance);
//sets the distance between the centered and the non centered covers //sets the distance between the centered and the non centered covers
void setCenter_Distance(int distance); void setCenter_Distance(int distance);
//sets the pushback amount //sets the pushback amount
void setZ_Distance(int distance); void setZ_Distance(int distance);
void setCF_Y(int value); void setCF_Y(int value);
@ -344,7 +336,7 @@ protected:
private: private:
QMutex mutex; QMutex mutex;
QWaitCondition condition; QWaitCondition condition;
bool restart; bool restart;
bool working; bool working;