Merge branch 'master' of github.com:Daenyth/Cockatrice

This commit is contained in:
Daenyth 2013-07-11 13:51:18 -04:00
commit db43a0609b
74 changed files with 3062 additions and 77 deletions

View file

@ -89,4 +89,4 @@ public:
static PendingCommand *prepareAdminCommand(const ::google::protobuf::Message &cmd);
};
#endif
#endif

View file

@ -32,4 +32,4 @@ public:
void removeArrowTo(ArrowItem *arrow) { arrowsTo.removeAt(arrowsTo.indexOf(arrow)); }
};
#endif
#endif

View file

@ -331,7 +331,6 @@ void CardItem::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
if (!cardMenu->isEmpty())
cardMenu->exec(event->screenPos());
} else if ((event->button() == Qt::LeftButton) && !settingsCache->getDoubleClickToPlay()) {
setCursor(Qt::OpenHandCursor);
bool hideCard = false;
if (zone->getIsView()) {
@ -345,6 +344,7 @@ void CardItem::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
playCard(event->modifiers().testFlag(Qt::ShiftModifier));
}
setCursor(Qt::OpenHandCursor);
AbstractCardItem::mouseReleaseEvent(event);
}

View file

@ -50,4 +50,4 @@ signals:
void deleteCardInfoPopup(QString cardName);
};
#endif
#endif

View file

@ -26,4 +26,4 @@ Q_DECLARE_METATYPE(QList<ServerInfo_User>)
Q_DECLARE_METATYPE(Event_ReplayAdded)
#endif
#endif

View file

@ -14,4 +14,4 @@ public:
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
};
#endif
#endif

View file

@ -21,4 +21,4 @@ public:
QSet<QString> getCardColors() const;
};
#endif
#endif

View file

@ -13,7 +13,7 @@ DlgConnect::DlgConnect(QWidget *parent)
settings.beginGroup("server");
hostLabel = new QLabel(tr("&Host:"));
hostEdit = new QLineEdit(settings.value("hostname", "play.cockatrice.de").toString());
hostEdit = new QLineEdit(settings.value("hostname", "cockatrice.woogerworks.com").toString());
hostLabel->setBuddy(hostEdit);
portLabel = new QLabel(tr("&Port:"));

View file

@ -5,4 +5,4 @@
typedef QMap<int, QString> GameTypeMap;
#endif
#endif

View file

@ -18,4 +18,4 @@ private slots:
void itemFromServer(const ServerMessage &item);
};
#endif
#endif

View file

@ -20,4 +20,4 @@ public slots:
void itemFromClient(const CommandContainer &item);
};
#endif
#endif

View file

@ -39,7 +39,7 @@ void PhaseButton::paint(QPainter *painter, const QStyleOptionGraphicsItem * /*op
painter->setBrush(QColor(220 * (activeAnimationCounter / 10.0), 220 * (activeAnimationCounter / 10.0), 220 * (activeAnimationCounter / 10.0)));
painter->setPen(Qt::gray);
painter->drawRect(0.5, 0.5, width - 1, width - 1);
painter->drawRect(0, 0, width - 1, width - 1);
painter->save();
painter->resetTransform();
painter->drawPixmap(iconPixmap.rect().translated(round(3 * scaleFactor), round(3 * scaleFactor)), iconPixmap, iconPixmap.rect());
@ -47,7 +47,7 @@ void PhaseButton::paint(QPainter *painter, const QStyleOptionGraphicsItem * /*op
painter->setBrush(QColor(0, 0, 0, 255 * ((10 - activeAnimationCounter) / 15.0)));
painter->setPen(Qt::gray);
painter->drawRect(0.5, 0.5, width - 1, width - 1);
painter->drawRect(0, 0, width - 1, width - 1);
}
void PhaseButton::setWidth(double _width)

View file

@ -123,7 +123,7 @@ QPixmap CountryPixmapGenerator::generatePixmap(int height, const QString &countr
QPainter painter(&pixmap);
svg.render(&painter, QRectF(0, 0, width, height));
painter.setPen(Qt::black);
painter.drawRect(0.5, 0.5, width - 1, height - 1);
painter.drawRect(0, 0, width - 1, height - 1);
pmCache.insert(key, pixmap);
return pixmap;

View file

@ -35,4 +35,4 @@ public:
AbstractCounter *addCounter(int _counterId, const QString &_name, int _value);
};
#endif
#endif

View file

@ -31,4 +31,4 @@ public slots:
extern SoundEngine *soundEngine;
#endif
#endif

View file

@ -46,4 +46,4 @@ public:
bool getLocked() const { return locked; }
};
#endif
#endif

View file

@ -77,7 +77,7 @@ void ToggleButton::paintEvent(QPaintEvent *event)
painter.setPen(QPen(Qt::green, 3));
else
painter.setPen(QPen(Qt::red, 3));
painter.drawRect(1.5, 1.5, width() - 3, height() - 3);
painter.drawRect(1, 1, width() - 3, height() - 3);
}
void ToggleButton::setState(bool _state)

View file

@ -24,4 +24,4 @@ public slots:
void updateInfo(const QString &userName);
};
#endif
#endif

View file

@ -92,4 +92,4 @@ public:
void sortItems();
};
#endif
#endif

View file

@ -258,7 +258,7 @@ void MainWindow::loginError(Response::ResponseCode r, QString reasonStr, quint32
QMessageBox::critical(this, tr("Error"), bannedStr);
break;
}
case Response::RespUserIsBanned:
case Response::RespUsernameInvalid:
QMessageBox::critical(this, tr("Error"), tr("Invalid username."));
break;
default: