Start Documenting Classes

This commit is contained in:
Justin Hammond 2019-06-29 08:58:58 +08:00
parent cb52e92dd8
commit 4093f321c7
38 changed files with 3701 additions and 94 deletions

2537
docs/qt-openzwave.doxygen Normal file

File diff suppressed because it is too large Load diff

View file

@ -1,3 +1,29 @@
//-----------------------------------------------------------------------------
//
// qtopenzwave.h
//
// Main Class For QT-OpenZWave
//
// Copyright (c) 2019 Justin Hammond <Justin@dynam.ac>
//
// SOFTWARE NOTICE AND LICENSE
//
// This file is part of QT-OpenZWave.
//
// OpenZWave is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published
// by the Free Software Foundation, either version 3 of the License,
// or (at your option) any later version.
//
// OpenZWave is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with OpenZWave. If not, see <http://www.gnu.org/licenses/>.
//
//-----------------------------------------------------------------------------
#ifndef QTOPENZWAVE_H
#define QTOPENZWAVE_H
@ -6,15 +32,75 @@
#include "qt-openzwave_global.h"
#include "qtozwmanager.h"
/**
* \mainpage QT-OpenZWave
* \section Introduction Introduction to QT-OpenZWave
* QT-OpenZWave is an open-source, cross-platform QT Wrapper around the OpenZWave
* Library designed to allow developers to write QT Based Applications that can
* interface with a Z-Wave Network.
* Its Design Closely mimics the main OpenZWave Library in structure, while adopting
* several QT Technologies such as Signals/Slots and Models to allow
* quick development of QT based applications.
* In Addition, it makes use of the QTRemoteObjects module that can expose QT
* Classes to remote hosts. This allows a QT Application
* to connect to a host and interact with the Z-Wave Network remotely.
* <p>
* We recomend anyone wishing to develop a application using this library has a good
* grasp of the Z-Wave Specificaitons and Technology and in particular has a good
* understanding of Nodes, MultiChannel Devices, Association Groups and CommandClasses
* We also recomend you consult the OpenZWave Library API (and associated documentation)
* as many of the public methods this library exposes are simple wrappers around the OZW
* Library
* <p>
* Included in the library are two sample applications -
* SimpleClient is, as the name implies a simple QT GUI Application to expose Nodes,
* Values, and Association Groups. It also demostrates how to use the QTRemoteObjects
* feature that allows QT-OpenZWave to connect to remote hosts that have a Z-Wave Dongle or
* interface.
* qt-ozwdaemon is console only application that allows remote clients (such as the simpleclient
* or ozw-admin application) to connect remotely.
* <p>
* @image html zwalliance_250x100.jpg
* <center>OpenZWave is a affiliate member of the Z-Wave Alliance (http://zwavealliance.org/)</center>
*/
/** \brief
* Initilizes and Sets up QT-OpenZWave for use.
*
* \nosubgrouping
* The QTOpenZWave class provides the necessary initilization steps to
* setup QT-OpenZWave Ready for use. You should create a instance of this
* class early in your application.
*
* The Class ensures that the enviroment is ready to start a Copy of OpenZWave
* Your Application will then call GetManager() to get a copy of the QTOZW_Manager
* class which is the main interface to QT-OpenZWave
*/
class QTOPENZWAVESHARED_EXPORT QTOpenZwave : public QObject
{
Q_OBJECT
public:
/** \brief Main Constructor
* \param parent The Parent Class of this instance
* \param DBPath if this will be running a local instance (the machine has the attached ZWave Dongle)
* of OZW, then the OpenZWave Device Database (config directory in the OpenZWave Source) must be present.
* this is the path to that directory
* \param UserPath Path where OpenZWave will store/retrive user Specific configuration, such as Options.xml
* or store the network related files
*/
QTOpenZwave(QObject *parent = nullptr, QDir DBPath = QDir("./config/"), QDir UserPath = QDir("./config/"));
QTOZWManager *GetManager();
private Q_SLOT:
void newWSConnection();
/** \brief Obtain a copy of the QTOZW_Manager Instance
*
* The QTOZW_Manager class is the main interface for your application. You must only obtain
* the QTOZW_Manager instance via this call, and never create yourself, to ensure that the enviroment
* is setup and ready for OpenZWave to start.
* \returns QTOZWManager a copy of the instance you can use to interact with QT-OpenZWave
*/
QTOZWManager *GetManager();
private:
QTOZWManager *m_manager;

View file

@ -1,3 +1,30 @@
//-----------------------------------------------------------------------------
//
// qtozw_pods.h
//
// Structure Definitions for QT-OpenZWave Wrapper
//
// Copyright (c) 2019 Justin Hammond <Justin@dynam.ac>
//
// SOFTWARE NOTICE AND LICENSE
//
// This file is part of QT-OpenZWave.
//
// OpenZWave is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published
// by the Free Software Foundation, either version 3 of the License,
// or (at your option) any later version.
//
// OpenZWave is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with OpenZWave. If not, see <http://www.gnu.org/licenses/>.
//
//-----------------------------------------------------------------------------
#ifndef QTOZW_PODS_H
#define QTOZW_PODS_H
#include <QObject>
@ -5,42 +32,46 @@
#include <QDataStream>
#include <QDebug>
/** \brief Statistics Relating to Communications with Nodes on your Network
*/
struct NodeStatistics {
quint32 sentCount;
quint32 sentFailed;
quint32 retries;
quint32 recievedPackets;
quint32 recievedDupPackets;
quint32 recievedUnsolicited;
QString lastSentTimeStamp;
QString lastReceivedTimeStamp;
quint32 lastRequestRTT;
quint32 averageRequestRTT;
quint32 lastResponseRTT;
quint32 averageResponseRTT;
quint8 quality;
bool extendedTXSupported;
quint16 txTime;
quint8 hops;
QString rssi_1;
QString rssi_2;
QString rssi_3;
QString rssi_4;
QString rssi_5;
quint8 route_1;
quint8 route_2;
quint8 route_3;
quint8 route_4;
quint8 ackChannel;
quint8 lastTXChannel;
QString routeScheme;
QString routeUsed;
QString routeSpeed;
quint8 routeTries;
quint8 lastFailedLinkFrom;
quint8 lastFailedLinkTo;
quint32 sentCount; /**< Number of Packets Sent to the Node */
quint32 sentFailed; /**< Number of Packets that Failed to be acknowledged by the Node or Controller */
quint32 retries; /**< Number of times we have had to Retry sending packets to the Node */
quint32 receivedPackets; /**< Number of received Packets from the Node */
quint32 receivedDupPackets; /**< Number of Duplicate Packets received from the Node */
quint32 receivedUnsolicited; /**< Number of Unsolicited Packets received from the Node */
QString lastSentTimeStamp; /**< TimeStamp of the Last time we sent a packet to the Node */
QString lastReceivedTimeStamp; /**< Timestamp of the last time we received a packet from the Node */
quint32 lastRequestRTT; /**< Last Round-Trip Time when we made a request to the Node */
quint32 averageRequestRTT; /**< Average Round-Trip Time when we make requests to a Node */
quint32 lastResponseRTT; /**< Last Round-Trip Time when we got a Response from a Node */
quint32 averageResponseRTT; /**< Average Round-Trip Time when got a Response from a Node */
quint8 quality; /**< The Quality of the Signal from the Node, as Reported by the Controller */
bool extendedTXSupported; /**< If these statistics support Extended TX Reporting (Controller Dependent) */
quint16 txTime; /**< The Time it took to Transmit the last packet to the Node */
quint8 hops; /**< The Number of hops the packet traversed to reach the node */
QString rssi_1; /**< The RSSI Strength of the first hop */
QString rssi_2; /**< The RSSI Strength of the second hop */
QString rssi_3; /**< The RSSI Strength of the third hop */
QString rssi_4; /**< The RSSI Strength of the fourth hop */
QString rssi_5; /**< The RSSI Strength of the final hop */
quint8 route_1; /**< The NodeId of the First Hop */
quint8 route_2; /**< The NodeId of the Second Hop */
quint8 route_3; /**< The NodeId of the third Hop */
quint8 route_4; /**< The NodeId of the Fourth Hop */
quint8 ackChannel; /**< The Channel that recieved the ACK From the Node */
quint8 lastTXChannel; /**< The last Channel we used to communicate with the Node */
QString routeScheme; /**< How the Route was calculated when we last communicated with the Node */
QString routeUsed; /**< The Route last used to communicate with the Node */
QString routeSpeed; /**< The Speed that was used when we last communicated with the node */
quint8 routeTries; /**< The Number of attempts the Controller made to route the packet to the Node */
quint8 lastFailedLinkFrom; /**< The Last Failed Link From */
quint8 lastFailedLinkTo; /**< The Last Failed Link To */
};
/** \cond DO_NOT_DOCUMENT
*/
Q_DECLARE_METATYPE(NodeStatistics)
inline QDataStream &operator<<(QDataStream &ds, const NodeStatistics &obj) {
@ -59,11 +90,11 @@ inline QDataStream &operator<<(QDataStream &ds, const NodeStatistics &obj) {
ds << static_cast<quint32>(obj.sentFailed);
ds << static_cast<quint32>(obj.lastRequestRTT);
ds << static_cast<quint32>(obj.lastResponseRTT);
ds << static_cast<quint32>(obj.recievedPackets);
ds << static_cast<quint32>(obj.receivedPackets);
ds << static_cast<quint32>(obj.averageRequestRTT);
ds << static_cast<quint32>(obj.averageResponseRTT);
ds << static_cast<quint32>(obj.recievedDupPackets);
ds << static_cast<quint32>(obj.recievedUnsolicited);
ds << static_cast<quint32>(obj.receivedDupPackets);
ds << static_cast<quint32>(obj.receivedUnsolicited);
ds << obj.extendedTXSupported;
@ -109,11 +140,11 @@ inline QDataStream &operator>>(QDataStream &ds, NodeStatistics &obj) {
ds >> obj.sentFailed;
ds >> obj.lastRequestRTT;
ds >> obj.lastResponseRTT;
ds >> obj.recievedPackets;
ds >> obj.receivedPackets;
ds >> obj.averageRequestRTT;
ds >> obj.averageResponseRTT;
ds >> obj.recievedDupPackets;
ds >> obj.recievedUnsolicited;
ds >> obj.receivedDupPackets;
ds >> obj.receivedUnsolicited;
ds >> obj.extendedTXSupported;
@ -135,26 +166,81 @@ inline QDataStream &operator>>(QDataStream &ds, NodeStatistics &obj) {
return ds;
}
/** \endcond
*/
/** \brief Represents a ENUM list for a Single Option
*
* Some of the Options available in the QTOZW_Options class are
* in fact a ENUM of a limited set of Possible Values. This simple
* Class allows us to represent those value
*/
class OptionList
{
Q_GADGET
friend QDataStream &operator<<(QDataStream &ds, const OptionList &obj);
friend QDataStream &operator>>(QDataStream &ds, OptionList &obj);
public:
/** \brief Constructor
*/
OptionList();
/** \brief Deconstructor
*/
~OptionList();
/** \brief Comparision Operator
*/
bool operator!=(OptionList &c2);
/** \brief Provide a List of Possible Values
*
* This is the List of Possible Values this Option accepts
* Applications should not call this function, as it will be populated
* by QTOZW_Options_Internal based on what is available in OpenZWave
* \param list A QStringList of values
*/
void setEnums(QStringList list);
/** \brief Get a List of Possible values for this Option
*
* Retreive a list of possible values for this Option.
* Can be used to populate a QComboBox for example
* \return A QStringList of possible values
*/
QStringList getEnums();
/** \brief Get the Selected Option
*
* Retrives the Currently Selected Option as a String
* \return A String representing the current value
*/
QString getSelectedName();
/** \brief Get the Index of the Selected value
*
* Retrieves the Position of the Currently Selected value. The Position is based upon the order
* that the values were passed in via setEnums
* \return the Index of the currently selected value
*/
int getSelected();
/** \brief Set the Selected value based upon the position
*
* Sets the currently selected value based to the index of the value
* passed in via the setEnums call
* \param index the position of the Value to Select
* \return bool if the Value was successfully stored.
*/
bool setSelected(int index);
/** \brief Set the Selected value based upon the string
*
* Sets the currently selected value to value, as long as it
* exists in the List passed in via setEnums
* \param value the String that you wish to set the value to
* \return bool if the value was successfully stored.
*/
bool setSelected(QString value);
private:
QStringList enumnames;
int selected;
};
/** \cond DO_NOT_DOCUMENT
*/
Q_DECLARE_METATYPE(OptionList)
@ -169,6 +255,8 @@ inline QDataStream &operator>>(QDataStream &ds, OptionList &obj) {
ds >> obj.selected;
return ds;
}
/** \endcond
*/
#endif // QTOZW_PODS_H

View file

@ -1,3 +1,30 @@
//-----------------------------------------------------------------------------
//
// qtozwassociationmodel.h
//
// Association Groups Exposed as a ABstractTableModel
//
// Copyright (c) 2019 Justin Hammond <Justin@dynam.ac>
//
// SOFTWARE NOTICE AND LICENSE
//
// This file is part of QT-OpenZWave.
//
// OpenZWave is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published
// by the Free Software Foundation, either version 3 of the License,
// or (at your option) any later version.
//
// OpenZWave is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with OpenZWave. If not, see <http://www.gnu.org/licenses/>.
//
//-----------------------------------------------------------------------------
#ifndef QTOZWASSOCIATIONS_H
#define QTOZWASSOCIATIONS_H

View file

@ -1,3 +1,30 @@
//-----------------------------------------------------------------------------
//
// qtozwlog.h
//
// OpenZWave Log Exposed as a AbstractTableModel
//
// Copyright (c) 2019 Justin Hammond <Justin@dynam.ac>
//
// SOFTWARE NOTICE AND LICENSE
//
// This file is part of QT-OpenZWave.
//
// OpenZWave is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published
// by the Free Software Foundation, either version 3 of the License,
// or (at your option) any later version.
//
// OpenZWave is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with OpenZWave. If not, see <http://www.gnu.org/licenses/>.
//
//-----------------------------------------------------------------------------
#ifndef QTOZWLOGGING_H
#define QTOZWLOGGING_H

View file

@ -1,3 +1,30 @@
//-----------------------------------------------------------------------------
//
// qtozwmanager.h
//
// Main Manager Class for QT-OpenZWave
//
// Copyright (c) 2019 Justin Hammond <Justin@dynam.ac>
//
// SOFTWARE NOTICE AND LICENSE
//
// This file is part of QT-OpenZWave.
//
// OpenZWave is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published
// by the Free Software Foundation, either version 3 of the License,
// or (at your option) any later version.
//
// OpenZWave is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with OpenZWave. If not, see <http://www.gnu.org/licenses/>.
//
//-----------------------------------------------------------------------------
#ifndef QTOZWMANAGER_H
#define QTOZWMANAGER_H

View file

@ -1,3 +1,31 @@
//-----------------------------------------------------------------------------
//
// qtozwmanager.rep
//
// QT RemoteObjects Replica File - To Generate our Source and Replica Headers
// so we can transport the QTOZWManager class over the network
//
// Copyright (c) 2019 Justin Hammond <Justin@dynam.ac>
//
// SOFTWARE NOTICE AND LICENSE
//
// This file is part of QT-OpenZWave.
//
// OpenZWave is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published
// by the Free Software Foundation, either version 3 of the License,
// or (at your option) any later version.
//
// OpenZWave is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with OpenZWave. If not, see <http://www.gnu.org/licenses/>.
//
//-----------------------------------------------------------------------------
#include <QtCore>
#include <QByteArray>
#include "qt-openzwave/qtozw_pods.h"

View file

@ -1,3 +1,30 @@
//-----------------------------------------------------------------------------
//
// qtozwnodemodel.h
//
// Nodes Exposed as a QAbstractTableModel
//
// Copyright (c) 2019 Justin Hammond <Justin@dynam.ac>
//
// SOFTWARE NOTICE AND LICENSE
//
// This file is part of QT-OpenZWave.
//
// OpenZWave is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published
// by the Free Software Foundation, either version 3 of the License,
// or (at your option) any later version.
//
// OpenZWave is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with OpenZWave. If not, see <http://www.gnu.org/licenses/>.
//
//-----------------------------------------------------------------------------
#ifndef QTOZWNODEMODEL_H
#define QTOZWNODEMODEL_H

View file

@ -1,3 +1,30 @@
//-----------------------------------------------------------------------------
//
// qtozwoptions.h
//
// OpenZWave Options Class Wrapper
//
// Copyright (c) 2019 Justin Hammond <Justin@dynam.ac>
//
// SOFTWARE NOTICE AND LICENSE
//
// This file is part of QT-OpenZWave.
//
// OpenZWave is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published
// by the Free Software Foundation, either version 3 of the License,
// or (at your option) any later version.
//
// OpenZWave is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with OpenZWave. If not, see <http://www.gnu.org/licenses/>.
//
//-----------------------------------------------------------------------------
#ifndef QTOZWOPTIONS_H
#define QTOZWOPTIONS_H

View file

@ -1,3 +1,31 @@
//-----------------------------------------------------------------------------
//
// qtozwoptions.rep
//
// QT RemoteObjects Replica File - To Generate our Source and Replica Headers
// so we can transport the QTOZWOptions class over the network
//
// Copyright (c) 2019 Justin Hammond <Justin@dynam.ac>
//
// SOFTWARE NOTICE AND LICENSE
//
// This file is part of QT-OpenZWave.
//
// OpenZWave is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published
// by the Free Software Foundation, either version 3 of the License,
// or (at your option) any later version.
//
// OpenZWave is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with OpenZWave. If not, see <http://www.gnu.org/licenses/>.
//
//-----------------------------------------------------------------------------
#include <QtCore>
#include <QByteArray>
#include "qt-openzwave/qtozw_pods.h"

View file

@ -1,3 +1,30 @@
//-----------------------------------------------------------------------------
//
// qtozwproxymodels.h
//
// Various useful Filtering Proxy Models for QT-OpenZWave
//
// Copyright (c) 2019 Justin Hammond <Justin@dynam.ac>
//
// SOFTWARE NOTICE AND LICENSE
//
// This file is part of QT-OpenZWave.
//
// OpenZWave is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published
// by the Free Software Foundation, either version 3 of the License,
// or (at your option) any later version.
//
// OpenZWave is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with OpenZWave. If not, see <http://www.gnu.org/licenses/>.
//
//-----------------------------------------------------------------------------
#ifndef QTOZWPROXYMODELS_H
#define QTOZWPROXYMODELS_H

View file

@ -1,3 +1,30 @@
//-----------------------------------------------------------------------------
//
// qtozwvalueidmodel.h
//
// Value's exposed as a QAstractTableModel
//
// Copyright (c) 2019 Justin Hammond <Justin@dynam.ac>
//
// SOFTWARE NOTICE AND LICENSE
//
// This file is part of QT-OpenZWave.
//
// OpenZWave is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published
// by the Free Software Foundation, either version 3 of the License,
// or (at your option) any later version.
//
// OpenZWave is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with OpenZWave. If not, see <http://www.gnu.org/licenses/>.
//
//-----------------------------------------------------------------------------
#ifndef QTOZWVALUEIDMODEL_H
#define QTOZWVALUEIDMODEL_H

View file

@ -1,3 +1,30 @@
//-----------------------------------------------------------------------------
//
// qt-openzwave_global.h
//
// Global Definition Header
//
// Copyright (c) 2019 Justin Hammond <Justin@dynam.ac>
//
// SOFTWARE NOTICE AND LICENSE
//
// This file is part of QT-OpenZWave.
//
// OpenZWave is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published
// by the Free Software Foundation, either version 3 of the License,
// or (at your option) any later version.
//
// OpenZWave is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with OpenZWave. If not, see <http://www.gnu.org/licenses/>.
//
//-----------------------------------------------------------------------------
#ifndef QTOPENZWAVE_GLOBAL_H
#define QTOPENZWAVE_GLOBAL_H

View file

@ -1,3 +1,30 @@
//-----------------------------------------------------------------------------
//
// qtozw_logging.h
//
// Internal QT Logging Functions
//
// Copyright (c) 2019 Justin Hammond <Justin@dynam.ac>
//
// SOFTWARE NOTICE AND LICENSE
//
// This file is part of QT-OpenZWave.
//
// OpenZWave is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published
// by the Free Software Foundation, either version 3 of the License,
// or (at your option) any later version.
//
// OpenZWave is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with OpenZWave. If not, see <http://www.gnu.org/licenses/>.
//
//-----------------------------------------------------------------------------
#include <QLoggingCategory>
#ifndef QTOZW_LOGGING_H

View file

@ -1,3 +1,30 @@
//-----------------------------------------------------------------------------
//
// qtozwassociationmodel_p.h
//
// Association Groups Model - Used Internally to Manage the Model
//
// Copyright (c) 2019 Justin Hammond <Justin@dynam.ac>
//
// SOFTWARE NOTICE AND LICENSE
//
// This file is part of QT-OpenZWave.
//
// OpenZWave is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published
// by the Free Software Foundation, either version 3 of the License,
// or (at your option) any later version.
//
// OpenZWave is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with OpenZWave. If not, see <http://www.gnu.org/licenses/>.
//
//-----------------------------------------------------------------------------
#ifndef QTOZWASSOCIATIONMODEL_P_H
#define QTOZWASSOCIATIONMODEL_P_H

View file

@ -1,3 +1,30 @@
//-----------------------------------------------------------------------------
//
// qtozwlog_p.h
//
// OpenZWave Log - Internal Class to manage the Model
//
// Copyright (c) 2019 Justin Hammond <Justin@dynam.ac>
//
// SOFTWARE NOTICE AND LICENSE
//
// This file is part of QT-OpenZWave.
//
// OpenZWave is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published
// by the Free Software Foundation, either version 3 of the License,
// or (at your option) any later version.
//
// OpenZWave is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with OpenZWave. If not, see <http://www.gnu.org/licenses/>.
//
//-----------------------------------------------------------------------------
#ifndef QTOZW_LOG_P_H
#define QTOZW_LOG_P_H
#include "qt-openzwave/qtozwlog.h"

View file

@ -1,3 +1,31 @@
//-----------------------------------------------------------------------------
//
// qtozwmanager_p.h
//
// QT-OpenZWave Manager - Internal Class to interface between OZW and the QT
// Wrapper
//
// Copyright (c) 2019 Justin Hammond <Justin@dynam.ac>
//
// SOFTWARE NOTICE AND LICENSE
//
// This file is part of QT-OpenZWave.
//
// OpenZWave is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published
// by the Free Software Foundation, either version 3 of the License,
// or (at your option) any later version.
//
// OpenZWave is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with OpenZWave. If not, see <http://www.gnu.org/licenses/>.
//
//-----------------------------------------------------------------------------
#ifndef QTOZWMANAGER_P_H
#define QTOZWMANAGER_P_H

View file

@ -1,3 +1,30 @@
//-----------------------------------------------------------------------------
//
// qtozwnodemodel_p.h
//
// Node Model - Internal Class to Manage the Model
//
// Copyright (c) 2019 Justin Hammond <Justin@dynam.ac>
//
// SOFTWARE NOTICE AND LICENSE
//
// This file is part of QT-OpenZWave.
//
// OpenZWave is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published
// by the Free Software Foundation, either version 3 of the License,
// or (at your option) any later version.
//
// OpenZWave is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with OpenZWave. If not, see <http://www.gnu.org/licenses/>.
//
//-----------------------------------------------------------------------------
#ifndef QTOZWNODEMODEL_P_H
#define QTOZWNODEMODEL_P_H

View file

@ -1,3 +1,30 @@
//-----------------------------------------------------------------------------
//
// qtozwnotification.h
//
// The Notification Callback to Interface OZW and the QT Wrapper
//
// Copyright (c) 2019 Justin Hammond <Justin@dynam.ac>
//
// SOFTWARE NOTICE AND LICENSE
//
// This file is part of QT-OpenZWave.
//
// OpenZWave is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published
// by the Free Software Foundation, either version 3 of the License,
// or (at your option) any later version.
//
// OpenZWave is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with OpenZWave. If not, see <http://www.gnu.org/licenses/>.
//
//-----------------------------------------------------------------------------
#ifndef QTOZWNOTIFICATION_H
#define QTOZWNOTIFICATION_H

View file

@ -1,3 +1,30 @@
//-----------------------------------------------------------------------------
//
// qtozwoptions_p.h
//
// OpenZWave Options Wrapper - Internal Class to interface with it
//
// Copyright (c) 2019 Justin Hammond <Justin@dynam.ac>
//
// SOFTWARE NOTICE AND LICENSE
//
// This file is part of QT-OpenZWave.
//
// OpenZWave is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published
// by the Free Software Foundation, either version 3 of the License,
// or (at your option) any later version.
//
// OpenZWave is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with OpenZWave. If not, see <http://www.gnu.org/licenses/>.
//
//-----------------------------------------------------------------------------
#ifndef QTOZWOPTIONS_P_H
#define QTOZWOPTIONS_P_H

View file

@ -1,3 +1,30 @@
//-----------------------------------------------------------------------------
//
// qtozwvalueidmodel_p.h
//
// ValueID Model - Internal Class to Manage the Model
//
// Copyright (c) 2019 Justin Hammond <Justin@dynam.ac>
//
// SOFTWARE NOTICE AND LICENSE
//
// This file is part of QT-OpenZWave.
//
// OpenZWave is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published
// by the Free Software Foundation, either version 3 of the License,
// or (at your option) any later version.
//
// OpenZWave is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with OpenZWave. If not, see <http://www.gnu.org/licenses/>.
//
//-----------------------------------------------------------------------------
#ifndef QTOZWVALUEIDMODEL_P_H
#define QTOZWVALUEIDMODEL_P_H

View file

@ -38,11 +38,11 @@ DEFINES += QT_DEPRECATED_WARNINGS
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
SOURCES += source/qtopenzwave.cpp \
source/qtozw_pods.cpp \
source/qtozwlog.cpp \
source/qtozwlog_p.cpp \
source/qtozwoptions.cpp \
source/qtozwoptions_p.cpp \
source/qt_pods.cpp \
source/qtozwassociationmodel.cpp \
source/qtozwassociationmodel_p.cpp \
source/qtozwmanager.cpp \

View file

@ -1,46 +0,0 @@
#include "qt-openzwave/qtozw_pods.h"
OptionList::OptionList()
{
}
OptionList::~OptionList()
{
}
bool OptionList::operator!=(OptionList &c2)
{
return this->selected != c2.selected;
}
void OptionList::setEnums(QStringList list)
{
this->enumnames = list;
}
QStringList OptionList::getEnums()
{
return this->enumnames;
}
QString OptionList::getSelectedName()
{
return this->enumnames.at(this->selected);
}
int OptionList::getSelected()
{
return this->selected;
}
bool OptionList::setSelected(int index)
{
if (!this->enumnames.value(index).isEmpty()) {
this->selected = index;
return true;
}
return false;
}
bool OptionList::setSelected(QString value)
{
if (this->enumnames.count(value) > 0) {
this->selected = this->enumnames.indexOf(value);
return true;
}
return false;
}

View file

@ -0,0 +1,73 @@
//-----------------------------------------------------------------------------
//
// qtozw_pods.cpp
//
// Common Structures for QTOZW Wrapper
//
// Copyright (c) 2019 Justin Hammond <Justin@dynam.ac>
//
// SOFTWARE NOTICE AND LICENSE
//
// This file is part of QT-OpenZWave.
//
// OpenZWave is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published
// by the Free Software Foundation, either version 3 of the License,
// or (at your option) any later version.
//
// OpenZWave is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with OpenZWave. If not, see <http://www.gnu.org/licenses/>.
//
//-----------------------------------------------------------------------------
#include "qt-openzwave/qtozw_pods.h"
OptionList::OptionList()
{
}
OptionList::~OptionList()
{
}
bool OptionList::operator!=(OptionList &c2)
{
return this->selected != c2.selected;
}
void OptionList::setEnums(QStringList list)
{
this->enumnames = list;
}
QStringList OptionList::getEnums()
{
return this->enumnames;
}
QString OptionList::getSelectedName()
{
return this->enumnames.at(this->selected);
}
int OptionList::getSelected()
{
return this->selected;
}
bool OptionList::setSelected(int index)
{
if (!this->enumnames.value(index).isEmpty()) {
this->selected = index;
return true;
}
return false;
}
bool OptionList::setSelected(QString value)
{
if (this->enumnames.count(value) > 0) {
this->selected = this->enumnames.indexOf(value);
return true;
}
return false;
}

View file

@ -1,3 +1,30 @@
//-----------------------------------------------------------------------------
//
// qtozwassocationmodel.cpp
//
// Association Groups Exposed as a QAbstractTableModel
//
// Copyright (c) 2019 Justin Hammond <Justin@dynam.ac>
//
// SOFTWARE NOTICE AND LICENSE
//
// This file is part of QT-OpenZWave.
//
// OpenZWave is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published
// by the Free Software Foundation, either version 3 of the License,
// or (at your option) any later version.
//
// OpenZWave is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with OpenZWave. If not, see <http://www.gnu.org/licenses/>.
//
//-----------------------------------------------------------------------------
#include <QDebug>
#include <QBitArray>
#include "qtozw_logging.h"

View file

@ -1,3 +1,30 @@
//-----------------------------------------------------------------------------
//
// qtozwassocationmodel_p.cpp
//
// Association Groups Model - Used Internally to Manage the Model
//
// Copyright (c) 2019 Justin Hammond <Justin@dynam.ac>
//
// SOFTWARE NOTICE AND LICENSE
//
// This file is part of QT-OpenZWave.
//
// OpenZWave is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published
// by the Free Software Foundation, either version 3 of the License,
// or (at your option) any later version.
//
// OpenZWave is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with OpenZWave. If not, see <http://www.gnu.org/licenses/>.
//
//-----------------------------------------------------------------------------
#include <QBitArray>
#include "qtozw_logging.h"
#include "qtozwassociationmodel_p.h"

View file

@ -1,3 +1,30 @@
//-----------------------------------------------------------------------------
//
// qtozwlog.cpp
//
// OpenZWave Log Exposed as a AbstractTableModel
//
// Copyright (c) 2019 Justin Hammond <Justin@dynam.ac>
//
// SOFTWARE NOTICE AND LICENSE
//
// This file is part of QT-OpenZWave.
//
// OpenZWave is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published
// by the Free Software Foundation, either version 3 of the License,
// or (at your option) any later version.
//
// OpenZWave is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with OpenZWave. If not, see <http://www.gnu.org/licenses/>.
//
//-----------------------------------------------------------------------------
#include "include/qt-openzwave/qtozwlog.h"
#include "include/qtozw_logging.h"

View file

@ -1,3 +1,30 @@
//-----------------------------------------------------------------------------
//
// qtozwlog_p.cpp
//
// OpenZWave Log - Internal Class to manage the Model
//
// Copyright (c) 2019 Justin Hammond <Justin@dynam.ac>
//
// SOFTWARE NOTICE AND LICENSE
//
// This file is part of QT-OpenZWave.
//
// OpenZWave is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published
// by the Free Software Foundation, either version 3 of the License,
// or (at your option) any later version.
//
// OpenZWave is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with OpenZWave. If not, see <http://www.gnu.org/licenses/>.
//
//-----------------------------------------------------------------------------
#include "include/qtozwlog_p.h"
#include "include/qtozw_logging.h"

View file

@ -1,3 +1,30 @@
//-----------------------------------------------------------------------------
//
// qtozwmanager.cpp
//
// Main Manager Class for QT-OpenZWave
//
// Copyright (c) 2019 Justin Hammond <Justin@dynam.ac>
//
// SOFTWARE NOTICE AND LICENSE
//
// This file is part of QT-OpenZWave.
//
// OpenZWave is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published
// by the Free Software Foundation, either version 3 of the License,
// or (at your option) any later version.
//
// OpenZWave is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with OpenZWave. If not, see <http://www.gnu.org/licenses/>.
//
//-----------------------------------------------------------------------------
#include <unistd.h>
#include <QDebug>
#include <QAbstractItemModel>

View file

@ -1,3 +1,31 @@
//-----------------------------------------------------------------------------
//
// qtozwmanager_p.cpp
//
// QT-OpenZWave Manager - Internal Class to interface between OZW and the QT
// Wrapper
//
// Copyright (c) 2019 Justin Hammond <Justin@dynam.ac>
//
// SOFTWARE NOTICE AND LICENSE
//
// This file is part of QT-OpenZWave.
//
// OpenZWave is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published
// by the Free Software Foundation, either version 3 of the License,
// or (at your option) any later version.
//
// OpenZWave is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with OpenZWave. If not, see <http://www.gnu.org/licenses/>.
//
//-----------------------------------------------------------------------------
#include "qtozwmanager_p.h"
#include "qt-openzwave/qtozwmanager.h"
@ -461,15 +489,15 @@ NodeStatistics QTOZWManager_Internal::GetNodeStatistics(quint8 const _node) {
ns.lastTXChannel = nd.m_lastTxChannel;
ns.lastRequestRTT = nd.m_lastRequestRTT;
ns.lastResponseRTT = nd.m_lastResponseRTT;
ns.recievedPackets = nd.m_receivedCnt;
ns.receivedPackets = nd.m_receivedCnt;
ns.lastFailedLinkTo = nd.m_lastFailedLinkTo;
ns.averageRequestRTT = nd.m_averageRequestRTT;
ns.lastSentTimeStamp = nd.m_sentTS.c_str();
ns.averageResponseRTT = nd.m_averageResponseRTT;
ns.lastFailedLinkFrom = nd.m_lastFailedLinkFrom;
ns.recievedDupPackets = nd.m_receivedDups;
ns.receivedDupPackets = nd.m_receivedDups;
ns.extendedTXSupported = nd.m_txStatusReportSupported;
ns.recievedUnsolicited = nd.m_receivedUnsolicited;
ns.receivedUnsolicited = nd.m_receivedUnsolicited;
ns.lastReceivedTimeStamp = nd.m_receivedTS.c_str();
return ns;
} catch (OpenZWave::OZWException &e) {

View file

@ -1,3 +1,30 @@
//-----------------------------------------------------------------------------
//
// qtozwnodemodel.cpp
//
// Nodes Exposed as a QAbstractTableModel
//
// Copyright (c) 2019 Justin Hammond <Justin@dynam.ac>
//
// SOFTWARE NOTICE AND LICENSE
//
// This file is part of QT-OpenZWave.
//
// OpenZWave is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published
// by the Free Software Foundation, either version 3 of the License,
// or (at your option) any later version.
//
// OpenZWave is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with OpenZWave. If not, see <http://www.gnu.org/licenses/>.
//
//-----------------------------------------------------------------------------
#include <QDebug>
#include <QBitArray>
#include "qtozw_logging.h"

View file

@ -1,3 +1,30 @@
//-----------------------------------------------------------------------------
//
// qtozwnodemodel_p.cpp
//
// Node Model - Internal Class to Manage the Model
//
// Copyright (c) 2019 Justin Hammond <Justin@dynam.ac>
//
// SOFTWARE NOTICE AND LICENSE
//
// This file is part of QT-OpenZWave.
//
// OpenZWave is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published
// by the Free Software Foundation, either version 3 of the License,
// or (at your option) any later version.
//
// OpenZWave is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with OpenZWave. If not, see <http://www.gnu.org/licenses/>.
//
//-----------------------------------------------------------------------------
#include <QBitArray>
#include "qtozw_logging.h"
#include "qtozwnodemodel_p.h"

View file

@ -1,3 +1,30 @@
//-----------------------------------------------------------------------------
//
// qtozwnotification.cpp
//
// The Notification Callback to Interface OZW and the QT Wrapper
//
// Copyright (c) 2019 Justin Hammond <Justin@dynam.ac>
//
// SOFTWARE NOTICE AND LICENSE
//
// This file is part of QT-OpenZWave.
//
// OpenZWave is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published
// by the Free Software Foundation, either version 3 of the License,
// or (at your option) any later version.
//
// OpenZWave is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with OpenZWave. If not, see <http://www.gnu.org/licenses/>.
//
//-----------------------------------------------------------------------------
#include <QtDebug>
#include "qtozwnotification.h"

View file

@ -1,3 +1,30 @@
//-----------------------------------------------------------------------------
//
// qtozwoptions.cpp
//
// OpenZWave Options Class Wrapper
//
// Copyright (c) 2019 Justin Hammond <Justin@dynam.ac>
//
// SOFTWARE NOTICE AND LICENSE
//
// This file is part of QT-OpenZWave.
//
// OpenZWave is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published
// by the Free Software Foundation, either version 3 of the License,
// or (at your option) any later version.
//
// OpenZWave is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with OpenZWave. If not, see <http://www.gnu.org/licenses/>.
//
//-----------------------------------------------------------------------------
#include <QAbstractItemModelReplica>
#include "qt-openzwave/qtozwoptions.h"

View file

@ -1,3 +1,30 @@
//-----------------------------------------------------------------------------
//
// qtozwoptions_p.cpp
//
// OpenZWave Options Wrapper - Internal Class to interface with it
//
// Copyright (c) 2019 Justin Hammond <Justin@dynam.ac>
//
// SOFTWARE NOTICE AND LICENSE
//
// This file is part of QT-OpenZWave.
//
// OpenZWave is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published
// by the Free Software Foundation, either version 3 of the License,
// or (at your option) any later version.
//
// OpenZWave is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with OpenZWave. If not, see <http://www.gnu.org/licenses/>.
//
//-----------------------------------------------------------------------------
#include "qtozwoptions_p.h"
#include "platform/Log.h"
@ -177,7 +204,8 @@ void QTOZWOptions_Internal::pvt_ConfigPathChanged(QString value) {
if (this->m_updating)
return;
/* OZW expects the paths to end with a / otherwise it treats it as a file */
if (value.at(value.size()) != "/")
qDebug() << value << value.size();
if (value.at(value.size()-1) != "/")
value.append("/");
this->m_options->AddOptionString("ConfigPath", value.toStdString(), false);
}
@ -185,7 +213,7 @@ void QTOZWOptions_Internal::pvt_UserPathChanged(QString value) {
if (this->m_updating)
return;
/* OZW expects the paths to end with a / otherwise it treats it as a file */
if (value.at(value.size()) != "/")
if (value.at(value.size()-1) != "/")
value.append("/");
this->m_options->AddOptionString("UserPath", value.toStdString(), false);
}

View file

@ -1,3 +1,30 @@
//-----------------------------------------------------------------------------
//
// qtozwproxymodels.cpp
//
// Various useful Filtering Proxy Models for QT-OpenZWave
//
// Copyright (c) 2019 Justin Hammond <Justin@dynam.ac>
//
// SOFTWARE NOTICE AND LICENSE
//
// This file is part of QT-OpenZWave.
//
// OpenZWave is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published
// by the Free Software Foundation, either version 3 of the License,
// or (at your option) any later version.
//
// OpenZWave is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with OpenZWave. If not, see <http://www.gnu.org/licenses/>.
//
//-----------------------------------------------------------------------------
#include <QDebug>
#include "qt-openzwave/qtozwproxymodels.h"
#include "qt-openzwave/qtozwvalueidmodel.h"

View file

@ -1,3 +1,30 @@
//-----------------------------------------------------------------------------
//
// qtozwvalueidmodel.cpp
//
// Value's exposed as a QAstractTableModel
//
// Copyright (c) 2019 Justin Hammond <Justin@dynam.ac>
//
// SOFTWARE NOTICE AND LICENSE
//
// This file is part of QT-OpenZWave.
//
// OpenZWave is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published
// by the Free Software Foundation, either version 3 of the License,
// or (at your option) any later version.
//
// OpenZWave is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with OpenZWave. If not, see <http://www.gnu.org/licenses/>.
//
//-----------------------------------------------------------------------------
#include <QDebug>
#include <QBitArray>
#include <QDataStream>

View file

@ -1,3 +1,30 @@
//-----------------------------------------------------------------------------
//
// qtozwvalueidmodel_p.cpp
//
// ValueID Model - Internal Class to Manage the Model
//
// Copyright (c) 2019 Justin Hammond <Justin@dynam.ac>
//
// SOFTWARE NOTICE AND LICENSE
//
// This file is part of QT-OpenZWave.
//
// OpenZWave is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published
// by the Free Software Foundation, either version 3 of the License,
// or (at your option) any later version.
//
// OpenZWave is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with OpenZWave. If not, see <http://www.gnu.org/licenses/>.
//
//-----------------------------------------------------------------------------
#include "qtozw_logging.h"
#include "qtozwvalueidmodel_p.h"