-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathdirectoryloader.h
54 lines (42 loc) · 969 Bytes
/
directoryloader.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#ifndef DIRECTORYLOADER_H
#define DIRECTORYLOADER_H
#include <QStringList>
#include <QDialog>
#include "imagefile.h"
class QDirIterator;
namespace Ui
{
class DirectoryLoader;
}
/*
* Directory loader with a spinning progress indicator. Calls accept()
* when some files has been found
*/
class DirectoryLoader : public QDialog
{
Q_OBJECT
public:
explicit DirectoryLoader(const QString &dirPath, QWidget *parent = 0);
~DirectoryLoader();
/*
* Found image files
*/
ImageFileList imageFiles() const;
protected:
virtual void keyPressEvent(QKeyEvent *e) override;
private slots:
void slotLoadNext();
private:
Ui::DirectoryLoader *ui;
enum class Step { Images, Plates } m_step;
QDirIterator *m_iterator;
ImageFileList m_imageFiles;
int m_heapPlates;
QStringList m_lostPlates;
};
inline
ImageFileList DirectoryLoader::imageFiles() const
{
return m_imageFiles;
}
#endif // DIRECTORYLOADER_H