Play-/Source/ui_qt/S3FileBrowser.h
2019-10-23 20:48:46 -04:00

45 lines
874 B
C++

#pragma once
#include <QDialog>
#include <QListWidgetItem>
#undef DELETE
#include "../s3stream/AmazonS3Client.h"
#include "filesystem_def.h"
#include "ContinuationChecker.h"
namespace Ui
{
class S3FileBrowser;
}
class S3FileBrowser : public QDialog
{
Q_OBJECT
public:
explicit S3FileBrowser(QWidget* parent = 0);
~S3FileBrowser();
static bool IsAvailable();
fs::path GetSelectedPath() const;
private slots:
void refreshButton_clicked();
void objectList_itemSelectionChanged();
void searchFilterEdit_textChanged(QString);
void updateFilter();
private:
void accept() Q_DECL_OVERRIDE;
void updateOkButtonState();
void launchUpdate();
Ui::S3FileBrowser* ui = nullptr;
CContinuationChecker* m_continuationChecker = nullptr;
QString m_lastUpdateBucketName;
QTimer* m_filterTimer = nullptr;
ListObjectsResult m_bucketItems;
fs::path m_selectedPath;
};