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

@ -15,32 +15,31 @@
class ImageLoader;
class ComicFlow : public YACReaderFlow
{
Q_OBJECT
Q_OBJECT
public:
ComicFlow(QWidget* parent = 0,FlowType flowType = CoverFlowLike);
virtual ~ComicFlow();
ComicFlow(QWidget *parent = 0, FlowType flowType = CoverFlowLike);
virtual ~ComicFlow();
void setImagePaths(const QStringList& paths);
//bool eventFilter(QObject *target, QEvent *event);
void keyPressEvent(QKeyEvent* event);
void removeSlide(int cover);
void setImagePaths(const QStringList &paths);
//bool eventFilter(QObject *target, QEvent *event);
void keyPressEvent(QKeyEvent *event);
void removeSlide(int cover);
void resortCovers(QList<int> newOrder);
private slots:
void preload();
void updateImageData();
void preload();
void updateImageData();
private:
//QString imagePath;
QStringList imageFiles;
QVector<bool> imagesLoaded;
QVector<bool> imagesSetted;
int numImagesLoaded;
QTimer* updateTimer;
ImageLoader* worker;
virtual void wheelEvent(QWheelEvent * event);
};
//QString imagePath;
QStringList imageFiles;
QVector<bool> imagesLoaded;
QVector<bool> imagesSetted;
int numImagesLoaded;
QTimer *updateTimer;
ImageLoader *worker;
virtual void wheelEvent(QWheelEvent *event);
};
//-----------------------------------------------------------------------------
// Source code of ImageLoader class was modified from http://code.google.com/p/photoflow/
@ -48,31 +47,30 @@ private:
class ImageLoader : public QThread
{
public:
ImageLoader();
~ImageLoader();
// returns FALSE if worker is still busy and can't take the task
bool busy() const;
void generate(int index, const QString& fileName, QSize size);
void reset(){idx = -1;};
int index() const { return idx; };
void lock();
void unlock();
QImage result();
ImageLoader();
~ImageLoader();
// returns FALSE if worker is still busy and can't take the task
bool busy() const;
void generate(int index, const QString &fileName, QSize size);
void reset() { idx = -1; };
int index() const { return idx; };
void lock();
void unlock();
QImage result();
protected:
void run();
void run();
private:
QMutex mutex;
QWaitCondition condition;
QMutex mutex;
QWaitCondition condition;
bool restart;
bool working;
int idx;
QString fileName;
QSize size;
QImage img;
bool restart;
bool working;
int idx;
QString fileName;
QSize size;
QImage img;
};
#endif