SynchroTime
Signals | Public Member Functions | Public Attributes | Properties | Private Member Functions | Private Attributes | List of all members
Settings Struct Reference

The Settings class. More...

#include <serialportsettings.h>

Inheritance diagram for Settings:
Inheritance graph
Collaboration diagram for Settings:
Collaboration graph

Signals

void paramChanged (void)
 
void pathChanged (void)
 

Public Member Functions

 Settings (QObject *parent=0)
 Settings::Settings. More...
 
 ~Settings ()
 Settings::~Settings. More...
 
QString param (void) const
 Settings::param. More...
 
QString path (void) const
 
void setParam (const QString &param)
 Settings::setParam. More...
 
void setPath (const QString &path)
 Settings::setPath. More...
 
QString pathToLog (void) const
 Settings::pathToLog. More...
 
QString portName (void) const
 Settings::portName. More...
 
void setPortName (const QString &port)
 Settings::setPortName. More...
 
qint32 portBaudRate (void) const
 Settings::portBaudRate. More...
 
void setBaudRate (const qint32 baudRate)
 Settings::setBaudRate. More...
 

Public Attributes

QString name
 The name of the serial port. More...
 
qint32 baudRate
 The data baud rate for the serial port. More...
 
QString stringBaudRate
 The data baud rate for the UI. More...
 
QSerialPort::DataBits dataBits
 This property holds the data bits in a frame. More...
 
QString stringDataBits
 description of the parameter data bits in a frame. More...
 
QSerialPort::Parity parity
 This property holds the parity checking mode. More...
 
QString stringParity
 description of the parameter parity checking mode. More...
 
QSerialPort::StopBits stopBits
 This property holds the number of stop bits in a frame. More...
 
QString stringStopBits
 description of the parameter number of stop bits in a frame. More...
 
QSerialPort::FlowControl flowControl
 This property holds the desired flow control mode. More...
 
QString stringFlowControl
 description of the parameter flow control mode. More...
 
float correctionFactor
 Additional parameter: Correction factor between frequency deviation and Aging register value. More...
 
int requestRate
 Additional parameter: The interval, in milliseconds, between requests for device status. More...
 
bool statusControlEnabled
 Additional parameter: This is a flag that allows periodic requests for device status. More...
 
bool accessRateEnabled
 Additional parameter: This is a flag that allows determining access rate via the serial interface. More...
 
bool localEchoEnabled
 Additional parameter: This is a flag that allows console input. More...
 
bool isChanged = false
 This is a flag to save changes to the serial port parameters. More...
 

Properties

QString param
 
QString path
 Settings::path. More...
 

Private Member Functions

void readSettings (void)
 The function reads the parameters necessary for the user interface that were saved in the previous session. More...
 
void writeSettings (void) const
 The function saves the user interface parameters that have been changed by the user in the current session. More...
 

Private Attributes

QString m_param
 
QString m_path
 
bool m_enableLog
 
QString m_pathToLog
 
quint32 m_maxSizeLog
 
QString m_portName
 
qint32 m_baudRate
 

Detailed Description

The Settings class.

The Settings structure and new type Settings_t.

The structure contains specific fields for storing Serial Port / UART settings. This structure is necessary for storing user settings of the Serial Port / UART.

Constructor & Destructor Documentation

Settings::Settings ( QObject *  parent = 0)
explicit

Settings::Settings.

Parameters
parent

References readSettings().

Here is the call graph for this function:

Settings::~Settings ( )

Settings::~Settings.

Todo:

References writeSettings().

Here is the call graph for this function:

Member Function Documentation

QString Settings::param ( void  ) const

Settings::param.

Returns

References m_param, m_path, and path().

Referenced by setParam().

Here is the call graph for this function:

Here is the caller graph for this function:

void Settings::paramChanged ( void  )
signal
QString Settings::path ( void  ) const

Referenced by param(), and setPath().

Here is the caller graph for this function:

void Settings::pathChanged ( void  )
signal
QString Settings::pathToLog ( void  ) const

Settings::pathToLog.

Returns

References m_pathToLog.

Referenced by readSettings().

Here is the caller graph for this function:

qint32 Settings::portBaudRate ( void  ) const

Settings::portBaudRate.

Returns

References m_baudRate.

QString Settings::portName ( void  ) const

Settings::portName.

Returns

References m_portName.

Referenced by readSettings().

Here is the caller graph for this function:

void Settings::readSettings ( void  )
private

The function reads the parameters necessary for the user interface that were saved in the previous session.

Such important parameters will be read as

  • the position of the window on the screen and window size,
  • interface font and its size,
  • the user interface settings (overwrite of the data, recurse of dir's, etc.)
  • error and event logging options.

References baudRate, m_baudRate, m_enableLog, m_maxSizeLog, m_pathToLog, m_portName, pathToLog(), and portName().

Referenced by Settings().

Here is the call graph for this function:

Here is the caller graph for this function:

void Settings::setBaudRate ( const qint32  baudRate)

Settings::setBaudRate.

Parameters
baudRate

References baudRate, and m_baudRate.

void Settings::setParam ( const QString &  param)

Settings::setParam.

Parameters
param

References m_param, and param().

Here is the call graph for this function:

void Settings::setPath ( const QString &  path)

Settings::setPath.

Parameters
path

References m_path, and path().

Here is the call graph for this function:

void Settings::setPortName ( const QString &  port)

Settings::setPortName.

Parameters
port

References m_portName.

void Settings::writeSettings ( void  ) const
private

The function saves the user interface parameters that have been changed by the user in the current session.

Such parameters will be updated as

  • the position of the window on the screen and window size,
  • interface font and its size,
  • the user interface settings (overwrite of the data, recurse of dir's, etc.)
  • error and event logging options.

References m_baudRate, m_enableLog, m_maxSizeLog, m_pathToLog, and m_portName.

Referenced by ~Settings().

Here is the caller graph for this function:

Member Data Documentation

bool Settings::accessRateEnabled

Additional parameter: This is a flag that allows determining access rate via the serial interface.

Referenced by SettingsDialog::fillSettingsUi(), MainWindow::putRate(), MainWindow::readSettings(), SettingsDialog::updateSettings(), and MainWindow::writeSettings().

qint32 Settings::baudRate
float Settings::correctionFactor

Additional parameter: Correction factor between frequency deviation and Aging register value.

Referenced by SettingsDialog::fillSettingsUi(), MainWindow::readSettings(), SettingsDialog::updateSettings(), and MainWindow::writeSettings().

QSerialPort::DataBits Settings::dataBits

This property holds the data bits in a frame.

Referenced by RTC::RTC(), and SettingsDialog::updateSettings().

QSerialPort::FlowControl Settings::flowControl

This property holds the desired flow control mode.

Referenced by RTC::RTC(), and SettingsDialog::updateSettings().

bool Settings::isChanged = false

This is a flag to save changes to the serial port parameters.

Referenced by SettingsDialog::apply(), and MainWindow::writeSettings().

bool Settings::localEchoEnabled

Additional parameter: This is a flag that allows console input.

qint32 Settings::m_baudRate
private
bool Settings::m_enableLog
private

Referenced by readSettings(), and writeSettings().

quint32 Settings::m_maxSizeLog
private

Referenced by readSettings(), and writeSettings().

QString Settings::m_param
private

Referenced by param(), and setParam().

QString Settings::m_path
private

Referenced by param(), and setPath().

QString Settings::m_pathToLog
private
QString Settings::m_portName
private
QString Settings::name
QSerialPort::Parity Settings::parity

This property holds the parity checking mode.

Referenced by RTC::RTC(), and SettingsDialog::updateSettings().

int Settings::requestRate

Additional parameter: The interval, in milliseconds, between requests for device status.

Referenced by SettingsDialog::fillSettingsUi(), MainWindow::readSettings(), RTC::RTC(), SettingsDialog::updateSettings(), and MainWindow::writeSettings().

bool Settings::statusControlEnabled

Additional parameter: This is a flag that allows periodic requests for device status.

Referenced by SettingsDialog::fillSettingsUi(), MainWindow::readSettings(), RTC::RTC(), SettingsDialog::updateSettings(), and MainWindow::writeSettings().

QSerialPort::StopBits Settings::stopBits

This property holds the number of stop bits in a frame.

Referenced by RTC::RTC(), and SettingsDialog::updateSettings().

QString Settings::stringBaudRate
QString Settings::stringDataBits

description of the parameter data bits in a frame.

Referenced by SettingsDialog::fillSettingsUi(), MainWindow::readSettings(), SettingsDialog::updateSettings(), and MainWindow::writeSettings().

QString Settings::stringFlowControl
QString Settings::stringParity

description of the parameter parity checking mode.

Referenced by SettingsDialog::fillSettingsUi(), MainWindow::readSettings(), SettingsDialog::updateSettings(), and MainWindow::writeSettings().

QString Settings::stringStopBits

description of the parameter number of stop bits in a frame.

Referenced by SettingsDialog::fillSettingsUi(), MainWindow::readSettings(), SettingsDialog::updateSettings(), and MainWindow::writeSettings().

Property Documentation

QString Settings::param
readwrite
QString Settings::path
readwrite

Settings::path.

Returns

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