Ben des affaires...
This commit is contained in:
parent
940287a97e
commit
50d091c68c
@ -41,6 +41,16 @@ int CChalet::ChaletStatusReceived(CChaletMainStatus Status)
|
|||||||
|
|
||||||
return RET_OK;
|
return RET_OK;
|
||||||
}
|
}
|
||||||
|
int CChalet::ChaletLogReceived(QByteArray *Log)
|
||||||
|
{
|
||||||
|
mChaletGui->UpdateChaletLogPlot(Log);
|
||||||
|
return RET_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int CChalet::ChaletCommActivity()
|
||||||
|
{
|
||||||
|
return mChaletGui->ChaletCommActivity();
|
||||||
|
}
|
||||||
|
|
||||||
int CChalet::WiFiToggleButtonPressed(bool RequestedState)
|
int CChalet::WiFiToggleButtonPressed(bool RequestedState)
|
||||||
{
|
{
|
||||||
@ -89,3 +99,28 @@ int CChalet::RebootCPUButtonPressed()
|
|||||||
{
|
{
|
||||||
return mNetworkInterface->SendMasterCtrlCommand(CHALET_INTERFACE_REBOOT_CPU_REQUEST,QByteArray());
|
return mNetworkInterface->SendMasterCtrlCommand(CHALET_INTERFACE_REBOOT_CPU_REQUEST,QByteArray());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int CChalet::ConnectedToMaster(bool connected)
|
||||||
|
{
|
||||||
|
if(connected)
|
||||||
|
{
|
||||||
|
mNetworkInterface->SendMasterCtrlCommand(CHALET_INTERFACE_GET_TODAYS_DATA_LOG_REQUEST,QByteArray());
|
||||||
|
}
|
||||||
|
return RET_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int CChalet::RequestChaletLogs(QDate StartDate)
|
||||||
|
{
|
||||||
|
if(StartDate > QDate::currentDate())
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
QByteArray StartDateData;
|
||||||
|
QDataStream Strm(&StartDateData,QIODevice::WriteOnly);
|
||||||
|
Strm.device()->seek(0);
|
||||||
|
|
||||||
|
Strm << StartDate;
|
||||||
|
|
||||||
|
return mNetworkInterface->SendMasterCtrlCommand(CHALET_INTERFACE_GET_DATA_LOG_REQUEST,StartDateData);
|
||||||
|
|
||||||
|
}
|
||||||
|
|||||||
@ -23,11 +23,15 @@ public:
|
|||||||
|
|
||||||
int Start();
|
int Start();
|
||||||
int ChaletStatusReceived(CChaletMainStatus Status);
|
int ChaletStatusReceived(CChaletMainStatus Status);
|
||||||
|
int ChaletLogReceived(QByteArray *Log);
|
||||||
|
int ConnectedToMaster(bool connected);
|
||||||
|
int ChaletCommActivity();
|
||||||
|
|
||||||
int WiFiToggleButtonPressed(bool RequestedState);
|
int WiFiToggleButtonPressed(bool RequestedState);
|
||||||
int InverterToggleButtonPressed(bool RequestedState);
|
int InverterToggleButtonPressed(bool RequestedState);
|
||||||
int DoHarakiriButtonClicked(bool Verified);
|
int DoHarakiriButtonClicked(bool Verified);
|
||||||
int RebootCPUButtonPressed();
|
int RebootCPUButtonPressed();
|
||||||
|
int RequestChaletLogs(QDate StartDate);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
|
||||||
|
|||||||
@ -7,8 +7,11 @@ CChaletMainStatus::CChaletMainStatus()
|
|||||||
{
|
{
|
||||||
mInverterRelayStatus = CHALET_POWER_RELAY_UNKNOWN_STATE;
|
mInverterRelayStatus = CHALET_POWER_RELAY_UNKNOWN_STATE;
|
||||||
mWiFiModuleStatus = WIFI_UNKNOWN_STATE;
|
mWiFiModuleStatus = WIFI_UNKNOWN_STATE;
|
||||||
|
mCurrentSensorStatus = CHALET_CURRENT_SENSOR_UNKNOWN_STATE;
|
||||||
mBatteryCurrent = 0;
|
mBatteryCurrent = 0;
|
||||||
mBatteryVoltage = 0;
|
mBatteryVoltage = 0;
|
||||||
|
mIsOnline = false;
|
||||||
|
mLostRequestPercentage = 0;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -17,26 +20,36 @@ int CChaletMainStatus::FromByteArray(QByteArray Data)
|
|||||||
QDataStream Strm(Data);
|
QDataStream Strm(Data);
|
||||||
Strm.device()->seek(0);
|
Strm.device()->seek(0);
|
||||||
|
|
||||||
|
Strm >> *this;
|
||||||
|
/*
|
||||||
|
|
||||||
Strm >> mInverterRelayStatus;
|
Strm >> mInverterRelayStatus;
|
||||||
Strm >> mWiFiModuleStatus;
|
Strm >> mWiFiModuleStatus;
|
||||||
Strm >> mBatteryVoltage;
|
Strm >> mBatteryVoltage;
|
||||||
Strm >> mBatteryCurrent;
|
Strm >> mBatteryCurrent;
|
||||||
Strm >> mBatterySOC;
|
Strm >> mBatterySOC;
|
||||||
|
Strm >> mIsOnline;
|
||||||
// ChaletStatus[0] = GetChaletPowerRelayState(); //Inverter relay status
|
Strm >> mCurrentSensorStatus;
|
||||||
// ChaletStatus[1] = GetWiFiSate(); //Wifi Module state
|
Strm >> mLostRequestPercentage;*/
|
||||||
// ChaletStatus[2] = 3; //Battery Voltage 1
|
|
||||||
// ChaletStatus[3] = 4; //Battery voltage 2
|
|
||||||
// ChaletStatus[4] = 5; //Battery current 1
|
|
||||||
// ChaletStatus[5] = 6; //Batgtery current 2
|
|
||||||
// ChaletStatus[6] = 7; //Battery SOC
|
|
||||||
// ChaletStatus[7] = 8; //Snatch
|
|
||||||
// ChaletStatus[8] = 9;
|
|
||||||
// ChaletStatus[9] = 10;
|
|
||||||
|
|
||||||
return RET_OK;
|
return RET_OK;
|
||||||
}
|
}
|
||||||
|
QDataStream &operator>>(QDataStream &in, CChaletMainStatus &dest)
|
||||||
|
{
|
||||||
|
in >> dest.mInverterRelayStatus
|
||||||
|
>> dest.mWiFiModuleStatus
|
||||||
|
>> dest.mBatteryVoltage
|
||||||
|
>> dest.mBatteryCurrent
|
||||||
|
>> dest.mBatterySOC
|
||||||
|
>> dest.mIsOnline
|
||||||
|
>> dest.mCurrentSensorStatus
|
||||||
|
>> dest.mLostRequestPercentage
|
||||||
|
>> dest.mThisStatusDateTime
|
||||||
|
>> dest.mLastLoraStatus
|
||||||
|
>> dest.mStatusToggleBit;
|
||||||
|
|
||||||
|
return in;
|
||||||
|
}
|
||||||
//QByteArray CChaletMainStatus::ToByteArray()
|
//QByteArray CChaletMainStatus::ToByteArray()
|
||||||
//{
|
//{
|
||||||
// QByteArray Data;
|
// QByteArray Data;
|
||||||
|
|||||||
@ -21,6 +21,13 @@ enum eChaletPowerRelayState
|
|||||||
CHALET_POWER_RELAY_UNKNOWN_STATE
|
CHALET_POWER_RELAY_UNKNOWN_STATE
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum eChaletCurrentSensorState
|
||||||
|
{
|
||||||
|
CHALET_CURRENT_SENSOR_DEFECT_STATE = 0,
|
||||||
|
CHALET_CURRENT_SENSOR_OK_STATE,
|
||||||
|
CHALET_CURRENT_SENSOR_UNKNOWN_STATE
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
class CChaletMainStatus
|
class CChaletMainStatus
|
||||||
{
|
{
|
||||||
@ -33,17 +40,25 @@ public:
|
|||||||
|
|
||||||
quint8 mInverterRelayStatus;
|
quint8 mInverterRelayStatus;
|
||||||
quint8 mWiFiModuleStatus;
|
quint8 mWiFiModuleStatus;
|
||||||
|
qint8 mCurrentSensorStatus;
|
||||||
|
|
||||||
float mBatteryVoltage;
|
float mBatteryVoltage;
|
||||||
float mBatteryCurrent;
|
qint16 mBatteryCurrent;
|
||||||
float mBatterySOC;
|
qint16 mBatterySOC;
|
||||||
|
|
||||||
bool mHarakiriDone;
|
bool mHarakiriDone;
|
||||||
bool mIsOnline;
|
bool mIsOnline;
|
||||||
|
|
||||||
|
bool mStatusToggleBit;
|
||||||
|
|
||||||
QDateTime mLastLoraStatus;
|
QDateTime mLastLoraStatus;
|
||||||
|
QDateTime mThisStatusDateTime;
|
||||||
|
|
||||||
|
float mLostRequestPercentage;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
QDataStream &operator>>(QDataStream &in, CChaletMainStatus &dest);
|
||||||
|
|
||||||
#endif // CHALETDATA_H
|
#endif // CHALETDATA_H
|
||||||
|
|||||||
@ -1,14 +1,19 @@
|
|||||||
#include "ChaletGui.h"
|
#include "ChaletGui.h"
|
||||||
#include "ui_ChaletGui.h"
|
#include "ui_ChaletGui.h"
|
||||||
#include "CChalet.h"
|
#include "CChalet.h"
|
||||||
|
#include <QWidget>
|
||||||
|
#include <QDate>
|
||||||
|
|
||||||
CChaletGui::CChaletGui(QWidget *parent) :
|
CChaletGui::CChaletGui(QWidget *parent) :
|
||||||
QWidget(parent),
|
QWidget(parent),
|
||||||
ui(new Ui::CChaletGui)
|
ui(new Ui::CChaletGui)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
|
|
||||||
ui->mDoHarakiriButton->setEnabled(false);
|
ui->mDoHarakiriButton->setEnabled(false);
|
||||||
|
ui->mLogStartDateEdit->setDate(QDate::currentDate());
|
||||||
|
|
||||||
connect(ui->mWiFiModuleONBtn,SIGNAL(clicked()),this,SLOT(WiFiONButtonClicked()));
|
connect(ui->mWiFiModuleONBtn,SIGNAL(clicked()),this,SLOT(WiFiONButtonClicked()));
|
||||||
connect(ui->mWiFiModuleOFFBtn,SIGNAL(clicked(bool)),this,SLOT(WiFiOFFButtonClicked()));
|
connect(ui->mWiFiModuleOFFBtn,SIGNAL(clicked(bool)),this,SLOT(WiFiOFFButtonClicked()));
|
||||||
@ -17,16 +22,84 @@ CChaletGui::CChaletGui(QWidget *parent) :
|
|||||||
connect(ui->mRebootCPUBtn,SIGNAL(clicked(bool)),this,SLOT(RebootCPUButtonClicked()));
|
connect(ui->mRebootCPUBtn,SIGNAL(clicked(bool)),this,SLOT(RebootCPUButtonClicked()));
|
||||||
connect(ui->mDoHarakiriButton,SIGNAL(clicked(bool)),this,SLOT(DoHarakiriButtonClicked()));
|
connect(ui->mDoHarakiriButton,SIGNAL(clicked(bool)),this,SLOT(DoHarakiriButtonClicked()));
|
||||||
connect(ui->mEnableHarakiriChkBx,SIGNAL(clicked(bool)),this,SLOT(EnableHarakiriClicked(bool)));
|
connect(ui->mEnableHarakiriChkBx,SIGNAL(clicked(bool)),this,SLOT(EnableHarakiriClicked(bool)));
|
||||||
|
connect(ui->mGetChaletLogButton,SIGNAL(clicked(bool)),this,SLOT(GetChaletLogsBtnClicked()));
|
||||||
|
|
||||||
|
mBatteryPlotWidget = new QCustomPlot(ui->mPlotWidget);
|
||||||
|
mBatteryPlotWidget->resize(ui->mPlotWidget->size());
|
||||||
|
|
||||||
|
// create graph and assign data to it:
|
||||||
|
mBatteryPlotWidget->addGraph();
|
||||||
|
|
||||||
|
|
||||||
|
// give the axes some labels:
|
||||||
|
mBatteryPlotWidget->xAxis->setLabel("time");
|
||||||
|
mBatteryPlotWidget->yAxis->setLabel("Volts");
|
||||||
|
|
||||||
|
double now = QDateTime::currentDateTime().toSecsSinceEpoch();
|
||||||
|
QSharedPointer<QCPAxisTickerDateTime> dateTicker(new QCPAxisTickerDateTime);
|
||||||
|
dateTicker->setDateTimeFormat("hh:mm:ss\ndd MMM");
|
||||||
|
mBatteryPlotWidget->xAxis->setTicker(dateTicker);
|
||||||
|
mBatteryPlotWidget->setInteractions(QCP::iRangeDrag | QCP::iRangeZoom | QCP::iSelectPlottables);
|
||||||
|
|
||||||
|
QDateTime Now = QDateTime::currentDateTime().toLocalTime();
|
||||||
|
|
||||||
|
QDateTime midnight = Now;
|
||||||
|
midnight.setTime(QTime(0,0,0));
|
||||||
|
QDateTime eod = Now;
|
||||||
|
eod.setTime(QTime(23,59,0));
|
||||||
|
|
||||||
|
//mBatteryPlotWidget->xAxis->setRange(0/*QCPAxisTickerDateTime::dateTimeToKey(midnight)*/,QCPAxisTickerDateTime::dateTimeToKey(eod));
|
||||||
|
// mBatteryPlotWidget->xAxis->setRange(now, now+(2*3600));
|
||||||
|
mBatteryPlotWidget->xAxis->setRange(midnight.toSecsSinceEpoch(), eod.toSecsSinceEpoch());
|
||||||
|
|
||||||
|
mBatteryPlotWidget->yAxis->setRange(12,15);
|
||||||
|
|
||||||
|
mBatteryPlotWidget->graph(0)->addData(now,13.5);
|
||||||
|
|
||||||
|
mBatteryPlotWidget->replot();
|
||||||
}
|
}
|
||||||
|
|
||||||
CChaletGui::~CChaletGui()
|
CChaletGui::~CChaletGui()
|
||||||
{
|
{
|
||||||
delete ui;
|
delete ui;
|
||||||
|
delete mBatteryPlotWidget;
|
||||||
}
|
}
|
||||||
|
|
||||||
int CChaletGui::UpdateChaletStatus(CChaletMainStatus Status)
|
int CChaletGui::UpdateChaletStatus(CChaletMainStatus Status)
|
||||||
{
|
{
|
||||||
|
static bool LastToggle = false;
|
||||||
QString text;
|
QString text;
|
||||||
|
|
||||||
|
int Delta = QDateTime::currentDateTime().toSecsSinceEpoch() - Status.mLastLoraStatus.toSecsSinceEpoch();
|
||||||
|
ui->mLasCommRequestReceivedLbl->setText(QString("Last response: %1 | %2 seconds ago...").arg(Status.mLastLoraStatus.toString("yyyy-MM-dd-hh:mm:ss")).arg(Delta));
|
||||||
|
|
||||||
|
if(Status.mIsOnline == false)
|
||||||
|
{
|
||||||
|
ui->mChaletOnlineStatusLbl->setText("OFFLINE");
|
||||||
|
QPalette pal = QPalette(ui->mChaletOnlineStatusLbl->palette());
|
||||||
|
pal.setColor(QPalette::WindowText,QColor(Qt::red));
|
||||||
|
ui->mChaletOnlineStatusLbl->setPalette(pal);
|
||||||
|
|
||||||
|
ui->mWiFiModuleStatusLabel->setText("Unknown");
|
||||||
|
ui->mInverterRlyStatusLabel->setText("Unknown");
|
||||||
|
ui->mCurrentSensorStateLbl->setText("Current Sensor: Unknown state");
|
||||||
|
ui->mBatteryVoltageLabel->setText("Battery Voltage: Unknown");
|
||||||
|
ui->mBatterySOCLabel->setText("Battery SOC: Unknown");
|
||||||
|
ui->mSolarPanelCurrentLabel->setText("Solar Panel Current: Unknown");
|
||||||
|
ui->mLostReqPercentLbl->setText("N/A");
|
||||||
|
|
||||||
|
|
||||||
|
return RET_OK;
|
||||||
|
}
|
||||||
|
else if(ui->mChaletOnlineStatusLbl->text() == "OFFLINE")
|
||||||
|
{
|
||||||
|
ui->mChaletOnlineStatusLbl->setText("ONLINE");
|
||||||
|
QPalette pal = QPalette(ui->mChaletOnlineStatusLbl->palette());
|
||||||
|
pal.setColor(QPalette::WindowText,QColor(Qt::darkGreen));
|
||||||
|
ui->mChaletOnlineStatusLbl->setPalette(pal);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
switch(Status.mWiFiModuleStatus)
|
switch(Status.mWiFiModuleStatus)
|
||||||
{
|
{
|
||||||
case WIFI_CONNECTED_STATE:
|
case WIFI_CONNECTED_STATE:
|
||||||
@ -82,8 +155,91 @@ int CChaletGui::UpdateChaletStatus(CChaletMainStatus Status)
|
|||||||
}
|
}
|
||||||
ui->mInverterRlyStatusLabel->setText(text);
|
ui->mInverterRlyStatusLabel->setText(text);
|
||||||
|
|
||||||
|
switch(Status.mCurrentSensorStatus)
|
||||||
|
{
|
||||||
|
case CHALET_CURRENT_SENSOR_DEFECT_STATE:
|
||||||
|
{
|
||||||
|
text = "Current Sensor: DEFECTIVE";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case CHALET_CURRENT_SENSOR_OK_STATE:
|
||||||
|
{
|
||||||
|
text = "Current Sensor: OK";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case CHALET_CURRENT_SENSOR_UNKNOWN_STATE:
|
||||||
|
default:
|
||||||
|
{
|
||||||
|
text = "Current Sensor: Unknown state";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
ui->mCurrentSensorStateLbl->setText(text);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
QString Voltage = QString("Battery Voltage: %1").arg(Status.mBatteryVoltage);
|
QString Voltage = QString("Battery Voltage: %1").arg(Status.mBatteryVoltage);
|
||||||
ui->mBatteryVoltageLabel->setText(Voltage);
|
ui->mBatteryVoltageLabel->setText(Voltage);
|
||||||
|
ui->mVoltageLCD->display(Voltage);
|
||||||
|
|
||||||
|
QString Current = QString("Solar Panel Current: %1").arg(Status.mBatteryCurrent);
|
||||||
|
ui->mSolarPanelCurrentLabel->setText(Current);
|
||||||
|
|
||||||
|
QString SOC = QString("Battery SOC: %1").arg(Status.mBatterySOC);
|
||||||
|
ui->mBatterySOCLabel->setText(SOC);
|
||||||
|
|
||||||
|
QString Percent = QString("Lost Requests: %1%").arg(Status.mLostRequestPercentage,0,'f',2);
|
||||||
|
ui->mLostReqPercentLbl->setText(Percent);
|
||||||
|
|
||||||
|
|
||||||
|
if(Status.mStatusToggleBit != LastToggle)
|
||||||
|
{
|
||||||
|
LastToggle = Status.mStatusToggleBit;
|
||||||
|
|
||||||
|
if(ui->mChaletCommActivityLbl->isEnabled())
|
||||||
|
{
|
||||||
|
ui->mChaletCommActivityLbl->setEnabled(false);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ui->mChaletCommActivityLbl->setEnabled(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
double CurTime = QDateTime::currentDateTime().toSecsSinceEpoch();
|
||||||
|
mBatteryPlotWidget->graph(0)->addData(CurTime,Status.mBatteryVoltage);
|
||||||
|
|
||||||
|
mBatteryPlotWidget->replot();
|
||||||
|
}
|
||||||
|
return RET_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int CChaletGui::UpdateChaletLogPlot(QByteArray *Log)
|
||||||
|
{
|
||||||
|
int NbRecords;
|
||||||
|
CChaletMainStatus CurData;
|
||||||
|
QVector<double> x,y;
|
||||||
|
QDataStream Strm(Log,QIODevice::ReadOnly);
|
||||||
|
Strm.device()->seek(0);
|
||||||
|
|
||||||
|
Strm >> NbRecords;
|
||||||
|
|
||||||
|
if(NbRecords > 0)
|
||||||
|
{
|
||||||
|
for(int i = 0; i < NbRecords; i++)
|
||||||
|
{
|
||||||
|
Strm >> CurData;
|
||||||
|
x.append(CurData.mThisStatusDateTime.toSecsSinceEpoch());
|
||||||
|
y.append(CurData.mBatteryVoltage);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
mBatteryPlotWidget->graph(0)->data().clear();
|
||||||
|
mBatteryPlotWidget->graph(0)->setData(x,y);
|
||||||
|
mBatteryPlotWidget->xAxis->setRange(x.first(),x.last());
|
||||||
|
mBatteryPlotWidget->replot();
|
||||||
|
|
||||||
return RET_OK;
|
return RET_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -124,3 +280,27 @@ void CChaletGui::RebootCPUButtonClicked()
|
|||||||
ui->mDoHarakiriButton->setEnabled(false);
|
ui->mDoHarakiriButton->setEnabled(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int CChaletGui::ChaletCommActivity()
|
||||||
|
{
|
||||||
|
if(ui->mChaletCommActivityLbl->isEnabled())
|
||||||
|
{
|
||||||
|
ui->mChaletCommActivityLbl->setEnabled(false);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ui->mChaletCommActivityLbl->setEnabled(true);
|
||||||
|
}
|
||||||
|
return RET_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CChaletGui::GetChaletLogsBtnClicked()
|
||||||
|
{
|
||||||
|
QDate StartDate = ui->mLogStartDateEdit->date();
|
||||||
|
if(StartDate > QDate::currentDate())
|
||||||
|
{
|
||||||
|
QMessageBox::critical(this,"Error","Date is in the future!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
mProgramHandle->RequestChaletLogs(StartDate);
|
||||||
|
}
|
||||||
|
|||||||
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
#include "ChaletData.h"
|
#include "ChaletData.h"
|
||||||
|
#include "QCustomPlot/qcustomplot.h"
|
||||||
|
|
||||||
class CChalet;
|
class CChalet;
|
||||||
|
|
||||||
@ -19,8 +20,11 @@ public:
|
|||||||
~CChaletGui();
|
~CChaletGui();
|
||||||
|
|
||||||
CChalet *mProgramHandle;
|
CChalet *mProgramHandle;
|
||||||
|
QCustomPlot *mBatteryPlotWidget;
|
||||||
|
|
||||||
int UpdateChaletStatus(CChaletMainStatus Status);
|
int UpdateChaletStatus(CChaletMainStatus Status);
|
||||||
|
int UpdateChaletLogPlot(QByteArray* Log);
|
||||||
|
int ChaletCommActivity();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::CChaletGui *ui;
|
Ui::CChaletGui *ui;
|
||||||
@ -33,6 +37,7 @@ public slots:
|
|||||||
void RebootCPUButtonClicked();
|
void RebootCPUButtonClicked();
|
||||||
void DoHarakiriButtonClicked();
|
void DoHarakiriButtonClicked();
|
||||||
void EnableHarakiriClicked(bool);
|
void EnableHarakiriClicked(bool);
|
||||||
|
void GetChaletLogsBtnClicked();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // CHALETGUI_H
|
#endif // CHALETGUI_H
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>849</width>
|
<width>1205</width>
|
||||||
<height>598</height>
|
<height>598</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
@ -16,9 +16,9 @@
|
|||||||
<widget class="QLabel" name="MainPageLabel">
|
<widget class="QLabel" name="MainPageLabel">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>370</x>
|
<x>460</x>
|
||||||
<y>20</y>
|
<y>10</y>
|
||||||
<width>201</width>
|
<width>71</width>
|
||||||
<height>31</height>
|
<height>31</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
@ -36,9 +36,9 @@
|
|||||||
<widget class="QLabel" name="mInverterRlyStatusLabel">
|
<widget class="QLabel" name="mInverterRlyStatusLabel">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>350</x>
|
<x>198</x>
|
||||||
<y>90</y>
|
<y>50</y>
|
||||||
<width>211</width>
|
<width>210</width>
|
||||||
<height>16</height>
|
<height>16</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
@ -49,9 +49,9 @@
|
|||||||
<widget class="QLabel" name="mWiFiModuleStatusLabel">
|
<widget class="QLabel" name="mWiFiModuleStatusLabel">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>360</x>
|
<x>198</x>
|
||||||
<y>130</y>
|
<y>90</y>
|
||||||
<width>131</width>
|
<width>130</width>
|
||||||
<height>16</height>
|
<height>16</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
@ -62,8 +62,8 @@
|
|||||||
<widget class="QLabel" name="mWiFiSectionLabel">
|
<widget class="QLabel" name="mWiFiSectionLabel">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>180</x>
|
<x>26</x>
|
||||||
<y>130</y>
|
<y>90</y>
|
||||||
<width>31</width>
|
<width>31</width>
|
||||||
<height>16</height>
|
<height>16</height>
|
||||||
</rect>
|
</rect>
|
||||||
@ -75,8 +75,8 @@
|
|||||||
<widget class="QPushButton" name="mInverterRelayOFFBtn">
|
<widget class="QPushButton" name="mInverterRelayOFFBtn">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>280</x>
|
<x>126</x>
|
||||||
<y>90</y>
|
<y>50</y>
|
||||||
<width>61</width>
|
<width>61</width>
|
||||||
<height>22</height>
|
<height>22</height>
|
||||||
</rect>
|
</rect>
|
||||||
@ -88,8 +88,8 @@
|
|||||||
<widget class="QPushButton" name="mWiFiModuleOFFBtn">
|
<widget class="QPushButton" name="mWiFiModuleOFFBtn">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>280</x>
|
<x>126</x>
|
||||||
<y>130</y>
|
<y>90</y>
|
||||||
<width>61</width>
|
<width>61</width>
|
||||||
<height>23</height>
|
<height>23</height>
|
||||||
</rect>
|
</rect>
|
||||||
@ -101,8 +101,8 @@
|
|||||||
<widget class="QPushButton" name="mInverterRelayONBtn">
|
<widget class="QPushButton" name="mInverterRelayONBtn">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>224</x>
|
<x>70</x>
|
||||||
<y>90</y>
|
<y>50</y>
|
||||||
<width>51</width>
|
<width>51</width>
|
||||||
<height>23</height>
|
<height>23</height>
|
||||||
</rect>
|
</rect>
|
||||||
@ -114,8 +114,8 @@
|
|||||||
<widget class="QPushButton" name="mWiFiModuleONBtn">
|
<widget class="QPushButton" name="mWiFiModuleONBtn">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>224</x>
|
<x>70</x>
|
||||||
<y>130</y>
|
<y>90</y>
|
||||||
<width>51</width>
|
<width>51</width>
|
||||||
<height>23</height>
|
<height>23</height>
|
||||||
</rect>
|
</rect>
|
||||||
@ -127,8 +127,8 @@
|
|||||||
<widget class="QLabel" name="mWiFiSectionLabel_2">
|
<widget class="QLabel" name="mWiFiSectionLabel_2">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>170</x>
|
<x>16</x>
|
||||||
<y>90</y>
|
<y>50</y>
|
||||||
<width>51</width>
|
<width>51</width>
|
||||||
<height>20</height>
|
<height>20</height>
|
||||||
</rect>
|
</rect>
|
||||||
@ -140,8 +140,8 @@
|
|||||||
<widget class="QPushButton" name="mRebootCPUBtn">
|
<widget class="QPushButton" name="mRebootCPUBtn">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>220</x>
|
<x>66</x>
|
||||||
<y>170</y>
|
<y>130</y>
|
||||||
<width>75</width>
|
<width>75</width>
|
||||||
<height>23</height>
|
<height>23</height>
|
||||||
</rect>
|
</rect>
|
||||||
@ -151,9 +151,12 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QCheckBox" name="mEnableHarakiriChkBx">
|
<widget class="QCheckBox" name="mEnableHarakiriChkBx">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>640</x>
|
<x>850</x>
|
||||||
<y>80</y>
|
<y>80</y>
|
||||||
<width>111</width>
|
<width>111</width>
|
||||||
<height>17</height>
|
<height>17</height>
|
||||||
@ -166,7 +169,7 @@
|
|||||||
<widget class="QGroupBox" name="groupBox">
|
<widget class="QGroupBox" name="groupBox">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>620</x>
|
<x>830</x>
|
||||||
<y>50</y>
|
<y>50</y>
|
||||||
<width>151</width>
|
<width>151</width>
|
||||||
<height>81</height>
|
<height>81</height>
|
||||||
@ -192,8 +195,8 @@
|
|||||||
<widget class="QLabel" name="mBatteryVoltageLabel">
|
<widget class="QLabel" name="mBatteryVoltageLabel">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>170</x>
|
<x>147</x>
|
||||||
<y>210</y>
|
<y>170</y>
|
||||||
<width>241</width>
|
<width>241</width>
|
||||||
<height>16</height>
|
<height>16</height>
|
||||||
</rect>
|
</rect>
|
||||||
@ -202,6 +205,148 @@
|
|||||||
<string>Battery Voltage</string>
|
<string>Battery Voltage</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
|
<widget class="QLabel" name="mChaletOnlineStatusLbl">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>450</x>
|
||||||
|
<y>50</y>
|
||||||
|
<width>91</width>
|
||||||
|
<height>21</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Terminal</family>
|
||||||
|
<pointsize>14</pointsize>
|
||||||
|
<weight>75</weight>
|
||||||
|
<bold>true</bold>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>OFFLINE</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLabel" name="mSolarPanelCurrentLabel">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>147</x>
|
||||||
|
<y>190</y>
|
||||||
|
<width>241</width>
|
||||||
|
<height>16</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Solar Panel Current: </string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLabel" name="mBatterySOCLabel">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>147</x>
|
||||||
|
<y>210</y>
|
||||||
|
<width>241</width>
|
||||||
|
<height>16</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Battery SOC: </string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLabel" name="mCurrentSensorStateLbl">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>147</x>
|
||||||
|
<y>230</y>
|
||||||
|
<width>241</width>
|
||||||
|
<height>16</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Current Sensor:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLabel" name="mLostReqPercentLbl">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>770</x>
|
||||||
|
<y>200</y>
|
||||||
|
<width>241</width>
|
||||||
|
<height>16</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Lost requests: </string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QWidget" name="mPlotWidget" native="true">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>590</x>
|
||||||
|
<y>250</y>
|
||||||
|
<width>571</width>
|
||||||
|
<height>321</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLCDNumber" name="mVoltageLCD">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>30</x>
|
||||||
|
<y>170</y>
|
||||||
|
<width>111</width>
|
||||||
|
<height>23</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLabel" name="mChaletCommActivityLbl">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>770</x>
|
||||||
|
<y>180</y>
|
||||||
|
<width>47</width>
|
||||||
|
<height>16</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Activity!!!</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLabel" name="mLasCommRequestReceivedLbl">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>770</x>
|
||||||
|
<y>160</y>
|
||||||
|
<width>301</width>
|
||||||
|
<height>16</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Last Request: </string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QDateEdit" name="mLogStartDateEdit">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>950</x>
|
||||||
|
<y>220</y>
|
||||||
|
<width>110</width>
|
||||||
|
<height>22</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QPushButton" name="mGetChaletLogButton">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>1070</x>
|
||||||
|
<y>220</y>
|
||||||
|
<width>75</width>
|
||||||
|
<height>23</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>PushButton</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
<zorder>groupBox</zorder>
|
<zorder>groupBox</zorder>
|
||||||
<zorder>MainPageLabel</zorder>
|
<zorder>MainPageLabel</zorder>
|
||||||
<zorder>mInverterRlyStatusLabel</zorder>
|
<zorder>mInverterRlyStatusLabel</zorder>
|
||||||
@ -215,6 +360,17 @@
|
|||||||
<zorder>mRebootCPUBtn</zorder>
|
<zorder>mRebootCPUBtn</zorder>
|
||||||
<zorder>mEnableHarakiriChkBx</zorder>
|
<zorder>mEnableHarakiriChkBx</zorder>
|
||||||
<zorder>mBatteryVoltageLabel</zorder>
|
<zorder>mBatteryVoltageLabel</zorder>
|
||||||
|
<zorder>mChaletOnlineStatusLbl</zorder>
|
||||||
|
<zorder>mSolarPanelCurrentLabel</zorder>
|
||||||
|
<zorder>mBatterySOCLabel</zorder>
|
||||||
|
<zorder>mCurrentSensorStateLbl</zorder>
|
||||||
|
<zorder>mLostReqPercentLbl</zorder>
|
||||||
|
<zorder>mPlotWidget</zorder>
|
||||||
|
<zorder>mVoltageLCD</zorder>
|
||||||
|
<zorder>mChaletCommActivityLbl</zorder>
|
||||||
|
<zorder>mLasCommRequestReceivedLbl</zorder>
|
||||||
|
<zorder>mLogStartDateEdit</zorder>
|
||||||
|
<zorder>mGetChaletLogButton</zorder>
|
||||||
</widget>
|
</widget>
|
||||||
<resources/>
|
<resources/>
|
||||||
<connections/>
|
<connections/>
|
||||||
|
|||||||
@ -19,6 +19,8 @@ int CChaletMasterCtrlInterface::DeviceConnectedToMaster(bool Connected)
|
|||||||
if(Connected)
|
if(Connected)
|
||||||
{
|
{
|
||||||
qDebug("Chalet Interface connected to Master.");
|
qDebug("Chalet Interface connected to Master.");
|
||||||
|
mProgramHandle->ConnectedToMaster(Connected);
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return RET_ERROR;
|
return RET_ERROR;
|
||||||
@ -66,10 +68,27 @@ int CChaletMasterCtrlInterface::DeviceFrameReceived(int TargetDeviceID, int Targ
|
|||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case CHALET_INTERFACE_GET_TODAYS_DATA_LOG_RESPONSE:
|
||||||
|
{
|
||||||
|
mProgramHandle->ChaletLogReceived(&Data);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case CHALET_INTERFACE_CHALET_ACTIVITY_RESPONSE:
|
||||||
|
{
|
||||||
|
mProgramHandle->ChaletCommActivity();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case CHALET_INTERFACE_GET_DATA_LOG_RESPONSE:
|
||||||
|
{
|
||||||
|
mProgramHandle->ChaletLogReceived(&Data);
|
||||||
|
break;
|
||||||
|
}
|
||||||
case CHALET_INTERFACE_GENERAL_STATUS_REQUEST:
|
case CHALET_INTERFACE_GENERAL_STATUS_REQUEST:
|
||||||
case CHALET_INTERFACE_AC_POWER_STATE_STATUS_REQUEST:
|
case CHALET_INTERFACE_AC_POWER_STATE_STATUS_REQUEST:
|
||||||
case CHALET_INTERFACE_AC_POWER_SET_STATE_REQUEST:
|
case CHALET_INTERFACE_AC_POWER_SET_STATE_REQUEST:
|
||||||
case CHALET_INTERFACE_BATTERY_VOLTAGE_REQUEST:
|
case CHALET_INTERFACE_BATTERY_VOLTAGE_REQUEST:
|
||||||
|
case CHALET_INTERFACE_GET_TODAYS_DATA_LOG_REQUEST:
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
qDebug("Chalet: Invalid Ethernet Msg received from MasterCtrl: %d",MessageID);
|
qDebug("Chalet: Invalid Ethernet Msg received from MasterCtrl: %d",MessageID);
|
||||||
|
|||||||
@ -9,13 +9,15 @@ CGuiMain::CGuiMain(QWidget *parent)
|
|||||||
mAvReceiverGui = new CAvReceiverGui(this);
|
mAvReceiverGui = new CAvReceiverGui(this);
|
||||||
mMainTabWidget = new QTabWidget(this);
|
mMainTabWidget = new QTabWidget(this);
|
||||||
mChaletGui = new CChaletGui(this);
|
mChaletGui = new CChaletGui(this);
|
||||||
|
mTowerLightShowGui = new CTowerLightShowGui;
|
||||||
setCentralWidget(mMainTabWidget);
|
setCentralWidget(mMainTabWidget);
|
||||||
mMainTabWidget->addTab(mSMSGui,"SMS");
|
mMainTabWidget->addTab(mSMSGui,"SMS");
|
||||||
mMainTabWidget->addTab(mSprinklerGui,"Sprinkler");
|
mMainTabWidget->addTab(mSprinklerGui,"Sprinkler");
|
||||||
mMainTabWidget->addTab(mAvReceiverGui,"AV Receiver");
|
mMainTabWidget->addTab(mAvReceiverGui,"AV Receiver");
|
||||||
mMainTabWidget->addTab(mChaletGui,"Chalet");
|
mMainTabWidget->addTab(mChaletGui,"Chalet");
|
||||||
|
mMainTabWidget->addTab(mTowerLightShowGui,"Lightshow");
|
||||||
|
|
||||||
resize(1024,768);
|
resize(1500,768);
|
||||||
}
|
}
|
||||||
|
|
||||||
CGuiMain::~CGuiMain()
|
CGuiMain::~CGuiMain()
|
||||||
|
|||||||
@ -8,7 +8,7 @@
|
|||||||
#include "SprinklerGui.h"
|
#include "SprinklerGui.h"
|
||||||
#include "AvReceiverGui.h"
|
#include "AvReceiverGui.h"
|
||||||
#include "ChaletGui.h"
|
#include "ChaletGui.h"
|
||||||
|
#include "TowerLightShowGui.h"
|
||||||
|
|
||||||
class CGuiMain : public QMainWindow
|
class CGuiMain : public QMainWindow
|
||||||
{
|
{
|
||||||
@ -23,6 +23,7 @@ public:
|
|||||||
CAvReceiverGui *mAvReceiverGui;
|
CAvReceiverGui *mAvReceiverGui;
|
||||||
CChaletGui *mChaletGui;
|
CChaletGui *mChaletGui;
|
||||||
QTabWidget *mMainTabWidget;
|
QTabWidget *mMainTabWidget;
|
||||||
|
CTowerLightShowGui *mTowerLightShowGui;
|
||||||
int RespawnMainWindow();
|
int RespawnMainWindow();
|
||||||
int HideMainWindow();
|
int HideMainWindow();
|
||||||
|
|
||||||
|
|||||||
@ -3,6 +3,18 @@
|
|||||||
CMasterCtrlInterface::CMasterCtrlInterface()
|
CMasterCtrlInterface::CMasterCtrlInterface()
|
||||||
{
|
{
|
||||||
mNetworkCommSocket = 0;
|
mNetworkCommSocket = 0;
|
||||||
|
|
||||||
|
mNetworkCommSocket = new QTcpSocket();
|
||||||
|
|
||||||
|
connect(mNetworkCommSocket,SIGNAL(connected()),this,SLOT(NetworkSocketConnected()));
|
||||||
|
connect(mNetworkCommSocket,SIGNAL(disconnected()),this,SLOT(NetworkSocketDisconnected()));
|
||||||
|
connect(mNetworkCommSocket,SIGNAL(readyRead()),this,SLOT(NetworkSocketDataAvailable()));
|
||||||
|
|
||||||
|
// mMasterReconnectTimer.setInterval(500);
|
||||||
|
// mMasterReconnectTimer.stop();
|
||||||
|
// mMasterReconnectTimer.setSingleShot(false);
|
||||||
|
// connect(&mMasterReconnectTimer,SIGNAL(timeout()),this,SLOT(NetworkReconnectTimerExpired()));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int CMasterCtrlInterface::ConnectToMasterCtrl()
|
int CMasterCtrlInterface::ConnectToMasterCtrl()
|
||||||
@ -10,11 +22,11 @@ int CMasterCtrlInterface::ConnectToMasterCtrl()
|
|||||||
if(mNetworkCommSocket == 0)
|
if(mNetworkCommSocket == 0)
|
||||||
{
|
{
|
||||||
mNetworkCommSocket = new QTcpSocket();
|
mNetworkCommSocket = new QTcpSocket();
|
||||||
}
|
|
||||||
connect(mNetworkCommSocket,SIGNAL(connected()),this,SLOT(NetworkSocketConnected()));
|
|
||||||
connect(mNetworkCommSocket,SIGNAL(disconnected()),this,SLOT(NetworkSocketDisconnected()));
|
|
||||||
connect(mNetworkCommSocket,SIGNAL(readyRead()),this,SLOT(NetworkSocketDataAvailable()));
|
|
||||||
|
|
||||||
|
connect(mNetworkCommSocket,SIGNAL(connected()),this,SLOT(NetworkSocketConnected()));
|
||||||
|
connect(mNetworkCommSocket,SIGNAL(disconnected()),this,SLOT(NetworkSocketDisconnected()));
|
||||||
|
connect(mNetworkCommSocket,SIGNAL(readyRead()),this,SLOT(NetworkSocketDataAvailable()));
|
||||||
|
}
|
||||||
mNetworkCommSocket->connectToHost(mMasterCtrlIPAddress,mNetworkPort);
|
mNetworkCommSocket->connectToHost(mMasterCtrlIPAddress,mNetworkPort);
|
||||||
|
|
||||||
return RET_OK;
|
return RET_OK;
|
||||||
@ -27,6 +39,7 @@ int CMasterCtrlInterface::DisconnectMasterCtrl()
|
|||||||
mNetworkCommSocket->close();
|
mNetworkCommSocket->close();
|
||||||
// mNetworkCommSocket->deleteLater();
|
// mNetworkCommSocket->deleteLater();
|
||||||
}
|
}
|
||||||
|
mMasterReconnectTimer.start();
|
||||||
|
|
||||||
return RET_OK;
|
return RET_OK;
|
||||||
}
|
}
|
||||||
@ -81,6 +94,7 @@ int CMasterCtrlInterface::NewFrameReceived(int TargetDeviceID, int TargetDeviceA
|
|||||||
void CMasterCtrlInterface::NetworkSocketConnected()
|
void CMasterCtrlInterface::NetworkSocketConnected()
|
||||||
{
|
{
|
||||||
qDebug("Connected to MasterCtrl");
|
qDebug("Connected to MasterCtrl");
|
||||||
|
mMasterReconnectTimer.stop();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -92,6 +106,7 @@ void CMasterCtrlInterface::NetworkSocketDataAvailable()
|
|||||||
void CMasterCtrlInterface::NetworkSocketDisconnected()
|
void CMasterCtrlInterface::NetworkSocketDisconnected()
|
||||||
{
|
{
|
||||||
qDebug("Disconnected from MasterCtrl");
|
qDebug("Disconnected from MasterCtrl");
|
||||||
|
mMasterReconnectTimer.start();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -101,3 +116,8 @@ int CMasterCtrlInterface::SendMasterCtrlCommand(unsigned char MessageID, QByteAr
|
|||||||
|
|
||||||
return RET_OK;
|
return RET_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CMasterCtrlInterface::NetworkReconnectTimerExpired()
|
||||||
|
{
|
||||||
|
ConnectToMasterCtrl();
|
||||||
|
}
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
#include "ProtocolDefs.h"
|
#include "ProtocolDefs.h"
|
||||||
#include <QTcpSocket>
|
#include <QTcpSocket>
|
||||||
#include "SMSMessage.h"
|
#include "SMSMessage.h"
|
||||||
|
#include <QTimer>
|
||||||
|
|
||||||
class CMasterCtrlInterface : public QObject, public CNetworkProtocol
|
class CMasterCtrlInterface : public QObject, public CNetworkProtocol
|
||||||
{
|
{
|
||||||
@ -20,6 +21,7 @@ public:
|
|||||||
int mNetworkPort;
|
int mNetworkPort;
|
||||||
QString mMasterCtrlIPAddress;
|
QString mMasterCtrlIPAddress;
|
||||||
int mMyDeviceID;
|
int mMyDeviceID;
|
||||||
|
QTimer mMasterReconnectTimer;
|
||||||
|
|
||||||
int ConnectToMasterCtrl();
|
int ConnectToMasterCtrl();
|
||||||
int DisconnectMasterCtrl();
|
int DisconnectMasterCtrl();
|
||||||
@ -36,6 +38,7 @@ public slots:
|
|||||||
void NetworkSocketConnected();
|
void NetworkSocketConnected();
|
||||||
void NetworkSocketDataAvailable();
|
void NetworkSocketDataAvailable();
|
||||||
void NetworkSocketDisconnected();
|
void NetworkSocketDisconnected();
|
||||||
|
void NetworkReconnectTimerExpired();
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -264,6 +264,11 @@ enum CHALET_INTERFACE_CMDS
|
|||||||
CHALET_INTERFACE_DO_HARAKIRI_RESPONSE,
|
CHALET_INTERFACE_DO_HARAKIRI_RESPONSE,
|
||||||
CHALET_INTERFACE_REBOOT_CPU_REQUEST,
|
CHALET_INTERFACE_REBOOT_CPU_REQUEST,
|
||||||
CHALET_INTERFACE_REBOOT_CPU_RESPONSE,
|
CHALET_INTERFACE_REBOOT_CPU_RESPONSE,
|
||||||
|
CHALET_INTERFACE_GET_TODAYS_DATA_LOG_REQUEST,
|
||||||
|
CHALET_INTERFACE_GET_TODAYS_DATA_LOG_RESPONSE,
|
||||||
|
CHALET_INTERFACE_CHALET_ACTIVITY_RESPONSE,
|
||||||
|
CHALET_INTERFACE_GET_DATA_LOG_REQUEST,
|
||||||
|
CHALET_INTERFACE_GET_DATA_LOG_RESPONSE,
|
||||||
|
|
||||||
|
|
||||||
MAX_CHALET_INTERFACE_CMD
|
MAX_CHALET_INTERFACE_CMD
|
||||||
|
|||||||
30214
Sources/QCustomPlot/qcustomplot.cpp
Normal file
30214
Sources/QCustomPlot/qcustomplot.cpp
Normal file
File diff suppressed because it is too large
Load Diff
6673
Sources/QCustomPlot/qcustomplot.h
Normal file
6673
Sources/QCustomPlot/qcustomplot.h
Normal file
File diff suppressed because it is too large
Load Diff
BIN
Sources/QCustomPlot/qcustomplot.qch
Normal file
BIN
Sources/QCustomPlot/qcustomplot.qch
Normal file
Binary file not shown.
6
Sources/Tower/LEDAnimation.cpp
Normal file
6
Sources/Tower/LEDAnimation.cpp
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
#include "LEDAnimation.h"
|
||||||
|
|
||||||
|
CLEDAnimation::CLEDAnimation()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
16
Sources/Tower/LEDAnimation.h
Normal file
16
Sources/Tower/LEDAnimation.h
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
#ifndef LEDANIMATION_H
|
||||||
|
#define LEDANIMATION_H
|
||||||
|
|
||||||
|
#include <QList>
|
||||||
|
class QColor;
|
||||||
|
|
||||||
|
class CLEDAnimation
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
CLEDAnimation();
|
||||||
|
|
||||||
|
int LedStringSize;
|
||||||
|
virtual QList<QColor> *GetCurrentFrame() = 0;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // LEDANIMATION_H
|
||||||
16
Sources/Tower/LEDAnimator.cpp
Normal file
16
Sources/Tower/LEDAnimator.cpp
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
#include "LEDAnimator.h"
|
||||||
|
|
||||||
|
CLEDAnimator::CLEDAnimator(QObject *parent) : QObject(parent)
|
||||||
|
{
|
||||||
|
mAnimationRefreshTimer = new QTimer();
|
||||||
|
mAnimationRefreshTimer->setSingleShot(false);
|
||||||
|
mAnimationRefreshTimer->setInterval(ANIMATION_REFRESH_TIMEOUT);
|
||||||
|
connect(mAnimationRefreshTimer,SIGNAL(timeout()),this,SLOT(AnimationTimerExipired()));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void CLEDAnimator::AnimationTimerExipired()
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
24
Sources/Tower/LEDAnimator.h
Normal file
24
Sources/Tower/LEDAnimator.h
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
#ifndef LEDANIMATOR_H
|
||||||
|
#define LEDANIMATOR_H
|
||||||
|
|
||||||
|
#include <QObject>
|
||||||
|
#include <QTimer>
|
||||||
|
|
||||||
|
#define ANIMATION_REFRESH_TIMEOUT 33 //ms = 30 FPS
|
||||||
|
|
||||||
|
class CLEDAnimator : public QObject
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
explicit CLEDAnimator(QObject *parent = 0);
|
||||||
|
|
||||||
|
QTimer *mAnimationRefreshTimer;
|
||||||
|
|
||||||
|
signals:
|
||||||
|
|
||||||
|
public slots:
|
||||||
|
|
||||||
|
void AnimationTimerExipired();
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // LEDANIMATOR_H
|
||||||
129
Sources/Tower/LedStringWidget.cpp
Normal file
129
Sources/Tower/LedStringWidget.cpp
Normal file
@ -0,0 +1,129 @@
|
|||||||
|
#include "LedStringWidget.h"
|
||||||
|
#include <QPainter>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
CLedStringWidget::CLedStringWidget(int NbLed, QGraphicsItem *parent)
|
||||||
|
{
|
||||||
|
mLEDSpacing = 5;
|
||||||
|
mNbLED = NbLed;
|
||||||
|
mBoundingRect.setTop(0);
|
||||||
|
mBoundingRect.setLeft(0);
|
||||||
|
int color = 0;
|
||||||
|
|
||||||
|
// for(int i = 0; i < NbLed; i++)
|
||||||
|
// {
|
||||||
|
// QColor LedColor;
|
||||||
|
// if(color == 0)
|
||||||
|
// {
|
||||||
|
// LedColor = QColor(Qt::red);
|
||||||
|
// color++;
|
||||||
|
// }
|
||||||
|
// else if(color == 1)
|
||||||
|
// {
|
||||||
|
// LedColor = QColor(Qt::green);
|
||||||
|
// color++;
|
||||||
|
// }
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
// LedColor = QColor(Qt::blue);
|
||||||
|
// color = 0;
|
||||||
|
// }
|
||||||
|
// CRGBLedWidget *NewLED = new CRGBLedWidget(LedColor,this);
|
||||||
|
// NewLED->setPos(i*(NewLED->boundingRect().width()+mLEDSpacing),0);
|
||||||
|
// mLEDList.append(NewLED);
|
||||||
|
// }
|
||||||
|
|
||||||
|
for(int i = 0; i < 30; i++)
|
||||||
|
{
|
||||||
|
// for(int led = 0; led < 10; led++)
|
||||||
|
{
|
||||||
|
QColor LedColor = QColor(50,0,0);
|
||||||
|
CRGBLedWidget *NewLED = new CRGBLedWidget(LedColor,this);
|
||||||
|
NewLED->setPos(((i*10)+1)*(NewLED->boundingRect().width()+mLEDSpacing),0);
|
||||||
|
mLEDList.append(NewLED);
|
||||||
|
|
||||||
|
LedColor = QColor(100,0,0);
|
||||||
|
NewLED = new CRGBLedWidget(LedColor,this);
|
||||||
|
NewLED->setPos(((i*10)+2)*(NewLED->boundingRect().width()+mLEDSpacing),0);
|
||||||
|
mLEDList.append(NewLED);
|
||||||
|
|
||||||
|
LedColor = QColor(150,0,0);
|
||||||
|
NewLED = new CRGBLedWidget(LedColor,this);
|
||||||
|
NewLED->setPos(((i*10)+3)*(NewLED->boundingRect().width()+mLEDSpacing),0);
|
||||||
|
mLEDList.append(NewLED);
|
||||||
|
|
||||||
|
LedColor = QColor(200,0,0);
|
||||||
|
NewLED = new CRGBLedWidget(LedColor,this);
|
||||||
|
NewLED->setPos(((i*10)+4)*(NewLED->boundingRect().width()+mLEDSpacing),0);
|
||||||
|
mLEDList.append(NewLED);
|
||||||
|
|
||||||
|
LedColor = QColor(255,0,0);
|
||||||
|
NewLED = new CRGBLedWidget(LedColor,this);
|
||||||
|
NewLED->setPos(((i*10)+5)*(NewLED->boundingRect().width()+mLEDSpacing),0);
|
||||||
|
mLEDList.append(NewLED);
|
||||||
|
|
||||||
|
LedColor = QColor(200,0,0);
|
||||||
|
NewLED = new CRGBLedWidget(LedColor,this);
|
||||||
|
NewLED->setPos(((i*10)+6)*(NewLED->boundingRect().width()+mLEDSpacing),0);
|
||||||
|
mLEDList.append(NewLED);
|
||||||
|
|
||||||
|
LedColor = QColor(150,0,0);
|
||||||
|
NewLED = new CRGBLedWidget(LedColor,this);
|
||||||
|
NewLED->setPos(((i*10)+7)*(NewLED->boundingRect().width()+mLEDSpacing),0);
|
||||||
|
mLEDList.append(NewLED);
|
||||||
|
|
||||||
|
LedColor = QColor(100,0,0);
|
||||||
|
NewLED = new CRGBLedWidget(LedColor,this);
|
||||||
|
NewLED->setPos(((i*10)+8)*(NewLED->boundingRect().width()+mLEDSpacing),0);
|
||||||
|
mLEDList.append(NewLED);
|
||||||
|
|
||||||
|
LedColor = QColor(50,0,0);
|
||||||
|
NewLED = new CRGBLedWidget(LedColor,this);
|
||||||
|
NewLED->setPos(((i*10)+9)*(NewLED->boundingRect().width()+mLEDSpacing),0);
|
||||||
|
mLEDList.append(NewLED);
|
||||||
|
|
||||||
|
LedColor = QColor(25,0,0);
|
||||||
|
NewLED = new CRGBLedWidget(LedColor,this);
|
||||||
|
NewLED->setPos(((i*10)+10)*(NewLED->boundingRect().width()+mLEDSpacing),0);
|
||||||
|
mLEDList.append(NewLED);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void CLedStringWidget::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
|
||||||
|
{
|
||||||
|
painter->setPen(QPen(Qt::darkGreen));
|
||||||
|
// painter->drawRect(boundingRect());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
QRectF CLedStringWidget::boundingRect() const
|
||||||
|
{
|
||||||
|
if(mLEDList.size() == 0)
|
||||||
|
return QRectF();
|
||||||
|
|
||||||
|
//This assumes all leds are the same size...
|
||||||
|
return QRectF(0,
|
||||||
|
0,
|
||||||
|
mLEDList.size()*(mLEDSpacing + mLEDList.at(0)->boundingRect().width()),
|
||||||
|
mLEDList.at(0)->boundingRect().height());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
int CLedStringWidget::SetLedStringColors(QList<QColor> *LEDColors)
|
||||||
|
{
|
||||||
|
if(LEDColors->size() != mLEDList.size())
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
for(int i = 0; i < mLEDList.size(); i++)
|
||||||
|
{
|
||||||
|
mLEDList[i]->SetColor(LEDColors->at(i));
|
||||||
|
}
|
||||||
|
|
||||||
|
this->boundingRect();
|
||||||
|
|
||||||
|
}
|
||||||
25
Sources/Tower/LedStringWidget.h
Normal file
25
Sources/Tower/LedStringWidget.h
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
#ifndef LEDSTRINGWIDGET_H
|
||||||
|
#define LEDSTRINGWIDGET_H
|
||||||
|
|
||||||
|
#include <QGraphicsItem>
|
||||||
|
#include <QList>
|
||||||
|
#include "RGBLedWidget.h"
|
||||||
|
|
||||||
|
class CLedStringWidget : public QGraphicsItem
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
CLedStringWidget(int NbLed, QGraphicsItem *parent = 0);
|
||||||
|
|
||||||
|
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
|
||||||
|
QRectF boundingRect() const;
|
||||||
|
int SetLedStringColors(QList<QColor> *LEDColors);
|
||||||
|
|
||||||
|
|
||||||
|
int mNbLED;
|
||||||
|
int mLEDSpacing;
|
||||||
|
QRectF mBoundingRect;
|
||||||
|
QList<CRGBLedWidget*> mLEDList;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // LEDSTRINGWIDGET_H
|
||||||
145
Sources/Tower/LightShowWidget.cpp
Normal file
145
Sources/Tower/LightShowWidget.cpp
Normal file
@ -0,0 +1,145 @@
|
|||||||
|
#include "LightShowWidget.h"
|
||||||
|
#include <QGraphicsScene>
|
||||||
|
#include <QGraphicsRectItem>
|
||||||
|
#include <math.h>
|
||||||
|
#include <QScrollBar>
|
||||||
|
|
||||||
|
|
||||||
|
#define VIEW_CENTER viewport()->rect().center()
|
||||||
|
#define VIEW_WIDTH viewport()->rect().width()
|
||||||
|
#define VIEW_HEIGHT viewport()->rect().height()
|
||||||
|
|
||||||
|
CLightShowWidget::CLightShowWidget(QWidget *parent)
|
||||||
|
{
|
||||||
|
mScale = 1.0;
|
||||||
|
mDoMousePan = false;
|
||||||
|
|
||||||
|
setParent(parent);
|
||||||
|
mScene = new QGraphicsScene(this);
|
||||||
|
mScene->setItemIndexMethod(QGraphicsScene::NoIndex);
|
||||||
|
mScene->setSceneRect(-5000, -5000, 10000, 10000);
|
||||||
|
// scene->setSceneRect(-100,-100,10000,10000);
|
||||||
|
setScene(mScene);
|
||||||
|
// setMinimumSize(500,500);
|
||||||
|
// setMaximumSize(parent->size());
|
||||||
|
|
||||||
|
setTransformationAnchor(AnchorUnderMouse);
|
||||||
|
// setTransformationAnchor(AnchorViewCenter);
|
||||||
|
setDragMode(QGraphicsView::NoDrag);
|
||||||
|
setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||||
|
setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||||
|
|
||||||
|
mViewportRect = new QGraphicsRectItem(0,0,50,50);
|
||||||
|
mViewportRect->setPen(QPen(Qt::darkBlue));
|
||||||
|
mSceneRect = new QGraphicsRectItem(sceneRect());
|
||||||
|
mSceneRect->setPen(QPen(Qt::red));
|
||||||
|
mLedStringRect = new QGraphicsRectItem();
|
||||||
|
mLedStringRect->setPen(QPen(Qt::darkGreen));
|
||||||
|
// test->setBrush(QBrush(Qt::darkBlue));
|
||||||
|
// mScene->addItem(mViewportRect);
|
||||||
|
// mScene->addItem(mSceneRect);
|
||||||
|
// mScene->addItem(mLedStringRect);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
mLedStringWidget = new CLedStringWidget(300);
|
||||||
|
mScene->addItem(mLedStringWidget);
|
||||||
|
// mLedStringWidget->setTransform(QTransform::fromScale(10, 10), true);
|
||||||
|
mLedStringWidget->setPos(0,100);
|
||||||
|
|
||||||
|
setSceneRect(-100,-100,parentWidget()->geometry().width(),parentWidget()->geometry().height());
|
||||||
|
setMinimumSize(parentWidget()->geometry().width(),parentWidget()->geometry().height());
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void CLightShowWidget::wheelEvent(QWheelEvent *event)
|
||||||
|
{
|
||||||
|
ScaleView(pow((double)2, event->delta() / 240.0));
|
||||||
|
}
|
||||||
|
|
||||||
|
void CLightShowWidget::ScaleView(qreal scaleFactor)
|
||||||
|
{
|
||||||
|
qreal factor = transform().scale(scaleFactor, scaleFactor).mapRect(QRectF(0, 0, 1, 1)).width();
|
||||||
|
if (/*factor < 0.07 || */factor > 1)
|
||||||
|
return;
|
||||||
|
|
||||||
|
scale(scaleFactor, scaleFactor);
|
||||||
|
mScale *= scaleFactor;
|
||||||
|
|
||||||
|
|
||||||
|
qreal deltaW = factor * sceneRect().width();
|
||||||
|
qreal deltaH = factor * sceneRect().height();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void CLightShowWidget::ZoomIn()
|
||||||
|
{
|
||||||
|
ScaleView(qreal(1.2));
|
||||||
|
}
|
||||||
|
|
||||||
|
void CLightShowWidget::ZoomOut()
|
||||||
|
{
|
||||||
|
ScaleView(1 / qreal(1.2));
|
||||||
|
}
|
||||||
|
|
||||||
|
void CLightShowWidget::showEvent(QShowEvent *event)
|
||||||
|
{
|
||||||
|
mNominalTransform = transform();
|
||||||
|
mLedStringRect->setRect(mLedStringWidget->boundingRect());
|
||||||
|
}
|
||||||
|
|
||||||
|
void CLightShowWidget::mousePressEvent(QMouseEvent *event)
|
||||||
|
{
|
||||||
|
if (event->button() == Qt::LeftButton){
|
||||||
|
mLasMousePos = event->pos();
|
||||||
|
mDoMousePan = true;
|
||||||
|
}
|
||||||
|
QGraphicsView::mousePressEvent(event);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CLightShowWidget::mouseMoveEvent(QMouseEvent *event)
|
||||||
|
{
|
||||||
|
if (mDoMousePan){
|
||||||
|
QPointF mouseDelta = mapToScene(event->pos()) - mapToScene(mLasMousePos);
|
||||||
|
Pan(mouseDelta);
|
||||||
|
}
|
||||||
|
|
||||||
|
QGraphicsView::mouseMoveEvent(event);
|
||||||
|
mLasMousePos = event->pos();
|
||||||
|
}
|
||||||
|
|
||||||
|
void CLightShowWidget::mouseReleaseEvent(QMouseEvent *event)
|
||||||
|
{
|
||||||
|
if (event->button() == Qt::LeftButton){
|
||||||
|
mDoMousePan = false;
|
||||||
|
}
|
||||||
|
QGraphicsView::mouseReleaseEvent(event);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CLightShowWidget::Pan(QPointF delta)
|
||||||
|
{
|
||||||
|
// Scale the pan amount by the current zoom.
|
||||||
|
// delta *= mScale;
|
||||||
|
delta *= PAN_SPEED;
|
||||||
|
// qDebug("Moving by x:%f, y:%f",delta.x(),delta.y());
|
||||||
|
|
||||||
|
delta.setX(-delta.rx());
|
||||||
|
delta.setY(-delta.ry());
|
||||||
|
|
||||||
|
QRectF NewViewRect = sceneRect();
|
||||||
|
NewViewRect.translate(delta.x(),delta.y());
|
||||||
|
|
||||||
|
|
||||||
|
mCurTransform = transform();
|
||||||
|
setSceneRect(NewViewRect);
|
||||||
|
|
||||||
|
|
||||||
|
mViewportRect->setRect(viewport()->geometry());
|
||||||
|
mSceneRect->setRect(sceneRect());
|
||||||
|
// qDebug("Scene Rect: left: %f, right:%f, top:%f, bottom:%f",sceneRect().left(),sceneRect().right(),sceneRect().top(),sceneRect().bottom());
|
||||||
|
// Have panning be anchored from the mouse.
|
||||||
|
setTransformationAnchor(QGraphicsView::AnchorUnderMouse);
|
||||||
|
|
||||||
|
}
|
||||||
47
Sources/Tower/LightShowWidget.h
Normal file
47
Sources/Tower/LightShowWidget.h
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
#ifndef LIGHTSHOWWIDGET_H
|
||||||
|
#define LIGHTSHOWWIDGET_H
|
||||||
|
#include <QGraphicsView>
|
||||||
|
#include <QWheelEvent>
|
||||||
|
#include "LedStringWidget.h"
|
||||||
|
|
||||||
|
#include <QObject>
|
||||||
|
|
||||||
|
|
||||||
|
#define PAN_SPEED 1
|
||||||
|
|
||||||
|
class CLightShowWidget : public QGraphicsView
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
CLightShowWidget(QWidget *parent = 0);
|
||||||
|
void ScaleView(qreal scaleFactor);
|
||||||
|
void Pan(QPointF delta);
|
||||||
|
|
||||||
|
void showEvent(QShowEvent *event);
|
||||||
|
void mousePressEvent(QMouseEvent *event);
|
||||||
|
void mouseReleaseEvent(QMouseEvent *event);
|
||||||
|
void mouseMoveEvent(QMouseEvent *event);
|
||||||
|
|
||||||
|
bool mDoMousePan;
|
||||||
|
|
||||||
|
qreal mScale;
|
||||||
|
QPoint mLasMousePos;
|
||||||
|
QGraphicsRectItem *mViewportRect, *mSceneRect, *mLedStringRect;
|
||||||
|
QGraphicsScene *mScene;
|
||||||
|
QTransform mCurTransform, mNominalTransform;
|
||||||
|
|
||||||
|
CLedStringWidget *mLedStringWidget;
|
||||||
|
|
||||||
|
|
||||||
|
public slots:
|
||||||
|
void ZoomIn();
|
||||||
|
void ZoomOut();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void wheelEvent(QWheelEvent *event);
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // LIGHTSHOWWIDGET_H
|
||||||
62
Sources/Tower/RGBLedWidget.cpp
Normal file
62
Sources/Tower/RGBLedWidget.cpp
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
#include "RGBLedWidget.h"
|
||||||
|
#include <math.h>
|
||||||
|
#include <QPainter>
|
||||||
|
#include <QGraphicsSceneMouseEvent>
|
||||||
|
#include <QGraphicsView>
|
||||||
|
|
||||||
|
CRGBLedWidget::CRGBLedWidget(QColor Color, QGraphicsItem *parent)
|
||||||
|
{
|
||||||
|
setParentItem(parent);
|
||||||
|
mLEDColor = Color;
|
||||||
|
mIsSelected = false;
|
||||||
|
mLedDiameter = LED_DIAMETER;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void CRGBLedWidget::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
|
||||||
|
{
|
||||||
|
painter->setPen(Qt::NoPen);
|
||||||
|
painter->setBrush(QBrush(mLEDColor));
|
||||||
|
painter->drawEllipse(0,0,mLedDiameter,mLedDiameter);
|
||||||
|
|
||||||
|
if(mIsSelected == true)
|
||||||
|
{
|
||||||
|
painter->setPen(Qt::black);
|
||||||
|
painter->setBrush(Qt::NoBrush);
|
||||||
|
painter->drawRect(0,0,mLedDiameter,mLedDiameter);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
QRectF CRGBLedWidget::boundingRect() const
|
||||||
|
{
|
||||||
|
return QRectF(0,0,mLedDiameter,mLedDiameter);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CRGBLedWidget::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
|
||||||
|
{
|
||||||
|
mIsSelected = !mIsSelected;
|
||||||
|
update(boundingRect());
|
||||||
|
qDebug("LedMouseRelease");
|
||||||
|
}
|
||||||
|
|
||||||
|
void CRGBLedWidget::mousePressEvent(QGraphicsSceneMouseEvent *event)
|
||||||
|
{
|
||||||
|
event->accept();
|
||||||
|
qDebug("LedMousePress");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
int CRGBLedWidget::SetColor(QColor color)
|
||||||
|
{
|
||||||
|
mLEDColor = color;
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
int CRGBLedWidget::SetColor(int r, int g, int b)
|
||||||
|
{
|
||||||
|
mLEDColor = QColor(r,g,b);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
27
Sources/Tower/RGBLedWidget.h
Normal file
27
Sources/Tower/RGBLedWidget.h
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
#ifndef RGBLEDWIDGET_H
|
||||||
|
#define RGBLEDWIDGET_H
|
||||||
|
|
||||||
|
#include <QGraphicsItem>
|
||||||
|
#define LED_DIAMETER 30.0
|
||||||
|
|
||||||
|
class CRGBLedWidget : public QGraphicsItem
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
CRGBLedWidget(QColor Color = Qt::darkBlue, QGraphicsItem *parent = 0);
|
||||||
|
QColor mLEDColor;
|
||||||
|
|
||||||
|
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
|
||||||
|
QRectF boundingRect() const;
|
||||||
|
int SetColor(QColor color);
|
||||||
|
int SetColor(int r, int g, int b);
|
||||||
|
|
||||||
|
bool mIsSelected;
|
||||||
|
qreal mLedDiameter;
|
||||||
|
|
||||||
|
void mouseReleaseEvent(QGraphicsSceneMouseEvent * event);
|
||||||
|
void mousePressEvent(QGraphicsSceneMouseEvent * event);
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // RGBLEDWIDGET_H
|
||||||
18
Sources/Tower/TowerLightShowGui.cpp
Normal file
18
Sources/Tower/TowerLightShowGui.cpp
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
#include "TowerLightShowGui.h"
|
||||||
|
#include "ui_TowerLightShowGui.h"
|
||||||
|
|
||||||
|
|
||||||
|
CTowerLightShowGui::CTowerLightShowGui(QWidget *parent) :
|
||||||
|
QDialog(parent),
|
||||||
|
ui(new Ui::CTowerLightShowGui)
|
||||||
|
{
|
||||||
|
ui->setupUi(this);
|
||||||
|
|
||||||
|
mLightShowWidget = new CLightShowWidget(ui->mLightCtrlWidget);
|
||||||
|
//mLightShowWidget->resize(ui->mLightCtrlWidget->size());
|
||||||
|
}
|
||||||
|
|
||||||
|
CTowerLightShowGui::~CTowerLightShowGui()
|
||||||
|
{
|
||||||
|
delete ui;
|
||||||
|
}
|
||||||
25
Sources/Tower/TowerLightShowGui.h
Normal file
25
Sources/Tower/TowerLightShowGui.h
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
#ifndef TOWERLIGHTSHOWGUI_H
|
||||||
|
#define TOWERLIGHTSHOWGUI_H
|
||||||
|
|
||||||
|
#include <QDialog>
|
||||||
|
#include "LightShowWidget.h"
|
||||||
|
|
||||||
|
namespace Ui {
|
||||||
|
class CTowerLightShowGui;
|
||||||
|
}
|
||||||
|
|
||||||
|
class CTowerLightShowGui : public QDialog
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
explicit CTowerLightShowGui(QWidget *parent = 0);
|
||||||
|
~CTowerLightShowGui();
|
||||||
|
|
||||||
|
CLightShowWidget *mLightShowWidget;
|
||||||
|
|
||||||
|
private:
|
||||||
|
Ui::CTowerLightShowGui *ui;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // TOWERLIGHTSHOWGUI_H
|
||||||
60
Sources/Tower/TowerLightShowGui.ui
Normal file
60
Sources/Tower/TowerLightShowGui.ui
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>CTowerLightShowGui</class>
|
||||||
|
<widget class="QDialog" name="CTowerLightShowGui">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>1694</width>
|
||||||
|
<height>658</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>Dialog</string>
|
||||||
|
</property>
|
||||||
|
<widget class="QLabel" name="label">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>470</x>
|
||||||
|
<y>20</y>
|
||||||
|
<width>171</width>
|
||||||
|
<height>31</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<pointsize>16</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Tower Light Show</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QWidget" name="mLightCtrlWidget" native="true">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>39</x>
|
||||||
|
<y>119</y>
|
||||||
|
<width>1621</width>
|
||||||
|
<height>531</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QPushButton" name="pushButton">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>40</x>
|
||||||
|
<y>100</y>
|
||||||
|
<width>75</width>
|
||||||
|
<height>23</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>PushButton</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
|
<resources/>
|
||||||
|
<connections/>
|
||||||
|
</ui>
|
||||||
@ -4,7 +4,7 @@
|
|||||||
#
|
#
|
||||||
#-------------------------------------------------
|
#-------------------------------------------------
|
||||||
|
|
||||||
QT += core gui network
|
QT += core gui network printsupport
|
||||||
|
|
||||||
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
||||||
|
|
||||||
@ -27,6 +27,7 @@ INCLUDEPATH += Sources\
|
|||||||
Sources/Sprinkler\
|
Sources/Sprinkler\
|
||||||
Sources/AvReceiver\
|
Sources/AvReceiver\
|
||||||
Sources/Chalet\
|
Sources/Chalet\
|
||||||
|
Sources/Tower\
|
||||||
|
|
||||||
SOURCES += \
|
SOURCES += \
|
||||||
Sources/Chalet/CChalet.cpp \
|
Sources/Chalet/CChalet.cpp \
|
||||||
@ -34,7 +35,6 @@ SOURCES += \
|
|||||||
Sources/Chalet/ChaletGui.cpp \
|
Sources/Chalet/ChaletGui.cpp \
|
||||||
Sources/Chalet/ChaletMasterCtrlInterface.cpp \
|
Sources/Chalet/ChaletMasterCtrlInterface.cpp \
|
||||||
Sources/GuiMain.cpp \
|
Sources/GuiMain.cpp \
|
||||||
Sources/main.cpp \
|
|
||||||
Sources/NetworkProtocol.cpp \
|
Sources/NetworkProtocol.cpp \
|
||||||
Sources/ProgramSettings.cpp \
|
Sources/ProgramSettings.cpp \
|
||||||
Sources/SystemGui.cpp \
|
Sources/SystemGui.cpp \
|
||||||
@ -56,7 +56,15 @@ SOURCES += \
|
|||||||
Sources/AvReceiver/AvReceiverGui.cpp \
|
Sources/AvReceiver/AvReceiverGui.cpp \
|
||||||
Sources/AvReceiver/AvReceiver.cpp \
|
Sources/AvReceiver/AvReceiver.cpp \
|
||||||
Sources/AvReceiver/AvReceiverNetworkCtrlInterface.cpp \
|
Sources/AvReceiver/AvReceiverNetworkCtrlInterface.cpp \
|
||||||
Sources/AvReceiver/AvReceiverData.cpp
|
Sources/AvReceiver/AvReceiverData.cpp \
|
||||||
|
Sources/QCustomPlot/qcustomplot.cpp \
|
||||||
|
Sources/Tower/TowerLightShowGui.cpp \
|
||||||
|
Sources/Tower/LightShowWidget.cpp \
|
||||||
|
Sources/Tower/RGBLedWidget.cpp \
|
||||||
|
Sources/Tower/LedStringWidget.cpp \
|
||||||
|
Sources/Tower/LEDAnimator.cpp \
|
||||||
|
Sources/Tower/LEDAnimation.cpp \
|
||||||
|
Sources/main.cpp
|
||||||
|
|
||||||
HEADERS += Sources/AbstractNetworkInterface.h \
|
HEADERS += Sources/AbstractNetworkInterface.h \
|
||||||
Sources/Chalet/CChalet.h \
|
Sources/Chalet/CChalet.h \
|
||||||
@ -87,11 +95,19 @@ HEADERS += Sources/AbstractNetworkInterface.h \
|
|||||||
Sources/AvReceiver/AvReceiverGui.h \
|
Sources/AvReceiver/AvReceiverGui.h \
|
||||||
Sources/AvReceiver/AvReceiver.h \
|
Sources/AvReceiver/AvReceiver.h \
|
||||||
Sources/AvReceiver/AvReceiverNetworkCtrlInterface.h \
|
Sources/AvReceiver/AvReceiverNetworkCtrlInterface.h \
|
||||||
Sources/AvReceiver/AvReceiverData.h
|
Sources/AvReceiver/AvReceiverData.h \
|
||||||
|
Sources/QCustomPlot/qcustomplot.h \
|
||||||
|
Sources/Tower/TowerLightShowGui.h \
|
||||||
|
Sources/Tower/LightShowWidget.h \
|
||||||
|
Sources/Tower/RGBLedWidget.h \
|
||||||
|
Sources/Tower/LedStringWidget.h \
|
||||||
|
Sources/Tower/LEDAnimator.h \
|
||||||
|
Sources/Tower/LEDAnimation.h
|
||||||
|
|
||||||
FORMS += \
|
FORMS += \
|
||||||
SMSGui.ui \
|
SMSGui.ui \
|
||||||
Sources/Chalet/ChaletGui.ui \
|
Sources/Chalet/ChaletGui.ui \
|
||||||
Sources/Sprinkler/SprinklerGui.ui \
|
Sources/Sprinkler/SprinklerGui.ui \
|
||||||
Sources/Sprinkler/SprinklerDeviceGuiItem.ui \
|
Sources/Sprinkler/SprinklerDeviceGuiItem.ui \
|
||||||
Sources/AvReceiver/AvReceiverGui.ui
|
Sources/AvReceiver/AvReceiverGui.ui \
|
||||||
|
Sources/Tower/TowerLightShowGui.ui
|
||||||
|
|||||||
264
SystemGui.pro.user.4.8-pre1
Normal file
264
SystemGui.pro.user.4.8-pre1
Normal file
@ -0,0 +1,264 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE QtCreatorProject>
|
||||||
|
<!-- Written by QtCreator 4.2.1, 2021-04-11T13:02:02. -->
|
||||||
|
<qtcreator>
|
||||||
|
<data>
|
||||||
|
<variable>EnvironmentId</variable>
|
||||||
|
<value type="QByteArray">{5a351af6-dc3b-4afc-af92-7da5e3a5cd12}</value>
|
||||||
|
</data>
|
||||||
|
<data>
|
||||||
|
<variable>ProjectExplorer.Project.ActiveTarget</variable>
|
||||||
|
<value type="int">0</value>
|
||||||
|
</data>
|
||||||
|
<data>
|
||||||
|
<variable>ProjectExplorer.Project.EditorSettings</variable>
|
||||||
|
<valuemap type="QVariantMap">
|
||||||
|
<value type="bool" key="EditorConfiguration.AutoIndent">true</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.CamelCaseNavigation">true</value>
|
||||||
|
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0">
|
||||||
|
<value type="QString" key="language">Cpp</value>
|
||||||
|
<valuemap type="QVariantMap" key="value">
|
||||||
|
<value type="QByteArray" key="CurrentPreferences">CppGlobal</value>
|
||||||
|
</valuemap>
|
||||||
|
</valuemap>
|
||||||
|
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1">
|
||||||
|
<value type="QString" key="language">QmlJS</value>
|
||||||
|
<valuemap type="QVariantMap" key="value">
|
||||||
|
<value type="QByteArray" key="CurrentPreferences">QmlJSGlobal</value>
|
||||||
|
</valuemap>
|
||||||
|
</valuemap>
|
||||||
|
<value type="int" key="EditorConfiguration.CodeStyle.Count">2</value>
|
||||||
|
<value type="QByteArray" key="EditorConfiguration.Codec">UTF-8</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value>
|
||||||
|
<value type="int" key="EditorConfiguration.IndentSize">4</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value>
|
||||||
|
<value type="int" key="EditorConfiguration.MarginColumn">80</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.MouseHiding">true</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.MouseNavigation">true</value>
|
||||||
|
<value type="int" key="EditorConfiguration.PaddingMode">1</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.ShowMargin">false</value>
|
||||||
|
<value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.SmartSelectionChanging">true</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.SpacesForTabs">true</value>
|
||||||
|
<value type="int" key="EditorConfiguration.TabKeyBehavior">0</value>
|
||||||
|
<value type="int" key="EditorConfiguration.TabSize">8</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.UseGlobal">true</value>
|
||||||
|
<value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.addFinalNewLine">true</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.cleanIndentation">true</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.cleanWhitespace">true</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.inEntireDocument">false</value>
|
||||||
|
</valuemap>
|
||||||
|
</data>
|
||||||
|
<data>
|
||||||
|
<variable>ProjectExplorer.Project.PluginSettings</variable>
|
||||||
|
<valuemap type="QVariantMap"/>
|
||||||
|
</data>
|
||||||
|
<data>
|
||||||
|
<variable>ProjectExplorer.Project.Target.0</variable>
|
||||||
|
<valuemap type="QVariantMap">
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Qt 5.14.2</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Qt 5.14.2</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{dc2b548b-27bc-4e25-8500-cc36640735d8}</value>
|
||||||
|
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
|
||||||
|
<value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
|
||||||
|
<value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
|
||||||
|
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">D:/Main/PicDev/Projets/MasterCtrl/SystemGui</value>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
|
||||||
|
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">true</value>
|
||||||
|
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
|
||||||
|
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
|
||||||
|
<value type="bool" key="QtProjectManager.QMakeBuildStep.SeparateDebugInfo">false</value>
|
||||||
|
<value type="bool" key="QtProjectManager.QMakeBuildStep.UseQtQuickCompiler">false</value>
|
||||||
|
</valuemap>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||||
|
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"/>
|
||||||
|
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
|
||||||
|
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
|
||||||
|
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||||
|
</valuemap>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||||
|
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"/>
|
||||||
|
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
|
||||||
|
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
|
||||||
|
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||||
|
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Debug</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
||||||
|
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value>
|
||||||
|
<value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value>
|
||||||
|
</valuemap>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
|
||||||
|
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">D:/Main/PicDev/Projets/MasterCtrl/SystemGui</value>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
|
||||||
|
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value>
|
||||||
|
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
|
||||||
|
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
|
||||||
|
<value type="bool" key="QtProjectManager.QMakeBuildStep.SeparateDebugInfo">false</value>
|
||||||
|
<value type="bool" key="QtProjectManager.QMakeBuildStep.UseQtQuickCompiler">false</value>
|
||||||
|
</valuemap>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||||
|
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"/>
|
||||||
|
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
|
||||||
|
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
|
||||||
|
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||||
|
</valuemap>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||||
|
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"/>
|
||||||
|
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
|
||||||
|
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
|
||||||
|
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||||
|
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Release</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
||||||
|
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
|
||||||
|
<value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">2</value>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||||
|
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy locally</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.Target.PluginSettings"/>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
|
||||||
|
<value type="bool" key="Analyzer.QmlProfiler.AggregateTraces">false</value>
|
||||||
|
<value type="bool" key="Analyzer.QmlProfiler.FlushEnabled">false</value>
|
||||||
|
<value type="uint" key="Analyzer.QmlProfiler.FlushInterval">1000</value>
|
||||||
|
<value type="QString" key="Analyzer.QmlProfiler.LastTraceFile"></value>
|
||||||
|
<value type="bool" key="Analyzer.QmlProfiler.Settings.UseGlobalSettings">true</value>
|
||||||
|
<valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/>
|
||||||
|
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value>
|
||||||
|
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value>
|
||||||
|
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value>
|
||||||
|
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value>
|
||||||
|
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value>
|
||||||
|
<value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value>
|
||||||
|
<value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value>
|
||||||
|
<value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value>
|
||||||
|
<value type="int" key="Analyzer.Valgrind.LeakCheckOnFinish">1</value>
|
||||||
|
<value type="int" key="Analyzer.Valgrind.NumCallers">25</value>
|
||||||
|
<valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/>
|
||||||
|
<value type="int" key="Analyzer.Valgrind.SelfModifyingCodeDetection">1</value>
|
||||||
|
<value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value>
|
||||||
|
<value type="bool" key="Analyzer.Valgrind.ShowReachable">false</value>
|
||||||
|
<value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value>
|
||||||
|
<value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value>
|
||||||
|
<valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds">
|
||||||
|
<value type="int">0</value>
|
||||||
|
<value type="int">1</value>
|
||||||
|
<value type="int">2</value>
|
||||||
|
<value type="int">3</value>
|
||||||
|
<value type="int">4</value>
|
||||||
|
<value type="int">5</value>
|
||||||
|
<value type="int">6</value>
|
||||||
|
<value type="int">7</value>
|
||||||
|
<value type="int">8</value>
|
||||||
|
<value type="int">9</value>
|
||||||
|
<value type="int">10</value>
|
||||||
|
<value type="int">11</value>
|
||||||
|
<value type="int">12</value>
|
||||||
|
<value type="int">13</value>
|
||||||
|
<value type="int">14</value>
|
||||||
|
</valuelist>
|
||||||
|
<value type="int" key="PE.EnvironmentAspect.Base">2</value>
|
||||||
|
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">SystemGui</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:D:/Main/PicDev/Projets/MasterCtrl/SystemGui/SystemGui.pro</value>
|
||||||
|
<value type="bool" key="QmakeProjectManager.QmakeRunConfiguration.UseLibrarySearchPath">true</value>
|
||||||
|
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments"></value>
|
||||||
|
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.ProFile">SystemGui.pro</value>
|
||||||
|
<value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix">false</value>
|
||||||
|
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory"></value>
|
||||||
|
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory.default">D:/Main/PicDev/Projets/MasterCtrl/SystemGui</value>
|
||||||
|
<value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
|
||||||
|
<value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
|
||||||
|
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
|
||||||
|
<value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
|
||||||
|
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
|
||||||
|
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
|
||||||
|
</valuemap>
|
||||||
|
</data>
|
||||||
|
<data>
|
||||||
|
<variable>ProjectExplorer.Project.TargetCount</variable>
|
||||||
|
<value type="int">1</value>
|
||||||
|
</data>
|
||||||
|
<data>
|
||||||
|
<variable>ProjectExplorer.Project.Updater.FileVersion</variable>
|
||||||
|
<value type="int">18</value>
|
||||||
|
</data>
|
||||||
|
<data>
|
||||||
|
<variable>Version</variable>
|
||||||
|
<value type="int">18</value>
|
||||||
|
</data>
|
||||||
|
</qtcreator>
|
||||||
100
ui_ChaletGui.h
100
ui_ChaletGui.h
@ -12,7 +12,9 @@
|
|||||||
#include <QtCore/QVariant>
|
#include <QtCore/QVariant>
|
||||||
#include <QtWidgets/QApplication>
|
#include <QtWidgets/QApplication>
|
||||||
#include <QtWidgets/QCheckBox>
|
#include <QtWidgets/QCheckBox>
|
||||||
|
#include <QtWidgets/QDateEdit>
|
||||||
#include <QtWidgets/QGroupBox>
|
#include <QtWidgets/QGroupBox>
|
||||||
|
#include <QtWidgets/QLCDNumber>
|
||||||
#include <QtWidgets/QLabel>
|
#include <QtWidgets/QLabel>
|
||||||
#include <QtWidgets/QPushButton>
|
#include <QtWidgets/QPushButton>
|
||||||
#include <QtWidgets/QWidget>
|
#include <QtWidgets/QWidget>
|
||||||
@ -36,15 +38,26 @@ public:
|
|||||||
QGroupBox *groupBox;
|
QGroupBox *groupBox;
|
||||||
QPushButton *mDoHarakiriButton;
|
QPushButton *mDoHarakiriButton;
|
||||||
QLabel *mBatteryVoltageLabel;
|
QLabel *mBatteryVoltageLabel;
|
||||||
|
QLabel *mChaletOnlineStatusLbl;
|
||||||
|
QLabel *mSolarPanelCurrentLabel;
|
||||||
|
QLabel *mBatterySOCLabel;
|
||||||
|
QLabel *mCurrentSensorStateLbl;
|
||||||
|
QLabel *mLostReqPercentLbl;
|
||||||
|
QWidget *mPlotWidget;
|
||||||
|
QLCDNumber *mVoltageLCD;
|
||||||
|
QLabel *mChaletCommActivityLbl;
|
||||||
|
QLabel *mLasCommRequestReceivedLbl;
|
||||||
|
QDateEdit *mLogStartDateEdit;
|
||||||
|
QPushButton *mGetChaletLogButton;
|
||||||
|
|
||||||
void setupUi(QWidget *CChaletGui)
|
void setupUi(QWidget *CChaletGui)
|
||||||
{
|
{
|
||||||
if (CChaletGui->objectName().isEmpty())
|
if (CChaletGui->objectName().isEmpty())
|
||||||
CChaletGui->setObjectName(QString::fromUtf8("CChaletGui"));
|
CChaletGui->setObjectName(QString::fromUtf8("CChaletGui"));
|
||||||
CChaletGui->resize(849, 598);
|
CChaletGui->resize(1205, 598);
|
||||||
MainPageLabel = new QLabel(CChaletGui);
|
MainPageLabel = new QLabel(CChaletGui);
|
||||||
MainPageLabel->setObjectName(QString::fromUtf8("MainPageLabel"));
|
MainPageLabel->setObjectName(QString::fromUtf8("MainPageLabel"));
|
||||||
MainPageLabel->setGeometry(QRect(370, 20, 201, 31));
|
MainPageLabel->setGeometry(QRect(460, 10, 71, 31));
|
||||||
QFont font;
|
QFont font;
|
||||||
font.setPointSize(12);
|
font.setPointSize(12);
|
||||||
font.setBold(true);
|
font.setBold(true);
|
||||||
@ -52,43 +65,83 @@ public:
|
|||||||
MainPageLabel->setFont(font);
|
MainPageLabel->setFont(font);
|
||||||
mInverterRlyStatusLabel = new QLabel(CChaletGui);
|
mInverterRlyStatusLabel = new QLabel(CChaletGui);
|
||||||
mInverterRlyStatusLabel->setObjectName(QString::fromUtf8("mInverterRlyStatusLabel"));
|
mInverterRlyStatusLabel->setObjectName(QString::fromUtf8("mInverterRlyStatusLabel"));
|
||||||
mInverterRlyStatusLabel->setGeometry(QRect(350, 90, 211, 16));
|
mInverterRlyStatusLabel->setGeometry(QRect(198, 50, 210, 16));
|
||||||
mWiFiModuleStatusLabel = new QLabel(CChaletGui);
|
mWiFiModuleStatusLabel = new QLabel(CChaletGui);
|
||||||
mWiFiModuleStatusLabel->setObjectName(QString::fromUtf8("mWiFiModuleStatusLabel"));
|
mWiFiModuleStatusLabel->setObjectName(QString::fromUtf8("mWiFiModuleStatusLabel"));
|
||||||
mWiFiModuleStatusLabel->setGeometry(QRect(360, 130, 131, 16));
|
mWiFiModuleStatusLabel->setGeometry(QRect(198, 90, 130, 16));
|
||||||
mWiFiSectionLabel = new QLabel(CChaletGui);
|
mWiFiSectionLabel = new QLabel(CChaletGui);
|
||||||
mWiFiSectionLabel->setObjectName(QString::fromUtf8("mWiFiSectionLabel"));
|
mWiFiSectionLabel->setObjectName(QString::fromUtf8("mWiFiSectionLabel"));
|
||||||
mWiFiSectionLabel->setGeometry(QRect(180, 130, 31, 16));
|
mWiFiSectionLabel->setGeometry(QRect(26, 90, 31, 16));
|
||||||
mInverterRelayOFFBtn = new QPushButton(CChaletGui);
|
mInverterRelayOFFBtn = new QPushButton(CChaletGui);
|
||||||
mInverterRelayOFFBtn->setObjectName(QString::fromUtf8("mInverterRelayOFFBtn"));
|
mInverterRelayOFFBtn->setObjectName(QString::fromUtf8("mInverterRelayOFFBtn"));
|
||||||
mInverterRelayOFFBtn->setGeometry(QRect(280, 90, 61, 22));
|
mInverterRelayOFFBtn->setGeometry(QRect(126, 50, 61, 22));
|
||||||
mWiFiModuleOFFBtn = new QPushButton(CChaletGui);
|
mWiFiModuleOFFBtn = new QPushButton(CChaletGui);
|
||||||
mWiFiModuleOFFBtn->setObjectName(QString::fromUtf8("mWiFiModuleOFFBtn"));
|
mWiFiModuleOFFBtn->setObjectName(QString::fromUtf8("mWiFiModuleOFFBtn"));
|
||||||
mWiFiModuleOFFBtn->setGeometry(QRect(280, 130, 61, 23));
|
mWiFiModuleOFFBtn->setGeometry(QRect(126, 90, 61, 23));
|
||||||
mInverterRelayONBtn = new QPushButton(CChaletGui);
|
mInverterRelayONBtn = new QPushButton(CChaletGui);
|
||||||
mInverterRelayONBtn->setObjectName(QString::fromUtf8("mInverterRelayONBtn"));
|
mInverterRelayONBtn->setObjectName(QString::fromUtf8("mInverterRelayONBtn"));
|
||||||
mInverterRelayONBtn->setGeometry(QRect(224, 90, 51, 23));
|
mInverterRelayONBtn->setGeometry(QRect(70, 50, 51, 23));
|
||||||
mWiFiModuleONBtn = new QPushButton(CChaletGui);
|
mWiFiModuleONBtn = new QPushButton(CChaletGui);
|
||||||
mWiFiModuleONBtn->setObjectName(QString::fromUtf8("mWiFiModuleONBtn"));
|
mWiFiModuleONBtn->setObjectName(QString::fromUtf8("mWiFiModuleONBtn"));
|
||||||
mWiFiModuleONBtn->setGeometry(QRect(224, 130, 51, 23));
|
mWiFiModuleONBtn->setGeometry(QRect(70, 90, 51, 23));
|
||||||
mWiFiSectionLabel_2 = new QLabel(CChaletGui);
|
mWiFiSectionLabel_2 = new QLabel(CChaletGui);
|
||||||
mWiFiSectionLabel_2->setObjectName(QString::fromUtf8("mWiFiSectionLabel_2"));
|
mWiFiSectionLabel_2->setObjectName(QString::fromUtf8("mWiFiSectionLabel_2"));
|
||||||
mWiFiSectionLabel_2->setGeometry(QRect(170, 90, 51, 20));
|
mWiFiSectionLabel_2->setGeometry(QRect(16, 50, 51, 20));
|
||||||
mRebootCPUBtn = new QPushButton(CChaletGui);
|
mRebootCPUBtn = new QPushButton(CChaletGui);
|
||||||
mRebootCPUBtn->setObjectName(QString::fromUtf8("mRebootCPUBtn"));
|
mRebootCPUBtn->setObjectName(QString::fromUtf8("mRebootCPUBtn"));
|
||||||
mRebootCPUBtn->setGeometry(QRect(220, 170, 75, 23));
|
mRebootCPUBtn->setGeometry(QRect(66, 130, 75, 23));
|
||||||
mEnableHarakiriChkBx = new QCheckBox(CChaletGui);
|
mEnableHarakiriChkBx = new QCheckBox(CChaletGui);
|
||||||
mEnableHarakiriChkBx->setObjectName(QString::fromUtf8("mEnableHarakiriChkBx"));
|
mEnableHarakiriChkBx->setObjectName(QString::fromUtf8("mEnableHarakiriChkBx"));
|
||||||
mEnableHarakiriChkBx->setGeometry(QRect(640, 80, 111, 17));
|
mEnableHarakiriChkBx->setEnabled(false);
|
||||||
|
mEnableHarakiriChkBx->setGeometry(QRect(850, 80, 111, 17));
|
||||||
groupBox = new QGroupBox(CChaletGui);
|
groupBox = new QGroupBox(CChaletGui);
|
||||||
groupBox->setObjectName(QString::fromUtf8("groupBox"));
|
groupBox->setObjectName(QString::fromUtf8("groupBox"));
|
||||||
groupBox->setGeometry(QRect(620, 50, 151, 81));
|
groupBox->setGeometry(QRect(830, 50, 151, 81));
|
||||||
mDoHarakiriButton = new QPushButton(groupBox);
|
mDoHarakiriButton = new QPushButton(groupBox);
|
||||||
mDoHarakiriButton->setObjectName(QString::fromUtf8("mDoHarakiriButton"));
|
mDoHarakiriButton->setObjectName(QString::fromUtf8("mDoHarakiriButton"));
|
||||||
mDoHarakiriButton->setGeometry(QRect(20, 50, 101, 23));
|
mDoHarakiriButton->setGeometry(QRect(20, 50, 101, 23));
|
||||||
mBatteryVoltageLabel = new QLabel(CChaletGui);
|
mBatteryVoltageLabel = new QLabel(CChaletGui);
|
||||||
mBatteryVoltageLabel->setObjectName(QString::fromUtf8("mBatteryVoltageLabel"));
|
mBatteryVoltageLabel->setObjectName(QString::fromUtf8("mBatteryVoltageLabel"));
|
||||||
mBatteryVoltageLabel->setGeometry(QRect(170, 210, 241, 16));
|
mBatteryVoltageLabel->setGeometry(QRect(147, 170, 241, 16));
|
||||||
|
mChaletOnlineStatusLbl = new QLabel(CChaletGui);
|
||||||
|
mChaletOnlineStatusLbl->setObjectName(QString::fromUtf8("mChaletOnlineStatusLbl"));
|
||||||
|
mChaletOnlineStatusLbl->setGeometry(QRect(450, 50, 91, 21));
|
||||||
|
QFont font1;
|
||||||
|
font1.setFamily(QString::fromUtf8("Terminal"));
|
||||||
|
font1.setPointSize(14);
|
||||||
|
font1.setBold(true);
|
||||||
|
font1.setWeight(75);
|
||||||
|
mChaletOnlineStatusLbl->setFont(font1);
|
||||||
|
mSolarPanelCurrentLabel = new QLabel(CChaletGui);
|
||||||
|
mSolarPanelCurrentLabel->setObjectName(QString::fromUtf8("mSolarPanelCurrentLabel"));
|
||||||
|
mSolarPanelCurrentLabel->setGeometry(QRect(147, 190, 241, 16));
|
||||||
|
mBatterySOCLabel = new QLabel(CChaletGui);
|
||||||
|
mBatterySOCLabel->setObjectName(QString::fromUtf8("mBatterySOCLabel"));
|
||||||
|
mBatterySOCLabel->setGeometry(QRect(147, 210, 241, 16));
|
||||||
|
mCurrentSensorStateLbl = new QLabel(CChaletGui);
|
||||||
|
mCurrentSensorStateLbl->setObjectName(QString::fromUtf8("mCurrentSensorStateLbl"));
|
||||||
|
mCurrentSensorStateLbl->setGeometry(QRect(147, 230, 241, 16));
|
||||||
|
mLostReqPercentLbl = new QLabel(CChaletGui);
|
||||||
|
mLostReqPercentLbl->setObjectName(QString::fromUtf8("mLostReqPercentLbl"));
|
||||||
|
mLostReqPercentLbl->setGeometry(QRect(770, 200, 241, 16));
|
||||||
|
mPlotWidget = new QWidget(CChaletGui);
|
||||||
|
mPlotWidget->setObjectName(QString::fromUtf8("mPlotWidget"));
|
||||||
|
mPlotWidget->setGeometry(QRect(590, 250, 571, 321));
|
||||||
|
mVoltageLCD = new QLCDNumber(CChaletGui);
|
||||||
|
mVoltageLCD->setObjectName(QString::fromUtf8("mVoltageLCD"));
|
||||||
|
mVoltageLCD->setGeometry(QRect(30, 170, 111, 23));
|
||||||
|
mChaletCommActivityLbl = new QLabel(CChaletGui);
|
||||||
|
mChaletCommActivityLbl->setObjectName(QString::fromUtf8("mChaletCommActivityLbl"));
|
||||||
|
mChaletCommActivityLbl->setGeometry(QRect(770, 180, 47, 16));
|
||||||
|
mLasCommRequestReceivedLbl = new QLabel(CChaletGui);
|
||||||
|
mLasCommRequestReceivedLbl->setObjectName(QString::fromUtf8("mLasCommRequestReceivedLbl"));
|
||||||
|
mLasCommRequestReceivedLbl->setGeometry(QRect(770, 160, 301, 16));
|
||||||
|
mLogStartDateEdit = new QDateEdit(CChaletGui);
|
||||||
|
mLogStartDateEdit->setObjectName(QString::fromUtf8("mLogStartDateEdit"));
|
||||||
|
mLogStartDateEdit->setGeometry(QRect(950, 220, 110, 22));
|
||||||
|
mGetChaletLogButton = new QPushButton(CChaletGui);
|
||||||
|
mGetChaletLogButton->setObjectName(QString::fromUtf8("mGetChaletLogButton"));
|
||||||
|
mGetChaletLogButton->setGeometry(QRect(1070, 220, 75, 23));
|
||||||
groupBox->raise();
|
groupBox->raise();
|
||||||
MainPageLabel->raise();
|
MainPageLabel->raise();
|
||||||
mInverterRlyStatusLabel->raise();
|
mInverterRlyStatusLabel->raise();
|
||||||
@ -102,6 +155,17 @@ public:
|
|||||||
mRebootCPUBtn->raise();
|
mRebootCPUBtn->raise();
|
||||||
mEnableHarakiriChkBx->raise();
|
mEnableHarakiriChkBx->raise();
|
||||||
mBatteryVoltageLabel->raise();
|
mBatteryVoltageLabel->raise();
|
||||||
|
mChaletOnlineStatusLbl->raise();
|
||||||
|
mSolarPanelCurrentLabel->raise();
|
||||||
|
mBatterySOCLabel->raise();
|
||||||
|
mCurrentSensorStateLbl->raise();
|
||||||
|
mLostReqPercentLbl->raise();
|
||||||
|
mPlotWidget->raise();
|
||||||
|
mVoltageLCD->raise();
|
||||||
|
mChaletCommActivityLbl->raise();
|
||||||
|
mLasCommRequestReceivedLbl->raise();
|
||||||
|
mLogStartDateEdit->raise();
|
||||||
|
mGetChaletLogButton->raise();
|
||||||
|
|
||||||
retranslateUi(CChaletGui);
|
retranslateUi(CChaletGui);
|
||||||
|
|
||||||
@ -125,6 +189,14 @@ public:
|
|||||||
groupBox->setTitle(QCoreApplication::translate("CChaletGui", "HARAKIRI!!!", nullptr));
|
groupBox->setTitle(QCoreApplication::translate("CChaletGui", "HARAKIRI!!!", nullptr));
|
||||||
mDoHarakiriButton->setText(QCoreApplication::translate("CChaletGui", "DO HARAKIRI !!!", nullptr));
|
mDoHarakiriButton->setText(QCoreApplication::translate("CChaletGui", "DO HARAKIRI !!!", nullptr));
|
||||||
mBatteryVoltageLabel->setText(QCoreApplication::translate("CChaletGui", "Battery Voltage", nullptr));
|
mBatteryVoltageLabel->setText(QCoreApplication::translate("CChaletGui", "Battery Voltage", nullptr));
|
||||||
|
mChaletOnlineStatusLbl->setText(QCoreApplication::translate("CChaletGui", "OFFLINE", nullptr));
|
||||||
|
mSolarPanelCurrentLabel->setText(QCoreApplication::translate("CChaletGui", "Solar Panel Current: ", nullptr));
|
||||||
|
mBatterySOCLabel->setText(QCoreApplication::translate("CChaletGui", "Battery SOC: ", nullptr));
|
||||||
|
mCurrentSensorStateLbl->setText(QCoreApplication::translate("CChaletGui", "Current Sensor:", nullptr));
|
||||||
|
mLostReqPercentLbl->setText(QCoreApplication::translate("CChaletGui", "Lost requests: ", nullptr));
|
||||||
|
mChaletCommActivityLbl->setText(QCoreApplication::translate("CChaletGui", "Activity!!!", nullptr));
|
||||||
|
mLasCommRequestReceivedLbl->setText(QCoreApplication::translate("CChaletGui", "Last Request: ", nullptr));
|
||||||
|
mGetChaletLogButton->setText(QCoreApplication::translate("CChaletGui", "PushButton", nullptr));
|
||||||
} // retranslateUi
|
} // retranslateUi
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
66
ui_TowerLightShowGui.h
Normal file
66
ui_TowerLightShowGui.h
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
/********************************************************************************
|
||||||
|
** Form generated from reading UI file 'TowerLightShowGui.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_TOWERLIGHTSHOWGUI_H
|
||||||
|
#define UI_TOWERLIGHTSHOWGUI_H
|
||||||
|
|
||||||
|
#include <QtCore/QVariant>
|
||||||
|
#include <QtWidgets/QApplication>
|
||||||
|
#include <QtWidgets/QDialog>
|
||||||
|
#include <QtWidgets/QLabel>
|
||||||
|
#include <QtWidgets/QPushButton>
|
||||||
|
#include <QtWidgets/QWidget>
|
||||||
|
|
||||||
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
|
class Ui_CTowerLightShowGui
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
QLabel *label;
|
||||||
|
QWidget *mLightCtrlWidget;
|
||||||
|
QPushButton *pushButton;
|
||||||
|
|
||||||
|
void setupUi(QDialog *CTowerLightShowGui)
|
||||||
|
{
|
||||||
|
if (CTowerLightShowGui->objectName().isEmpty())
|
||||||
|
CTowerLightShowGui->setObjectName(QString::fromUtf8("CTowerLightShowGui"));
|
||||||
|
CTowerLightShowGui->resize(1694, 658);
|
||||||
|
label = new QLabel(CTowerLightShowGui);
|
||||||
|
label->setObjectName(QString::fromUtf8("label"));
|
||||||
|
label->setGeometry(QRect(470, 20, 171, 31));
|
||||||
|
QFont font;
|
||||||
|
font.setPointSize(16);
|
||||||
|
label->setFont(font);
|
||||||
|
mLightCtrlWidget = new QWidget(CTowerLightShowGui);
|
||||||
|
mLightCtrlWidget->setObjectName(QString::fromUtf8("mLightCtrlWidget"));
|
||||||
|
mLightCtrlWidget->setGeometry(QRect(39, 119, 1621, 531));
|
||||||
|
pushButton = new QPushButton(CTowerLightShowGui);
|
||||||
|
pushButton->setObjectName(QString::fromUtf8("pushButton"));
|
||||||
|
pushButton->setGeometry(QRect(40, 100, 75, 23));
|
||||||
|
|
||||||
|
retranslateUi(CTowerLightShowGui);
|
||||||
|
|
||||||
|
QMetaObject::connectSlotsByName(CTowerLightShowGui);
|
||||||
|
} // setupUi
|
||||||
|
|
||||||
|
void retranslateUi(QDialog *CTowerLightShowGui)
|
||||||
|
{
|
||||||
|
CTowerLightShowGui->setWindowTitle(QCoreApplication::translate("CTowerLightShowGui", "Dialog", nullptr));
|
||||||
|
label->setText(QCoreApplication::translate("CTowerLightShowGui", "Tower Light Show", nullptr));
|
||||||
|
pushButton->setText(QCoreApplication::translate("CTowerLightShowGui", "PushButton", nullptr));
|
||||||
|
} // retranslateUi
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
namespace Ui {
|
||||||
|
class CTowerLightShowGui: public Ui_CTowerLightShowGui {};
|
||||||
|
} // namespace Ui
|
||||||
|
|
||||||
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
|
#endif // UI_TOWERLIGHTSHOWGUI_H
|
||||||
Loading…
x
Reference in New Issue
Block a user