mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-11 16:44:48 -07:00
Window Alerts for messagelogwidget and chatwidget
This commit is contained in:
parent
4beb990f38
commit
f5193edead
3 changed files with 18 additions and 0 deletions
|
|
@ -2,6 +2,7 @@
|
|||
#include "game.h"
|
||||
#include "player.h"
|
||||
#include "cardzone.h"
|
||||
#include <QApplication>
|
||||
|
||||
QString MessageLogWidget::sanitizeHtml(QString dirty) const
|
||||
{
|
||||
|
|
@ -286,6 +287,20 @@ void MessageLogWidget::connectToGame(Game *game)
|
|||
connect(game, SIGNAL(logStopDumpZone(Player *, CardZone *, Player *)), this, SLOT(logStopDumpZone(Player *, CardZone *, Player *)));
|
||||
connect(game, SIGNAL(logSetActivePlayer(Player *)), this, SLOT(logSetActivePlayer(Player *)));
|
||||
connect(game, SIGNAL(setActivePhase(int)), this, SLOT(logSetActivePhase(int)));
|
||||
|
||||
//Alert Test
|
||||
connect(game, SIGNAL(logSay(Player *, QString)), this, SLOT(msgAlert()));
|
||||
connect(game, SIGNAL(logJoin(Player *)), this, SLOT(msgAlert()));
|
||||
connect(game, SIGNAL(logLeave(Player *)), this, SLOT(msgAlert()));
|
||||
connect(game, SIGNAL(logSetActivePlayer(Player *)), this, SLOT(msgAlert()));
|
||||
connect(game, SIGNAL(setActivePhase(int)), this, SLOT(msgAlert()));
|
||||
connect(game, SIGNAL(logDraw(Player *, int)), this, SLOT(msgAlert()));
|
||||
connect(game, SIGNAL(logMoveCard(Player *, QString, CardZone *, int, CardZone *, int)), this, SLOT(msgAlert()));
|
||||
}
|
||||
|
||||
void MessageLogWidget::msgAlert()
|
||||
{
|
||||
QApplication::alert(this);
|
||||
}
|
||||
|
||||
MessageLogWidget::MessageLogWidget(QWidget *parent)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue