File indexing completed on 2024-12-22 04:57:53
0001 /* 0002 SPDX-License-Identifier: BSD-2-Clause 0003 */ 0004 0005 #pragma once 0006 0007 #include <QNetworkReply> 0008 #include <QTimer> 0009 0010 /// A timer connected to a network reply. 0011 class O1TimedReply : public QTimer 0012 { 0013 Q_OBJECT 0014 0015 public: 0016 explicit O1TimedReply(QNetworkReply *parent, int pTimeout = 60 * 1000); 0017 0018 Q_SIGNALS: 0019 /// Emitted when we have timed out waiting for the network reply. 0020 void error(QNetworkReply::NetworkError); 0021 /// Emitted when the network reply has responded. 0022 void finished(); 0023 0024 private Q_SLOTS: 0025 void onFinished(); 0026 void onTimeout(); 0027 };