#include <table_zone.h>
|
| | TableZone (TableZoneLogic *_logic, QGraphicsItem *parent=nullptr) |
| QRectF | boundingRect () const override |
| void | paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override |
| void | toggleTapped () |
| void | handleDropEvent (const QList< CardDragItem * > &dragItems, CardZoneLogic *startZone, const QPoint &dropPoint) override |
| void | handleDropEventByGrid (const QList< CardDragItem * > &dragItems, CardZoneLogic *startZone, const QPoint &gridPoint) |
| CardItem * | getCardFromGrid (const QPoint &gridPoint) const |
| CardItem * | getCardFromCoords (const QPointF &point) const |
| QPointF | closestGridPoint (const QPointF &point) override |
| void | resizeToContents () |
| int | getMinimumWidth () const |
| void | setWidth (qreal _width) |
| qreal | getWidth () const |
| void | setActive (bool _active) |
| | SelectZone (CardZoneLogic *logic, QGraphicsItem *parent=nullptr) |
| int | type () const override |
| | CardZone (CardZoneLogic *logic, QGraphicsItem *parent=nullptr) |
| void | retranslateUi () |
| CardZoneLogic * | getLogic () const |
| void | setMenu (QMenu *_menu, QAction *_doubleClickAction=0) |
| | AbstractGraphicsItem (QGraphicsItem *parent=nullptr) |
|
| static const int | TABLEROWS = 3 |
| static const int | MARGIN_LEFT = 20 |
| static const int | MARGIN_RIGHT = 15 |
| static const int | MARGIN_TOP = 10 |
| static const int | MARGIN_BOTTOM = 30 |
| static const int | PADDING_X = 35 |
| static const int | PADDING_Y = 30 |
| static const int | MIN_WIDTH = MARGIN_LEFT + (5 * CARD_WIDTH) + MARGIN_RIGHT |
| static const int | STACKED_CARD_OFFSET_X = CARD_WIDTH / 3 |
| static const int | STACKED_CARD_OFFSET_Y = PADDING_Y / 3 |
| static const int | BOX_LINE_WIDTH = 10 |
| static const QColor | BACKGROUND_COLOR = QColor(100, 100, 100) |
| static const QColor | FADE_MASK = QColor(0, 0, 0, 80) |
| static const QColor | GRADIENT_COLOR = QColor(255, 255, 255, 150) |
| static const QColor | GRADIENT_COLORLESS = QColor(255, 255, 255, 0) |
◆ TableZone()
| TableZone::TableZone |
( |
TableZoneLogic * | _logic, |
|
|
QGraphicsItem * | parent = nullptr ) |
|
explicit |
◆ boundingRect()
| QRectF TableZone::boundingRect |
( |
| ) |
const |
|
nodiscardoverride |
- Returns
- a QRectF of the TableZone bounding box.
◆ clampValidTableRow()
| int TableZone::clampValidTableRow |
( |
const int | row | ) |
|
|
static |
◆ closestGridPoint()
| QPointF TableZone::closestGridPoint |
( |
const QPointF & | point | ) |
|
|
overridevirtual |
◆ computeCardStackWidths()
| void TableZone::computeCardStackWidths |
( |
| ) |
|
|
private |
◆ getCardFromCoords()
| CardItem * TableZone::getCardFromCoords |
( |
const QPointF & | point | ) |
const |
|
nodiscard |
- Returns
- CardItem from coordinate location
◆ getCardFromGrid()
| CardItem * TableZone::getCardFromGrid |
( |
const QPoint & | gridPoint | ) |
const |
|
nodiscard |
◆ getCardStackMapKey()
| int TableZone::getCardStackMapKey |
( |
int | x, |
|
|
int | y ) const |
|
inlinenodiscardprivate |
◆ getMinimumWidth()
| int TableZone::getMinimumWidth |
( |
| ) |
const |
|
inlinenodiscard |
◆ getWidth()
| qreal TableZone::getWidth |
( |
| ) |
const |
|
inlinenodiscard |
◆ handleDropEvent()
| void TableZone::handleDropEvent |
( |
const QList< CardDragItem * > & | dragItems, |
|
|
CardZoneLogic * | startZone, |
|
|
const QPoint & | dropPoint ) |
|
overridevirtual |
See HandleDropEventByGrid
Implements CardZone.
◆ handleDropEventByGrid()
| void TableZone::handleDropEventByGrid |
( |
const QList< CardDragItem * > & | dragItems, |
|
|
CardZoneLogic * | startZone, |
|
|
const QPoint & | gridPoint ) |
Handles the placement of cards
◆ isInverted()
| bool TableZone::isInverted |
( |
| ) |
const |
|
nodiscardprivate |
◆ mapFromGrid()
| QPointF TableZone::mapFromGrid |
( |
QPoint | gridPoint | ) |
const |
|
nodiscardprivate |
◆ mapToGrid()
| QPoint TableZone::mapToGrid |
( |
const QPointF & | mapPoint | ) |
const |
|
nodiscardprivate |
◆ paint()
| void TableZone::paint |
( |
QPainter * | painter, |
|
|
const QStyleOptionGraphicsItem * | option, |
|
|
QWidget * | widget ) |
|
override |
◆ paintLandDivider()
| void TableZone::paintLandDivider |
( |
QPainter * | painter | ) |
|
|
private |
Render a division line for land placement
@painter QPainter object
◆ paintZoneOutline()
| void TableZone::paintZoneOutline |
( |
QPainter * | painter | ) |
|
|
private |
Render a soft outline around the edge of the TableZone.
- Parameters
-
◆ reorganizeCards
| void TableZone::reorganizeCards |
( |
| ) |
|
|
overrideslot |
◆ resizeToContents()
| void TableZone::resizeToContents |
( |
| ) |
|
Resizes the TableZone in case CardItems are within or outside of the TableZone constraints.
◆ setActive()
| void TableZone::setActive |
( |
bool | _active | ) |
|
|
inline |
◆ setWidth()
| void TableZone::setWidth |
( |
qreal | _width | ) |
|
|
inline |
◆ sizeChanged
| void TableZone::sizeChanged |
( |
| ) |
|
|
signal |
◆ toggleTapped()
| void TableZone::toggleTapped |
( |
| ) |
|
Toggles the selected items as tapped.
◆ updateBg
| void TableZone::updateBg |
( |
| ) |
|
|
privateslot |
Loads in any found custom background and updates
◆ active
| bool TableZone::active = false |
|
private |
◆ BACKGROUND_COLOR
| const QColor TableZone::BACKGROUND_COLOR = QColor(100, 100, 100) |
|
staticprivate |
◆ backgroundPixelMap
| QPixmap TableZone::backgroundPixelMap |
|
private |
◆ BOX_LINE_WIDTH
| const int TableZone::BOX_LINE_WIDTH = 10 |
|
staticprivate |
◆ cardStackWidth
| QMap<int, int> TableZone::cardStackWidth |
|
private |
◆ currentMinimumWidth
| int TableZone::currentMinimumWidth |
|
private |
◆ FADE_MASK
| const QColor TableZone::FADE_MASK = QColor(0, 0, 0, 80) |
|
staticprivate |
◆ GRADIENT_COLOR
| const QColor TableZone::GRADIENT_COLOR = QColor(255, 255, 255, 150) |
|
staticprivate |
◆ GRADIENT_COLORLESS
| const QColor TableZone::GRADIENT_COLORLESS = QColor(255, 255, 255, 0) |
|
staticprivate |
◆ height
◆ MARGIN_BOTTOM
| const int TableZone::MARGIN_BOTTOM = 30 |
|
staticprivate |
◆ MARGIN_LEFT
| const int TableZone::MARGIN_LEFT = 20 |
|
staticprivate |
◆ MARGIN_RIGHT
| const int TableZone::MARGIN_RIGHT = 15 |
|
staticprivate |
◆ MARGIN_TOP
| const int TableZone::MARGIN_TOP = 10 |
|
staticprivate |
◆ MIN_WIDTH
◆ PADDING_X
| const int TableZone::PADDING_X = 35 |
|
staticprivate |
◆ PADDING_Y
| const int TableZone::PADDING_Y = 30 |
|
staticprivate |
◆ STACKED_CARD_OFFSET_X
| const int TableZone::STACKED_CARD_OFFSET_X = CARD_WIDTH / 3 |
|
staticprivate |
◆ STACKED_CARD_OFFSET_Y
| const int TableZone::STACKED_CARD_OFFSET_Y = PADDING_Y / 3 |
|
staticprivate |
◆ TABLEROWS
| const int TableZone::TABLEROWS = 3 |
|
staticprivate |
◆ width
The documentation for this class was generated from the following files: