Q3270
A Qt-based 3270 Terminal Emulator
Loading...
Searching...
No Matches
SessionDialogBase Class Reference
Inheritance diagram for SessionDialogBase:
ManageSessionsDialog OpenSessionDialog SaveSessionDialog

Signals

void deleteRequested (const QString &name)
 

Public Member Functions

 SessionDialogBase (SessionStore &store, QWidget *parent=nullptr)
 SessionDialogBase constructor.
 
virtual ~SessionDialogBase ()
 SessionDialogBase destructor.
 

Protected Slots

void doDelete (const QString &name)
 SessionDialogBase::doDelete Deletes the specified session.
 

Protected Member Functions

void setupTable ()
 setupTable Sets up the session table widget.
 
void populateSessionTable ()
 populateSessionTable Populates the session table with sessions from the store.
 
void connectSignals ()
 connectSignals Connects UI signals to their respective slots.
 
void onRowClicked (int row)
 SessionDialogBase::onRowClicked Slot called when a row in the session table is clicked.
 
void enableOKButton (bool enabled)
 enableOKButton Enables or disables the OK button.
 
void setOKButtonText (const QString &text)
 setOKButtonText Sets the text of the OK button.
 
void requestDeleteSelected ()
 SessionDialogBase::requestDeleteSelected Slot called when the delete button is clicked.
 
virtual void onAccept ()
 onAccept Slot called when the OK button is clicked.
 

Protected Attributes

Ui::SessionDialog * ui
 
QList< Sessionsessions
 
SessionStorestore
 

Constructor & Destructor Documentation

◆ SessionDialogBase()

SessionDialogBase::SessionDialogBase ( SessionStore store,
QWidget *  parent = nullptr 
)
explicit

SessionDialogBase constructor.

Parameters
storeReference to the SessionStore.
parentParent widget.

This is the base class for session dialogs.

◆ ~SessionDialogBase()

SessionDialogBase::~SessionDialogBase ( )
virtual

SessionDialogBase destructor.

Cleans up the UI.

Note
Probably not needed since ui is a pointer to a QObject-derived class, which will be automatically deleted when the parent QDialog is deleted.

Member Function Documentation

◆ connectSignals()

void SessionDialogBase::connectSignals ( )
protected

connectSignals Connects UI signals to their respective slots.

This function connects the dialog's button box signals (accepted and rejected) to the appropriate slots, as well as the delete button and session table cell click events.

◆ doDelete

void SessionDialogBase::doDelete ( const QString &  name)
protectedslot

SessionDialogBase::doDelete Deletes the specified session.

Parameters
nameThe name of the session to delete.

This function deletes the session with the given name from the SessionStore and repopulates the session table.

◆ enableOKButton()

void SessionDialogBase::enableOKButton ( bool  enabled)
protected

enableOKButton Enables or disables the OK button.

Parameters
enabledTrue to enable, false to disable.

This function enables or disables the OK button in the dialog's button box.

◆ onAccept()

void SessionDialogBase::onAccept ( )
protectedvirtual

onAccept Slot called when the OK button is clicked.

This function is called when the OK button is clicked. Subclasses can override this method to implement custom behavior.

◆ onRowClicked()

void SessionDialogBase::onRowClicked ( int  row)
protected

SessionDialogBase::onRowClicked Slot called when a row in the session table is clicked.

Parameters
rowThe index of the clicked row.

This function updates the session name and description fields based on the selected row in the session table. It also enables the OK button and updates the session preview widget.

◆ populateSessionTable()

void SessionDialogBase::populateSessionTable ( )
protected

populateSessionTable Populates the session table with sessions from the store.

This function retrieves the list of sessions from the SessionStore and populates the session table with their names and descriptions.

◆ requestDeleteSelected()

void SessionDialogBase::requestDeleteSelected ( )
protected

SessionDialogBase::requestDeleteSelected Slot called when the delete button is clicked.

This function prompts the user to confirm deletion of the selected session. If confirmed, it emits a deleteRequested signal with the session name.

◆ setOKButtonText()

void SessionDialogBase::setOKButtonText ( const QString &  text)
protected

setOKButtonText Sets the text of the OK button.

Parameters
textThe text to set on the OK button.

This function sets the text of the OK button in the dialog's button box.

◆ setupTable()

void SessionDialogBase::setupTable ( )
protected

setupTable Sets up the session table widget.

Configures the session table with two columns: "Session Name" and "Description". It also sets the selection behavior to select entire rows and disables editing.


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