split switcher and traverser to prepare for shuffle mode

This commit is contained in:
Manuel
2020-02-13 21:52:17 +01:00
parent 0eb9596095
commit db09dc43f2
8 changed files with 189 additions and 77 deletions

View File

@@ -4,6 +4,7 @@
#include <QObject>
#include <QTimer>
#include <iostream>
#include <memory>
class MainWindow;
class ImageSelector;
@@ -11,7 +12,7 @@ class ImageSwitcher : public QObject
{
Q_OBJECT
public:
ImageSwitcher(MainWindow& w, unsigned int timeout, const ImageSelector& selector);
ImageSwitcher(MainWindow& w, unsigned int timeout, std::unique_ptr<ImageSelector>& selector);
void start();
public slots:
@@ -19,7 +20,7 @@ public slots:
private:
MainWindow& window;
unsigned int timeout;
const ImageSelector& selector;
std::unique_ptr<ImageSelector>& selector;
QTimer timer;
};