QTfrontend/pageroomslist.h
author koda
Mon, 09 May 2011 16:56:29 +0200
changeset 5204 e1a5f4d5d86a
child 5205 78138ae93820
permissions -rw-r--r--
split pages.h into several header files


#ifndef PAGE_ROOMLIST_H
#define PAGE_ROOMLIST_H

#include "pages.h"

class HWChatWidget;

class PageRoomsList : public AbstractPage
{
    Q_OBJECT

public:
    PageRoomsList(QWidget* parent, QSettings * config, SDLInteraction * sdli);

    QLineEdit * roomName;
    QLineEdit * searchText;
    QTableWidget * roomsList;
    QPushButton * BtnBack;
    QPushButton * BtnCreate;
    QPushButton * BtnJoin;
    QPushButton * BtnRefresh;
    QPushButton * BtnAdmin;
    QPushButton * BtnClear;
    QComboBox * CBState;
    QComboBox * CBRules;
    QComboBox * CBWeapons;
    HWChatWidget * chatWidget;

private:
    bool gameInLobby;
    QString gameInLobbyName;
    QStringList listFromServer;
    AmmoSchemeModel * ammoSchemeModel;

public slots:
    void setRoomsList(const QStringList & list);
    void setAdmin(bool);

private slots:
    void onCreateClick();
    void onJoinClick();
    void onRefreshClick();
    void onClearClick();
    void onJoinConfirmation(const QString &);

signals:
    void askForCreateRoom(const QString &);
    void askForJoinRoom(const QString &);
    void askForRoomList();
    void askJoinConfirmation(const QString &);
};

#endif