Index: sources/gui/guiview.cpp =================================================================== diff -u -re1605219ac2baf49ef21d0889f845ac53d59c3c1 -r56d00a82669a7a2c00ab90109a89dbec8db27527 --- sources/gui/guiview.cpp (.../guiview.cpp) (revision e1605219ac2baf49ef21d0889f845ac53d59c3c1) +++ sources/gui/guiview.cpp (.../guiview.cpp) (revision 56d00a82669a7a2c00ab90109a89dbec8db27527) @@ -30,6 +30,11 @@ initConnections(); } +/*! + * \brief GuiView::initConnections + * \details Initializes the required signal/slot connection between this class and other objects + * to be able to communicate. + */ void GuiView::initConnections() { connect(&_GuiController, SIGNAL(didActionReceive (GuiActionType, const QVariantList &)), @@ -55,45 +60,96 @@ &_GuiController, SLOT( doExportLog())); } +/*! + * \brief GuiView::onActionReceive + * \details emits didActionReceive signal to notify other classes (Gui) + * , an action has been received. + * \param vAction - the action + * \param vData - the action data + */ void GuiView::onActionReceive (GuiActionType vAction, const QVariantList &vData) { // process the evaluation and notify GUI // process ... emit didActionReceive (vAction, vData); } -void GuiView::doUSBDriveMount () -{ - emit didUSBDriveMount (); -} - -void GuiView::doUSBDriveRemove() -{ - emit didUSBDriveRemove(); -} - +/*! + * \brief GuiView::doActionTransmit + * \details emits didActionTransmit signal to notify other classes (GuiController) + * , an action has been required to be transmitted. + * \param vAction - the action + * \param vData - the action data + */ void GuiView::doActionTransmit(GuiActionType vAction, const QVariantList &vData) { emit didActionTransmit(vAction, vData); } +/*! + * \brief GuiView::doActionTransmit + * \details emits didActionTransmit signal to notify other classes (GuiController) + * , an action has been required to be transmitted. + * \note The overloaded method with only one data parameter, for easier use in qml. + * \param vAction - the action + * \param vData - the action data + */ + void GuiView::doActionTransmit(GuiActionType vAction, const QVariant &vData) { QVariantList mData; mData += vData; emit didActionTransmit(vAction, mData); } +/*! + * \brief GuiView::doUSBDriveMount + * \details emits didUSBDriveMount signal to notify other classes (GuiController) + * , the USB drive has been mounted. + */ +void GuiView::doUSBDriveMount () +{ + emit didUSBDriveMount (); +} + +/*! + * \brief GuiView::doUSBDriveUmount + * \details emits didUSBDriveRemove signal to notify other classes (GuiController) + * , the USB drive has been removed. + */ void GuiView::doUSBDriveUmount() { emit didUSBDriveUmount(); } +/*! + * \brief GuiView::doUSBDriveRemove + * \details emits didUSBDriveRemove signal to notify other classes (GuiController) + * , the USB drive has been removed. + */ +void GuiView::doUSBDriveRemove() +{ + emit didUSBDriveRemove(); +} + +/*! + * \brief GuiView::doExportLog + * \details emits didExportLog signal to notify other classes (GuiController) + * , the User requested to export the log. + */ void GuiView::doExportLog() { emit didExportLog(); } +/*! + * \brief GuiView::alarmPriorityName + * \details this code is the place holder for the alarms description mapping + * since it is another feature + * it returns the enum name for now + * \param vEnum - The Alarm priority + * \return String representation of the Alarm priority Enum name + */ QString GuiView::alarmPriorityName(GuiAlarmPriority vEnum) { // this code is the place holder for the alarms description mapping @@ -103,6 +159,15 @@ int enumIdx = mo->indexOfEnumerator(qt_getEnumName(vEnum)); return mo->enumerator(enumIdx).valueToKey(vEnum); } + +/*! + * \brief GuiView::alarmIDName + * \details this code is the place holder for the alarms description mapping + * since it is another feature + * it returns the enum name for now + * \param vEnum - The Alarm ID + * \return String representation of the Alarm Id Enum name + */ QString GuiView::alarmIDName(GuiAlarmID vEnum) { // this code is the place holder for the alarms description mapping