Cockatrice 2026-01-14-Development-2.11.0-beta.46
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 const DeckListgetDeckList ()=0

Protected Slots

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

Protected Member Functions

void setText (const QString &text)
bool loadIntoDeck (DeckList &deckList) 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 const DeckList & AbstractDlgDeckTextEdit::getDeckList ( )
nodiscardpure virtual

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

Returns
The loaded decklist

Implemented in DlgEditDeckInClipboard, and DlgLoadDeckFromClipboard.

◆ keyPressEvent()

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

◆ loadIntoDeck()

bool AbstractDlgDeckTextEdit::loadIntoDeck ( DeckList & deckList) const
protected

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

Parameters
deckListThe deckList to load the deck into
Returns
Whether the loading was successful
Here is the call graph for this function:
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: