Cockatrice 2025-11-30-Development-2.11.0-beta.38
A cross-platform virtual tabletop for multiplayer card games
Loading...
Searching...
No Matches
ZoneViewWidget Class Reference

#include <view_zone_widget.h>

Inheritance diagram for ZoneViewWidget:
[legend]
Collaboration diagram for ZoneViewWidget:
[legend]

Signals

void closePressed (ZoneViewWidget *zv)

Public Member Functions

 ZoneViewWidget (Player *_player, CardZoneLogic *_origZone, int numberCards=0, bool _revealZone=false, bool _writeableRevealZone=false, const QList< const ServerInfo_Card * > &cardList=QList< const ServerInfo_Card * >(), bool _isReversed=false)
ZoneViewZonegetZone () const
PlayergetPlayer () const
void retranslateUi ()

Protected Member Functions

void closeEvent (QCloseEvent *event) override
void initStyleOption (QStyleOption *option) const override
void mouseDoubleClickEvent (QGraphicsSceneMouseEvent *event) override

Private Slots

void processGroupBy (int value)
void processSortBy (int value)
void processSetPileView (QT_STATE_CHANGED_T value)
void resizeToZoneContents (bool forceInitialHeight=false)
void handleScrollBarChange (int value)
void zoneDeleted ()
void moveEvent (QGraphicsSceneMoveEvent *) override
void resizeEvent (QGraphicsSceneResizeEvent *) override
void expandWindow ()

Private Member Functions

void resizeScrollbar (qreal newZoneHeight)

Private Attributes

ZoneViewZonezone
QGraphicsWidget * zoneContainer
QPushButton * closeButton
QScrollBar * scrollBar
ScrollableGraphicsProxyWidgetscrollBarProxy
QLineEdit searchEdit
QComboBox groupBySelector
QComboBox sortBySelector
QCheckBox shuffleCheckBox
QCheckBox pileViewCheckBox
bool canBeShuffled
int extraHeight
Playerplayer

Detailed Description

A QGraphicsWidget that holds a ZoneViewZone.

Some zone views allow sorting. This widget will display the sort options when relevant, and forward the values of the options to the ZoneViewZone.

Constructor & Destructor Documentation

◆ ZoneViewWidget()

ZoneViewWidget::ZoneViewWidget ( Player * _player,
CardZoneLogic * _origZone,
int numberCards = 0,
bool _revealZone = false,
bool _writeableRevealZone = false,
const QList< const ServerInfo_Card * > & cardList = QList<const ServerInfo_Card *>(),
bool _isReversed = false )
Parameters
_playerthe player the cards were revealed to.
_origZonethe zone the cards were revealed from.
numberCardsnum of cards to reveal from the zone. Ex: scry the top 3 cards. Pass in a negative number to reveal the entire zone. -1 specifically will give the option to shuffle the zone upon closing the window.
_revealZoneif false, the cards will be face down.
_writeableRevealZonewhether the player can interact with the revealed cards.
Here is the call graph for this function:
Here is the caller graph for this function:

Member Function Documentation

◆ closeEvent()

void ZoneViewWidget::closeEvent ( QCloseEvent * event)
overrideprotected
Here is the call graph for this function:

◆ closePressed

void ZoneViewWidget::closePressed ( ZoneViewWidget * zv)
signal
Here is the call graph for this function:
Here is the caller graph for this function:

◆ expandWindow

void ZoneViewWidget::expandWindow ( )
privateslot

Expands/shrinks the window, depending on the current height as well as the configured initial and expanded max heights.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getPlayer()

Player * ZoneViewWidget::getPlayer ( ) const
inline

◆ getZone()

ZoneViewZone * ZoneViewWidget::getZone ( ) const
inline

◆ handleScrollBarChange

void ZoneViewWidget::handleScrollBarChange ( int value)
privateslot
Here is the caller graph for this function:

◆ initStyleOption()

void ZoneViewWidget::initStyleOption ( QStyleOption * option) const
overrideprotected

◆ mouseDoubleClickEvent()

void ZoneViewWidget::mouseDoubleClickEvent ( QGraphicsSceneMouseEvent * event)
overrideprotected
Here is the call graph for this function:

◆ moveEvent

void ZoneViewWidget::moveEvent ( QGraphicsSceneMoveEvent * )
overrideprivateslot

◆ processGroupBy

void ZoneViewWidget::processGroupBy ( int value)
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ processSetPileView

void ZoneViewWidget::processSetPileView ( QT_STATE_CHANGED_T value)
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ processSortBy

void ZoneViewWidget::processSortBy ( int value)
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ resizeEvent

void ZoneViewWidget::resizeEvent ( QGraphicsSceneResizeEvent * event)
overrideprivateslot
Here is the call graph for this function:

◆ resizeScrollbar()

void ZoneViewWidget::resizeScrollbar ( qreal newZoneHeight)
private
Here is the caller graph for this function:

◆ resizeToZoneContents

void ZoneViewWidget::resizeToZoneContents ( bool forceInitialHeight = false)
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ retranslateUi()

void ZoneViewWidget::retranslateUi ( )
Here is the caller graph for this function:

◆ zoneDeleted

void ZoneViewWidget::zoneDeleted ( )
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ canBeShuffled

bool ZoneViewWidget::canBeShuffled
private

◆ closeButton

QPushButton* ZoneViewWidget::closeButton
private

◆ extraHeight

int ZoneViewWidget::extraHeight
private

◆ groupBySelector

QComboBox ZoneViewWidget::groupBySelector
private

◆ pileViewCheckBox

QCheckBox ZoneViewWidget::pileViewCheckBox
private

◆ player

Player* ZoneViewWidget::player
private

◆ scrollBar

QScrollBar* ZoneViewWidget::scrollBar
private

◆ scrollBarProxy

ScrollableGraphicsProxyWidget* ZoneViewWidget::scrollBarProxy
private

◆ searchEdit

QLineEdit ZoneViewWidget::searchEdit
private

◆ shuffleCheckBox

QCheckBox ZoneViewWidget::shuffleCheckBox
private

◆ sortBySelector

QComboBox ZoneViewWidget::sortBySelector
private

◆ zone

ZoneViewZone* ZoneViewWidget::zone
private

◆ zoneContainer

QGraphicsWidget* ZoneViewWidget::zoneContainer
private

The documentation for this class was generated from the following files: