From b2f473d927bdc42129f673a0ee2f5ab65bb57f2e Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Mon, 30 Jun 2014 07:19:22 -0700 Subject: User survey: actually collect and send the data to the backend This switches the QTextEdit fields to QPlainTextEdit (I don't see a reason why we should allow HTML here), no longer tries to have a default text but instead adds labels for the two fields, connects the UI so th data is collected and uses a bastardized WebServices subclass to send the data to our backend. Fixes #546 Signed-off-by: Dirk Hohndel --- qt-ui/subsurfacewebservices.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'qt-ui/subsurfacewebservices.h') diff --git a/qt-ui/subsurfacewebservices.h b/qt-ui/subsurfacewebservices.h index b54da67c7..9c13e21df 100644 --- a/qt-ui/subsurfacewebservices.h +++ b/qt-ui/subsurfacewebservices.h @@ -97,6 +97,13 @@ private: bool uploadMode; }; +class UserSurveyServices : public WebServices { + Q_OBJECT +public: + void sendSurvey(QString values); + explicit UserSurveyServices(QWidget *parent = 0, Qt::WindowFlags f = 0); +}; + #ifdef __cplusplus extern "C" { #endif -- cgit v1.2.3-70-g09d2 From e4a88db7dc197eee3a7f63ba1fc725c10a195073 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Mon, 30 Jun 2014 14:05:02 -0700 Subject: Fix Qt4 build Strangely no problems on Qt5 without those declarations. Signed-off-by: Dirk Hohndel --- qt-ui/subsurfacewebservices.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'qt-ui/subsurfacewebservices.h') diff --git a/qt-ui/subsurfacewebservices.h b/qt-ui/subsurfacewebservices.h index 9c13e21df..f2138ac6f 100644 --- a/qt-ui/subsurfacewebservices.h +++ b/qt-ui/subsurfacewebservices.h @@ -102,6 +102,13 @@ class UserSurveyServices : public WebServices { public: void sendSurvey(QString values); explicit UserSurveyServices(QWidget *parent = 0, Qt::WindowFlags f = 0); +private +slots: + // need to declare them as no ops or Qt4 is unhappy + virtual void startDownload() { } + virtual void startUpload() { } + virtual void buttonClicked(QAbstractButton *button) { } + }; #ifdef __cplusplus -- cgit v1.2.3-70-g09d2