File indexing completed on 2025-01-19 03:55:39
0001 #ifndef O1TIMEDREPLY_H 0002 #define O1TIMEDREPLY_H 0003 0004 #include <QNetworkReply> 0005 #include <QTimer> 0006 0007 #include "o0export.h" 0008 0009 /// A timer connected to a network reply. 0010 class O0_EXPORT O1TimedReply: public QTimer { 0011 Q_OBJECT 0012 0013 public: 0014 explicit O1TimedReply(QNetworkReply *parent, int pTimeout=60*1000); 0015 0016 Q_SIGNALS: 0017 /// Emitted when we have timed out waiting for the network reply. 0018 void error(QNetworkReply::NetworkError); 0019 /// Emitted when the network reply has responded. 0020 void finished(); 0021 0022 private Q_SLOTS: 0023 void onFinished(); 0024 void onTimeout(); 0025 }; 0026 0027 #endif