mirror of
https://github.com/iDescriptor/iDescriptor.git
synced 2026-06-22 03:45:51 +08:00
52 lines
1.2 KiB
C++
52 lines
1.2 KiB
C++
#ifndef PHOTOIMPORTDIALOG_H
|
|
#define PHOTOIMPORTDIALOG_H
|
|
|
|
#include <QDialog>
|
|
#include <QHBoxLayout>
|
|
#include <QLabel>
|
|
#include <QListWidget>
|
|
#include <QProgressBar>
|
|
#include <QPushButton>
|
|
#include <QStringList>
|
|
#include <QVBoxLayout>
|
|
|
|
class SimpleHttpServer;
|
|
|
|
class PhotoImportDialog : public QDialog
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit PhotoImportDialog(const QStringList &files, bool hasDirectories,
|
|
QWidget *parent = nullptr);
|
|
~PhotoImportDialog();
|
|
|
|
private slots:
|
|
void onConfirmImport();
|
|
void onServerStarted();
|
|
void onServerError(const QString &error);
|
|
void onDownloadProgress(const QString &fileName, int bytesDownloaded,
|
|
int totalBytes);
|
|
|
|
private:
|
|
QStringList selectedFiles;
|
|
bool containsDirectories;
|
|
|
|
QListWidget *fileList;
|
|
QLabel *warningLabel;
|
|
QLabel *qrCodeLabel;
|
|
QLabel *instructionLabel;
|
|
QPushButton *confirmButton;
|
|
QPushButton *cancelButton;
|
|
QProgressBar *progressBar;
|
|
QLabel *progressLabel;
|
|
|
|
SimpleHttpServer *httpServer;
|
|
|
|
void setupUI();
|
|
void generateQRCode(const QString &url);
|
|
QString getLocalIP() const;
|
|
};
|
|
|
|
#endif // PHOTOIMPORTDIALOG_H
|