QTfrontend/netwwwwidget.cpp
changeset 665 5c7bfc8bac6a
parent 664 f0af2401f981
child 668 0d7683a66d61
equal deleted inserted replaced
664:f0af2401f981 665:5c7bfc8bac6a
    15  * along with this program; if not, write to the Free Software
    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
    16  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
    17  */
    17  */
    18 
    18 
    19 #include <QHttp>
    19 #include <QHttp>
    20 #include <QListWidget>
       
    21 #include <QDebug>
       
    22 #include <QDomDocument>
    20 #include <QDomDocument>
    23 #include <QDomElement>
    21 #include <QDomElement>
    24 #include <QDomNode>
    22 #include <QDomNode>
    25 #include <QDomText>
    23 #include <QDomText>
       
    24 #include <QDebug>
    26 
    25 
    27 #include "netwwwwidget.h"
    26 #include "netwwwwidget.h"
    28 #include "hwconsts.h"
    27 #include "hwconsts.h"
    29 
    28 
    30 HWNetWwwWidget::HWNetWwwWidget(QWidget* parent) :
       
    31   HWNetServersWidget(parent)
       
    32 {
       
    33 	serversList->setModel(new HWNetWwwModel);
       
    34 }
       
    35 
    29 
    36 void HWNetWwwWidget::updateList()
    30 HWNetWwwModel::HWNetWwwModel(QObject *parent) : HWNetServersModel(parent)
    37 {
       
    38 	static_cast<HWNetWwwModel *>(serversList->model())->updateList();
       
    39 }
       
    40 
       
    41 
       
    42 HWNetWwwModel::HWNetWwwModel(QObject *parent) : QAbstractTableModel(parent)
       
    43 {
    31 {
    44 	http = new QHttp(this);
    32 	http = new QHttp(this);
    45 	http->setHost("www.hedgewars.org", 80);
    33 	http->setHost("www.hedgewars.org", 80);
    46 	connect(http, SIGNAL(requestFinished(int, bool)), this, SLOT(onClientRead(int, bool)));
    34 	connect(http, SIGNAL(requestFinished(int, bool)), this, SLOT(onClientRead(int, bool)));
    47 }
    35 }