|
| int | type () const override |
| | CardItem (PlayerLogic *_owner, QGraphicsItem *parent=nullptr, const CardRef &cardRef={}, int _cardid=-1, CardZoneLogic *_zone=nullptr) |
| void | retranslateUi () |
| CardState * | getState () const |
| CardZoneLogic * | getZone () const |
| void | setZone (CardZoneLogic *_zone) |
| void | paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override |
| QPoint | getGridPoint () const |
| void | setGridPoint (const QPoint &_gridPoint) |
| QPoint | getGridPos () const |
| PlayerLogic * | getOwner () const |
| void | setOwner (PlayerLogic *_owner) |
| bool | getAttacking () const |
| void | setAttacking (bool _attacking) |
| const QMap< int, int > & | getCounters () const |
| void | setCounter (int _id, int _value) |
| QString | getAnnotation () const |
| void | setAnnotation (const QString &_annotation) |
| bool | getDoesntUntap () const |
| void | setDoesntUntap (bool _doesntUntap) |
| QString | getPT () const |
| void | setPT (const QString &_pt) |
| bool | getDestroyOnZoneChange () const |
| void | setDestroyOnZoneChange (bool _destroy) |
| CardItem * | getAttachedTo () const |
| void | setAttachedTo (CardItem *_attachedTo) |
| void | addAttachedCard (CardItem *card) |
| void | removeAttachedCard (CardItem *card) |
| const QList< CardItem * > & | getAttachedCards () const |
| void | resetState (bool keepAnnotations=false) |
| | Resets the fields that should be reset after a zone transition.
|
| void | processCardInfo (const ServerInfo_Card &_info) |
| bool | animationEvent () |
| CardDragItem * | createDragItem (int _id, const QPointF &_pos, const QPointF &_scenePos, bool forceFaceDown) |
| void | deleteDragItem () |
| void | drawArrow (const QColor &arrowColor) |
| void | drawAttachArrow () |
| void | playCard (bool faceDown) |
| int | type () const override |
| | AbstractCardItem (QGraphicsItem *parent=nullptr, const CardRef &cardRef={}, PlayerLogic *_owner=nullptr, int _id=-1) |
| | ~AbstractCardItem () override |
| QRectF | boundingRect () const override |
| QPainterPath | shape () const override |
| QSizeF | getTranslatedSize (QPainter *painter) const |
| void | paintPicture (QPainter *painter, const QSizeF &translatedSize, int angle) |
| void | paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override |
| ExactCard | getCard () const |
| const CardInfo & | getCardInfo () const |
| int | getId () const |
| void | setId (int _id) |
| QString | getName () const |
| QString | getProviderId () const |
| void | setCardRef (const CardRef &_cardRef) |
| CardRef | getCardRef () const |
| qreal | getRealZValue () const |
| void | setRealZValue (qreal _zValue) |
| void | setHovered (bool _hovered) |
| bool | getIsHovered () const |
| QString | getColor () const |
| void | setColor (const QString &_color) |
| bool | getTapped () const |
| void | setTapped (bool _tapped, bool canAnimate=false) |
| bool | getFaceDown () const |
| void | setFaceDown (bool _facedown) |
| void | processHoverEvent () |
| void | deleteCardInfoPopup () |
| | ArrowTarget (PlayerLogic *_owner, QGraphicsItem *parent=nullptr) |
| | ~ArrowTarget () override=default |
| PlayerLogic * | getOwner () const |
| void | setBeingPointedAt (bool _beingPointedAt) |
| bool | getBeingPointedAt () const |
| | AbstractGraphicsItem (QGraphicsItem *parent=nullptr) |
|
| void | mouseMoveEvent (QGraphicsSceneMouseEvent *event) override |
| void | mouseReleaseEvent (QGraphicsSceneMouseEvent *event) override |
| void | mouseDoubleClickEvent (QGraphicsSceneMouseEvent *event) override |
| QVariant | itemChange (GraphicsItemChange change, const QVariant &value) override |
| void | transformPainter (QPainter *painter, const QSizeF &translatedSize, int angle) |
| void | mousePressEvent (QGraphicsSceneMouseEvent *event) override |
| void | mouseReleaseEvent (QGraphicsSceneMouseEvent *event) override |
| QVariant | itemChange (QGraphicsItem::GraphicsItemChange change, const QVariant &value) override |
| void | cacheBgColor () |
| QVariant | itemChange (GraphicsItemChange change, const QVariant &value) override |
| void | paintNumberEllipse (int number, int radius, const QColor &color, int position, int count, QPainter *painter) |
| QVariantList CardItem::parsePT |
( |
const QString & | pt | ) |
|
|
static |
Parses a string representing a p/t in order to extract the values from it.
If the string contains '/', the string will be split at the '/' and each side will be parsed separately, which means the result list will have two elements.
If '/' is not found, then the entire string is parsed together, which means the result list will have a single element.
If either side of the split is empty, there will also only be a single element in the result list.
This function will attempt to parse each substring as an int first, handling plus and minus prefixes. If successful, it will put the parsed value into the QVariant as an int. If failed, it will just put the substring into the QVariant as a QString.
- Parameters
-
- Returns
- A QVariantList that can contain one or two elements, where each QVariant can be either int or QString