split imageselector

* image updating in seperate class ImageSwitcher
 * image selection in class ImageSelector
This commit is contained in:
Manuel
2020-01-02 23:33:39 +01:00
parent eec0eb8998
commit bc9dd90acc
8 changed files with 94 additions and 34 deletions

View File

@@ -1,26 +1,20 @@
#ifndef IMAGESELECTOR_H
#define IMAGESELECTOR_H
#include <QObject>
#include <QTimer>
#include <iostream>
class MainWindow;
class ImageSelector : public QObject
{
Q_OBJECT
public:
ImageSelector(MainWindow& w, unsigned int timeout, std::string path, bool recursive);
void start();
#include <QStringList>
class MainWindow;
class ImageSelector
{
public:
ImageSelector(std::string path, bool recursive);
std::string getNextImage() const;
public slots:
void updateImage();
private:
QStringList listImagesRecursive();
MainWindow& window;
unsigned int timeout;
QStringList listImagesRecursive() const;
std::string path;
bool recursive;
QTimer timer;
};
#endif // IMAGESELECTOR_H