Qt Virtual Chart Table (QVCT)
CDevice Class Referenceabstract

Generic navigation device (GPS, speedometer, compass, etc.) More...

#include <devices/CDevice.hpp>

Inheritance diagram for CDevice:
COverlayItem COverlayObject CDeviceGpsdAis CDeviceGpsdGps CDeviceSample CDeviceTcpSbs1

Public Types

enum  ECapability { FIX = 1, SKYVIEW = 2 }
 Device capabilities. More...
 
enum  EOperatingMode { UNDEFINED, STOP, PAUSE, START }
 Device operating mode (stop, start, pause) More...
 
- Public Types inherited from COverlayObject
enum  EType {
  OVERLAY = 1001, CONTAINER = 1010, SUBCONTAINER = 1011, ITEM = 1100,
  SUBITEM1 = 1101, SUBITEM2 = 1102
}
 Overlay object type. More...
 

Signals

void signalOperatingMode (CDevice::EOperatingMode _eOperatingMode)
 Signal emitted by the device when its operating mode changed. More...
 
void signalActivity ()
 Signal emitted by the device when activity occures. More...
 
void signalDataFix (const CDeviceDataFix &_roDeviceDataFix)
 Signal emitted by the device when an updated fix is available. More...
 
void signalDataSkyView (const CDeviceDataSkyView &_roDeviceDataSkyView)
 Signal emitted by the device when an updated sky view is available. More...
 
void signalError (const QString &_rqsErrorMessage)
 Signal emitted by the device when an error occured. More...
 

Public Member Functions

virtual ~CDevice ()
 
virtual COverlayuseOverlay ()
 Returns this object's (base) overlay. More...
 
virtual QVCT::EStatus setOperatingMode (EOperatingMode _eOperatingMode)=0
 Sets the device's operating mode. More...
 
virtual CDeviceDriver::EDriver getDriver () const =0
 Returns the device's driver ID. More...
 
virtual int getCapabilities () const =0
 Returns the device's capabilities. More...
 
virtual EOperatingMode getOperatingMode ()
 Returns the device's operating mode. More...
 
virtual void showDetail ()=0
 Displays the device's details (in the appropriate widget/view) More...
 
virtual void showEdit ()=0
 Displays the device's edit (configuration) widget/view. More...
 
virtual void parseQVCT (const QDomElement &_rqDomElement)=0
 Retrieves the device's configuration from the given QVCT source (file) More...
 
virtual void dumpQVCT (QXmlStreamWriter &_rqXmlStreamWriter) const =0
 Stores the device's configuration to the given QVCT destination (file) More...
 
- Public Member Functions inherited from COverlayItem
void setMultiSelected (bool _bMultiSelected)
 Sets this item's selection status. More...
 
bool isMultiSelected () const
 Returns this item's selection status. More...
 
- Public Member Functions inherited from COverlayObject
void setName (const QString &_rqsName)
 Sets this object's name. More...
 
QString getName () const
 Returns this object's name. More...
 
QString newChildName (const QString &_rqsName, int _iZeroPrefix=0, bool _bForceSuffix=false) const
 Returns a valid (non-duplicate) name for a new sibling of this object. More...
 
QString newChildName (const QString &_rqsName, int _iZeroPrefix, int _iSuffix) const
 Returns a suffixed (potentially duplicate) name for a new sibling of this object. More...
 

Protected Member Functions

 CDevice (const QString &_rqsName)
 
- Protected Member Functions inherited from COverlayItem
 COverlayItem (COverlayObject::EType _eType, const QString &_rqsName)
 
virtual ~COverlayItem ()
 
- Protected Member Functions inherited from COverlayObject
 COverlayObject (EType _eType, const QString &_rqsName)
 
virtual ~COverlayObject ()
 

Private Slots

void slotOperatingMode (CDevice::EOperatingMode _eOperatingMode)
 [Slot] Slot to handle operating mode changes More...
 

Private Member Functions

virtual void serialize (QDataStream &_rqDataStream) const
 Serializes (store) this object's data to binary format. More...
 
virtual void unserialize (QDataStream &_rqDataStream)
 Unserializes (restore) this object's data from binary format. More...
 
virtual void draw (const CChart *_poChart, QPainter *_pqPainter)
 Draws this object (itself or its content) More...
 

Private Attributes

EOperatingMode eOperatingMode
 Device's operating mode. More...
 

Additional Inherited Members

- Protected Attributes inherited from COverlayItem
bool bMultiSelected
 Item's selection status. More...
 
- Protected Attributes inherited from COverlayObject
QString qsName
 Object name. More...
 

Detailed Description

Generic navigation device (GPS, speedometer, compass, etc.)

This class defines the generic representation of a navigation device, able to emit full or partial geographical position or course data, along other useful information.

Author
Cedric Dufour http://cedric.dufour.name

Definition at line 42 of file CDevice.hpp.

Member Enumeration Documentation

◆ ECapability

Device capabilities.

Enumerator
FIX 

Device emits 'newDataFix' signal.

SKYVIEW 

Device emits 'newDataSkyView' signal.

Definition at line 53 of file CDevice.hpp.

◆ EOperatingMode

Device operating mode (stop, start, pause)

Enumerator
UNDEFINED 
STOP 
PAUSE 
START 

Definition at line 58 of file CDevice.hpp.

Constructor & Destructor Documentation

◆ CDevice()

CDevice::CDevice ( const QString &  _rqsName)
protected

Definition at line 32 of file CDevice.cpp.

◆ ~CDevice()

virtual CDevice::~CDevice ( )
inlinevirtual

Definition at line 79 of file CDevice.hpp.

Member Function Documentation

◆ serialize()

virtual void CDevice::serialize ( QDataStream &  _rqDataStream) const
inlineprivatevirtual

Serializes (store) this object's data to binary format.

Reimplemented from COverlayObject.

Definition at line 87 of file CDevice.hpp.

◆ unserialize()

virtual void CDevice::unserialize ( QDataStream &  _rqDataStream)
inlineprivatevirtual

Unserializes (restore) this object's data from binary format.

Reimplemented from COverlayObject.

Definition at line 88 of file CDevice.hpp.

◆ useOverlay()

virtual COverlay* CDevice::useOverlay ( )
inlinevirtual

Returns this object's (base) overlay.

Implements COverlayObject.

Definition at line 91 of file CDevice.hpp.

◆ draw()

virtual void CDevice::draw ( const CChart _poChart,
QPainter *  _pqPainter 
)
inlineprivatevirtual

Draws this object (itself or its content)

Implements COverlayObject.

Definition at line 94 of file CDevice.hpp.

◆ slotOperatingMode

void CDevice::slotOperatingMode ( CDevice::EOperatingMode  _eOperatingMode)
inlineprivateslot

[Slot] Slot to handle operating mode changes

Definition at line 104 of file CDevice.hpp.

◆ signalOperatingMode

void CDevice::signalOperatingMode ( CDevice::EOperatingMode  _eOperatingMode)
signal

Signal emitted by the device when its operating mode changed.

◆ signalActivity

void CDevice::signalActivity ( )
signal

Signal emitted by the device when activity occures.

◆ signalDataFix

void CDevice::signalDataFix ( const CDeviceDataFix _roDeviceDataFix)
signal

Signal emitted by the device when an updated fix is available.

◆ signalDataSkyView

void CDevice::signalDataSkyView ( const CDeviceDataSkyView _roDeviceDataSkyView)
signal

Signal emitted by the device when an updated sky view is available.

◆ signalError

void CDevice::signalError ( const QString &  _rqsErrorMessage)
signal

Signal emitted by the device when an error occured.

◆ setOperatingMode()

virtual QVCT::EStatus CDevice::setOperatingMode ( EOperatingMode  _eOperatingMode)
pure virtual

Sets the device's operating mode.

Implemented in CDeviceTcpSbs1, CDeviceGpsdGps, CDeviceGpsdAis, and CDeviceSample.

◆ getDriver()

virtual CDeviceDriver::EDriver CDevice::getDriver ( ) const
pure virtual

Returns the device's driver ID.

Implemented in CDeviceTcpSbs1, CDeviceGpsdGps, CDeviceGpsdAis, and CDeviceSample.

◆ getCapabilities()

virtual int CDevice::getCapabilities ( ) const
pure virtual

Returns the device's capabilities.

See also
ECapability

Implemented in CDeviceTcpSbs1, CDeviceGpsdGps, CDeviceGpsdAis, and CDeviceSample.

◆ getOperatingMode()

virtual EOperatingMode CDevice::getOperatingMode ( )
inlinevirtual

Returns the device's operating mode.

Definition at line 132 of file CDevice.hpp.

◆ showDetail()

virtual void CDevice::showDetail ( )
pure virtual

Displays the device's details (in the appropriate widget/view)

Implements COverlayObject.

Implemented in CDeviceTcpSbs1, CDeviceGpsdGps, CDeviceGpsdAis, and CDeviceSample.

◆ showEdit()

virtual void CDevice::showEdit ( )
pure virtual

Displays the device's edit (configuration) widget/view.

Implements COverlayObject.

Implemented in CDeviceTcpSbs1, CDeviceGpsdGps, CDeviceGpsdAis, and CDeviceSample.

◆ parseQVCT()

virtual void CDevice::parseQVCT ( const QDomElement &  _rqDomElement)
pure virtual

Retrieves the device's configuration from the given QVCT source (file)

Implemented in CDeviceTcpSbs1, CDeviceGpsdGps, CDeviceGpsdAis, and CDeviceSample.

◆ dumpQVCT()

virtual void CDevice::dumpQVCT ( QXmlStreamWriter &  _rqXmlStreamWriter) const
pure virtual

Stores the device's configuration to the given QVCT destination (file)

Implemented in CDeviceTcpSbs1, CDeviceGpsdGps, CDeviceGpsdAis, and CDeviceSample.

Member Data Documentation

◆ eOperatingMode

EOperatingMode CDevice::eOperatingMode
private

Device's operating mode.

See also
setOperatingMode(), getOperatingMode()

Definition at line 68 of file CDevice.hpp.


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