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

#include <dlg_load_deck_from_clipboard.h>

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

Public Member Functions

 AbstractDlgDeckTextEdit (QWidget *parent=nullptr)
virtual DeckLoader * getDeckList () const =0

Protected Slots

virtual void actOK ()=0
virtual void actRefresh ()=0

Protected Member Functions

void setText (const QString &text)
bool loadIntoDeck (DeckLoader *deckLoader) const
void keyPressEvent (QKeyEvent *event) override

Private Slots

void refreshShortcuts ()

Private Attributes

QPlainTextEdit * contentsEdit
QPushButton * refreshButton
QCheckBox * loadSetNameAndNumberCheckBox

Detailed Description

Base class for dialog windows for actions that involve loading decks from text input.

Constructor & Destructor Documentation

◆ AbstractDlgDeckTextEdit()

AbstractDlgDeckTextEdit::AbstractDlgDeckTextEdit ( QWidget * parent = nullptr)
explicit

Creates the main layout and connects the signals that are common to all versions of this window

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

Member Function Documentation

◆ actOK

virtual void AbstractDlgDeckTextEdit::actOK ( )
protectedpure virtualslot
Here is the caller graph for this function:

◆ actRefresh

virtual void AbstractDlgDeckTextEdit::actRefresh ( )
protectedpure virtualslot
Here is the caller graph for this function:

◆ getDeckList()

virtual DeckLoader * AbstractDlgDeckTextEdit::getDeckList ( ) const
nodiscardpure virtual

Gets the loaded deck. Only call this method after this dialog window has been successfully exec'd.

The returned DeckLoader is parented to this object; make sure to take ownership of the DeckLoader if you intend to use it, since otherwise it will get destroyed once this dlg is destroyed

Returns
The DeckLoader

Implemented in DlgEditDeckInClipboard, and DlgLoadDeckFromClipboard.

◆ keyPressEvent()

void AbstractDlgDeckTextEdit::keyPressEvent ( QKeyEvent * event)
overrideprotected
Here is the call graph for this function:

◆ loadIntoDeck()

bool AbstractDlgDeckTextEdit::loadIntoDeck ( DeckLoader * deckLoader) const
protected

Tries to load the current contents of the contentsEdit into the DeckLoader

Parameters
deckLoaderThe DeckLoader to load the deck into
Returns
Whether the loading was successful
Here is the caller graph for this function:

◆ refreshShortcuts

void AbstractDlgDeckTextEdit::refreshShortcuts ( )
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setText()

void AbstractDlgDeckTextEdit::setText ( const QString & text)
protected

Replaces the contents of the contentsEdit with the given text.

Parameters
textThe text
Here is the caller graph for this function:

Member Data Documentation

◆ contentsEdit

QPlainTextEdit* AbstractDlgDeckTextEdit::contentsEdit
private

◆ loadSetNameAndNumberCheckBox

QCheckBox* AbstractDlgDeckTextEdit::loadSetNameAndNumberCheckBox
private

◆ refreshButton

QPushButton* AbstractDlgDeckTextEdit::refreshButton
private

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