QTfrontend/ui/widget/feedbackdialog.h
changeset 8385 9e8924ff9813
child 9080 9b42757d7e71
equal deleted inserted replaced
8384:a6e7a95f3b2e 8385:9e8924ff9813
       
     1 /*
       
     2  * Hedgewars, a free turn based strategy game
       
     3  * Copyright (c) 2004-2012 Andrey Korotaev <unC0Rr@gmail.com>
       
     4  *
       
     5  * This program is free software; you can redistribute it and/or modify
       
     6  * it under the terms of the GNU General Public License as published by
       
     7  * the Free Software Foundation; version 2 of the License
       
     8  *
       
     9  * This program is distributed in the hope that it will be useful,
       
    10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
       
    11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
       
    12  * GNU General Public License for more details.
       
    13  *
       
    14  * You should have received a copy of the GNU General Public License
       
    15  * along with this program; if not, write to the Free Software
       
    16  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
       
    17  */
       
    18 
       
    19 #ifndef FEEDBACKDIALOG_H
       
    20 #define FEEDBACKDIALOG_H
       
    21 
       
    22 #include <QDialog>
       
    23 
       
    24 class QNetworkReply;
       
    25 class QNetworkAccessManager;
       
    26 class QCheckBox;
       
    27 class QLineEdit;
       
    28 class QTextBrowser;
       
    29 class QLabel;
       
    30 
       
    31 class FeedbackDialog : public QDialog
       
    32 {
       
    33         Q_OBJECT
       
    34 
       
    35     public:
       
    36         FeedbackDialog(QWidget * parent = 0);
       
    37         void EmbedSystemInfo();
       
    38         void LoadCaptchaImage();
       
    39 
       
    40         QPushButton * BtnSend;
       
    41         QPushButton * BtnViewInfo;
       
    42         QCheckBox * CheckSendSpecs;
       
    43         QLineEdit * summary;
       
    44         QTextBrowser * description;
       
    45         QLabel * info;
       
    46         QLabel * label_summary;
       
    47         QLabel * label_description;
       
    48         QLabel * label_captcha;
       
    49         QLabel * label_email;
       
    50         QLabel * label_captcha_input;
       
    51         QLineEdit * captcha_code;
       
    52         QLineEdit * email;
       
    53         int captchaID;
       
    54         QString specs;
       
    55 
       
    56     private:
       
    57         void GenerateSpecs();
       
    58         QLayout * bodyLayoutDefinition();
       
    59         QLayout * footerLayoutDefinition();
       
    60         QNetworkAccessManager * GetNetManager();
       
    61         void ShowErrorMessage(const QString & msg);
       
    62 
       
    63         QNetworkAccessManager * netManager;
       
    64         QNetworkReply * captchaImageRequest;
       
    65         QNetworkReply * genCaptchaRequest;
       
    66         QNetworkAccessManager * nam;
       
    67 
       
    68     private slots:
       
    69         virtual void NetReply(QNetworkReply*);
       
    70         virtual void ShowSpecs();
       
    71         void SendFeedback();
       
    72         void finishedSlot(QNetworkReply* reply);
       
    73 };
       
    74 
       
    75 #endif // FEEDBACKDIALOG_H