Cockatrice 2026-01-14-Development-2.11.0-beta.46
A cross-platform virtual tabletop for multiplayer card games
Loading...
Searching...
No Matches
ColorPie Class Reference

#include <color_pie.h>

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

Public Member Functions

 ColorPie (const QMap< QString, int > &_colors={}, QWidget *parent=nullptr)
void setColors (const QMap< QString, int > &_colors)
QSize minimumSizeHint () const override

Protected Member Functions

void paintEvent (QPaintEvent *) override
void enterEvent (QEnterEvent *event) override
void leaveEvent (QEvent *) override
void mouseMoveEvent (QMouseEvent *event) override

Private Member Functions

QColor colorFromName (const QString &name) const
QString tooltipForPoint (const QPoint &pt) const

Private Attributes

QList< QPair< QString, int > > colors
bool isHovered = false
const double minRatioThreshold = 0.01

Constructor & Destructor Documentation

◆ ColorPie()

ColorPie::ColorPie ( const QMap< QString, int > & _colors = {},
QWidget * parent = nullptr )
explicit

Member Function Documentation

◆ colorFromName()

QColor ColorPie::colorFromName ( const QString & name) const
private
Here is the caller graph for this function:

◆ enterEvent()

void ColorPie::enterEvent ( QEnterEvent * event)
overrideprotected

◆ leaveEvent()

void ColorPie::leaveEvent ( QEvent * )
overrideprotected

◆ minimumSizeHint()

QSize ColorPie::minimumSizeHint ( ) const
override

◆ mouseMoveEvent()

void ColorPie::mouseMoveEvent ( QMouseEvent * event)
overrideprotected
Here is the call graph for this function:

◆ paintEvent()

void ColorPie::paintEvent ( QPaintEvent * )
overrideprotected
Here is the call graph for this function:

◆ setColors()

void ColorPie::setColors ( const QMap< QString, int > & _colors)

◆ tooltipForPoint()

QString ColorPie::tooltipForPoint ( const QPoint & pt) const
private
Here is the caller graph for this function:

Member Data Documentation

◆ colors

QList<QPair<QString, int> > ColorPie::colors
private

◆ isHovered

bool ColorPie::isHovered = false
private

◆ minRatioThreshold

const double ColorPie::minRatioThreshold = 0.01
private

The documentation for this class was generated from the following files:
  • cockatrice/src/interface/widgets/general/display/charts/pies/color_pie.h
  • cockatrice/src/interface/widgets/general/display/charts/pies/color_pie.cpp