mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-05 09:33:25 -08:00
Q_INTERFACES fix
This commit is contained in:
parent
bc1338420e
commit
baf6bb41cb
11 changed files with 13 additions and 12 deletions
|
|
@ -14,7 +14,7 @@ const QColor GHOST_MASK = QColor(255, 255, 255, 50);
|
|||
AbstractCardDragItem::AbstractCardDragItem(AbstractCardItem *_item,
|
||||
const QPointF &_hotSpot,
|
||||
AbstractCardDragItem *parentDrag)
|
||||
: QGraphicsItem(), item(_item), hotSpot(_hotSpot)
|
||||
: QGraphicsObject(), item(_item), hotSpot(_hotSpot)
|
||||
{
|
||||
if (parentDrag) {
|
||||
parentDrag->addChildDrag(this);
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ class QGraphicsScene;
|
|||
class CardZone;
|
||||
class CardInfo;
|
||||
|
||||
class AbstractCardDragItem : public QObject, public QGraphicsItem
|
||||
class AbstractCardDragItem : public QGraphicsObject
|
||||
{
|
||||
Q_OBJECT
|
||||
protected:
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ AbstractCounter::AbstractCounter(CounterState *state,
|
|||
bool _shownInCounterArea,
|
||||
bool _useNameForShortcut,
|
||||
QGraphicsItem *parent)
|
||||
: QGraphicsItem(parent), player(_player), id(state->getId()), name(state->getName()), value(state->getValue()),
|
||||
: QGraphicsObject(parent), player(_player), id(state->getId()), name(state->getName()), value(state->getValue()),
|
||||
color(state->getColor()), radius(state->getRadius()), useNameForShortcut(_useNameForShortcut),
|
||||
shownInCounterArea(_shownInCounterArea)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ class QKeyEvent;
|
|||
class QMenu;
|
||||
class QString;
|
||||
|
||||
class AbstractCounter : public QObject, public QGraphicsItem, public AbstractPlayerComponent
|
||||
class AbstractCounter : public QGraphicsObject, public AbstractPlayerComponent
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ qreal easeOutCubic(qreal t)
|
|||
} // namespace
|
||||
|
||||
ArrowItem::ArrowItem(QSharedPointer<const ArrowData> _data, ArrowTarget *_startItem, ArrowTarget *_targetItem)
|
||||
: data(std::move(_data)), startItem(_startItem), targetItem(_targetItem)
|
||||
: QGraphicsObject(), data(std::move(_data)), startItem(_startItem), targetItem(_targetItem)
|
||||
{
|
||||
setZValue(ZValues::ARROWS);
|
||||
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ class CardItem;
|
|||
class QGraphicsSceneMouseEvent;
|
||||
class PlayerLogic;
|
||||
|
||||
class ArrowItem : public QObject, public QGraphicsItem, public IAnimatedItem
|
||||
class ArrowItem : public QGraphicsObject, public IAnimatedItem
|
||||
{
|
||||
Q_OBJECT
|
||||
signals:
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
#include <libcockatrice/utility/zone_names.h>
|
||||
|
||||
PhaseButton::PhaseButton(const QString &_name, QGraphicsItem *parent, QAction *_doubleClickAction, bool _highlightable)
|
||||
: QObject(), QGraphicsItem(parent), name(_name), active(false), highlightable(_highlightable),
|
||||
: QGraphicsObject(parent), name(_name), active(false), highlightable(_highlightable),
|
||||
activeAnimationCounter(0), doubleClickAction(_doubleClickAction), width(50)
|
||||
{
|
||||
if (highlightable) {
|
||||
|
|
@ -108,7 +108,7 @@ void PhaseButton::triggerDoubleClickAction()
|
|||
}
|
||||
|
||||
PhasesToolbar::PhasesToolbar(QGraphicsItem *parent)
|
||||
: QGraphicsItem(parent), width(100), height(100), ySpacing(1), symbolSize(8)
|
||||
: QGraphicsObject(parent), width(100), height(100), ySpacing(1), symbolSize(8)
|
||||
{
|
||||
auto *aUntapAll = new QAction(this);
|
||||
connect(aUntapAll, &QAction::triggered, this, &PhasesToolbar::actUntapAll);
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ class Message;
|
|||
class PlayerLogic;
|
||||
class GameCommand;
|
||||
|
||||
class PhaseButton : public QObject, public QGraphicsItem
|
||||
class PhaseButton : public QGraphicsObject
|
||||
{
|
||||
Q_OBJECT
|
||||
private:
|
||||
|
|
@ -61,7 +61,7 @@ protected:
|
|||
void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event) override;
|
||||
};
|
||||
|
||||
class PhasesToolbar : public QObject, public QGraphicsItem
|
||||
class PhasesToolbar : public QGraphicsObject
|
||||
{
|
||||
Q_OBJECT
|
||||
private:
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
#include <QPainter>
|
||||
|
||||
PlayerArea::PlayerArea(QGraphicsItem *parentItem) : QObject(), QGraphicsItem(parentItem)
|
||||
PlayerArea::PlayerArea(QGraphicsItem *parentItem) : QGraphicsObject(parentItem)
|
||||
{
|
||||
setCacheMode(DeviceCoordinateCache);
|
||||
connect(themeManager, &ThemeManager::themeChanged, this, &PlayerArea::updateBg);
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
/**
|
||||
* The entire graphical area belonging to a single player.
|
||||
*/
|
||||
class PlayerArea : public QObject, public QGraphicsItem
|
||||
class PlayerArea : public QGraphicsObject
|
||||
{
|
||||
Q_OBJECT
|
||||
private:
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@ class QGraphicsSceneWheelEvent;
|
|||
class ZoneViewZone : public SelectZone, public QGraphicsLayoutItem
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_INTERFACES(QGraphicsLayoutItem)
|
||||
private:
|
||||
static constexpr int HORIZONTAL_PADDING = 12;
|
||||
static constexpr int VERTICAL_PADDING = 5;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue