annotate main/Surveyer.h @ 2596:04d381f0d89a tip

Default branch is now named default on git as well as hg, in case we ever want to switch to mirroring in the other direction
author Chris Cannam
date Thu, 27 Aug 2020 15:58:56 +0100
parents 62b1a3a242ee
children
rev   line source
Chris@662 1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
Chris@662 2
Chris@662 3 /*
Chris@662 4 Sonic Visualiser
Chris@662 5 An audio file viewer and annotation editor.
Chris@662 6 Centre for Digital Music, Queen Mary, University of London.
Chris@662 7
Chris@662 8 This program is free software; you can redistribute it and/or
Chris@662 9 modify it under the terms of the GNU General Public License as
Chris@662 10 published by the Free Software Foundation; either version 2 of the
Chris@662 11 License, or (at your option) any later version. See the file
Chris@662 12 COPYING included with this distribution for more information.
Chris@662 13 */
Chris@662 14
Chris@662 15 #ifndef _SURVEYER_H_
Chris@662 16 #define _SURVEYER_H_
Chris@662 17
Chris@662 18 #include <QStringList>
Chris@662 19 #include <QString>
Chris@662 20 #include <QObject>
Chris@662 21 #include <QNetworkReply>
Chris@662 22
Chris@662 23 class QNetworkAccessManager;
Chris@662 24
Chris@662 25 class Surveyer : public QObject
Chris@662 26 {
Chris@662 27 Q_OBJECT
Chris@662 28
Chris@662 29 public:
Chris@2535 30 struct Config {
Chris@2535 31 QString hostname;
Chris@2535 32 QString testPath;
Chris@2535 33 QString surveyPath;
Chris@2535 34 QString countdownKey;
Chris@2535 35 int countdownFrom;
Chris@2535 36 QString title;
Chris@2535 37 QString text;
Chris@2535 38 QString acceptLabel;
Chris@2535 39 QString rejectLabel;
Chris@2535 40 bool includeSystemInfo;
Chris@2535 41 };
Chris@2535 42
Chris@2535 43 Surveyer(Config config);
Chris@662 44 virtual ~Surveyer();
Chris@662 45
Chris@662 46 protected slots:
Chris@662 47 void finished();
Chris@662 48 void error(QNetworkReply::NetworkError);
Chris@662 49
Chris@662 50 private:
Chris@2535 51 Config m_config;
Chris@662 52 bool m_httpFailed;
Chris@662 53 QNetworkReply *m_reply;
Chris@662 54 QNetworkAccessManager *m_nm;
Chris@662 55 };
Chris@662 56
Chris@662 57 #endif
Chris@662 58