Format code using clang-format

This commit is contained in:
Luis Ángel San Martín
2019-05-30 19:46:37 +02:00
parent e0eb94e3ae
commit e3ec56aa43
356 changed files with 19824 additions and 21874 deletions

View File

@ -19,7 +19,6 @@ class QWaitCondition;
class QEvent;
class QLabel;
class Comic;
class PageLoader;
class YACReaderFlow;
@ -28,44 +27,43 @@ class QKeyEvent;
class GoToFlow : public GoToFlowWidget
{
Q_OBJECT
Q_OBJECT
public:
GoToFlow(QWidget* parent = 0,FlowType flowType = CoverFlowLike);
~GoToFlow();
bool ready; //comic is ready for read.
GoToFlow(QWidget *parent = 0, FlowType flowType = CoverFlowLike);
~GoToFlow();
bool ready; //comic is ready for read.
private:
YACReaderFlow * flow;
void keyPressEvent(QKeyEvent* event);
//Comic * comic;
QSize imageSize;
YACReaderFlow *flow;
void keyPressEvent(QKeyEvent *event);
//Comic * comic;
QSize imageSize;
QVector<bool> imagesLoaded;
QVector<bool> imagesSetted;
int numImagesLoaded;
QVector<bool> imagesReady;
QVector<QByteArray> rawImages;
QTimer* updateTimer;
PageLoader* worker;
virtual void wheelEvent(QWheelEvent * event);
QMutex mutexGoToFlow;
QVector<bool> imagesLoaded;
QVector<bool> imagesSetted;
int numImagesLoaded;
QVector<bool> imagesReady;
QVector<QByteArray> rawImages;
QTimer *updateTimer;
PageLoader *worker;
virtual void wheelEvent(QWheelEvent *event);
QMutex mutexGoToFlow;
private slots:
void preload();
void updateImageData();
void resizeEvent(QResizeEvent *event);
public slots:
void centerSlide(int slide);
public slots:
void centerSlide(int slide);
void reset();
void setNumSlides(unsigned int slides);
void setImageReady(int index,const QByteArray & image);
void setImageReady(int index, const QByteArray &image);
void setFlowType(FlowType flowType);
void updateConfig(QSettings * settings);
void updateConfig(QSettings *settings);
void setFlowRightToLeft(bool b);
signals:
void goToPage(unsigned int page);
};
//-----------------------------------------------------------------------------
@ -74,27 +72,29 @@ signals:
class PageLoader : public QThread
{
public:
PageLoader(QMutex * m);
~PageLoader();
// returns FALSE if worker is still busy and can't take the task
bool busy() const;
void generate(int index, QSize size,const QByteArray & rImage);
void reset(){idx = -1;};
int index() const { return idx; }
QImage result() const { return img; }
PageLoader(QMutex *m);
~PageLoader();
// returns FALSE if worker is still busy and can't take the task
bool busy() const;
void generate(int index, QSize size, const QByteArray &rImage);
void reset() { idx = -1; };
int index() const { return idx; }
QImage result() const { return img; }
protected:
void run();
void run();
private:
QMutex * mutex;
QWaitCondition condition;
QMutex *mutex;
QWaitCondition condition;
bool restart;
bool working;
int idx;
bool restart;
bool working;
int idx;
QSize size;
QImage img;
QByteArray rawImage;
QSize size;
QImage img;
QByteArray rawImage;
};
#endif