|
|
void | deleteRequested (const QString &name) |
| |
◆ SessionDialogBase()
| SessionDialogBase::SessionDialogBase |
( |
SessionStore & |
store, |
|
|
QWidget * |
parent = nullptr |
|
) |
| |
|
explicit |
SessionDialogBase constructor.
- Parameters
-
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.
◆ 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
-
| name | The 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
-
| enabled | True 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
-
| row | The 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
-
| text | The 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:
- /home/runner/work/Q3270/Q3270/src/Sessions/SessionDialogBase.h
- /home/runner/work/Q3270/Q3270/src/Sessions/SessionDialogBase.cpp