Transfert vers nouvel ordi + nouveau GIT + ajout Chalet
This commit is contained in:
parent
b3245e769d
commit
5d4ef09df6
2
.gitignore
vendored
2
.gitignore
vendored
@ -9,3 +9,5 @@
|
||||
/debug
|
||||
/release
|
||||
/.project
|
||||
/SystemGui.pro.user.3910d82.4.8-pre1
|
||||
/.qmake.stash
|
||||
|
||||
34
.qmake.stash
34
.qmake.stash
@ -13,3 +13,37 @@ QMAKE_DEFAULT_LIBDIRS = \
|
||||
/usr/lib \
|
||||
/lib/x86_64-linux-gnu \
|
||||
/lib
|
||||
QMAKE_CXX.QT_COMPILER_STDCXX = 201402L
|
||||
QMAKE_CXX.QMAKE_GCC_MAJOR_VERSION = 7
|
||||
QMAKE_CXX.QMAKE_GCC_MINOR_VERSION = 3
|
||||
QMAKE_CXX.QMAKE_GCC_PATCH_VERSION = 0
|
||||
QMAKE_CXX.COMPILER_MACROS = \
|
||||
QT_COMPILER_STDCXX \
|
||||
QMAKE_GCC_MAJOR_VERSION \
|
||||
QMAKE_GCC_MINOR_VERSION \
|
||||
QMAKE_GCC_PATCH_VERSION
|
||||
QMAKE_CXX.INCDIRS = \
|
||||
/usr/include/c++/5 \
|
||||
/usr/include/x86_64-linux-gnu/c++/5 \
|
||||
/usr/include/c++/5/backward \
|
||||
/usr/lib/gcc/x86_64-linux-gnu/5/include \
|
||||
/usr/local/include \
|
||||
/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed \
|
||||
/usr/include/x86_64-linux-gnu \
|
||||
/usr/include \
|
||||
C:/Qt/Qt5.14.2/Tools/mingw730_64/lib/gcc/x86_64-w64-mingw32/7.3.0/include/c++ \
|
||||
C:/Qt/Qt5.14.2/Tools/mingw730_64/lib/gcc/x86_64-w64-mingw32/7.3.0/include/c++/x86_64-w64-mingw32 \
|
||||
C:/Qt/Qt5.14.2/Tools/mingw730_64/lib/gcc/x86_64-w64-mingw32/7.3.0/include/c++/backward \
|
||||
C:/Qt/Qt5.14.2/Tools/mingw730_64/lib/gcc/x86_64-w64-mingw32/7.3.0/include \
|
||||
C:/Qt/Qt5.14.2/Tools/mingw730_64/lib/gcc/x86_64-w64-mingw32/7.3.0/include-fixed \
|
||||
C:/Qt/Qt5.14.2/Tools/mingw730_64/x86_64-w64-mingw32/include
|
||||
QMAKE_CXX.LIBDIRS = \
|
||||
/usr/lib/gcc/x86_64-linux-gnu/5 \
|
||||
/usr/lib/x86_64-linux-gnu \
|
||||
/usr/lib \
|
||||
/lib/x86_64-linux-gnu \
|
||||
/lib \
|
||||
C:/Qt/Qt5.14.2/Tools/mingw730_64/lib/gcc/x86_64-w64-mingw32/7.3.0 \
|
||||
C:/Qt/Qt5.14.2/Tools/mingw730_64/lib/gcc \
|
||||
C:/Qt/Qt5.14.2/Tools/mingw730_64/x86_64-w64-mingw32/lib \
|
||||
C:/Qt/Qt5.14.2/Tools/mingw730_64/lib
|
||||
|
||||
76
Sources/AvReceiver/AvReceiver.cpp
Normal file
76
Sources/AvReceiver/AvReceiver.cpp
Normal file
@ -0,0 +1,76 @@
|
||||
#include "AvReceiver.h"
|
||||
#include "AvReceiverNetworkCtrlInterface.h"
|
||||
|
||||
CAvReceiver::CAvReceiver(CAvReceiverGui *ReceiverGui)
|
||||
{
|
||||
mReceiverGui = ReceiverGui;
|
||||
ReceiverGui->mProgramHandle = this;
|
||||
mNetworkInterface = new CAvReceiverNetworkCtrlInterface(this);
|
||||
|
||||
mReceiverPollTimer = new QTimer();
|
||||
mReceiverPollTimer->setSingleShot(false);
|
||||
mReceiverPollTimer->setInterval(1000);
|
||||
connect(mReceiverPollTimer,SIGNAL(timeout()),this,SLOT(PollTimerExpired()));
|
||||
}
|
||||
|
||||
CAvReceiver::~CAvReceiver()
|
||||
{
|
||||
delete mNetworkInterface;
|
||||
delete mReceiverPollTimer;
|
||||
}
|
||||
|
||||
int CAvReceiver::Start()
|
||||
{
|
||||
mNetworkInterface->ConnectToMasterCtrl();
|
||||
mReceiverPollTimer->start();
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
|
||||
int CAvReceiver::SpeakerBToggleSwitchPressed(bool state)
|
||||
{
|
||||
|
||||
QByteArray SpkrState;
|
||||
SpkrState.clear();
|
||||
|
||||
if(state)
|
||||
{
|
||||
SpkrState.append((char)0x01);
|
||||
}
|
||||
else
|
||||
{
|
||||
SpkrState.append((char)0x00);
|
||||
}
|
||||
return mNetworkInterface->SendMasterCtrlCommand(AV_RECEIVER_INTERFACE_SET_SPEAKERB_REQUEST,SpkrState);
|
||||
|
||||
}
|
||||
|
||||
|
||||
int CAvReceiver::SpeakerAToggleSwitchPressed(bool state)
|
||||
{
|
||||
|
||||
QByteArray SpkrState;
|
||||
SpkrState.clear();
|
||||
|
||||
if(state)
|
||||
{
|
||||
SpkrState.append((char)0x01);
|
||||
}
|
||||
else
|
||||
{
|
||||
SpkrState.append((char)0x00);
|
||||
}
|
||||
return mNetworkInterface->SendMasterCtrlCommand(AV_RECEIVER_INTERFACE_SET_SPEAKERA_REQUEST,SpkrState);
|
||||
|
||||
}
|
||||
|
||||
void CAvReceiver::PollTimerExpired()
|
||||
{
|
||||
mNetworkInterface->SendMasterCtrlCommand(AV_RECEIVER_INTERFACE_GENERAL_STATUS_REQUEST,QByteArray());
|
||||
}
|
||||
|
||||
int CAvReceiver::ReceiverGeneralStatusReceived(QByteArray StatusData)
|
||||
{
|
||||
mReceiverStatus.FromByteArray(StatusData);
|
||||
mReceiverGui->UpdateReceiverStatus(mReceiverStatus);
|
||||
}
|
||||
36
Sources/AvReceiver/AvReceiver.h
Normal file
36
Sources/AvReceiver/AvReceiver.h
Normal file
@ -0,0 +1,36 @@
|
||||
#ifndef AVRECEIVER_H
|
||||
#define AVRECEIVER_H
|
||||
|
||||
#include <QTimer>
|
||||
#include "AvReceiverData.h"
|
||||
|
||||
class CAvReceiverNetworkCtrlInterface;
|
||||
|
||||
#include "AvReceiverGui.h"
|
||||
|
||||
class CAvReceiver : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
CAvReceiver(CAvReceiverGui *ReceiverGui);
|
||||
virtual ~CAvReceiver();
|
||||
|
||||
int Start();
|
||||
|
||||
int SpeakerBToggleSwitchPressed(bool state);
|
||||
int SpeakerAToggleSwitchPressed(bool state);
|
||||
int ReceiverGeneralStatusReceived(QByteArray StatusData);
|
||||
|
||||
CAvReceiverNetworkCtrlInterface *mNetworkInterface;
|
||||
CAvReceiverGui *mReceiverGui;
|
||||
QTimer *mReceiverPollTimer;
|
||||
|
||||
private:
|
||||
CAvReceiverMainStatus mReceiverStatus;
|
||||
|
||||
public slots:
|
||||
void PollTimerExpired();
|
||||
|
||||
};
|
||||
|
||||
#endif // AVRECEIVER_H
|
||||
52
Sources/AvReceiver/AvReceiverData.cpp
Normal file
52
Sources/AvReceiver/AvReceiverData.cpp
Normal file
@ -0,0 +1,52 @@
|
||||
#include "AvReceiverData.h"
|
||||
#include <QDataStream>
|
||||
|
||||
CAvReceiverMainStatus::CAvReceiverMainStatus()
|
||||
{
|
||||
mDataValid = false;
|
||||
mReceiverOnline = false;
|
||||
}
|
||||
|
||||
QByteArray CAvReceiverMainStatus::ToByteArray()
|
||||
{
|
||||
|
||||
QByteArray Output;
|
||||
Output.clear();
|
||||
QDataStream Strm(&Output,QIODevice::WriteOnly);
|
||||
|
||||
Strm << mMainPwrStatus;
|
||||
Strm << mMainSleepStatus;
|
||||
Strm << mMainVolume;
|
||||
Strm << mIsMute;
|
||||
Strm << mInput;
|
||||
Strm << mProgram;
|
||||
Strm << mSpeakerAState;
|
||||
Strm << mSpeakerBState;
|
||||
|
||||
Strm << mDataValid;
|
||||
Strm << mReceiverOnline;
|
||||
|
||||
return Output;
|
||||
|
||||
}
|
||||
|
||||
int CAvReceiverMainStatus::FromByteArray(QByteArray Data)
|
||||
{
|
||||
QDataStream Strm(Data);
|
||||
Strm.device()->seek(0);
|
||||
|
||||
Strm >> mMainPwrStatus;
|
||||
Strm >> mMainSleepStatus;
|
||||
Strm >> mMainVolume;
|
||||
Strm >> mIsMute;
|
||||
Strm >> mInput;
|
||||
Strm >> mProgram;
|
||||
Strm >> mSpeakerAState;
|
||||
Strm >> mSpeakerBState;
|
||||
|
||||
Strm >> mDataValid;
|
||||
Strm >> mReceiverOnline;
|
||||
|
||||
return RET_OK;
|
||||
|
||||
}
|
||||
30
Sources/AvReceiver/AvReceiverData.h
Normal file
30
Sources/AvReceiver/AvReceiverData.h
Normal file
@ -0,0 +1,30 @@
|
||||
#ifndef AVRECEIVERDATA_H
|
||||
#define AVRECEIVERDATA_H
|
||||
#include <QString>
|
||||
#include "GlobalDefine.h"
|
||||
|
||||
|
||||
class CAvReceiverMainStatus
|
||||
{
|
||||
public:
|
||||
|
||||
QByteArray ToByteArray();
|
||||
int FromByteArray(QByteArray Data);
|
||||
|
||||
CAvReceiverMainStatus();
|
||||
|
||||
bool mMainPwrStatus;
|
||||
bool mMainSleepStatus;
|
||||
float mMainVolume;
|
||||
bool mIsMute;
|
||||
QString mInput;
|
||||
QString mProgram;
|
||||
bool mSpeakerAState;
|
||||
bool mSpeakerBState;
|
||||
|
||||
bool mDataValid;
|
||||
bool mReceiverOnline;
|
||||
|
||||
};
|
||||
|
||||
#endif // AVRECEIVERDATA_H
|
||||
104
Sources/AvReceiver/AvReceiverGui.cpp
Normal file
104
Sources/AvReceiver/AvReceiverGui.cpp
Normal file
@ -0,0 +1,104 @@
|
||||
#include "AvReceiverGui.h"
|
||||
#include "ui_AvReceiverGui.h"
|
||||
|
||||
#include "AvReceiver.h"
|
||||
|
||||
CAvReceiverGui::CAvReceiverGui(QWidget *parent) :
|
||||
QWidget(parent),
|
||||
ui(new Ui::CAvReceiverGui)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
connect(ui->mSpkBCheckBox,SIGNAL(toggled(bool)),this,SLOT(SpeakerBRadioClicked(bool)));
|
||||
connect(ui->mSpkACheckBox,SIGNAL(toggled(bool)),this,SLOT(SpeakerARadioClicked(bool)));
|
||||
}
|
||||
|
||||
CAvReceiverGui::~CAvReceiverGui()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void CAvReceiverGui::SpeakerBRadioClicked(bool checked)
|
||||
{
|
||||
mProgramHandle->SpeakerBToggleSwitchPressed(checked);
|
||||
}
|
||||
|
||||
void CAvReceiverGui::SpeakerARadioClicked(bool checked)
|
||||
{
|
||||
mProgramHandle->SpeakerAToggleSwitchPressed(checked);
|
||||
}
|
||||
|
||||
int CAvReceiverGui::UpdateReceiverStatus(CAvReceiverMainStatus Status)
|
||||
{
|
||||
QString StatusText;
|
||||
|
||||
StatusText.clear();
|
||||
StatusText += "Receiver Status:\n\n";
|
||||
|
||||
StatusText += "Power: ";
|
||||
if(Status.mMainPwrStatus == true)
|
||||
{
|
||||
StatusText += "ON\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
StatusText += "OFF\n";
|
||||
}
|
||||
|
||||
StatusText += "Mute: ";
|
||||
if(Status.mIsMute == true)
|
||||
{
|
||||
StatusText += "ON\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
StatusText += "OFF\n";
|
||||
}
|
||||
|
||||
StatusText += "Main sleep: ";
|
||||
if(Status.mMainSleepStatus == true)
|
||||
{
|
||||
StatusText += "ON\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
StatusText += "OFF\n";
|
||||
}
|
||||
|
||||
StatusText += "Volume: ";
|
||||
StatusText += QString("%1").arg(Status.mMainVolume);
|
||||
StatusText +="\n";
|
||||
StatusText += "Input: ";
|
||||
StatusText +=Status.mInput;
|
||||
StatusText += "\n";
|
||||
StatusText += "Program: ";
|
||||
StatusText +=Status.mProgram;
|
||||
StatusText += "\n";
|
||||
|
||||
StatusText += "Zone A: ";
|
||||
if(Status.mSpeakerAState == true)
|
||||
{
|
||||
StatusText += "ON\n";
|
||||
ui->mSpkACheckBox->setChecked(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
StatusText += "OFF\n";
|
||||
ui->mSpkACheckBox->setChecked(false);
|
||||
}
|
||||
|
||||
StatusText += "Zone B: ";
|
||||
if(Status.mSpeakerBState == true)
|
||||
{
|
||||
StatusText += "ON\n";
|
||||
ui->mSpkBCheckBox->setChecked(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
StatusText += "OFF\n";
|
||||
ui->mSpkBCheckBox->setChecked(false);
|
||||
}
|
||||
|
||||
|
||||
ui->mRcvrStatusLabel->setText(StatusText);
|
||||
}
|
||||
32
Sources/AvReceiver/AvReceiverGui.h
Normal file
32
Sources/AvReceiver/AvReceiverGui.h
Normal file
@ -0,0 +1,32 @@
|
||||
#ifndef AVRECEIVERGUI_H
|
||||
#define AVRECEIVERGUI_H
|
||||
|
||||
#include <QWidget>
|
||||
class CAvReceiver;
|
||||
#include "AvReceiverData.h"
|
||||
|
||||
namespace Ui {
|
||||
class CAvReceiverGui;
|
||||
}
|
||||
|
||||
class CAvReceiverGui : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit CAvReceiverGui(QWidget *parent = 0);
|
||||
~CAvReceiverGui();
|
||||
|
||||
CAvReceiver *mProgramHandle;
|
||||
|
||||
int UpdateReceiverStatus(CAvReceiverMainStatus Status);
|
||||
|
||||
private:
|
||||
Ui::CAvReceiverGui *ui;
|
||||
|
||||
public slots:
|
||||
void SpeakerBRadioClicked(bool checked);
|
||||
void SpeakerARadioClicked(bool checked);
|
||||
};
|
||||
|
||||
#endif // AVRECEIVERGUI_H
|
||||
71
Sources/AvReceiver/AvReceiverGui.ui
Normal file
71
Sources/AvReceiver/AvReceiverGui.ui
Normal file
@ -0,0 +1,71 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>CAvReceiverGui</class>
|
||||
<widget class="QWidget" name="CAvReceiverGui">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>796</width>
|
||||
<height>447</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>230</x>
|
||||
<y>30</y>
|
||||
<width>201</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>AvReceiver</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="mRcvrStatusLabel">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>100</x>
|
||||
<y>110</y>
|
||||
<width>181</width>
|
||||
<height>231</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="mSpkBCheckBox">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>570</x>
|
||||
<y>130</y>
|
||||
<width>70</width>
|
||||
<height>17</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Speaker B</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="mSpkACheckBox">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>570</x>
|
||||
<y>160</y>
|
||||
<width>70</width>
|
||||
<height>17</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Speaker A</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
79
Sources/AvReceiver/AvReceiverNetworkCtrlInterface.cpp
Normal file
79
Sources/AvReceiver/AvReceiverNetworkCtrlInterface.cpp
Normal file
@ -0,0 +1,79 @@
|
||||
#include "AvReceiverNetworkCtrlInterface.h"
|
||||
#include "AvReceiver.h"
|
||||
|
||||
CAvReceiverNetworkCtrlInterface::CAvReceiverNetworkCtrlInterface(CAvReceiver *ProgramHandle)
|
||||
{
|
||||
mMyDeviceID = ID_AVRECEIVER_INTERFACE;
|
||||
mNetworkPort = 2182;
|
||||
mMasterCtrlIPAddress = "127.0.0.1";
|
||||
mNetworkCommSocket = 0;
|
||||
mDeviceAddress = 1;
|
||||
|
||||
mProgramHandle = ProgramHandle;
|
||||
}
|
||||
int CAvReceiverNetworkCtrlInterface::DeviceFrameReceived(int TargetDeviceID, int TargetDeviceAddress, int SenderID, int SenderAddress, int MessageID, int DataSize, QByteArray Data)
|
||||
{
|
||||
Q_UNUSED(DataSize)
|
||||
|
||||
|
||||
if(TargetDeviceID == mMyDeviceID && (TargetDeviceAddress == BROADCAST_VALUE || TargetDeviceAddress == mDeviceAddress))
|
||||
{
|
||||
switch(MessageID)
|
||||
{
|
||||
|
||||
case AV_RECEIVER_INTERFACE_ACK:
|
||||
{
|
||||
qDebug("Av Receiver Interface ACK received :)");
|
||||
break;
|
||||
}
|
||||
|
||||
case AV_RECEIVER_INTERFACE_GENERAL_STATUS_RESPONSE:
|
||||
{
|
||||
// qDebug("Av Receiver General Status received :)");
|
||||
mProgramHandle->ReceiverGeneralStatusReceived(Data);
|
||||
break;
|
||||
}
|
||||
|
||||
case AV_RECEIVER_INTERFACE_SET_MAIN_POWER_RESPONSE:
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
case AV_RECEIVER_INTERFACE_SET_SPEAKERB_RESPONSE:
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
case AV_RECEIVER_INTERFACE_SEND_DIRECT_CMD_RESPONSE:
|
||||
{
|
||||
break;
|
||||
}
|
||||
case AV_RECEIVER_INTERFACE_GENERAL_STATUS_REQUEST:
|
||||
case AV_RECEIVER_INTERFACE_SET_MAIN_POWER_REQUEST:
|
||||
case AV_RECEIVER_INTERFACE_SET_SPEAKERB_REQUEST:
|
||||
case AV_RECEIVER_INTERFACE_SEND_DIRECT_CMD_REQUEST:
|
||||
default:
|
||||
{
|
||||
qDebug("AV Receiver: Invalid Ethernet Msg received: %d",MessageID);
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
int CAvReceiverNetworkCtrlInterface::DeviceConnectedToMaster(bool Connected)
|
||||
{
|
||||
|
||||
if(Connected)
|
||||
{
|
||||
qDebug("Av Receiver Interface connected to Master.");
|
||||
return SendMasterCtrlCommand(AV_RECEIVER_INTERFACE_GENERAL_STATUS_REQUEST,QByteArray());
|
||||
}
|
||||
else
|
||||
return RET_ERROR;
|
||||
|
||||
return RET_OK;
|
||||
}
|
||||
19
Sources/AvReceiver/AvReceiverNetworkCtrlInterface.h
Normal file
19
Sources/AvReceiver/AvReceiverNetworkCtrlInterface.h
Normal file
@ -0,0 +1,19 @@
|
||||
#ifndef AVRECEIVERNETWORKCTRLINTERFACE_H
|
||||
#define AVRECEIVERNETWORKCTRLINTERFACE_H
|
||||
|
||||
#include "MasterCtrlInterface.h"
|
||||
class CAvReceiver;
|
||||
|
||||
class CAvReceiverNetworkCtrlInterface: public CMasterCtrlInterface
|
||||
{
|
||||
public:
|
||||
CAvReceiverNetworkCtrlInterface(CAvReceiver *ProgramHandle);
|
||||
|
||||
int DeviceFrameReceived(int TargetDeviceID, int TargetDeviceAddress, int SenderID, int SenderAddress, int MessageID, int DataSize, QByteArray Data);
|
||||
int DeviceConnectedToMaster(bool Connected = true);
|
||||
|
||||
private:
|
||||
CAvReceiver *mProgramHandle;
|
||||
};
|
||||
|
||||
#endif // AVRECEIVERNETWORKCTRLINTERFACE_H
|
||||
14
Sources/Chalet/Chalet.cpp
Normal file
14
Sources/Chalet/Chalet.cpp
Normal file
@ -0,0 +1,14 @@
|
||||
#include "Chalet.h"
|
||||
#include "ChaletMasterCtrlInterface.h"
|
||||
|
||||
CChalet::CChalet(CChaletGui *ChaletGui)
|
||||
{
|
||||
mChaletGui = ChaletGui;
|
||||
mChaletGui->mProgramHandle = this;
|
||||
mNetworkInterface = new CChaletMasterCtrlInterface(this);
|
||||
}
|
||||
|
||||
CChalet::~CChalet()
|
||||
{
|
||||
delete mNetworkInterface;
|
||||
}
|
||||
22
Sources/Chalet/Chalet.h
Normal file
22
Sources/Chalet/Chalet.h
Normal file
@ -0,0 +1,22 @@
|
||||
#ifndef CCHALET_H
|
||||
#define CCHALET_H
|
||||
|
||||
#include <QObject>
|
||||
#include "ChaletGui.h"
|
||||
class CChaletMasterCtrlInterface;
|
||||
|
||||
class CChalet : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit CChalet(CChaletGui *ChaletGui);
|
||||
~CChalet();
|
||||
|
||||
CChaletMasterCtrlInterface *mNetworkInterface;
|
||||
CChaletGui *mChaletGui;
|
||||
|
||||
signals:
|
||||
|
||||
};
|
||||
|
||||
#endif // CCHALET_H
|
||||
15
Sources/Chalet/ChaletGui.cpp
Normal file
15
Sources/Chalet/ChaletGui.cpp
Normal file
@ -0,0 +1,15 @@
|
||||
#include "ChaletGui.h"
|
||||
#include "ui_ChaletGui.h"
|
||||
#include "Chalet.h"
|
||||
|
||||
CChaletGui::CChaletGui(QWidget *parent) :
|
||||
QWidget(parent),
|
||||
ui(new Ui::CChaletGui)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
}
|
||||
|
||||
CChaletGui::~CChaletGui()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
26
Sources/Chalet/ChaletGui.h
Normal file
26
Sources/Chalet/ChaletGui.h
Normal file
@ -0,0 +1,26 @@
|
||||
#ifndef CHALETGUI_H
|
||||
#define CHALETGUI_H
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
class CChalet;
|
||||
|
||||
namespace Ui {
|
||||
class CChaletGui;
|
||||
}
|
||||
|
||||
class CChaletGui : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit CChaletGui(QWidget *parent = nullptr);
|
||||
~CChaletGui();
|
||||
|
||||
CChalet *mProgramHandle;
|
||||
|
||||
private:
|
||||
Ui::CChaletGui *ui;
|
||||
};
|
||||
|
||||
#endif // CHALETGUI_H
|
||||
39
Sources/Chalet/ChaletGui.ui
Normal file
39
Sources/Chalet/ChaletGui.ui
Normal file
@ -0,0 +1,39 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>CChaletGui</class>
|
||||
<widget class="QWidget" name="CChaletGui">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>615</width>
|
||||
<height>521</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>220</x>
|
||||
<y>40</y>
|
||||
<width>201</width>
|
||||
<height>31</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>12</pointsize>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Chalet</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
71
Sources/Chalet/ChaletMasterCtrlInterface.cpp
Normal file
71
Sources/Chalet/ChaletMasterCtrlInterface.cpp
Normal file
@ -0,0 +1,71 @@
|
||||
#include "ChaletMasterCtrlInterface.h"
|
||||
|
||||
CChaletMasterCtrlInterface::CChaletMasterCtrlInterface(CChalet *ProgramHandle)
|
||||
{
|
||||
mProgramHandle = ProgramHandle;
|
||||
}
|
||||
|
||||
int CChaletMasterCtrlInterface::DeviceConnectedToMaster(bool Connected)
|
||||
{
|
||||
|
||||
if(Connected)
|
||||
{
|
||||
qDebug("Chalet Interface connected to Master.");
|
||||
}
|
||||
else
|
||||
return RET_ERROR;
|
||||
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
int CChaletMasterCtrlInterface::DeviceFrameReceived(int TargetDeviceID, int TargetDeviceAddress, int SenderID, int SenderAddress, int MessageID, int DataSize, QByteArray Data)
|
||||
{
|
||||
Q_UNUSED(DataSize)
|
||||
Q_UNUSED(SenderID)
|
||||
Q_UNUSED(SenderAddress)
|
||||
|
||||
|
||||
if(TargetDeviceID == mMyDeviceID && (TargetDeviceAddress == BROADCAST_VALUE || TargetDeviceAddress == mDeviceAddress))
|
||||
{
|
||||
switch(MessageID)
|
||||
{
|
||||
case CHALET_INTERFACE_ACK:
|
||||
{
|
||||
qDebug("Chalet Interface ACK received :)");
|
||||
break;
|
||||
}
|
||||
|
||||
case CHALET_INTERFACE_GENERAL_STATUS_RESPONSE:
|
||||
{
|
||||
qDebug("Chalet General Status received :)");
|
||||
break;
|
||||
}
|
||||
|
||||
case CHALET_INTERFACE_AC_POWER_STATE_STATUS_RESPONSE:
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
case CHALET_INTERFACE_AC_POWER_SET_STATE_RESPONSE:
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
case CHALET_INTERFACE_BATTERY_VOLTAGE_RESPONSE:
|
||||
{
|
||||
break;
|
||||
}
|
||||
case CHALET_INTERFACE_GENERAL_STATUS_REQUEST:
|
||||
case CHALET_INTERFACE_AC_POWER_STATE_STATUS_REQUEST:
|
||||
case CHALET_INTERFACE_AC_POWER_SET_STATE_REQUEST:
|
||||
case CHALET_INTERFACE_BATTERY_VOLTAGE_REQUEST:
|
||||
default:
|
||||
{
|
||||
qDebug("Chalet: Invalid Ethernet Msg received from MasterCtrl: %d",MessageID);
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
return RET_OK;
|
||||
}
|
||||
19
Sources/Chalet/ChaletMasterCtrlInterface.h
Normal file
19
Sources/Chalet/ChaletMasterCtrlInterface.h
Normal file
@ -0,0 +1,19 @@
|
||||
#ifndef CCHALETMASTERCTRLINTERFACE_H
|
||||
#define CCHALETMASTERCTRLINTERFACE_H
|
||||
|
||||
#include "MasterCtrlInterface.h"
|
||||
class CChalet;
|
||||
|
||||
class CChaletMasterCtrlInterface: public CMasterCtrlInterface
|
||||
{
|
||||
public:
|
||||
CChaletMasterCtrlInterface(CChalet *ProgramHandle);
|
||||
|
||||
int DeviceFrameReceived(int TargetDeviceID, int TargetDeviceAddress, int SenderID, int SenderAddress, int MessageID, int DataSize, QByteArray Data);
|
||||
int DeviceConnectedToMaster(bool Connected = true);
|
||||
|
||||
private:
|
||||
CChalet *mProgramHandle;
|
||||
};
|
||||
|
||||
#endif // CCHALETMASTERCTRLINTERFACE_H
|
||||
@ -6,10 +6,15 @@ CGuiMain::CGuiMain(QWidget *parent)
|
||||
{
|
||||
mSMSGui = new CSMSGui(this);
|
||||
mSprinklerGui = new CSprinklerGui(this);
|
||||
mAvReceiverGui = new CAvReceiverGui(this);
|
||||
mMainTabWidget = new QTabWidget(this);
|
||||
mChaletGui = new CChaletGui(this);
|
||||
setCentralWidget(mMainTabWidget);
|
||||
mMainTabWidget->addTab(mSMSGui,"SMS");
|
||||
mMainTabWidget->addTab(mSprinklerGui,"Sprinkler");
|
||||
mMainTabWidget->addTab(mAvReceiverGui,"AV Receiver");
|
||||
mMainTabWidget->addTab(mChaletGui,"Chalet");
|
||||
|
||||
resize(1024,768);
|
||||
}
|
||||
|
||||
|
||||
@ -6,6 +6,9 @@
|
||||
#include "SMSGui.h"
|
||||
#include <QTabWidget>
|
||||
#include "SprinklerGui.h"
|
||||
#include "AvReceiverGui.h"
|
||||
#include "ChaletGui.h"
|
||||
|
||||
|
||||
class CGuiMain : public QMainWindow
|
||||
{
|
||||
@ -17,6 +20,8 @@ public:
|
||||
|
||||
CSMSGui *mSMSGui;
|
||||
CSprinklerGui *mSprinklerGui;
|
||||
CAvReceiverGui *mAvReceiverGui;
|
||||
CChaletGui *mChaletGui;
|
||||
QTabWidget *mMainTabWidget;
|
||||
int RespawnMainWindow();
|
||||
int HideMainWindow();
|
||||
|
||||
@ -15,7 +15,7 @@ int CMasterCtrlInterface::ConnectToMasterCtrl()
|
||||
connect(mNetworkCommSocket,SIGNAL(disconnected()),this,SLOT(NetworkSocketDisconnected()));
|
||||
connect(mNetworkCommSocket,SIGNAL(readyRead()),this,SLOT(NetworkSocketDataAvailable()));
|
||||
|
||||
mNetworkCommSocket->connectToHost(mMasterCtrlAddress,mNetworkPort);
|
||||
mNetworkCommSocket->connectToHost(mMasterCtrlIPAddress,mNetworkPort);
|
||||
|
||||
return RET_OK;
|
||||
}
|
||||
@ -94,3 +94,10 @@ void CMasterCtrlInterface::NetworkSocketDisconnected()
|
||||
qDebug("Disconnected from MasterCtrl");
|
||||
|
||||
}
|
||||
|
||||
int CMasterCtrlInterface::SendMasterCtrlCommand(unsigned char MessageID, QByteArray Data)
|
||||
{
|
||||
mNetworkCommSocket->write(GetTxPacket(MessageID,0,Data.data(),Data.size(),1,ID_MASTER,mMyDeviceID,mDeviceAddress));
|
||||
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
@ -18,17 +18,20 @@ public:
|
||||
QTcpSocket *mNetworkCommSocket;
|
||||
int mDeviceAddress;
|
||||
int mNetworkPort;
|
||||
QString mMasterCtrlAddress;
|
||||
QString mMasterCtrlIPAddress;
|
||||
int mMyDeviceID;
|
||||
|
||||
int ConnectToMasterCtrl();
|
||||
int DisconnectMasterCtrl();
|
||||
int SendMasterCtrlCommand(unsigned char MessageID, QByteArray Data);
|
||||
virtual int NewFrameReceived(int TargetDeviceID, int TargetDeviceAddress, int SenderID, int SenderAddress, int MessageID, int DataSize, QByteArray Data);
|
||||
|
||||
virtual int DeviceFrameReceived(int TargetDeviceID, int TargetDeviceAddress, int SenderID, int SenderAddress, int MessageID, int DataSize, QByteArray Data) = 0;
|
||||
virtual int DeviceConnectedToMaster(bool Connected = true) = 0;
|
||||
|
||||
|
||||
|
||||
|
||||
public slots:
|
||||
void NetworkSocketConnected();
|
||||
void NetworkSocketDataAvailable();
|
||||
|
||||
@ -27,16 +27,20 @@ jean-francois.martel@polymtl.ca
|
||||
|
||||
enum eFrameIndex
|
||||
{
|
||||
FRAME_HEADER_INDEX,
|
||||
FRAME_SENDER_ID_INDEX,
|
||||
FRAME_HEADER_INDEX = 0,
|
||||
FRAME_SENDER_ADDRESS_INDEX,
|
||||
FRAME_DEST_ID_INDEX,
|
||||
FRAME_SENDER_DEVICE_ID_INDEX,
|
||||
FRAME_DEST_DEVICE_ID_INDEX,
|
||||
FRAME_DEST_ADDRESS_INDEX,
|
||||
FRAME_FLAGS_INDEX,
|
||||
FRAME_COMMAND_INDEX,
|
||||
FRAME_SIZE1_INDEX,
|
||||
FRAME_SIZE2_INDEX,
|
||||
FRAME_DATA_INDEX
|
||||
FRAME_SIZE3_INDEX,
|
||||
FRAME_SIZE4_INDEX,
|
||||
FRAME_DATA_INDEX,
|
||||
|
||||
FRAME_INDEX_NBR
|
||||
};
|
||||
|
||||
enum DEVICES_IDS
|
||||
@ -47,12 +51,14 @@ enum DEVICES_IDS
|
||||
ID_AV_MUX, //Audio Video Multiplexer
|
||||
ID_IR_REMOTE, //Infra red transmitter
|
||||
ID_DEADBOLT_DEVICE,
|
||||
ID_RECEIVER_AMP,
|
||||
ID_AV_RECEIVER,
|
||||
ID_SMS_CLIENT,
|
||||
ID_ETHERNET_VIRTUAL,
|
||||
ID_SPRINKLER_DEVICE,
|
||||
ID_SPRINKLER_INTERFACE,
|
||||
ID_DEADBOLT_INTERFACE,
|
||||
ID_AVRECEIVER_INTERFACE,
|
||||
ID_CHALET_INTERFACE,
|
||||
ID_NB_DEVICE_ID
|
||||
|
||||
};
|
||||
@ -221,4 +227,39 @@ enum ETHERNET_NETWORK_VIRTUAL_CMDS
|
||||
|
||||
};
|
||||
|
||||
enum AV_RECEIVER_INTERFACE_CMDS
|
||||
{
|
||||
AV_RECEIVER_INTERFACE_ACK = 1,
|
||||
AV_RECEIVER_INTERFACE_GENERAL_STATUS_REQUEST,
|
||||
AV_RECEIVER_INTERFACE_GENERAL_STATUS_RESPONSE,
|
||||
AV_RECEIVER_INTERFACE_SET_MAIN_POWER_REQUEST,
|
||||
AV_RECEIVER_INTERFACE_SET_MAIN_POWER_RESPONSE,
|
||||
AV_RECEIVER_INTERFACE_SET_SPEAKERB_REQUEST,
|
||||
AV_RECEIVER_INTERFACE_SET_SPEAKERB_RESPONSE,
|
||||
AV_RECEIVER_INTERFACE_SET_SPEAKERA_REQUEST,
|
||||
AV_RECEIVER_INTERFACE_SET_SPEAKERA_RESPONSE,
|
||||
AV_RECEIVER_INTERFACE_SET_SPEAKERS_REQUEST,
|
||||
AV_RECEIVER_INTERFACE_SET_SPEAKERS_RESPONSE,
|
||||
AV_RECEIVER_INTERFACE_SEND_DIRECT_CMD_REQUEST,
|
||||
AV_RECEIVER_INTERFACE_SEND_DIRECT_CMD_RESPONSE,
|
||||
|
||||
|
||||
MAX_AV_RECEIVER_INTERFACE_CMD
|
||||
};
|
||||
|
||||
enum CHALET_INTERFACE_CMDS
|
||||
{
|
||||
CHALET_INTERFACE_ACK = 1,
|
||||
CHALET_INTERFACE_GENERAL_STATUS_REQUEST,
|
||||
CHALET_INTERFACE_GENERAL_STATUS_RESPONSE,
|
||||
CHALET_INTERFACE_AC_POWER_STATE_STATUS_REQUEST,
|
||||
CHALET_INTERFACE_AC_POWER_STATE_STATUS_RESPONSE,
|
||||
CHALET_INTERFACE_AC_POWER_SET_STATE_REQUEST,
|
||||
CHALET_INTERFACE_AC_POWER_SET_STATE_RESPONSE,
|
||||
CHALET_INTERFACE_BATTERY_VOLTAGE_REQUEST,
|
||||
CHALET_INTERFACE_BATTERY_VOLTAGE_RESPONSE,
|
||||
|
||||
MAX_CHALET_INTERFACE_CMD
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@ -41,32 +41,35 @@ int CSMSGui::FullConversationsUpdate()
|
||||
|
||||
|
||||
|
||||
for(int i = 0; i < ConversationsList->size(); i++)
|
||||
if(ConversationsList->size() > 0)
|
||||
{
|
||||
QFont NewMsgFont;
|
||||
NewMsgFont.setBold(true);
|
||||
|
||||
QTreeWidgetItem *NewContact = new QTreeWidgetItem(mContactsTreeWidget);
|
||||
CSMSConversation *Conversation = ConversationsList->at(i);
|
||||
CSMSMessage *LastMsg = Conversation->GetMostRecentMessage();
|
||||
NewContact->setIcon(0,QIcon(Conversation->GetConversationContact()->mContactPicture));
|
||||
if(LastMsg->mIsRead == false)
|
||||
for(int i = 0; i < ConversationsList->size(); i++)
|
||||
{
|
||||
NewContact->setFont(1,NewMsgFont);
|
||||
NewContact->setFont(2,NewMsgFont);
|
||||
}
|
||||
NewContact->setText(1,Conversation->GetConversationContact()->mContactName);
|
||||
NewContact->setText(2,Conversation->GetConversationContact()->mContactNumber);
|
||||
// QVariant data = QVariant::fromValue((void*)Conversation);
|
||||
NewContact->setData(0,Qt::UserRole,QVariant::fromValue((void*)Conversation));
|
||||
mContactsTreeWidget->insertTopLevelItem(0,NewContact);
|
||||
}
|
||||
QFont NewMsgFont;
|
||||
NewMsgFont.setBold(true);
|
||||
|
||||
mContactsTreeWidget->resizeColumnToContents(0);
|
||||
mContactsTreeWidget->resizeColumnToContents(1);
|
||||
mContactsTreeWidget->resizeColumnToContents(2);
|
||||
mContactsTreeWidget->topLevelItem(0)->setSelected(true);
|
||||
ConversationClicked(mContactsTreeWidget->topLevelItem(0),0);
|
||||
QTreeWidgetItem *NewContact = new QTreeWidgetItem(mContactsTreeWidget);
|
||||
CSMSConversation *Conversation = ConversationsList->at(i);
|
||||
CSMSMessage *LastMsg = Conversation->GetMostRecentMessage();
|
||||
NewContact->setIcon(0,QIcon(Conversation->GetConversationContact()->mContactPicture));
|
||||
if(LastMsg->mIsRead == false)
|
||||
{
|
||||
NewContact->setFont(1,NewMsgFont);
|
||||
NewContact->setFont(2,NewMsgFont);
|
||||
}
|
||||
NewContact->setText(1,Conversation->GetConversationContact()->mContactName);
|
||||
NewContact->setText(2,Conversation->GetConversationContact()->mContactNumber);
|
||||
// QVariant data = QVariant::fromValue((void*)Conversation);
|
||||
NewContact->setData(0,Qt::UserRole,QVariant::fromValue((void*)Conversation));
|
||||
mContactsTreeWidget->insertTopLevelItem(0,NewContact);
|
||||
}
|
||||
|
||||
mContactsTreeWidget->resizeColumnToContents(0);
|
||||
mContactsTreeWidget->resizeColumnToContents(1);
|
||||
mContactsTreeWidget->resizeColumnToContents(2);
|
||||
mContactsTreeWidget->topLevelItem(0)->setSelected(true);
|
||||
ConversationClicked(mContactsTreeWidget->topLevelItem(0),0);
|
||||
}
|
||||
|
||||
|
||||
// mContactsTreeWidget->addTopLevelItem(QTreeWidget());
|
||||
|
||||
@ -11,10 +11,10 @@ CSMSMasterCtrlInterface::CSMSMasterCtrlInterface(CSMSClient *ProgramHandle)
|
||||
{
|
||||
mDeviceAddress = 1;
|
||||
mNetworkPort = 2182;
|
||||
// mMasterCtrlAddress = "127.0.0.1";
|
||||
mMasterCtrlIPAddress = "127.0.0.1";
|
||||
// mNetworkPort = 6463;
|
||||
// mMasterCtrlAddress = "192.168.0.100";
|
||||
mMasterCtrlAddress = "mortel.myftp.org";
|
||||
// mMasterCtrlIPAddress = "192.168.0.100";
|
||||
// mMasterCtrlIPAddress = "mortel.myftp.org";
|
||||
mNetworkCommSocket = 0;
|
||||
mMyDeviceID = ID_SMS_CLIENT;
|
||||
|
||||
@ -40,7 +40,7 @@ CSMSMasterCtrlInterface::~CSMSMasterCtrlInterface()
|
||||
//// connect(mNetworkCommSocket,SIGNAL(disconnected()),this,SLOT(NetworkSocketDisconnected()));
|
||||
//// connect(mNetworkCommSocket,SIGNAL(readyRead()),this,SLOT(NetworkSocketDataAvailable()));
|
||||
|
||||
//// mNetworkCommSocket->connectToHost(mMasterCtrlAddress,mNetworkPort);
|
||||
//// mNetworkCommSocket->connectToHost(mMasterCtrlIPAddress,mNetworkPort);
|
||||
|
||||
// return RET_OK;
|
||||
//}
|
||||
|
||||
@ -11,9 +11,9 @@ CSprinklerMasterCtrlInterface::CSprinklerMasterCtrlInterface(CSprinkler *Program
|
||||
{
|
||||
mDeviceAddress = 1;
|
||||
mNetworkPort = 2182;
|
||||
mMasterCtrlAddress = "127.0.0.1";
|
||||
mMasterCtrlIPAddress = "127.0.0.1";
|
||||
// mNetworkPort = 6463;
|
||||
// mMasterCtrlAddress = "192.168.0.112";
|
||||
// mMasterCtrlIPAddress = "192.168.0.112";
|
||||
mNetworkCommSocket = 0;
|
||||
mMyDeviceID = ID_SPRINKLER_INTERFACE;
|
||||
|
||||
|
||||
@ -7,6 +7,7 @@ CSystemGui::CSystemGui(QObject *parent) : QObject(parent)
|
||||
mProgramSettings = new CProgramSettings();
|
||||
mSMSClient = new CSMSClient(mGui->mSMSGui,&mSettings.mVoipMSSettings);
|
||||
mSprinklers = new CSprinkler(mGui->mSprinklerGui);
|
||||
mAvReceiver = new CAvReceiver(mGui->mAvReceiverGui);
|
||||
|
||||
mSysTrayMgr = new CSystemTrayManager();
|
||||
mSysTrayMgr->mProgramHandle=this;
|
||||
@ -20,6 +21,7 @@ CSystemGui::~CSystemGui()
|
||||
delete mSMSClient;
|
||||
delete mProgramSettings;
|
||||
delete mSysTrayMgr;
|
||||
delete mAvReceiver;
|
||||
|
||||
}
|
||||
|
||||
@ -28,6 +30,7 @@ void CSystemGui::Start()
|
||||
mProgramSettings->LoadSettings(&mSettings);
|
||||
mGui->show();
|
||||
mSMSClient->Start();
|
||||
mAvReceiver->Start();
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -7,6 +7,9 @@
|
||||
#include "ProgramSettings.h"
|
||||
#include "SystemTrayManager.h"
|
||||
#include "Sprinkler.h"
|
||||
#include "AvReceiverGui.h"
|
||||
#include "AvReceiver.h"
|
||||
|
||||
|
||||
class CSystemGui : public QObject
|
||||
{
|
||||
@ -29,6 +32,7 @@ private:
|
||||
CSettings mSettings;
|
||||
CSystemTrayManager *mSysTrayMgr;
|
||||
CSprinkler *mSprinklers;
|
||||
CAvReceiver *mAvReceiver;
|
||||
|
||||
|
||||
signals:
|
||||
|
||||
@ -25,8 +25,13 @@ DEFINES += QT_DEPRECATED_WARNINGS
|
||||
INCLUDEPATH += Sources\
|
||||
Sources/SMSClient\
|
||||
Sources/Sprinkler\
|
||||
Sources/AvReceiver\
|
||||
Sources/Chalet\
|
||||
|
||||
SOURCES += \
|
||||
Sources/Chalet/Chalet.cpp \
|
||||
Sources/Chalet/ChaletGui.cpp \
|
||||
Sources/Chalet/ChaletMasterCtrlInterface.cpp \
|
||||
Sources/GuiMain.cpp \
|
||||
Sources/main.cpp \
|
||||
Sources/NetworkProtocol.cpp \
|
||||
@ -46,9 +51,16 @@ SOURCES += \
|
||||
Sources/ToggleSwitch.cpp \
|
||||
Sources/Sprinkler/Sprinkler.cpp \
|
||||
Sources/Sprinkler/SprinklerMasterCtrlInterface.cpp \
|
||||
Sources/Sprinkler/SprinklerDevice.cpp
|
||||
Sources/Sprinkler/SprinklerDevice.cpp \
|
||||
Sources/AvReceiver/AvReceiverGui.cpp \
|
||||
Sources/AvReceiver/AvReceiver.cpp \
|
||||
Sources/AvReceiver/AvReceiverNetworkCtrlInterface.cpp \
|
||||
Sources/AvReceiver/AvReceiverData.cpp
|
||||
|
||||
HEADERS += Sources/AbstractNetworkInterface.h \
|
||||
Sources/Chalet/Chalet.h \
|
||||
Sources/Chalet/ChaletGui.h \
|
||||
Sources/Chalet/ChaletMasterCtrlInterface.h \
|
||||
Sources/GuiMain.h \
|
||||
Sources/NetworkProtocol.h \
|
||||
Sources/ProgramSettings.h \
|
||||
@ -69,9 +81,15 @@ HEADERS += Sources/AbstractNetworkInterface.h \
|
||||
Sources/Sprinkler/Sprinkler.h \
|
||||
Sources/Sprinkler/SprinklerDevice.h \
|
||||
Sources/Sprinkler/SprinklerMasterCtrlInterface.h \
|
||||
Sources/Sprinkler/SprinklerMasterCtrlInterface.h
|
||||
Sources/Sprinkler/SprinklerMasterCtrlInterface.h \
|
||||
Sources/AvReceiver/AvReceiverGui.h \
|
||||
Sources/AvReceiver/AvReceiver.h \
|
||||
Sources/AvReceiver/AvReceiverNetworkCtrlInterface.h \
|
||||
Sources/AvReceiver/AvReceiverData.h
|
||||
|
||||
FORMS += \
|
||||
SMSGui.ui \
|
||||
Sources/Chalet/ChaletGui.ui \
|
||||
Sources/Sprinkler/SprinklerGui.ui \
|
||||
Sources/Sprinkler/SprinklerDeviceGuiItem.ui
|
||||
Sources/Sprinkler/SprinklerDeviceGuiItem.ui \
|
||||
Sources/AvReceiver/AvReceiverGui.ui
|
||||
|
||||
68
ui_AvReceiverGui.h
Normal file
68
ui_AvReceiverGui.h
Normal file
@ -0,0 +1,68 @@
|
||||
/********************************************************************************
|
||||
** Form generated from reading UI file 'AvReceiverGui.ui'
|
||||
**
|
||||
** Created by: Qt User Interface Compiler version 5.14.2
|
||||
**
|
||||
** WARNING! All changes made in this file will be lost when recompiling UI file!
|
||||
********************************************************************************/
|
||||
|
||||
#ifndef UI_AVRECEIVERGUI_H
|
||||
#define UI_AVRECEIVERGUI_H
|
||||
|
||||
#include <QtCore/QVariant>
|
||||
#include <QtWidgets/QApplication>
|
||||
#include <QtWidgets/QCheckBox>
|
||||
#include <QtWidgets/QLabel>
|
||||
#include <QtWidgets/QWidget>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class Ui_CAvReceiverGui
|
||||
{
|
||||
public:
|
||||
QLabel *label;
|
||||
QLabel *mRcvrStatusLabel;
|
||||
QCheckBox *mSpkBCheckBox;
|
||||
QCheckBox *mSpkACheckBox;
|
||||
|
||||
void setupUi(QWidget *CAvReceiverGui)
|
||||
{
|
||||
if (CAvReceiverGui->objectName().isEmpty())
|
||||
CAvReceiverGui->setObjectName(QString::fromUtf8("CAvReceiverGui"));
|
||||
CAvReceiverGui->resize(796, 447);
|
||||
label = new QLabel(CAvReceiverGui);
|
||||
label->setObjectName(QString::fromUtf8("label"));
|
||||
label->setGeometry(QRect(230, 30, 201, 16));
|
||||
mRcvrStatusLabel = new QLabel(CAvReceiverGui);
|
||||
mRcvrStatusLabel->setObjectName(QString::fromUtf8("mRcvrStatusLabel"));
|
||||
mRcvrStatusLabel->setGeometry(QRect(100, 110, 181, 231));
|
||||
mSpkBCheckBox = new QCheckBox(CAvReceiverGui);
|
||||
mSpkBCheckBox->setObjectName(QString::fromUtf8("mSpkBCheckBox"));
|
||||
mSpkBCheckBox->setGeometry(QRect(570, 130, 70, 17));
|
||||
mSpkACheckBox = new QCheckBox(CAvReceiverGui);
|
||||
mSpkACheckBox->setObjectName(QString::fromUtf8("mSpkACheckBox"));
|
||||
mSpkACheckBox->setGeometry(QRect(570, 160, 70, 17));
|
||||
|
||||
retranslateUi(CAvReceiverGui);
|
||||
|
||||
QMetaObject::connectSlotsByName(CAvReceiverGui);
|
||||
} // setupUi
|
||||
|
||||
void retranslateUi(QWidget *CAvReceiverGui)
|
||||
{
|
||||
CAvReceiverGui->setWindowTitle(QCoreApplication::translate("CAvReceiverGui", "Form", nullptr));
|
||||
label->setText(QCoreApplication::translate("CAvReceiverGui", "AvReceiver", nullptr));
|
||||
mRcvrStatusLabel->setText(QCoreApplication::translate("CAvReceiverGui", "TextLabel", nullptr));
|
||||
mSpkBCheckBox->setText(QCoreApplication::translate("CAvReceiverGui", "Speaker B", nullptr));
|
||||
mSpkACheckBox->setText(QCoreApplication::translate("CAvReceiverGui", "Speaker A", nullptr));
|
||||
} // retranslateUi
|
||||
|
||||
};
|
||||
|
||||
namespace Ui {
|
||||
class CAvReceiverGui: public Ui_CAvReceiverGui {};
|
||||
} // namespace Ui
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // UI_AVRECEIVERGUI_H
|
||||
57
ui_ChaletGui.h
Normal file
57
ui_ChaletGui.h
Normal file
@ -0,0 +1,57 @@
|
||||
/********************************************************************************
|
||||
** Form generated from reading UI file 'ChaletGui.ui'
|
||||
**
|
||||
** Created by: Qt User Interface Compiler version 5.14.2
|
||||
**
|
||||
** WARNING! All changes made in this file will be lost when recompiling UI file!
|
||||
********************************************************************************/
|
||||
|
||||
#ifndef UI_CHALETGUI_H
|
||||
#define UI_CHALETGUI_H
|
||||
|
||||
#include <QtCore/QVariant>
|
||||
#include <QtWidgets/QApplication>
|
||||
#include <QtWidgets/QLabel>
|
||||
#include <QtWidgets/QWidget>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class Ui_CChaletGui
|
||||
{
|
||||
public:
|
||||
QLabel *label;
|
||||
|
||||
void setupUi(QWidget *CChaletGui)
|
||||
{
|
||||
if (CChaletGui->objectName().isEmpty())
|
||||
CChaletGui->setObjectName(QString::fromUtf8("CChaletGui"));
|
||||
CChaletGui->resize(615, 521);
|
||||
label = new QLabel(CChaletGui);
|
||||
label->setObjectName(QString::fromUtf8("label"));
|
||||
label->setGeometry(QRect(220, 40, 201, 31));
|
||||
QFont font;
|
||||
font.setPointSize(12);
|
||||
font.setBold(true);
|
||||
font.setWeight(75);
|
||||
label->setFont(font);
|
||||
|
||||
retranslateUi(CChaletGui);
|
||||
|
||||
QMetaObject::connectSlotsByName(CChaletGui);
|
||||
} // setupUi
|
||||
|
||||
void retranslateUi(QWidget *CChaletGui)
|
||||
{
|
||||
CChaletGui->setWindowTitle(QCoreApplication::translate("CChaletGui", "Form", nullptr));
|
||||
label->setText(QCoreApplication::translate("CChaletGui", "Chalet", nullptr));
|
||||
} // retranslateUi
|
||||
|
||||
};
|
||||
|
||||
namespace Ui {
|
||||
class CChaletGui: public Ui_CChaletGui {};
|
||||
} // namespace Ui
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // UI_CHALETGUI_H
|
||||
@ -1,7 +1,7 @@
|
||||
/********************************************************************************
|
||||
** Form generated from reading UI file 'SprinklerDeviceGuiItem.ui'
|
||||
**
|
||||
** Created by: Qt User Interface Compiler version 5.5.0
|
||||
** Created by: Qt User Interface Compiler version 5.14.2
|
||||
**
|
||||
** WARNING! All changes made in this file will be lost when recompiling UI file!
|
||||
********************************************************************************/
|
||||
@ -10,10 +10,7 @@
|
||||
#define UI_SPRINKLERDEVICEGUIITEM_H
|
||||
|
||||
#include <QtCore/QVariant>
|
||||
#include <QtWidgets/QAction>
|
||||
#include <QtWidgets/QApplication>
|
||||
#include <QtWidgets/QButtonGroup>
|
||||
#include <QtWidgets/QHeaderView>
|
||||
#include <QtWidgets/QLabel>
|
||||
#include <QtWidgets/QPushButton>
|
||||
#include <QtWidgets/QWidget>
|
||||
@ -31,19 +28,19 @@ public:
|
||||
void setupUi(QWidget *CSprinklerDeviceGuiItem)
|
||||
{
|
||||
if (CSprinklerDeviceGuiItem->objectName().isEmpty())
|
||||
CSprinklerDeviceGuiItem->setObjectName(QStringLiteral("CSprinklerDeviceGuiItem"));
|
||||
CSprinklerDeviceGuiItem->setObjectName(QString::fromUtf8("CSprinklerDeviceGuiItem"));
|
||||
CSprinklerDeviceGuiItem->resize(540, 399);
|
||||
SprinklerAddress = new QLabel(CSprinklerDeviceGuiItem);
|
||||
SprinklerAddress->setObjectName(QStringLiteral("SprinklerAddress"));
|
||||
SprinklerAddress->setObjectName(QString::fromUtf8("SprinklerAddress"));
|
||||
SprinklerAddress->setGeometry(QRect(20, 10, 101, 41));
|
||||
SprinklerFlowSpeed = new QLabel(CSprinklerDeviceGuiItem);
|
||||
SprinklerFlowSpeed->setObjectName(QStringLiteral("SprinklerFlowSpeed"));
|
||||
SprinklerFlowSpeed->setObjectName(QString::fromUtf8("SprinklerFlowSpeed"));
|
||||
SprinklerFlowSpeed->setGeometry(QRect(20, 50, 131, 41));
|
||||
label = new QLabel(CSprinklerDeviceGuiItem);
|
||||
label->setObjectName(QStringLiteral("label"));
|
||||
label->setObjectName(QString::fromUtf8("label"));
|
||||
label->setGeometry(QRect(30, 100, 54, 17));
|
||||
pushButton = new QPushButton(CSprinklerDeviceGuiItem);
|
||||
pushButton->setObjectName(QStringLiteral("pushButton"));
|
||||
pushButton->setObjectName(QString::fromUtf8("pushButton"));
|
||||
pushButton->setGeometry(QRect(220, 20, 80, 25));
|
||||
pushButton->setCheckable(true);
|
||||
|
||||
@ -54,11 +51,11 @@ public:
|
||||
|
||||
void retranslateUi(QWidget *CSprinklerDeviceGuiItem)
|
||||
{
|
||||
CSprinklerDeviceGuiItem->setWindowTitle(QApplication::translate("CSprinklerDeviceGuiItem", "Form", 0));
|
||||
SprinklerAddress->setText(QApplication::translate("CSprinklerDeviceGuiItem", "Address : ", 0));
|
||||
SprinklerFlowSpeed->setText(QApplication::translate("CSprinklerDeviceGuiItem", "Flow speed :", 0));
|
||||
label->setText(QApplication::translate("CSprinklerDeviceGuiItem", "State : ", 0));
|
||||
pushButton->setText(QApplication::translate("CSprinklerDeviceGuiItem", "PushButton", 0));
|
||||
CSprinklerDeviceGuiItem->setWindowTitle(QCoreApplication::translate("CSprinklerDeviceGuiItem", "Form", nullptr));
|
||||
SprinklerAddress->setText(QCoreApplication::translate("CSprinklerDeviceGuiItem", "Address : ", nullptr));
|
||||
SprinklerFlowSpeed->setText(QCoreApplication::translate("CSprinklerDeviceGuiItem", "Flow speed :", nullptr));
|
||||
label->setText(QCoreApplication::translate("CSprinklerDeviceGuiItem", "State : ", nullptr));
|
||||
pushButton->setText(QCoreApplication::translate("CSprinklerDeviceGuiItem", "PushButton", nullptr));
|
||||
} // retranslateUi
|
||||
|
||||
};
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/********************************************************************************
|
||||
** Form generated from reading UI file 'SprinklerGui.ui'
|
||||
**
|
||||
** Created by: Qt User Interface Compiler version 5.5.0
|
||||
** Created by: Qt User Interface Compiler version 5.14.2
|
||||
**
|
||||
** WARNING! All changes made in this file will be lost when recompiling UI file!
|
||||
********************************************************************************/
|
||||
@ -10,10 +10,7 @@
|
||||
#define UI_SPRINKLERGUI_H
|
||||
|
||||
#include <QtCore/QVariant>
|
||||
#include <QtWidgets/QAction>
|
||||
#include <QtWidgets/QApplication>
|
||||
#include <QtWidgets/QButtonGroup>
|
||||
#include <QtWidgets/QHeaderView>
|
||||
#include <QtWidgets/QLabel>
|
||||
#include <QtWidgets/QWidget>
|
||||
#include "ToggleSwitch.h"
|
||||
@ -29,13 +26,13 @@ public:
|
||||
void setupUi(QWidget *CSprinklerGui)
|
||||
{
|
||||
if (CSprinklerGui->objectName().isEmpty())
|
||||
CSprinklerGui->setObjectName(QStringLiteral("CSprinklerGui"));
|
||||
CSprinklerGui->setObjectName(QString::fromUtf8("CSprinklerGui"));
|
||||
CSprinklerGui->resize(1047, 560);
|
||||
label = new QLabel(CSprinklerGui);
|
||||
label->setObjectName(QStringLiteral("label"));
|
||||
label->setObjectName(QString::fromUtf8("label"));
|
||||
label->setGeometry(QRect(20, 10, 201, 51));
|
||||
mValveSwitch = new CToggleSwitch(CSprinklerGui);
|
||||
mValveSwitch->setObjectName(QStringLiteral("mValveSwitch"));
|
||||
mValveSwitch->setObjectName(QString::fromUtf8("mValveSwitch"));
|
||||
mValveSwitch->setGeometry(QRect(220, 90, 91, 81));
|
||||
|
||||
retranslateUi(CSprinklerGui);
|
||||
@ -45,8 +42,8 @@ public:
|
||||
|
||||
void retranslateUi(QWidget *CSprinklerGui)
|
||||
{
|
||||
CSprinklerGui->setWindowTitle(QApplication::translate("CSprinklerGui", "Form", 0));
|
||||
label->setText(QApplication::translate("CSprinklerGui", "Sprinklers network", 0));
|
||||
CSprinklerGui->setWindowTitle(QCoreApplication::translate("CSprinklerGui", "Form", nullptr));
|
||||
label->setText(QCoreApplication::translate("CSprinklerGui", "Sprinklers network", nullptr));
|
||||
} // retranslateUi
|
||||
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user