split imageselector
* image updating in seperate class ImageSwitcher * image selection in class ImageSelector
This commit is contained in:
26
src/imageswitcher.h
Normal file
26
src/imageswitcher.h
Normal file
@@ -0,0 +1,26 @@
|
||||
#ifndef IMAGESWITCHER_H
|
||||
#define IMAGESWITCHER_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QTimer>
|
||||
#include <iostream>
|
||||
|
||||
class MainWindow;
|
||||
class ImageSelector;
|
||||
class ImageSwitcher : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
ImageSwitcher(MainWindow& w, unsigned int timeout, const ImageSelector& selector);
|
||||
void start();
|
||||
|
||||
public slots:
|
||||
void updateImage();
|
||||
private:
|
||||
MainWindow& window;
|
||||
unsigned int timeout;
|
||||
const ImageSelector& selector;
|
||||
QTimer timer;
|
||||
};
|
||||
|
||||
#endif // IMAGESWITCHER_H
|
||||
Reference in New Issue
Block a user