summaryrefslogtreecommitdiff
path: root/SampleDownloader/Directory.hpp
diff options
context:
space:
mode:
authorChristoph Berg <myon@debian.org>2026-04-07 19:02:45 +0200
committerChristoph Berg <myon@debian.org>2026-04-07 19:02:45 +0200
commitf647d78463c1250ce9c99af664615fafccf5e959 (patch)
tree5b00428cef68aef1c9d407e2d4535687422419b6 /SampleDownloader/Directory.hpp
parent0a13f1fdb9928b6d012569dd65f7f6ef18fac2f8 (diff)
New upstream version 3.0.0upstream/3.0.0
Diffstat (limited to 'SampleDownloader/Directory.hpp')
-rw-r--r--[-rwxr-xr-x]SampleDownloader/Directory.hpp120
1 files changed, 60 insertions, 60 deletions
diff --git a/SampleDownloader/Directory.hpp b/SampleDownloader/Directory.hpp
index 82de4d21..1ffae0d8 100755..100644
--- a/SampleDownloader/Directory.hpp
+++ b/SampleDownloader/Directory.hpp
@@ -1,60 +1,60 @@
-#ifndef SAMPLE_DOWNLOADER_DIRECTORY_HPP__
-#define SAMPLE_DOWNLOADER_DIRECTORY_HPP__
-
-#include <QObject>
-#include <QString>
-#include <QTreeWidget>
-#include <QIcon>
-#include <QSize>
-#include <QDir>
-#include <QUrl>
-
-#include "DirectoryDelegate.hpp"
-#include "RemoteFile.hpp"
-
-class Configuration;
-class QNetworkAccessManager;
-class QTreeWidgetItem;
-class QNetworkReply;
-class QAuthenticator;
-class QJsonArray;
-
-class Directory final
- : public QTreeWidget
- , protected RemoteFile::ListenerInterface
-{
- Q_OBJECT
-
-public:
- explicit Directory (Configuration const * configuration
- , QNetworkAccessManager * network_manager
- , QWidget * parent = nullptr);
-
- QSize sizeHint () const override {return {400, 500};}
-
- bool url_root (QUrl);
- bool refresh (bool http_only);
- void abort ();
- void update (QTreeWidgetItem * item);
-
-protected:
- void error (QString const& title, QString const& message) override;
- bool redirect_request (QUrl const&) override {return true;} // allow
- void download_finished (bool success) override;
-
-private:
- Q_SLOT void authentication (QNetworkReply *, QAuthenticator *);
- void parse_entries (QJsonArray const& entries, QDir const& dir, QTreeWidgetItem * parent);
-
- Configuration const * configuration_;
- QNetworkAccessManager * network_manager_;
- bool http_only_;
- QDir root_dir_;
- QUrl url_root_;
- RemoteFile contents_;
- DirectoryDelegate item_delegate_;
- QIcon dir_icon_;
- QIcon file_icon_;
-};
-
-#endif
+#ifndef SAMPLE_DOWNLOADER_DIRECTORY_HPP__
+#define SAMPLE_DOWNLOADER_DIRECTORY_HPP__
+
+#include <QObject>
+#include <QString>
+#include <QTreeWidget>
+#include <QIcon>
+#include <QSize>
+#include <QDir>
+#include <QUrl>
+
+#include "DirectoryDelegate.hpp"
+#include "RemoteFile.hpp"
+
+class Configuration;
+class QNetworkAccessManager;
+class QTreeWidgetItem;
+class QNetworkReply;
+class QAuthenticator;
+class QJsonArray;
+
+class Directory final
+ : public QTreeWidget
+ , protected RemoteFile::ListenerInterface
+{
+ Q_OBJECT
+
+public:
+ explicit Directory (Configuration const * configuration
+ , QNetworkAccessManager * network_manager
+ , QWidget * parent = nullptr);
+
+ QSize sizeHint () const override {return {400, 500};}
+
+ bool url_root (QUrl);
+ bool refresh (bool http_only);
+ void abort ();
+ void update (QTreeWidgetItem * item);
+
+protected:
+ void error (QString const& title, QString const& message) override;
+ bool redirect_request (QUrl const&) override {return true;} // allow
+ void download_finished (bool success) override;
+
+private:
+ Q_SLOT void authentication (QNetworkReply *, QAuthenticator *);
+ void parse_entries (QJsonArray const& entries, QDir const& dir, QTreeWidgetItem * parent);
+
+ Configuration const * configuration_;
+ QNetworkAccessManager * network_manager_;
+ bool http_only_;
+ QDir root_dir_;
+ QUrl url_root_;
+ RemoteFile contents_;
+ DirectoryDelegate item_delegate_;
+ QIcon dir_icon_;
+ QIcon file_icon_;
+};
+
+#endif