mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-10 00:04:48 -07:00
48 lines
1 KiB
C++
48 lines
1 KiB
C++
#ifndef TAB_SUPERVISOR_H
|
|
#define TAB_SUPERVISOR_H
|
|
|
|
#include <QTabWidget>
|
|
#include <QMap>
|
|
|
|
class QMenu;
|
|
class Client;
|
|
class Tab;
|
|
class TabServer;
|
|
class TabChatChannel;
|
|
class TabGame;
|
|
class TabDeckStorage;
|
|
class ChatEvent;
|
|
class GameEvent;
|
|
class Event_GameJoined;
|
|
|
|
class TabSupervisor : public QTabWidget {
|
|
Q_OBJECT
|
|
private:
|
|
QIcon *tabChangedIcon;
|
|
Client *client;
|
|
TabServer *tabServer;
|
|
TabDeckStorage *tabDeckStorage;
|
|
QMap<QString, TabChatChannel *> chatChannelTabs;
|
|
QMap<int, TabGame *> gameTabs;
|
|
void myAddTab(Tab *tab);
|
|
public:
|
|
TabSupervisor(QWidget *parent = 0);
|
|
~TabSupervisor();
|
|
void retranslateUi();
|
|
void start(Client *_client);
|
|
void stop();
|
|
signals:
|
|
void setMenu(QMenu *menu);
|
|
private slots:
|
|
void updateCurrent(int index);
|
|
void updatePingTime(int value, int max);
|
|
void gameJoined(Event_GameJoined *event);
|
|
void gameLeft(TabGame *tab);
|
|
void addChatChannelTab(const QString &channelName);
|
|
void chatChannelLeft(TabChatChannel *tab);
|
|
void tabUserEvent();
|
|
void processChatEvent(ChatEvent *event);
|
|
void processGameEvent(GameEvent *event);
|
|
};
|
|
|
|
#endif
|