1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-28 05:34:47 +01:00
GPXSee/src/filebrowser.h

40 lines
631 B
C
Raw Normal View History

2015-10-20 22:18:41 +02:00
#ifndef FILEBROWSER_H
#define FILEBROWSER_H
#include <QObject>
#include <QFileInfo>
#include <QStringList>
class QFileSystemWatcher;
class FileBrowser : public QObject
{
Q_OBJECT
public:
FileBrowser(QObject *parent = 0);
~FileBrowser();
void setFilter(const QStringList &filter);
void setCurrent(const QString &path);
QString next();
QString prev();
2015-12-18 22:21:11 +01:00
QString last();
QString first();
2016-03-19 17:24:53 +01:00
bool isLast() const;
bool isFirst() const;
2015-10-20 22:18:41 +02:00
private slots:
void reloadDirectory(const QString &path);
private:
QFileSystemWatcher *_watcher;
QStringList _filter;
QFileInfoList _files;
int _index;
};
#endif // FILEBROWSER_H