Surveyer.h
Go to the documentation of this file.
1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
2 
3 /*
4  Sonic Visualiser
5  An audio file viewer and annotation editor.
6  Centre for Digital Music, Queen Mary, University of London.
7 
8  This program is free software; you can redistribute it and/or
9  modify it under the terms of the GNU General Public License as
10  published by the Free Software Foundation; either version 2 of the
11  License, or (at your option) any later version. See the file
12  COPYING included with this distribution for more information.
13 */
14 
15 #ifndef _SURVEYER_H_
16 #define _SURVEYER_H_
17 
18 #include <QStringList>
19 #include <QString>
20 #include <QObject>
21 #include <QNetworkReply>
22 
23 class QNetworkAccessManager;
24 
25 class Surveyer : public QObject
26 {
27  Q_OBJECT
28 
29 public:
30  struct Config {
31  QString hostname;
32  QString testPath;
33  QString surveyPath;
34  QString countdownKey;
36  QString title;
37  QString text;
38  QString acceptLabel;
39  QString rejectLabel;
41  };
42 
43  Surveyer(Config config);
44  virtual ~Surveyer();
45 
46 protected slots:
47  void finished();
48  void error(QNetworkReply::NetworkError);
49 
50 private:
53  QNetworkReply *m_reply;
54  QNetworkAccessManager *m_nm;
55 };
56 
57 #endif
58 
QString rejectLabel
Definition: Surveyer.h:39
bool m_httpFailed
Definition: Surveyer.h:52
QString acceptLabel
Definition: Surveyer.h:38
void finished()
Definition: Surveyer.cpp:85
void error(QNetworkReply::NetworkError)
Definition: Surveyer.cpp:78
QString countdownKey
Definition: Surveyer.h:34
QNetworkReply * m_reply
Definition: Surveyer.h:53
Surveyer(Config config)
Definition: Surveyer.cpp:32
bool includeSystemInfo
Definition: Surveyer.h:40
QNetworkAccessManager * m_nm
Definition: Surveyer.h:54
Config m_config
Definition: Surveyer.h:51
QString title
Definition: Surveyer.h:36
QString text
Definition: Surveyer.h:37
virtual ~Surveyer()
Definition: Surveyer.cpp:68
QString testPath
Definition: Surveyer.h:32
QString hostname
Definition: Surveyer.h:31
QString surveyPath
Definition: Surveyer.h:33