Cockatrice 2026-10-19-Development-3.1.2-beta.2
A virtual tabletop for multiplayer card games
Loading...
Searching...
No Matches
ShareBarWidget Class Referencefinal

The activated toolbar used to create a temporary deck share. More...

#include <share_bar_widget.h>

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

Signals

void createRequested ()
void cancelRequested ()

Public Member Functions

 ShareBarWidget (QWidget *parent=nullptr)
void retranslateUi ()
QString name () const
void setName (const QString &name)
 Resets the name field to the given default.
void setCountText (const QString &text)
 Sets the selected-count summary label text.
void setHintText (const QString &text, bool visible)
 Sets the explainer hint text, showing it when visible is true.
void setCreateEnabled (bool enabled)
 Enables or disables the create-share-link button (guards double submission).
void focusName ()
 Moves keyboard focus to the name field.

Private Attributes

QLabel * hintLabel
QLineEdit * nameEdit
QLabel * countLabel
QPushButton * cancelButton
QPushButton * createButton

Detailed Description

The activated toolbar used to create a temporary deck share.

A single reusable component shared by the local visual deck storage and the remote server deck storage tabs, so the share workflow renders identically in both places. It owns its own widgets, strings, and layout; the owning tab only sets the count/hint text and reacts to the create/cancel signals.

Constructor & Destructor Documentation

◆ ShareBarWidget()

ShareBarWidget::ShareBarWidget ( QWidget * parent = nullptr)
explicit
Here is the call graph for this function:
Here is the caller graph for this function:

Member Function Documentation

◆ cancelRequested

void ShareBarWidget::cancelRequested ( )
signal
Here is the caller graph for this function:

◆ createRequested

void ShareBarWidget::createRequested ( )
signal
Here is the caller graph for this function:

◆ focusName()

void ShareBarWidget::focusName ( )

Moves keyboard focus to the name field.

Here is the caller graph for this function:

◆ name()

QString ShareBarWidget::name ( ) const
nodiscard
Returns
The trimmed name entered by the user.
Here is the caller graph for this function:

◆ retranslateUi()

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

◆ setCountText()

void ShareBarWidget::setCountText ( const QString & text)

Sets the selected-count summary label text.

Here is the caller graph for this function:

◆ setCreateEnabled()

void ShareBarWidget::setCreateEnabled ( bool enabled)

Enables or disables the create-share-link button (guards double submission).

Here is the caller graph for this function:

◆ setHintText()

void ShareBarWidget::setHintText ( const QString & text,
bool visible )

Sets the explainer hint text, showing it when visible is true.

Here is the caller graph for this function:

◆ setName()

void ShareBarWidget::setName ( const QString & name)

Resets the name field to the given default.

Here is the caller graph for this function:

Member Data Documentation

◆ cancelButton

QPushButton* ShareBarWidget::cancelButton
private

◆ countLabel

QLabel* ShareBarWidget::countLabel
private

◆ createButton

QPushButton* ShareBarWidget::createButton
private

◆ hintLabel

QLabel* ShareBarWidget::hintLabel
private

◆ nameEdit

QLineEdit* ShareBarWidget::nameEdit
private

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