Q3270
A Qt-based 3270 Terminal Emulator
Loading...
Searching...
No Matches
SessionStore Class Reference

Public Member Functions

 SessionStore ()
 SessionStore constructor.
 
void load ()
 load Loads sessions from persistent storage into the store.
 
QList< SessionlistSessions () const
 listSessions Lists all sessions in the store.
 
Session getSession (const QString &name) const
 getSession Retrieves a session by name.
 
QStringList listSessionNames () const
 listSessionNames Lists all session names in the store.
 
bool saveSession (const Session &session)
 saveSession Saves a session to persistent storage.
 
void deleteSession (const QString &name)
 deleteSession Deletes a session from persistent storage.
 
QStringList listAutoStartSessions () const
 listAutoStartSessions Lists all auto-start session names.
 
bool saveAutoStartSessions (const QStringList &names)
 saveAutoStartSessions Saves the list of auto-start session names.
 

Constructor & Destructor Documentation

◆ SessionStore()

SessionStore::SessionStore ( )

SessionStore constructor.

Initializes the SessionStore with the application settings.

Member Function Documentation

◆ deleteSession()

void SessionStore::deleteSession ( const QString &  name)

deleteSession Deletes a session from persistent storage.

Parameters
nameThe name of the session to delete.

This function removes the session with the given name from QSettings and the in-memory session map.

◆ getSession()

Session SessionStore::getSession ( const QString &  name) const

getSession Retrieves a session by name.

Parameters
nameThe name of the session to retrieve.
Returns
The Session object corresponding to the given name.

This function looks up the session in the in-memory map and returns it. If the session does not exist, an empty Session object is returned.

◆ listAutoStartSessions()

QStringList SessionStore::listAutoStartSessions ( ) const

listAutoStartSessions Lists all auto-start session names.

Returns
A QStringList of auto-start session names.

This function retrieves the list of sessions configured to auto-start from persistent storage.

◆ listSessionNames()

QStringList SessionStore::listSessionNames ( ) const

listSessionNames Lists all session names in the store.

Returns
A QStringList of all session names.

This function retrieves the names of all sessions stored in persistent storage.

◆ listSessions()

QList< Session > SessionStore::listSessions ( ) const

listSessions Lists all sessions in the store.

Returns
A QList of all Session objects.

This function returns a list of all sessions currently stored in memory.

◆ load()

void SessionStore::load ( )

load Loads sessions from persistent storage into the store.

This function reads session data from QSettings and populates the in-memory session map.

◆ saveAutoStartSessions()

bool SessionStore::saveAutoStartSessions ( const QStringList &  list)

saveAutoStartSessions Saves the list of auto-start session names.

Parameters
listThe QStringList of session names to set as auto-start.
Returns
True if the list was saved successfully, false otherwise.

This function writes the provided list of session names to persistent storage as the auto-start configuration.

◆ saveSession()

bool SessionStore::saveSession ( const Session session)

saveSession Saves a session to persistent storage.

Parameters
sessionThe Session object to save.
Returns
True if the session was saved successfully, false otherwise.

This function writes the session data to QSettings and updates the in-memory session map.


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