From 992d4b4b8d3f3a630a2cf00d593ee4ce4dfa7ce8 Mon Sep 17 00:00:00 2001 From: Christoph Berg Date: Thu, 9 Jan 2025 22:12:06 +0100 Subject: New upstream version 2.7.0~rc8+repack --- SampleDownloader/Directory.hpp | 120 ++++++++++++++++++++--------------------- 1 file changed, 60 insertions(+), 60 deletions(-) (limited to 'SampleDownloader/Directory.hpp') diff --git a/SampleDownloader/Directory.hpp b/SampleDownloader/Directory.hpp index 82de4d21..1ffae0d8 100755 --- a/SampleDownloader/Directory.hpp +++ b/SampleDownloader/Directory.hpp @@ -1,60 +1,60 @@ -#ifndef SAMPLE_DOWNLOADER_DIRECTORY_HPP__ -#define SAMPLE_DOWNLOADER_DIRECTORY_HPP__ - -#include -#include -#include -#include -#include -#include -#include - -#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 +#include +#include +#include +#include +#include +#include + +#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 -- cgit v1.2.3