QTfrontend/ui/page/pagefeedback.h
changeset 8385 9e8924ff9813
parent 8328 03684c667664
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 PAGE_FEEDBACK_H
       
    20 #define PAGE_FEEDBACK_H
       
    21 
       
    22 #include "AbstractPage.h"
       
    23 
       
    24 class QNetworkReply;
       
    25 class QNetworkAccessManager;
       
    26 
       
    27 class PageFeedback : public AbstractPage
       
    28 {
       
    29         Q_OBJECT
       
    30 
       
    31     public:
       
    32         PageFeedback(QWidget * parent = 0);
       
    33         void EmbedSystemInfo();
       
    34         void LoadCaptchaImage();
       
    35 
       
    36         QPushButton * BtnSend;
       
    37         QPushButton * BtnViewInfo;
       
    38         QCheckBox * CheckSendSpecs;
       
    39         QLineEdit * summary;
       
    40         QTextBrowser * description;
       
    41         QLabel * info;
       
    42         QLabel * label_summary;
       
    43         QLabel * label_description;
       
    44         QLabel * label_captcha;
       
    45         QLabel * label_email;
       
    46         QLabel * label_captcha_input;
       
    47         QLineEdit * captcha_code;
       
    48         QLineEdit * email;
       
    49         int captchaID;
       
    50         QString specs;
       
    51         
       
    52     private slots:
       
    53     
       
    54         virtual void NetReply(QNetworkReply*);
       
    55         virtual void ShowSpecs();
       
    56 
       
    57     private:
       
    58         void GenerateSpecs();
       
    59         QLayout * bodyLayoutDefinition();
       
    60         QLayout * footerLayoutDefinition();
       
    61         QNetworkAccessManager * GetNetManager();
       
    62         void ShowErrorMessage(const QString & msg);
       
    63         void connectSignals();
       
    64 
       
    65         QNetworkAccessManager * netManager;
       
    66         QNetworkReply * captchaImageRequest;
       
    67         QNetworkReply * genCaptchaRequest;
       
    68 };
       
    69 
       
    70 #endif