QTfrontend/netudpwidget.h
changeset 667 194dc62d1519
parent 665 5c7bfc8bac6a
child 668 0d7683a66d61
equal deleted inserted replaced
666:07fa9a74a074 667:194dc62d1519
     1 /*
     1 /*
     2  * Hedgewars, a worms-like game
     2  * Hedgewars, a worms-like game
     3  * Copyright (c) 2007 Igor Ulyanov <iulyanov@gmail.com>
     3  * Copyright (c) 2007 Igor Ulyanov <iulyanov@gmail.com>
       
     4  * Copyright (c) 2007 Andrey Korotaev <unC0Rr@gmail.com>
     4  *
     5  *
     5  * This program is free software; you can redistribute it and/or modify
     6  * 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  * it under the terms of the GNU General Public License as published by
     7  * the Free Software Foundation; version 2 of the License
     8  * the Free Software Foundation; version 2 of the License
     8  *
     9  *
    17  */
    18  */
    18 
    19 
    19 #ifndef _NET_UDPWIDGET_INCLUDED
    20 #ifndef _NET_UDPWIDGET_INCLUDED
    20 #define _NET_UDPWIDGET_INCLUDED
    21 #define _NET_UDPWIDGET_INCLUDED
    21 
    22 
    22 #include <QWidget>
    23 #include <QStringList>
    23 #include <QVBoxLayout>
    24 #include "netserverslist.h"
    24 
    25 
    25 #include "netserverslist.h"
       
    26 /*
       
    27 class QUdpSocket;
    26 class QUdpSocket;
    28 class QListWidget;
       
    29 
    27 
    30 class HWNetUdpWidget : public HWNetServersWidget
    28 class HWNetUdpModel : public HWNetServersModel
    31 {
    29 {
    32   Q_OBJECT
    30   Q_OBJECT
    33 
    31 
    34  public:
    32 public:
    35   HWNetUdpWidget(QWidget *parent = 0);
    33 	HWNetUdpModel(QObject *parent = 0);
    36 
    34 
    37  public slots:
    35 	QVariant data(const QModelIndex &index, int role) const;
    38   void updateList();
    36 	QVariant headerData(int section, Qt::Orientation orientation, int role) const;
       
    37 	int rowCount(const QModelIndex & parent) const;
       
    38 	int columnCount(const QModelIndex & parent) const;
    39 
    39 
    40  private slots:
    40 public slots:
    41   void onClientRead();
    41 	void updateList();
    42 
    42 
    43  private:
    43 private slots:
    44   QUdpSocket* pUdpSocket;
    44 	void onClientRead();
       
    45 
       
    46 private:
       
    47 	QUdpSocket* pUdpSocket;
       
    48 	QList<QStringList> games;
    45 };
    49 };
    46 */
    50 
    47 #endif // _NET_UDPWIDGET_INCLUDED
    51 #endif // _NET_UDPWIDGET_INCLUDED