VR-Engage  2.2
Loading...
Searching...
No Matches
makVre::DtVreSelectConnectionPageDriver Class Referenceabstract

Detailed Description

DtVreSelectConnectionPageDriver serves as the abstract base class for specific connection protocol drivers (such as DIS or HLA) in the VR-Engage connection system. It provides common properties like driver name, type, auto-connect state, and active connection state that are shared across all driver implementations. This class exposes these properties to QML for the connection selection UI, and handles updates to the backend connection system when the properties change.

#include <vreSelectConnectionPageDriver.h>

Inheritance diagram for makVre::DtVreSelectConnectionPageDriver:
[legend]

Public Slots

virtual void setDriverName (const QString &name)
 
virtual void setDriverType (const QString &type)
 
virtual void setAutoConnect (const bool autoConnect)
 
virtual void setActiveConnection (const bool activeConnection)
 

Signals

void driverNameChanged (QString name)
 
void driverTypeChanged (QString type)
 
void autoConnectChanged (bool autoConnect)
 
void activeConnectionChanged (bool activeConnection)
 

Public Member Functions

 DtVreSelectConnectionPageDriver (QObject *parent=nullptr)
 
virtual ~DtVreSelectConnectionPageDriver () override
 
QString getDriverName () const
 
QString getDriverType () const
 
bool isAutoConnect () const
 
bool isActiveConnection () const
 
virtual void setData (makVre::DtVreMessage *msg)=0
 
virtual Q_INVOKABLE void save ()
 

Protected Attributes

QString myDriverName
 
QString myDriverType
 
bool myAutoConnect
 
bool myActiveConnection
 

Properties

QString driverName
 
QString driverType
 
bool autoConnect
 
bool activeConnection
 

Constructor & Destructor Documentation

◆ DtVreSelectConnectionPageDriver()

makVre::DtVreSelectConnectionPageDriver::DtVreSelectConnectionPageDriver ( QObject * parent = nullptr)
explicit

Constructor.

Parameters
parentOptional parent QObject for memory management

Creates a new connection driver with default property values. Sets initial state with empty names and false flags.

◆ ~DtVreSelectConnectionPageDriver()

virtual makVre::DtVreSelectConnectionPageDriver::~DtVreSelectConnectionPageDriver ( )
overridevirtual

Destructor.

Cleans up resources used by the connection driver.

Member Function Documentation

◆ getDriverName()

QString makVre::DtVreSelectConnectionPageDriver::getDriverName ( ) const

Gets the name of the driver.

Returns
Name of the driver as a QString

Returns the display name of this connection driver.

◆ getDriverType()

QString makVre::DtVreSelectConnectionPageDriver::getDriverType ( ) const

Gets the type of the driver.

Returns
Type of the driver as a QString

Returns the type identifier of this connection driver (e.g., "DIS" or "HLA").

◆ isAutoConnect()

bool makVre::DtVreSelectConnectionPageDriver::isAutoConnect ( ) const

Checks if the driver should auto-connect.

Returns
True if the driver should auto-connect, false otherwise

Determines whether this driver should automatically connect when the application starts up.

◆ isActiveConnection()

bool makVre::DtVreSelectConnectionPageDriver::isActiveConnection ( ) const

Checks if the driver is the active connection.

Returns
True if the driver is the active connection, false otherwise

Determines whether this driver is currently the active connection for the application.

◆ setData()

virtual void makVre::DtVreSelectConnectionPageDriver::setData ( makVre::DtVreMessage * msg)
pure virtual

Sets driver data from a message.

Parameters
msgPointer to the message containing driver data

Pure virtual method that must be implemented by derived classes to parse and apply data from a message. This allows different driver types to handle their specific configuration data differently.

Implemented in makVre::DtVreSelectConnectionPageDriverDIS, and makVre::DtVreSelectConnectionPageDriverHLA.

◆ save()

virtual Q_INVOKABLE void makVre::DtVreSelectConnectionPageDriver::save ( )
inlinevirtual

Saves the current driver configuration.

QML-invokable method that saves the current driver configuration. Each driver type can implement this differently to handle its specific configuration data. The base implementation does nothing and is intended to be overridden by derived classes.

Reimplemented in makVre::DtVreSelectConnectionPageDriverDIS, and makVre::DtVreSelectConnectionPageDriverHLA.

◆ setDriverName

virtual void makVre::DtVreSelectConnectionPageDriver::setDriverName ( const QString & name)
virtualslot

Sets the name of the driver.

Parameters
nameNew name for the driver

Updates the driver name and emits the driverNameChanged signal.

◆ setDriverType

virtual void makVre::DtVreSelectConnectionPageDriver::setDriverType ( const QString & type)
virtualslot

Sets the type of the driver.

Parameters
typeNew type for the driver

Updates the driver type and emits the driverTypeChanged signal.

◆ setAutoConnect

virtual void makVre::DtVreSelectConnectionPageDriver::setAutoConnect ( const bool autoConnect)
virtualslot

Sets the auto-connect state of the driver.

Parameters
autoConnectNew auto-connect state

Updates the auto-connect state, emits the autoConnectChanged signal, calls save(), and sends an update message to the network thread to persist the change. If the value hasn't changed, this is a no-op.

References autoConnect.

◆ setActiveConnection

virtual void makVre::DtVreSelectConnectionPageDriver::setActiveConnection ( const bool activeConnection)
virtualslot

Sets the active connection state of the driver.

Parameters
activeConnectionNew active connection state

Updates the active connection state, emits the activeConnectionChanged signal, calls save(), and sends an update message to the network thread to make this driver the active connection. If the value hasn't changed, this is a no-op.

References activeConnection.

◆ driverNameChanged

void makVre::DtVreSelectConnectionPageDriver::driverNameChanged ( QString name)
signal

Signal emitted when the driver name changes.

Parameters
nameNew driver name

Notifies the QML interface that the driver name has changed.

◆ driverTypeChanged

void makVre::DtVreSelectConnectionPageDriver::driverTypeChanged ( QString type)
signal

Signal emitted when the driver type changes.

Parameters
typeNew driver type

Notifies the QML interface that the driver type has changed.

◆ autoConnectChanged

void makVre::DtVreSelectConnectionPageDriver::autoConnectChanged ( bool autoConnect)
signal

Signal emitted when the auto-connect state changes.

Parameters
autoConnectNew auto-connect state

Notifies the QML interface that the auto-connect state has changed.

References autoConnect.

◆ activeConnectionChanged

void makVre::DtVreSelectConnectionPageDriver::activeConnectionChanged ( bool activeConnection)
signal

Signal emitted when the active connection state changes.

Parameters
activeConnectionNew active connection state

Notifies the QML interface that the active connection state has changed.

References activeConnection.

Member Data Documentation

◆ myDriverName

QString makVre::DtVreSelectConnectionPageDriver::myDriverName
protected

Name of the connection driver.

Stores the display name of this connection driver for UI presentation.

◆ myDriverType

QString makVre::DtVreSelectConnectionPageDriver::myDriverType
protected

Type of the connection driver.

Stores the type of this connection driver (e.g., "DIS" or "HLA").

◆ myAutoConnect

bool makVre::DtVreSelectConnectionPageDriver::myAutoConnect
protected

Auto-connect state flag.

When true, indicates that this driver should automatically connect when the application starts up.

◆ myActiveConnection

bool makVre::DtVreSelectConnectionPageDriver::myActiveConnection
protected

Active connection state flag.

When true, indicates that this driver is currently the active connection for the application.

Property Documentation

◆ driverName

QString makVre::DtVreSelectConnectionPageDriver::driverName
readwrite

Name of the connection driver.

QML property for the display name of this connection driver. This is typically used in the UI to identify the driver to the user.

◆ driverType

QString makVre::DtVreSelectConnectionPageDriver::driverType
readwrite

Type of the connection driver.

QML property for the type of this connection driver (e.g., "DIS" or "HLA"). This identifies the protocol used by this driver.

◆ autoConnect

bool makVre::DtVreSelectConnectionPageDriver::autoConnect
readwrite

Auto-connect state of the driver.

QML property indicating whether this driver should automatically connect on application startup.

Referenced by autoConnectChanged(), and setAutoConnect().

◆ activeConnection

bool makVre::DtVreSelectConnectionPageDriver::activeConnection
readwrite

Active connection state.

QML property indicating whether this driver is currently the active connection for the application.

Referenced by activeConnectionChanged(), and setActiveConnection().


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