Commit 26a77d9e authored by Max-Wilhelm Bruker's avatar Max-Wilhelm Bruker
Browse files

new zone view code

parent ad3f4ba9
...@@ -12,7 +12,8 @@ enum CardItemType { ...@@ -12,7 +12,8 @@ enum CardItemType {
typeCard = QGraphicsItem::UserType + 1, typeCard = QGraphicsItem::UserType + 1,
typeCardDrag = QGraphicsItem::UserType + 2, typeCardDrag = QGraphicsItem::UserType + 2,
typeZone = QGraphicsItem::UserType + 3, typeZone = QGraphicsItem::UserType + 3,
typeOther = QGraphicsItem::UserType + 4 typeZoneView = QGraphicsItem::UserType + 4,
typeOther = QGraphicsItem::UserType + 5
}; };
class AbstractCardItem : public QObject, public AbstractGraphicsItem { class AbstractCardItem : public QObject, public AbstractGraphicsItem {
......
#include "carddragitem.h" #include "carddragitem.h"
#include "cardzone.h" #include "cardzone.h"
#include "tablezone.h" #include "tablezone.h"
#include "zoneviewzone.h"
#include <QGraphicsScene> #include <QGraphicsScene>
#include <QGraphicsSceneMouseEvent> #include <QGraphicsSceneMouseEvent>
#include <QCursor> #include <QCursor>
#include <QDebug>
CardDragItem::CardDragItem(AbstractCardItem *_item, int _id, const QPointF &_hotSpot, bool _faceDown, AbstractCardDragItem *parentDrag) CardDragItem::CardDragItem(AbstractCardItem *_item, int _id, const QPointF &_hotSpot, bool _faceDown, AbstractCardDragItem *parentDrag)
: AbstractCardDragItem(_item, _hotSpot, parentDrag), id(_id), faceDown(_faceDown), currentZone(0) : AbstractCardDragItem(_item, _hotSpot, parentDrag), id(_id), faceDown(_faceDown), currentZone(0)
...@@ -14,10 +16,17 @@ void CardDragItem::updatePosition(const QPointF &cursorScenePos) ...@@ -14,10 +16,17 @@ void CardDragItem::updatePosition(const QPointF &cursorScenePos)
{ {
QList<QGraphicsItem *> colliding = scene()->items(cursorScenePos); QList<QGraphicsItem *> colliding = scene()->items(cursorScenePos);
CardZone *cardZone = 0;
ZoneViewZone *zoneViewZone = 0;
for (int i = colliding.size() - 1; i >= 0; i--) {
if (!zoneViewZone) zoneViewZone = qgraphicsitem_cast<ZoneViewZone *>(colliding.at(i));
if (!cardZone) cardZone = qgraphicsitem_cast<CardZone *>(colliding.at(i));
}
CardZone *cursorZone = 0; CardZone *cursorZone = 0;
for (int i = colliding.size() - 1; i >= 0; i--) if (zoneViewZone)
if ((cursorZone = qgraphicsitem_cast<CardZone *>(colliding.at(i)))) cursorZone = zoneViewZone;
break; else if (cardZone)
cursorZone = cardZone;
if (!cursorZone) if (!cursorZone)
return; return;
currentZone = cursorZone; currentZone = cursorZone;
......
#include "cardlist.h" #include "cardlist.h"
#include "carditem.h" #include "carditem.h"
#include "carddatabase.h"
CardList::CardList(bool _contentsKnown) CardList::CardList(bool _contentsKnown)
: QList<CardItem *>(), contentsKnown(_contentsKnown) : QList<CardItem *>(), contentsKnown(_contentsKnown)
...@@ -32,15 +33,27 @@ CardItem *CardList::findCard(const int id, const bool remove, int *position) ...@@ -32,15 +33,27 @@ CardItem *CardList::findCard(const int id, const bool remove, int *position)
} }
class CardList::compareFunctor { class CardList::compareFunctor {
private:
int flags;
public: public:
compareFunctor(int _flags) : flags(_flags)
{
}
inline bool operator()(CardItem *a, CardItem *b) const inline bool operator()(CardItem *a, CardItem *b) const
{ {
if (flags & SortByType) {
QString t1 = a->getInfo()->getMainCardType();
QString t2 = b->getInfo()->getMainCardType();
if ((t1 == t2) && (flags & SortByName))
return a->getName() < b->getName();
return t1 < t2;
} else
return a->getName() < b->getName(); return a->getName() < b->getName();
} }
}; };
void CardList::sort() void CardList::sort(int flags)
{ {
compareFunctor cf; compareFunctor cf(flags);
qSort(begin(), end(), cf); qSort(begin(), end(), cf);
} }
...@@ -11,10 +11,11 @@ private: ...@@ -11,10 +11,11 @@ private:
protected: protected:
bool contentsKnown; bool contentsKnown;
public: public:
enum SortFlags { SortByName = 1, SortByType = 2 };
CardList(bool _contentsKnown); CardList(bool _contentsKnown);
CardItem *findCard(const int id, const bool remove, int *position = NULL); CardItem *findCard(const int id, const bool remove, int *position = NULL);
bool getContentsKnown() const { return contentsKnown; } bool getContentsKnown() const { return contentsKnown; }
void sort(); void sort(int flags = SortByName);
}; };
#endif #endif
...@@ -167,9 +167,6 @@ void GeneralSettingsPage::retranslateUi() ...@@ -167,9 +167,6 @@ void GeneralSettingsPage::retranslateUi()
AppearanceSettingsPage::AppearanceSettingsPage() AppearanceSettingsPage::AppearanceSettingsPage()
{ {
zoneBgGroupBox = new QGroupBox;
QSettings settings;
handBgLabel = new QLabel; handBgLabel = new QLabel;
handBgEdit = new QLineEdit(settingsCache->getHandBgPath()); handBgEdit = new QLineEdit(settingsCache->getHandBgPath());
handBgEdit->setReadOnly(true); handBgEdit->setReadOnly(true);
...@@ -199,9 +196,9 @@ AppearanceSettingsPage::AppearanceSettingsPage() ...@@ -199,9 +196,9 @@ AppearanceSettingsPage::AppearanceSettingsPage()
zoneBgGrid->addWidget(playerAreaBgEdit, 2, 1); zoneBgGrid->addWidget(playerAreaBgEdit, 2, 1);
zoneBgGrid->addWidget(playerAreaBgButton, 2, 2); zoneBgGrid->addWidget(playerAreaBgButton, 2, 2);
zoneBgGroupBox = new QGroupBox;
zoneBgGroupBox->setLayout(zoneBgGrid); zoneBgGroupBox->setLayout(zoneBgGrid);
tableGroupBox = new QGroupBox;
economicGridCheckBox = new QCheckBox; economicGridCheckBox = new QCheckBox;
economicGridCheckBox->setChecked(settingsCache->getEconomicGrid()); economicGridCheckBox->setChecked(settingsCache->getEconomicGrid());
connect(economicGridCheckBox, SIGNAL(stateChanged(int)), settingsCache, SLOT(setEconomicGrid(int))); connect(economicGridCheckBox, SIGNAL(stateChanged(int)), settingsCache, SLOT(setEconomicGrid(int)));
...@@ -209,20 +206,21 @@ AppearanceSettingsPage::AppearanceSettingsPage() ...@@ -209,20 +206,21 @@ AppearanceSettingsPage::AppearanceSettingsPage()
QGridLayout *tableGrid = new QGridLayout; QGridLayout *tableGrid = new QGridLayout;
tableGrid->addWidget(economicGridCheckBox, 0, 0, 1, 2); tableGrid->addWidget(economicGridCheckBox, 0, 0, 1, 2);
tableGroupBox = new QGroupBox;
tableGroupBox->setLayout(tableGrid); tableGroupBox->setLayout(tableGrid);
zoneViewGroupBox = new QGroupBox; zoneViewSortByNameCheckBox = new QCheckBox;
settings.beginGroup("zoneview"); zoneViewSortByNameCheckBox->setChecked(settingsCache->getZoneViewSortByName());
connect(zoneViewSortByNameCheckBox, SIGNAL(stateChanged(int)), settingsCache, SLOT(setZoneViewSortByName(int)));
zoneViewSortingCheckBox = new QCheckBox; zoneViewSortByTypeCheckBox = new QCheckBox;
zoneViewSortingCheckBox->setChecked(settings.value("sorting").toInt()); zoneViewSortByTypeCheckBox->setChecked(settingsCache->getZoneViewSortByType());
connect(zoneViewSortingCheckBox, SIGNAL(stateChanged(int)), this, SLOT(zoneViewSortingCheckBoxChanged(int))); connect(zoneViewSortByTypeCheckBox, SIGNAL(stateChanged(int)), settingsCache, SLOT(setZoneViewSortByType(int)));
settings.endGroup();
QGridLayout *zoneViewGrid = new QGridLayout; QGridLayout *zoneViewGrid = new QGridLayout;
zoneViewGrid->addWidget(zoneViewSortingCheckBox, 0, 0, 1, 2); zoneViewGrid->addWidget(zoneViewSortByNameCheckBox, 0, 0, 1, 2);
zoneViewGrid->addWidget(zoneViewSortByTypeCheckBox, 1, 0, 1, 2);
zoneViewGroupBox = new QGroupBox;
zoneViewGroupBox->setLayout(zoneViewGrid); zoneViewGroupBox->setLayout(zoneViewGrid);
QVBoxLayout *mainLayout = new QVBoxLayout; QVBoxLayout *mainLayout = new QVBoxLayout;
...@@ -245,7 +243,8 @@ void AppearanceSettingsPage::retranslateUi() ...@@ -245,7 +243,8 @@ void AppearanceSettingsPage::retranslateUi()
economicGridCheckBox->setText(tr("Economic layout")); economicGridCheckBox->setText(tr("Economic layout"));
zoneViewGroupBox->setTitle(tr("Zone view layout")); zoneViewGroupBox->setTitle(tr("Zone view layout"));
zoneViewSortingCheckBox->setText(tr("Sort alphabetically by default")); zoneViewSortByNameCheckBox->setText(tr("Sort by name"));
zoneViewSortByTypeCheckBox->setText(tr("Sort by type"));
} }
void AppearanceSettingsPage::handBgButtonClicked() void AppearanceSettingsPage::handBgButtonClicked()
...@@ -278,15 +277,6 @@ void AppearanceSettingsPage::playerAreaBgButtonClicked() ...@@ -278,15 +277,6 @@ void AppearanceSettingsPage::playerAreaBgButtonClicked()
settingsCache->setPlayerBgPath(path); settingsCache->setPlayerBgPath(path);
} }
void AppearanceSettingsPage::zoneViewSortingCheckBoxChanged(int state)
{
QSettings settings;
settings.beginGroup("zoneview");
settings.setValue("sorting", state);
emit zoneViewSortingChanged(state);
}
UserInterfaceSettingsPage::UserInterfaceSettingsPage() UserInterfaceSettingsPage::UserInterfaceSettingsPage()
{ {
doubleClickToPlayCheckBox = new QCheckBox; doubleClickToPlayCheckBox = new QCheckBox;
......
...@@ -52,16 +52,14 @@ private slots: ...@@ -52,16 +52,14 @@ private slots:
void handBgButtonClicked(); void handBgButtonClicked();
void tableBgButtonClicked(); void tableBgButtonClicked();
void playerAreaBgButtonClicked(); void playerAreaBgButtonClicked();
void zoneViewSortingCheckBoxChanged(int state);
signals: signals:
void handBgChanged(const QString &path); void handBgChanged(const QString &path);
void tableBgChanged(const QString &path); void tableBgChanged(const QString &path);
void playerAreaBgChanged(const QString &path); void playerAreaBgChanged(const QString &path);
void zoneViewSortingChanged(int state);
private: private:
QLabel *handBgLabel, *tableBgLabel, *playerAreaBgLabel; QLabel *handBgLabel, *tableBgLabel, *playerAreaBgLabel;
QLineEdit *handBgEdit, *tableBgEdit, *playerAreaBgEdit; QLineEdit *handBgEdit, *tableBgEdit, *playerAreaBgEdit;
QCheckBox *economicGridCheckBox, *zoneViewSortingCheckBox; QCheckBox *economicGridCheckBox, *zoneViewSortByNameCheckBox, *zoneViewSortByTypeCheckBox;
QGroupBox *zoneBgGroupBox, *tableGroupBox, *zoneViewGroupBox; QGroupBox *zoneBgGroupBox, *tableGroupBox, *zoneViewGroupBox;
public: public:
AppearanceSettingsPage(); AppearanceSettingsPage();
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
#include "player.h" #include "player.h"
#include "zoneviewwidget.h" #include "zoneviewwidget.h"
#include "zoneviewzone.h" #include "zoneviewzone.h"
#include <QAction>
GameScene::GameScene(QObject *parent) GameScene::GameScene(QObject *parent)
: QGraphicsScene(parent) : QGraphicsScene(parent)
...@@ -78,7 +79,7 @@ void GameScene::toggleZoneView(Player *player, const QString &zoneName, int numb ...@@ -78,7 +79,7 @@ void GameScene::toggleZoneView(Player *player, const QString &zoneName, int numb
} }
} }
ZoneViewWidget *item = new ZoneViewWidget(this, player, player->getZones().value(zoneName), numberCards); ZoneViewWidget *item = new ZoneViewWidget(player, player->getZones().value(zoneName), numberCards);
views.append(item); views.append(item);
connect(item, SIGNAL(closePressed(ZoneViewWidget *)), this, SLOT(removeZoneView(ZoneViewWidget *))); connect(item, SIGNAL(closePressed(ZoneViewWidget *)), this, SLOT(removeZoneView(ZoneViewWidget *)));
addItem(item); addItem(item);
...@@ -95,3 +96,9 @@ void GameScene::clearViews() ...@@ -95,3 +96,9 @@ void GameScene::clearViews()
for (int i = 0; i < views.size(); ++i) for (int i = 0; i < views.size(); ++i)
views[i]->close(); views[i]->close();
} }
void GameScene::closeMostRecentZoneView()
{
if (!views.isEmpty())
views.last()->close();
}
...@@ -25,6 +25,7 @@ public slots: ...@@ -25,6 +25,7 @@ public slots:
void addPlayer(Player *player); void addPlayer(Player *player);
void removePlayer(Player *player); void removePlayer(Player *player);
void clearViews(); void clearViews();
void closeMostRecentZoneView();
private slots: private slots:
void rearrange(); void rearrange();
}; };
......
#include "gameview.h" #include "gameview.h"
#include <QAction>
GameView::GameView(QGraphicsScene *scene, QWidget *parent) GameView::GameView(QGraphicsScene *scene, QWidget *parent)
: QGraphicsView(scene, parent) : QGraphicsView(scene, parent)
...@@ -7,9 +8,13 @@ GameView::GameView(QGraphicsScene *scene, QWidget *parent) ...@@ -7,9 +8,13 @@ GameView::GameView(QGraphicsScene *scene, QWidget *parent)
setRenderHints(QPainter::TextAntialiasing | QPainter::Antialiasing/* | QPainter::SmoothPixmapTransform*/); setRenderHints(QPainter::TextAntialiasing | QPainter::Antialiasing/* | QPainter::SmoothPixmapTransform*/);
setDragMode(RubberBandDrag); setDragMode(RubberBandDrag);
setViewportUpdateMode(BoundingRectViewportUpdate); setViewportUpdateMode(BoundingRectViewportUpdate);
setFocusPolicy(Qt::NoFocus);
connect(scene, SIGNAL(sceneRectChanged(const QRectF &)), this, SLOT(updateSceneRect(const QRectF &))); connect(scene, SIGNAL(sceneRectChanged(const QRectF &)), this, SLOT(updateSceneRect(const QRectF &)));
aCloseMostRecentZoneView = new QAction(this);
aCloseMostRecentZoneView->setShortcut(tr("Esc"));
connect(aCloseMostRecentZoneView, SIGNAL(triggered()), scene, SLOT(closeMostRecentZoneView()));
addAction(aCloseMostRecentZoneView);
} }
void GameView::resizeEvent(QResizeEvent *event) void GameView::resizeEvent(QResizeEvent *event)
......
...@@ -5,6 +5,8 @@ ...@@ -5,6 +5,8 @@
class GameView : public QGraphicsView { class GameView : public QGraphicsView {
Q_OBJECT Q_OBJECT
private:
QAction *aCloseMostRecentZoneView;
protected: protected:
void resizeEvent(QResizeEvent *event); void resizeEvent(QResizeEvent *event);
public slots: public slots:
......
...@@ -32,12 +32,14 @@ ...@@ -32,12 +32,14 @@
#include "window_main.h" #include "window_main.h"
#include "carddatabase.h" #include "carddatabase.h"
#include "settingscache.h" #include "settingscache.h"
#include "pingpixmapgenerator.h"
//Q_IMPORT_PLUGIN(qjpeg) //Q_IMPORT_PLUGIN(qjpeg)
CardDatabase *db; CardDatabase *db;
QTranslator *translator; QTranslator *translator;
SettingsCache *settingsCache; SettingsCache *settingsCache;
PingPixmapGenerator *pingPixmapGenerator;
void myMessageOutput(QtMsgType /*type*/, const char *msg) void myMessageOutput(QtMsgType /*type*/, const char *msg)
{ {
...@@ -61,6 +63,7 @@ int main(int argc, char *argv[]) ...@@ -61,6 +63,7 @@ int main(int argc, char *argv[])
settingsCache = new SettingsCache; settingsCache = new SettingsCache;
db = new CardDatabase; db = new CardDatabase;
pingPixmapGenerator = new PingPixmapGenerator;
QString localeName;// = QLocale::system().name(); QString localeName;// = QLocale::system().name();
QTranslator qtTranslator; QTranslator qtTranslator;
...@@ -88,6 +91,7 @@ int main(int argc, char *argv[]) ...@@ -88,6 +91,7 @@ int main(int argc, char *argv[])
int retval = app.exec(); int retval = app.exec();
delete pingPixmapGenerator;
delete db; delete db;
delete settingsCache; delete settingsCache;
......
#include "pingpixmapgenerator.h" #include "pingpixmapgenerator.h"
#include <QPainter> #include <QPainter>
QMap<int, QPixmap> PingPixmapGenerator::pmCache;
QPixmap PingPixmapGenerator::generatePixmap(int size, int value, int max) QPixmap PingPixmapGenerator::generatePixmap(int size, int value, int max)
{ {
int key = size * 1000000 + max * 1000 + value; int key = size * 1000000 + max * 1000 + value;
......
...@@ -6,9 +6,11 @@ ...@@ -6,9 +6,11 @@
class PingPixmapGenerator { class PingPixmapGenerator {
private: private:
static QMap<int, QPixmap> pmCache; QMap<int, QPixmap> pmCache;
public: public:
static QPixmap generatePixmap(int size, int value, int max); QPixmap generatePixmap(int size, int value, int max);
}; };
extern PingPixmapGenerator *pingPixmapGenerator;
#endif #endif
...@@ -219,6 +219,9 @@ Player::Player(const QString &_name, int _id, bool _local, Client *_client, TabG ...@@ -219,6 +219,9 @@ Player::Player(const QString &_name, int _id, bool _local, Client *_client, TabG
cardMenu->addSeparator(); cardMenu->addSeparator();
moveMenu = cardMenu->addMenu(QString()); moveMenu = cardMenu->addMenu(QString());
playerMenu->addSeparator();
playerMenu->addMenu(cardMenu);
moveMenu->addAction(aMoveToTopLibrary); moveMenu->addAction(aMoveToTopLibrary);
moveMenu->addAction(aMoveToBottomLibrary); moveMenu->addAction(aMoveToBottomLibrary);
moveMenu->addAction(aMoveToGraveyard); moveMenu->addAction(aMoveToGraveyard);
......
...@@ -80,7 +80,7 @@ void PlayerListWidget::updatePing(int playerId, int pingTime) ...@@ -80,7 +80,7 @@ void PlayerListWidget::updatePing(int playerId, int pingTime)
QTreeWidgetItem *twi = players.value(playerId, 0); QTreeWidgetItem *twi = players.value(playerId, 0);
if (!twi) if (!twi)
return; return;
twi->setIcon(0, QIcon(PingPixmapGenerator::generatePixmap(10, pingTime, 10))); twi->setIcon(0, QIcon(pingPixmapGenerator->generatePixmap(10, pingTime, 10)));
} }
void PlayerListWidget::setGameStarted(bool _gameStarted) void PlayerListWidget::setGameStarted(bool _gameStarted)
......
...@@ -87,3 +87,15 @@ void SettingsCache::setEconomicGrid(int _economicGrid) ...@@ -87,3 +87,15 @@ void SettingsCache::setEconomicGrid(int _economicGrid)
settings->setValue("table/economic", economicGrid); settings->setValue("table/economic", economicGrid);
emit economicGridChanged(); emit economicGridChanged();
} }
void SettingsCache::setZoneViewSortByName(int _zoneViewSortByName)
{
zoneViewSortByName = _zoneViewSortByName;
settings->setValue("zoneview/sortbyname", zoneViewSortByName);
}
void SettingsCache::setZoneViewSortByType(int _zoneViewSortByType)
{
zoneViewSortByType = _zoneViewSortByType;
settings->setValue("zoneview/sortbytype", zoneViewSortByType);
}
...@@ -25,6 +25,7 @@ private: ...@@ -25,6 +25,7 @@ private:
bool picDownload; bool picDownload;
bool doubleClickToPlay; bool doubleClickToPlay;
bool economicGrid; bool economicGrid;
bool zoneViewSortByName, zoneViewSortByType;
public: public:
SettingsCache(); SettingsCache();
QString getLang() const { return lang; } QString getLang() const { return lang; }
...@@ -37,6 +38,8 @@ public: ...@@ -37,6 +38,8 @@ public:
bool getPicDownload() const { return picDownload; } bool getPicDownload() const { return picDownload; }
bool getDoubleClickToPlay() const { return doubleClickToPlay; } bool getDoubleClickToPlay() const { return doubleClickToPlay; }
bool getEconomicGrid() const { return economicGrid; } bool getEconomicGrid() const { return economicGrid; }
bool getZoneViewSortByName() const { return zoneViewSortByName; }
bool getZoneViewSortByType() const { return zoneViewSortByType; }
public slots: public slots:
void setLang(const QString &_lang); void setLang(const QString &_lang);
void setDeckPath(const QString &_deckPath); void setDeckPath(const QString &_deckPath);
...@@ -48,6 +51,8 @@ public slots: ...@@ -48,6 +51,8 @@ public slots:
void setPicDownload(int _picDownload); void setPicDownload(int _picDownload);
void setDoubleClickToPlay(int _doubleClickToPlay); void setDoubleClickToPlay(int _doubleClickToPlay);
void setEconomicGrid(int _economicGrid); void setEconomicGrid(int _economicGrid);
void setZoneViewSortByName(int _zoneViewSortByName);
void setZoneViewSortByType(int _zoneViewSortByType);
}; };
extern SettingsCache *settingsCache; extern SettingsCache *settingsCache;
......
...@@ -81,9 +81,6 @@ TabGame::TabGame(Client *_client, int _gameId, const QString &_gameDescription, ...@@ -81,9 +81,6 @@ TabGame::TabGame(Client *_client, int _gameId, const QString &_gameDescription,
readyStartButton->hide(); readyStartButton->hide();
} }
aCloseMostRecentZoneView = new QAction(this);
addAction(aCloseMostRecentZoneView);
connect(loadLocalButton, SIGNAL(clicked()), this, SLOT(loadLocalDeck())); connect(loadLocalButton, SIGNAL(clicked()), this, SLOT(loadLocalDeck()));
connect(loadRemoteButton, SIGNAL(clicked()), this, SLOT(loadRemoteDeck())); connect(loadRemoteButton, SIGNAL(clicked()), this, SLOT(loadRemoteDeck()));
connect(readyStartButton, SIGNAL(clicked()), this, SLOT(readyStart())); connect(readyStartButton, SIGNAL(clicked()), this, SLOT(readyStart()));
...@@ -146,8 +143,6 @@ void TabGame::retranslateUi() ...@@ -146,8 +143,6 @@ void TabGame::retranslateUi()
readyStartButton->setText(tr("S&tart game")); readyStartButton->setText(tr("S&tart game"));
sayLabel->setText(tr("&Say:")); sayLabel->setText(tr("&Say:"));
cardInfo->retranslateUi(); cardInfo->retranslateUi();
aCloseMostRecentZoneView->setText(tr("Close most recent zone view"));
aCloseMostRecentZoneView->setShortcut(tr("Esc"));
QMapIterator<int, Player *> i(players); QMapIterator<int, Player *> i(players);
while (i.hasNext()) while (i.hasNext())
......
...@@ -66,8 +66,7 @@ private: ...@@ -66,8 +66,7 @@ private:
ZoneViewLayout *zoneLayout; ZoneViewLayout *zoneLayout;
QAction *playersSeparator; QAction *playersSeparator;
QMenu *playersMenu; QMenu *playersMenu;
QAction *aCloseMostRecentZoneView, QAction *aConcede, *aLeaveGame, *aNextPhase, *aNextTurn, *aRemoveLocalArrows;
*aConcede, *aLeaveGame, *aNextPhase, *aNextTurn, *aRemoveLocalArrows;
Player *addPlayer(int playerId, const QString &playerName); Player *addPlayer(int playerId, const QString &playerName);
......
...@@ -98,7 +98,7 @@ void TabSupervisor::updatePingTime(int value, int max) ...@@ -98,7 +98,7 @@ void TabSupervisor::updatePingTime(int value, int max)
if (!tabServer) if (!tabServer)
return; return;
setTabIcon(0, QIcon(PingPixmapGenerator::generatePixmap(15, value, max))); setTabIcon(0, QIcon(pingPixmapGenerator->generatePixmap(15, value, max)));
} }
void TabSupervisor::gameJoined(Event_GameJoined *event) void TabSupervisor::gameJoined(Event_GameJoined *event)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment