Ajout de la gestion de roulette de volume du clavier
This commit is contained in:
parent
59b07d5db3
commit
ac8490b5ee
0
DisplaySwitch.exe
Normal file
0
DisplaySwitch.exe
Normal file
@ -11,6 +11,9 @@ CAvReceiver::CAvReceiver(CAvReceiverGui *ReceiverGui)
|
||||
mReceiverPollTimer->setSingleShot(false);
|
||||
mReceiverPollTimer->setInterval(1000);
|
||||
connect(mReceiverPollTimer,SIGNAL(timeout()),this,SLOT(PollTimerExpired()));
|
||||
|
||||
connect(&mVolumeController,&CVolumeController::ExternalVolumeChanged,this,&CAvReceiver::ExternalVolumeChanged);
|
||||
mTempReceiverVolume = 0;
|
||||
}
|
||||
|
||||
CAvReceiver::~CAvReceiver()
|
||||
@ -23,6 +26,7 @@ int CAvReceiver::Start()
|
||||
{
|
||||
mNetworkInterface->ConnectToMasterCtrl();
|
||||
mReceiverPollTimer->start();
|
||||
mVolumeController.Init(this);
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
@ -77,6 +81,7 @@ int CAvReceiver::ReceiverGeneralStatusReceived(QByteArray StatusData)
|
||||
Strm >> mReceiverStatus;
|
||||
Strm >> mZone2Status;
|
||||
mReceiverGui->UpdateReceiverStatus(mReceiverStatus, mZone2Status);
|
||||
mTempReceiverVolume = mReceiverStatus.mMainVolume;
|
||||
return RET_OK;
|
||||
}
|
||||
int CAvReceiver::SelectScenePressed(char Zone, char Scene)
|
||||
@ -89,6 +94,7 @@ int CAvReceiver::SelectScenePressed(char Zone, char Scene)
|
||||
|
||||
int CAvReceiver::MainZoneVolumeChanged(float Value)
|
||||
{
|
||||
// qDebug("MainZoneVolumeChanged : %f",Value);
|
||||
QByteArray VolumeData;
|
||||
QDataStream Strm(&VolumeData,QIODevice::WriteOnly);
|
||||
Strm << Value;
|
||||
@ -102,3 +108,47 @@ int CAvReceiver::Zone2VolumeChanged(float Value)
|
||||
Strm << Value;
|
||||
return mNetworkInterface->SendMasterCtrlCommand(AV_RECEIVER_INTERFACE_SET_ZONE2_VOLUME_REQUEST,VolumeData);
|
||||
}
|
||||
|
||||
int CAvReceiver::Zone2InputSrcChanged(QString InputSrc)
|
||||
{
|
||||
QByteArray SourceData;
|
||||
QDataStream Strm(&SourceData,QIODevice::WriteOnly);
|
||||
Strm << InputSrc;
|
||||
return mNetworkInterface->SendMasterCtrlCommand(AV_RECEIVER_INTERFACE_SET_ZONE2_INPUT_REQUEST,SourceData);
|
||||
}
|
||||
|
||||
//We need to implement this in a slot because the Windows API runs in a differen Thread and it crashes the MasterCtrl socket.
|
||||
void CAvReceiver::ExternalVolumeChanged(float Value)
|
||||
{
|
||||
float ValueInPercent;
|
||||
float Ret;
|
||||
if(Value > 0)
|
||||
{
|
||||
mTempReceiverVolume += Value;
|
||||
MainZoneVolumeChanged(mTempReceiverVolume);
|
||||
Ret = 0.04;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(mTempReceiverVolume == -80.5)
|
||||
{
|
||||
Ret = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
mTempReceiverVolume += Value;
|
||||
if(mTempReceiverVolume == -80.5)
|
||||
{
|
||||
MainZoneVolumeChanged(mTempReceiverVolume);
|
||||
Ret = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
MainZoneVolumeChanged(mTempReceiverVolume);
|
||||
Ret = 0.04;
|
||||
}
|
||||
}
|
||||
}
|
||||
mVolumeController.SetMasterVolume(Ret);
|
||||
|
||||
}
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
|
||||
#include <QTimer>
|
||||
#include "AvReceiverData.h"
|
||||
#include "VolumeController.h"
|
||||
|
||||
class CAvReceiverNetworkCtrlInterface;
|
||||
|
||||
@ -23,18 +24,23 @@ public:
|
||||
int SelectScenePressed(char Zone, char Scene);
|
||||
int MainZoneVolumeChanged(float Value);
|
||||
int Zone2VolumeChanged(float Value);
|
||||
int Zone2InputSrcChanged(QString InputSrc);
|
||||
|
||||
|
||||
|
||||
CAvReceiverNetworkCtrlInterface *mNetworkInterface;
|
||||
CAvReceiverGui *mReceiverGui;
|
||||
QTimer *mReceiverPollTimer;
|
||||
CVolumeController mVolumeController;
|
||||
|
||||
private:
|
||||
CAvReceiverMainStatus mReceiverStatus;
|
||||
CAvReceiverMainStatus mZone2Status;
|
||||
float mTempReceiverVolume;
|
||||
|
||||
public slots:
|
||||
void PollTimerExpired();
|
||||
|
||||
void ExternalVolumeChanged(float Value);
|
||||
};
|
||||
|
||||
#endif // AVRECEIVER_H
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
#include "AvReceiverGui.h"
|
||||
#include "ui_AvReceiverGui.h"
|
||||
#include "TrayVolumeCtrl.h"
|
||||
|
||||
#include "AvReceiver.h"
|
||||
|
||||
@ -11,8 +12,15 @@ CAvReceiverGui::CAvReceiverGui(QWidget *parent) :
|
||||
mVolumeBarMovementTimer = new QTimer();
|
||||
mVolumeBarMovementTimer->setInterval(500);
|
||||
mVolumeBarMovementTimer->setSingleShot(true);
|
||||
connect(mVolumeBarMovementTimer,SIGNAL(timeout()),this,SLOT(VolumeBarMovementTimerExpired()));
|
||||
mLockZone2VolumeWithZone1 = false;
|
||||
|
||||
mTrayVolumeCtrlGuiHandle = 0;
|
||||
|
||||
|
||||
ui->mZone2InputComboBx->addItems(QStringList() << "AUDIO1" << "AUDIO2" << "AUDIO3" << "AUDIO4" << "AUDIO5" << "PHONO" << "TUNER" << "SERVER" << "Main Zone Sync");
|
||||
ui->mZone2InputComboBx->setEditable(false);
|
||||
|
||||
connect(mVolumeBarMovementTimer,SIGNAL(timeout()),this,SLOT(VolumeBarMovementTimerExpired()));
|
||||
connect(ui->mSpkBCheckBox,SIGNAL(clicked(bool)),this,SLOT(SpeakerBRadioClicked(bool)));
|
||||
connect(ui->mSpkACheckBox,SIGNAL(clicked(bool)),this,SLOT(SpeakerARadioClicked(bool)));
|
||||
connect(ui->MainZoneScene1Btn,SIGNAL(clicked(bool)),this,SLOT(MainZoneScene1BtnClicked(bool)));
|
||||
@ -21,6 +29,8 @@ CAvReceiverGui::CAvReceiverGui(QWidget *parent) :
|
||||
connect(ui->MainZoneScene4Btn,SIGNAL(clicked(bool)),this,SLOT(MainZoneScene4BtnClicked(bool)));
|
||||
connect(ui->mMainZoneVolumeSldBar,SIGNAL(valueChanged(int)),this,SLOT(MainZoneVolumeSetChanged(int)));
|
||||
connect(ui->mZone2VolumeSldBar,SIGNAL(valueChanged(int)),this,SLOT(Zone2VolumeSetChanged(int)));
|
||||
connect(ui->mZone2InputComboBx,&QComboBox::currentTextChanged,this,&CAvReceiverGui::Zone2InputSelectionChanged);
|
||||
connect(ui->mZone2SyncVolumeChkBx,&QCheckBox::clicked,this,&CAvReceiverGui::Zone2LockVolumeChanged);
|
||||
}
|
||||
|
||||
CAvReceiverGui::~CAvReceiverGui()
|
||||
@ -92,8 +102,12 @@ int CAvReceiverGui::UpdateReceiverStatus(CAvReceiverMainStatus Status, CAvReceiv
|
||||
|
||||
if(/*ui->mMainZoneVolumeSldBar->isSliderDown() == false && */mVolumeBarMovementTimer->isActive() == false)
|
||||
{
|
||||
ui->mMainZoneVolumeSldBar->setValue(ConvertVolumeToBarPosition(Status.mMainVolume));
|
||||
int SliderValue = ConvertVolumeToBarPosition(Status.mMainVolume);
|
||||
disconnect(ui->mMainZoneVolumeSldBar,SIGNAL(valueChanged(int)),this,SLOT(MainZoneVolumeSetChanged(int)));
|
||||
ui->mMainZoneVolumeSldBar->setValue(SliderValue);
|
||||
connect(ui->mMainZoneVolumeSldBar,SIGNAL(valueChanged(int)),this,SLOT(MainZoneVolumeSetChanged(int)));
|
||||
ui->mMainZoneSliderValueLbl->setText("");
|
||||
mTrayVolumeCtrlGuiHandle->SetMainZoneVolume(SliderValue,Status.mMainVolume);
|
||||
}
|
||||
|
||||
|
||||
@ -146,11 +160,16 @@ int CAvReceiverGui::UpdateReceiverStatus(CAvReceiverMainStatus Status, CAvReceiv
|
||||
StatusText += "\n";
|
||||
|
||||
ui->mZone2StatusLabel->setText(StatusText);
|
||||
ui->mZone2InputComboBx->setCurrentText(Zone2Status.mInput);
|
||||
|
||||
if(/*ui->mZone2VolumeSldBar->isSliderDown() == false && */mVolumeBarMovementTimer->isActive() == false)
|
||||
{
|
||||
ui->mZone2VolumeSldBar->setValue(ConvertVolumeToBarPosition(Zone2Status.mMainVolume));
|
||||
int SliderValue = ConvertVolumeToBarPosition(Zone2Status.mMainVolume);
|
||||
disconnect(ui->mZone2VolumeSldBar,SIGNAL(valueChanged(int)),this,SLOT(Zone2VolumeSetChanged(int)));
|
||||
ui->mZone2VolumeSldBar->setValue(SliderValue);
|
||||
connect(ui->mZone2VolumeSldBar,SIGNAL(valueChanged(int)),this,SLOT(Zone2VolumeSetChanged(int)));
|
||||
ui->mZone2SliderValueLbl->setText("");
|
||||
mTrayVolumeCtrlGuiHandle->SetZone2Volume(SliderValue,Zone2Status.mMainVolume);
|
||||
}
|
||||
|
||||
return RET_OK;
|
||||
@ -192,26 +211,63 @@ float CAvReceiverGui::ConvertBarPositionToVolume(int position)
|
||||
|
||||
void CAvReceiverGui::MainZoneVolumeSetChanged(int value)
|
||||
{
|
||||
int BarPosition = ui->mMainZoneVolumeSldBar->value();
|
||||
// int BarPosition = ui->mMainZoneVolumeSldBar->value();
|
||||
int BarPosition = value;
|
||||
float Volume = ConvertBarPositionToVolume(BarPosition);
|
||||
|
||||
ui->mMainZoneSliderValueLbl->setText(QString("%1").arg(Volume));
|
||||
mProgramHandle->MainZoneVolumeChanged(Volume);
|
||||
mVolumeBarMovementTimer->start();
|
||||
|
||||
|
||||
if(mLockZone2VolumeWithZone1 == true)
|
||||
{
|
||||
ui->mZone2VolumeSldBar->setValue(BarPosition);
|
||||
mVolumeBarMovementTimer->start();
|
||||
//mProgramHandle->Zone2VolumeChanged(Volume);
|
||||
}
|
||||
}
|
||||
|
||||
void CAvReceiverGui::Zone2VolumeSetChanged(int value)
|
||||
{
|
||||
int BarPosition = ui->mZone2VolumeSldBar->value();
|
||||
// int BarPosition = ui->mZone2VolumeSldBar->value();
|
||||
int BarPosition = value;
|
||||
float Volume = ConvertBarPositionToVolume(BarPosition);
|
||||
|
||||
ui->mZone2SliderValueLbl->setText(QString("%1").arg(Volume));
|
||||
mProgramHandle->Zone2VolumeChanged(Volume);
|
||||
mVolumeBarMovementTimer->start();
|
||||
// mVolumeBarMovementTimer->start();
|
||||
|
||||
}
|
||||
|
||||
void CAvReceiverGui::VolumeBarMovementTimerExpired()
|
||||
{
|
||||
int BarPosition = ui->mMainZoneVolumeSldBar->value();
|
||||
float Volume = ConvertBarPositionToVolume(BarPosition);
|
||||
mProgramHandle->Zone2VolumeChanged(Volume);
|
||||
}
|
||||
|
||||
void CAvReceiverGui::Zone2LockVolumeChanged(bool checked)
|
||||
{
|
||||
mLockZone2VolumeWithZone1 = checked;
|
||||
if(checked)
|
||||
{
|
||||
//Set Zone 2 volume to main zone value
|
||||
int BarPosition = ui->mMainZoneVolumeSldBar->value();
|
||||
float Volume = ConvertBarPositionToVolume(BarPosition);
|
||||
|
||||
mProgramHandle->Zone2VolumeChanged(Volume);
|
||||
|
||||
ui->mZone2VolumeSldBar->setEnabled(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->mZone2VolumeSldBar->setEnabled(true);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void CAvReceiverGui::Zone2InputSelectionChanged()
|
||||
{
|
||||
QString Src = ui->mZone2InputComboBx->currentText();
|
||||
mProgramHandle->Zone2InputSrcChanged(Src);
|
||||
}
|
||||
|
||||
@ -6,6 +6,8 @@ class CAvReceiver;
|
||||
#include "AvReceiverData.h"
|
||||
#include <QTimer>
|
||||
|
||||
class CTrayVolumeCtrl;
|
||||
|
||||
namespace Ui {
|
||||
class CAvReceiverGui;
|
||||
}
|
||||
@ -24,6 +26,8 @@ public:
|
||||
int ConvertVolumeToBarPosition(float Volume);
|
||||
float ConvertBarPositionToVolume(int position);
|
||||
QTimer *mVolumeBarMovementTimer;
|
||||
bool mLockZone2VolumeWithZone1;
|
||||
CTrayVolumeCtrl *mTrayVolumeCtrlGuiHandle;
|
||||
|
||||
private:
|
||||
Ui::CAvReceiverGui *ui;
|
||||
@ -38,6 +42,8 @@ public slots:
|
||||
void MainZoneVolumeSetChanged(int);
|
||||
void Zone2VolumeSetChanged(int);
|
||||
void VolumeBarMovementTimerExpired();
|
||||
void Zone2InputSelectionChanged();
|
||||
void Zone2LockVolumeChanged(bool checked);
|
||||
};
|
||||
|
||||
#endif // AVRECEIVERGUI_H
|
||||
|
||||
@ -6,8 +6,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>796</width>
|
||||
<height>447</height>
|
||||
<width>883</width>
|
||||
<height>453</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@ -213,6 +213,29 @@
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QComboBox" name="mZone2InputComboBx">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>580</x>
|
||||
<y>180</y>
|
||||
<width>121</width>
|
||||
<height>21</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="mZone2SyncVolumeChkBx">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>590</x>
|
||||
<y>120</y>
|
||||
<width>171</width>
|
||||
<height>17</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Sync volume with Main zone</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
|
||||
138
Sources/AvReceiver/VolumeController.cpp
Normal file
138
Sources/AvReceiver/VolumeController.cpp
Normal file
@ -0,0 +1,138 @@
|
||||
#include "VolumeController.h"
|
||||
#include <windows.h>
|
||||
#include <combaseapi.h>
|
||||
#include <AvReceiver.h>
|
||||
#include <initguid.h>
|
||||
#include <Functiondiscoverykeys_devpkey.h>
|
||||
|
||||
CVolumeController::CVolumeController(QObject *parent) : QObject(parent)
|
||||
{
|
||||
mDeviceEnumerator = NULL;
|
||||
mAudioDevice = NULL;
|
||||
mEndpointVolume = 0;
|
||||
mProgramPtr = 0;
|
||||
mVolumeControllerActive = false;
|
||||
}
|
||||
|
||||
CVolumeController::~CVolumeController()
|
||||
{
|
||||
if(mVolumeControllerActive == true)
|
||||
{
|
||||
if(mEndpointVolume != NULL)
|
||||
{
|
||||
mEndpointVolume->UnregisterControlChangeNotify(this);
|
||||
mEndpointVolume->Release();
|
||||
}
|
||||
if(mAudioDevice != NULL)
|
||||
mAudioDevice->Release();
|
||||
if(mDeviceEnumerator != NULL)
|
||||
mDeviceEnumerator->Release();
|
||||
|
||||
CoUninitialize();
|
||||
}
|
||||
}
|
||||
|
||||
int CVolumeController::Init(CAvReceiver *ProgramPtr)
|
||||
{
|
||||
mProgramPtr = ProgramPtr;
|
||||
IPropertyStore *pProps = NULL;
|
||||
IMMDeviceCollection *pCollection = NULL;
|
||||
|
||||
CoInitialize(NULL);
|
||||
CoCreateGuid(&mMyGUID);
|
||||
|
||||
const CLSID CLSID_MMDeviceEnumerator = __uuidof(MMDeviceEnumerator);
|
||||
const IID IID_IMMDeviceEnumerator = __uuidof(IMMDeviceEnumerator);
|
||||
HRESULT hr = CoCreateInstance(CLSID_MMDeviceEnumerator, NULL,CLSCTX_ALL, IID_IMMDeviceEnumerator,(void**)&mDeviceEnumerator);
|
||||
|
||||
hr = mDeviceEnumerator->EnumAudioEndpoints(eRender,DEVICE_STATE_ACTIVE,&pCollection);
|
||||
unsigned int count;
|
||||
hr = pCollection->GetCount(&count);
|
||||
|
||||
|
||||
// mDeviceEnumerator->GetDefaultAudioEndpoint(eRender, eConsole, &mAudioDevice); // Get the default audio output device
|
||||
|
||||
bool InterfaceFound = false;
|
||||
for(unsigned int i = 0; i < count; i++)
|
||||
{
|
||||
hr = pCollection->Item(i,&mAudioDevice);
|
||||
mAudioDevice->OpenPropertyStore(STGM_READ,&pProps);
|
||||
PROPVARIANT DevName;
|
||||
// Initialize container for property value.
|
||||
PropVariantInit(&DevName);
|
||||
hr = pProps->GetValue(PKEY_Device_FriendlyName, &DevName); //Get the friendly name
|
||||
QString FriendlyName = QString("%1").arg(DevName.pwszVal);
|
||||
PropVariantClear(&DevName);
|
||||
qDebug("%s",qPrintable(FriendlyName));
|
||||
if(FriendlyName.contains("SPDIF"))
|
||||
{
|
||||
//We found our interface.
|
||||
InterfaceFound = true;
|
||||
qDebug("Audio interface found... binding callback.");
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(pProps != NULL)
|
||||
pProps->Release();
|
||||
|
||||
if(InterfaceFound == false)
|
||||
{
|
||||
qDebug("Audio interface not found");
|
||||
if(mAudioDevice != NULL)
|
||||
mAudioDevice->Release();
|
||||
if(mDeviceEnumerator != NULL)
|
||||
mDeviceEnumerator->Release();
|
||||
CoUninitialize();
|
||||
return RET_ERROR;
|
||||
}
|
||||
|
||||
mAudioDevice->Activate(__uuidof(IAudioEndpointVolume), CLSCTX_INPROC_SERVER, NULL, (void**)&mEndpointVolume); // Activate the endpoint volume interface
|
||||
|
||||
mEndpointVolume->RegisterControlChangeNotify(this);// Set up the volume change callback
|
||||
|
||||
|
||||
mEndpointVolume->SetMasterVolumeLevelScalar(0.02,&mMyGUID);
|
||||
mEndpointVolume->GetMasterVolumeLevelScalar(&mMasterVolume);
|
||||
|
||||
return RET_OK;
|
||||
|
||||
}
|
||||
|
||||
int CVolumeController::SetMasterVolume(float Volume)
|
||||
{
|
||||
mEndpointVolume->SetMasterVolumeLevelScalar(Volume,&mMyGUID);
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
STDMETHODIMP CVolumeController:: OnNotify(PAUDIO_VOLUME_NOTIFICATION_DATA pNotify)
|
||||
{
|
||||
if (pNotify)
|
||||
{
|
||||
if(pNotify->guidEventContext != mMyGUID)
|
||||
{
|
||||
// qDebug("Volume changed. Current %f, Requested: %f",mMasterVolume,pNotify->fMasterVolume);
|
||||
// float NewVolume;
|
||||
if(mMasterVolume > pNotify->fMasterVolume) //Volume decrease
|
||||
{
|
||||
// qDebug("Volume Decrease");
|
||||
emit ExternalVolumeChanged(-EXTERNAL_VOLUME_INCREMENT);
|
||||
}
|
||||
else if(mMasterVolume < pNotify->fMasterVolume) //Volume increase
|
||||
{
|
||||
// qDebug("Volume increase");
|
||||
emit ExternalVolumeChanged(EXTERNAL_VOLUME_INCREMENT);
|
||||
|
||||
}
|
||||
// qDebug("Setting interface volume to %f",NewVolume);
|
||||
// mEndpointVolume->SetMasterVolumeLevelScalar(NewVolume,&mMyGUID);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
mEndpointVolume->GetMasterVolumeLevelScalar(&mMasterVolume);
|
||||
// qDebug("Setting internal master volume: %f",mMasterVolume);
|
||||
}
|
||||
}
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
57
Sources/AvReceiver/VolumeController.h
Normal file
57
Sources/AvReceiver/VolumeController.h
Normal file
@ -0,0 +1,57 @@
|
||||
#ifndef VOLUMECONTROLLER_H
|
||||
#define VOLUMECONTROLLER_H
|
||||
|
||||
#include "GlobalDefine.h"
|
||||
#include <QObject>
|
||||
#include <endpointvolume.h>
|
||||
#include <Mmdeviceapi.h>
|
||||
|
||||
#define EXTERNAL_VOLUME_INCREMENT 1
|
||||
|
||||
class CAvReceiver;
|
||||
|
||||
|
||||
class CVolumeController : public QObject, public IAudioEndpointVolumeCallback
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit CVolumeController(QObject *parent = 0);
|
||||
~CVolumeController();
|
||||
int Init(CAvReceiver *ProgramPtr);
|
||||
bool mVolumeControllerActive;
|
||||
int SetMasterVolume(float Volume);
|
||||
|
||||
CAvReceiver *mProgramPtr;
|
||||
|
||||
private:
|
||||
IMMDeviceEnumerator *mDeviceEnumerator ;
|
||||
IMMDevice *mAudioDevice ;
|
||||
IAudioEndpointVolume *mEndpointVolume;
|
||||
GUID mMyGUID;
|
||||
float mMasterVolume;
|
||||
// CAudioNotificationCallback *mAudioNotificationObject;
|
||||
|
||||
|
||||
public:
|
||||
STDMETHODIMP QueryInterface(REFIID riid, void **ppv) {
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
STDMETHODIMP_(ULONG) AddRef() {return 2;}
|
||||
STDMETHODIMP_(ULONG) Release() {return 1;}
|
||||
STDMETHODIMP OnNotify(PAUDIO_VOLUME_NOTIFICATION_DATA pNotify);
|
||||
|
||||
public:
|
||||
|
||||
|
||||
signals:
|
||||
void ExternalVolumeChanged(float);
|
||||
|
||||
|
||||
public slots:
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // VOLUMECONTROLLER_H
|
||||
53
Sources/AvReceiver/VolumeController.h.T22060
Normal file
53
Sources/AvReceiver/VolumeController.h.T22060
Normal file
@ -0,0 +1,53 @@
|
||||
#ifndef VOLUMECONTROLLER_H
|
||||
#define VOLUMECONTROLLER_H
|
||||
|
||||
#include "GlobalDefine.h"
|
||||
#include <QObject>
|
||||
#include <endpointvolume.h>
|
||||
#include <Mmdeviceapi.h>
|
||||
|
||||
class CAvReceiver;
|
||||
|
||||
|
||||
class CVolumeController : public QObject, public IAudioEndpointVolumeCallback
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit CVolumeController(QObject *parent = 0);
|
||||
~CVolumeController();
|
||||
int Init();
|
||||
|
||||
CAvReceiver *mProgramPtr;
|
||||
|
||||
private:
|
||||
IMMDeviceEnumerator *mDeviceEnumerator ;
|
||||
IMMDevice *mAudioDevice ;
|
||||
IAudioEndpointVolume *mEndpointVolume;
|
||||
// CAudioNotificationCallback *mAudioNotificationObject;
|
||||
|
||||
|
||||
public:
|
||||
STDMETHODIMP QueryInterface(REFIID riid, void **ppv) {
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
STDMETHODIMP_(ULONG) AddRef() {return 2;}
|
||||
|
||||
STDMETHODIMP_(ULONG) Release() {return 1;}
|
||||
|
||||
STDMETHODIMP OnNotify(PAUDIO_VOLUME_NOTIFICATION_DATA pNotify);
|
||||
|
||||
public:
|
||||
|
||||
|
||||
signals:
|
||||
|
||||
|
||||
|
||||
public slots:
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // VOLUMECONTROLLER_H
|
||||
@ -49,11 +49,14 @@ CChaletGui::CChaletGui(QWidget *parent) :
|
||||
|
||||
// create graph and assign data to it:
|
||||
mBatteryPlotWidget->addGraph();
|
||||
mBatteryPlotWidget->addGraph(mBatteryPlotWidget->xAxis,mBatteryPlotWidget->yAxis2);
|
||||
|
||||
|
||||
// give the axes some labels:
|
||||
mBatteryPlotWidget->xAxis->setLabel("time");
|
||||
mBatteryPlotWidget->yAxis->setLabel("Volts");
|
||||
mBatteryPlotWidget->yAxis2->setLabel("RSSI (dBm)");
|
||||
mBatteryPlotWidget->yAxis2->setVisible(true);
|
||||
|
||||
double now = QDateTime::currentDateTime().toSecsSinceEpoch();
|
||||
QSharedPointer<QCPAxisTickerDateTime> dateTicker(new QCPAxisTickerDateTime);
|
||||
@ -73,6 +76,14 @@ CChaletGui::CChaletGui(QWidget *parent) :
|
||||
mBatteryPlotWidget->xAxis->setRange(midnight.toSecsSinceEpoch(), eod.toSecsSinceEpoch());
|
||||
|
||||
mBatteryPlotWidget->yAxis->setRange(12,15);
|
||||
mBatteryPlotWidget->yAxis2->setRange(-255,0.0);
|
||||
QList<QCPAxis*> xAxis, yAxis;
|
||||
xAxis.append(mBatteryPlotWidget->xAxis);
|
||||
yAxis.append(mBatteryPlotWidget->yAxis);
|
||||
yAxis.append(mBatteryPlotWidget->yAxis2);
|
||||
mBatteryPlotWidget->axisRect()->setRangeDragAxes(xAxis,yAxis);
|
||||
mBatteryPlotWidget->axisRect()->setRangeZoomAxes(xAxis,yAxis);
|
||||
mBatteryPlotWidget->setInteractions(QCP::iRangeDrag | QCP::iRangeZoom | QCP::iSelectPlottables);
|
||||
|
||||
mBatteryPlotWidget->graph(0)->addData(now,13.5);
|
||||
|
||||
@ -96,6 +107,8 @@ CChaletGui::CChaletGui(QWidget *parent) :
|
||||
ui->mTotalRxTxRequestsLbl->setText("Chalet Rx req: ??");
|
||||
ui->mChaletTemperatureLbl->setText("Temperature: -100)");
|
||||
|
||||
ui->mChaletWifiSelectionRadioBtn->setChecked(true);
|
||||
|
||||
}
|
||||
|
||||
CChaletGui::~CChaletGui()
|
||||
@ -293,6 +306,28 @@ int CChaletGui::UpdateLoraModuleStatus(CLoraModuleInterfaceStatus Status)
|
||||
QString ModuleStatusTxt = QString("Ambient RSSI: %1 [%3dBm]\nLast Rx RSSI: %2 [%4dBm]").arg(Status.mModuleAmbientRSSI).arg(Status.mModuleLastRxRSSI).arg(-1*(255-Status.mModuleAmbientRSSI)).arg(-1*(255-Status.mModuleLastRxRSSI));
|
||||
ui->mLoraIFModuleStatus->setText(ModuleStatusTxt);
|
||||
|
||||
quint32 Add = 0;
|
||||
|
||||
Add += (quint32)(Status.mIPAddress1 & 0x000000FF);
|
||||
Add <<= 8;
|
||||
Add += (quint32)(Status.mIPAddress2 & 0x000000FF);
|
||||
Add <<= 8;
|
||||
Add += (quint32)(Status.mIPAddress3 & 0x000000FF);
|
||||
Add <<= 8;
|
||||
Add += (quint32)(Status.mIPAddress4 & 0x000000FF);
|
||||
QHostAddress IP = QHostAddress(Add);
|
||||
|
||||
QString IPString = QString("Lora Module IP Address:").append(IP.toString());
|
||||
ui->mLoraModuleIPAddressLbl->setText(IPString);
|
||||
|
||||
if(Status.mModuleLastRxRSSI > 10) //filter glitches
|
||||
{
|
||||
double CurTime = QDateTime::currentDateTime().toSecsSinceEpoch();
|
||||
mBatteryPlotWidget->graph(1)->addData(CurTime,-1*(255-Status.mModuleLastRxRSSI));
|
||||
|
||||
mBatteryPlotWidget->replot();
|
||||
}
|
||||
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
@ -507,3 +542,8 @@ void CChaletGui::RebootCPUButtonClicked()
|
||||
ui->mModuleIPAddressLbl->setText("Module IP Address: ");
|
||||
mProgramHandle->RequestWifiStatus();
|
||||
}
|
||||
|
||||
void CChaletGui::WiFiSettingsSelectionChanged()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@ -60,6 +60,7 @@ public slots:
|
||||
void ResetCommStatsBtnClicked();
|
||||
void UpdateDeviceWifiStatus(char WifiState, QHostAddress IP);
|
||||
void GetModuleWifiStatusBtnClicked();
|
||||
void WiFiSettingsSelectionChanged();
|
||||
|
||||
|
||||
};
|
||||
|
||||
@ -282,7 +282,7 @@
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>420</x>
|
||||
<y>240</y>
|
||||
<y>260</y>
|
||||
<width>1021</width>
|
||||
<height>321</height>
|
||||
</rect>
|
||||
@ -350,23 +350,23 @@
|
||||
<string>Temperature:</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QGroupBox" name="groupBox_2">
|
||||
<widget class="QGroupBox" name="WifiSettingGroupBox">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>70</x>
|
||||
<x>60</x>
|
||||
<y>380</y>
|
||||
<width>321</width>
|
||||
<height>231</height>
|
||||
<height>251</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>WiFi parameters (stored in flash)</string>
|
||||
<string>Wifi parameters stored in flash</string>
|
||||
</property>
|
||||
<widget class="QLineEdit" name="mWifiAccessPtNameEditBx">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>80</x>
|
||||
<y>110</y>
|
||||
<y>150</y>
|
||||
<width>221</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
@ -382,7 +382,7 @@
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>110</y>
|
||||
<y>150</y>
|
||||
<width>71</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
@ -400,7 +400,7 @@
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>140</y>
|
||||
<y>180</y>
|
||||
<width>71</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
@ -418,7 +418,7 @@
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>80</x>
|
||||
<y>140</y>
|
||||
<y>180</y>
|
||||
<width>221</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
@ -434,7 +434,7 @@
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>50</y>
|
||||
<y>90</y>
|
||||
<width>71</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
@ -452,7 +452,7 @@
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>80</x>
|
||||
<y>50</y>
|
||||
<y>90</y>
|
||||
<width>221</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
@ -468,7 +468,7 @@
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>80</y>
|
||||
<y>120</y>
|
||||
<width>71</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
@ -486,7 +486,7 @@
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>80</x>
|
||||
<y>80</y>
|
||||
<y>120</y>
|
||||
<width>221</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
@ -502,7 +502,7 @@
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>20</y>
|
||||
<y>60</y>
|
||||
<width>70</width>
|
||||
<height>17</height>
|
||||
</rect>
|
||||
@ -515,7 +515,7 @@
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>70</x>
|
||||
<y>180</y>
|
||||
<y>220</y>
|
||||
<width>75</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
@ -528,7 +528,7 @@
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>170</x>
|
||||
<y>180</y>
|
||||
<y>220</y>
|
||||
<width>75</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
@ -537,6 +537,38 @@
|
||||
<string>SET</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QRadioButton" name="mChaletWifiSelectionRadioBtn">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>40</x>
|
||||
<y>20</y>
|
||||
<width>85</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Chalet</string>
|
||||
</property>
|
||||
<attribute name="buttonGroup">
|
||||
<string notr="true">buttonGroup</string>
|
||||
</attribute>
|
||||
</widget>
|
||||
<widget class="QRadioButton" name="mLoraIFWifiSelectionRadioBtn">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>140</x>
|
||||
<y>20</y>
|
||||
<width>101</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Lora Module IF</string>
|
||||
</property>
|
||||
<attribute name="buttonGroup">
|
||||
<string notr="true">buttonGroup</string>
|
||||
</attribute>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QLabel" name="mSolarPanelCurrentCnvLbl">
|
||||
<property name="geometry">
|
||||
@ -770,8 +802,39 @@ Module state: ??</string>
|
||||
<string>Activity!!!</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="mGetLoraWifiStatusBtn">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>170</x>
|
||||
<y>130</y>
|
||||
<width>61</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>GET</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="mLoraModuleIPAddressLbl">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>240</x>
|
||||
<y>130</y>
|
||||
<width>291</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>10</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Module IP Address:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<zorder>groupBox_2</zorder>
|
||||
<zorder>WifiSettingGroupBox</zorder>
|
||||
<zorder>groupBox</zorder>
|
||||
<zorder>MainPageLabel</zorder>
|
||||
<zorder>mInverterRlyStatusLabel</zorder>
|
||||
@ -810,4 +873,7 @@ Module state: ??</string>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
<buttongroups>
|
||||
<buttongroup name="buttonGroup"/>
|
||||
</buttongroups>
|
||||
</ui>
|
||||
|
||||
@ -26,6 +26,13 @@ CLoraModuleInterfaceStatus& CLoraModuleInterfaceStatus::operator = (const CLoraM
|
||||
mModuleAmbientRSSI = rhs.mModuleAmbientRSSI;
|
||||
mModuleLastRxRSSI = rhs.mModuleLastRxRSSI;
|
||||
|
||||
mIPAddress1 = rhs.mIPAddress1;
|
||||
mIPAddress2 = rhs.mIPAddress2;
|
||||
mIPAddress3 = rhs.mIPAddress3;
|
||||
mIPAddress4 = rhs.mIPAddress4;
|
||||
|
||||
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
@ -45,7 +52,13 @@ QDataStream &operator<<(QDataStream &out, const CLoraModuleInterfaceStatus &sour
|
||||
<< source.mModuleLBTEnabled
|
||||
<< source.mModuleWORCycle
|
||||
<< source.mModuleAmbientRSSI
|
||||
<< source.mModuleLastRxRSSI;
|
||||
<< source.mModuleLastRxRSSI
|
||||
<< source.mIPAddress1
|
||||
<< source.mIPAddress2
|
||||
<< source.mIPAddress3
|
||||
<< source.mIPAddress4;
|
||||
|
||||
|
||||
|
||||
return out;
|
||||
}
|
||||
@ -66,7 +79,11 @@ QDataStream &operator>>(QDataStream &in, CLoraModuleInterfaceStatus &dest)
|
||||
>> dest.mModuleLBTEnabled
|
||||
>> dest.mModuleWORCycle
|
||||
>> dest.mModuleAmbientRSSI
|
||||
>> dest.mModuleLastRxRSSI;
|
||||
>> dest.mModuleLastRxRSSI
|
||||
>> dest.mIPAddress1
|
||||
>> dest.mIPAddress2
|
||||
>> dest.mIPAddress3
|
||||
>> dest.mIPAddress4;
|
||||
|
||||
|
||||
return in;
|
||||
|
||||
@ -95,6 +95,11 @@ public:
|
||||
quint8 mModuleAmbientRSSI;
|
||||
quint8 mModuleLastRxRSSI;
|
||||
|
||||
quint8 mIPAddress1;
|
||||
quint8 mIPAddress2;
|
||||
quint8 mIPAddress3;
|
||||
quint8 mIPAddress4;
|
||||
|
||||
CLoraModuleInterfaceStatus& operator=(const CLoraModuleInterfaceStatus &rhs);
|
||||
|
||||
};
|
||||
|
||||
@ -252,6 +252,8 @@ enum AV_RECEIVER_INTERFACE_CMDS
|
||||
AV_RECEIVER_INTERFACE_SET_MAIN_VOLUME_RESPONSE,
|
||||
AV_RECEIVER_INTERFACE_SET_ZONE2_VOLUME_REQUEST,
|
||||
AV_RECEIVER_INTERFACE_SET_ZONE2_VOLUME_RESPONSE,
|
||||
AV_RECEIVER_INTERFACE_SET_ZONE2_INPUT_REQUEST,
|
||||
AV_RECEIVER_INTERFACE_SET_ZONE2_INPUT_RESPONSE,
|
||||
|
||||
|
||||
MAX_AV_RECEIVER_INTERFACE_CMD
|
||||
|
||||
@ -12,8 +12,10 @@ CSystemGui::CSystemGui(QObject *parent) : QObject(parent)
|
||||
mPICUploader = new CPICUploader(mGui->mPICUploaderGui);
|
||||
mIspindel = new CIspindel(mGui->mIspindelGui);
|
||||
mLoraModuleIF = new CLoraModuleInterface(mGui->mChaletGui);
|
||||
mTrayVolumeCtrl = new CTrayVolumeCtrl(mGui->mAvReceiverGui);
|
||||
mGui->mAvReceiverGui->mTrayVolumeCtrlGuiHandle = mTrayVolumeCtrl;
|
||||
|
||||
mSysTrayMgr = new CSystemTrayManager();
|
||||
mSysTrayMgr = new CSystemTrayManager(mTrayVolumeCtrl);
|
||||
mSysTrayMgr->mProgramHandle=this;
|
||||
mSMSClient->mTrayIconMgr = mSysTrayMgr;
|
||||
|
||||
@ -32,6 +34,7 @@ CSystemGui::~CSystemGui()
|
||||
delete mPICUploader;
|
||||
delete mIspindel;
|
||||
delete mLoraModuleIF;
|
||||
delete mTrayVolumeCtrl;
|
||||
|
||||
}
|
||||
|
||||
@ -44,7 +47,7 @@ void CSystemGui::Start()
|
||||
mChalet->Start();
|
||||
mPICUploader->Start();
|
||||
mIspindel->Start();
|
||||
mLoraModuleIF->Start();
|
||||
// mLoraModuleIF->Start();
|
||||
|
||||
}
|
||||
|
||||
@ -70,6 +73,8 @@ int CSystemGui::TrayIconLeftClick()
|
||||
if(mGui->isVisible())
|
||||
{
|
||||
mGui->hide();
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -13,6 +13,7 @@
|
||||
#include "PICUploader.h"
|
||||
#include "Ispindel.h"
|
||||
#include "LoraModuleInterface.h"
|
||||
#include "TrayVolumeCtrl.h"
|
||||
|
||||
|
||||
class CSystemGui : public QObject
|
||||
@ -41,6 +42,7 @@ private:
|
||||
CPICUploader *mPICUploader;
|
||||
CIspindel *mIspindel;
|
||||
CLoraModuleInterface *mLoraModuleIF;
|
||||
CTrayVolumeCtrl *mTrayVolumeCtrl;
|
||||
|
||||
|
||||
signals:
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
#include "SystemGui.h"
|
||||
#include <QCursor>
|
||||
|
||||
CSystemTrayManager::CSystemTrayManager()
|
||||
CSystemTrayManager::CSystemTrayManager(CTrayVolumeCtrl *VolumeCtrlWidget)
|
||||
{
|
||||
|
||||
mProgramHandle = 0;
|
||||
@ -13,8 +13,20 @@ CSystemTrayManager::CSystemTrayManager()
|
||||
connect(&mSystemTrayIcon,SIGNAL(messageClicked()),this,SLOT(TrayBaloonMessageClicked()));
|
||||
connect(mTrayMenu,SIGNAL(triggered(QAction*)),this,SLOT(TrayMenuClicked(QAction*)));
|
||||
|
||||
mShowSettingsGUIAction = mTrayMenu->addAction("Settings");
|
||||
|
||||
QWidgetAction *test = new QWidgetAction(0);
|
||||
test->setDefaultWidget(VolumeCtrlWidget);
|
||||
// mTrayVolumeAction = new CTrayVolumeMenuAction("Volume");
|
||||
// mShowSettingsGUIAction = mTrayMenu->addAction("Settings");
|
||||
mQuitAction = mTrayMenu->addAction("Quit SMS Client");
|
||||
mTrayMenu->addSection("Display");
|
||||
mCloneDisplaysAction = mTrayMenu->addAction("Clone");
|
||||
mExtendDisplaysAction = mTrayMenu->addAction("Extend");
|
||||
mTrayMenu->addSeparator();
|
||||
mTrayMenu->addAction(test);
|
||||
//mTrayMenu->setMinimumWidth(300);
|
||||
|
||||
|
||||
mSystemTrayIcon.setIcon(QIcon("./Ico/sms.png"));
|
||||
mSystemTrayIcon.setToolTip("SMS Client :)");
|
||||
mSystemTrayIcon.show();
|
||||
@ -44,7 +56,8 @@ void CSystemTrayManager::TrayIconActivated(QSystemTrayIcon::ActivationReason Rea
|
||||
}
|
||||
case QSystemTrayIcon::Context:
|
||||
{
|
||||
//qDebug("Context");
|
||||
// mTrayVolumeCtrl->show();
|
||||
qDebug("Context");
|
||||
break;
|
||||
}
|
||||
case QSystemTrayIcon::DoubleClick:
|
||||
@ -56,6 +69,7 @@ void CSystemTrayManager::TrayIconActivated(QSystemTrayIcon::ActivationReason Rea
|
||||
//qDebug("Trigger");
|
||||
//mTrayMenu->popup(QCursor::pos());
|
||||
//mProgramHandle->RespawnMainWindowRequest();
|
||||
// mTrayVolumeCtrl->show();
|
||||
mProgramHandle->TrayIconLeftClick();
|
||||
break;
|
||||
}
|
||||
@ -78,6 +92,14 @@ void CSystemTrayManager::TrayMenuClicked(QAction *Menu)
|
||||
qDebug("Settings");
|
||||
mProgramHandle->ShowSettingsWindowRequest();
|
||||
}
|
||||
else if(Menu == mCloneDisplaysAction)
|
||||
{
|
||||
system("C:\\Windows\\System32\\DisplaySwitch.exe /clone");
|
||||
}
|
||||
else if(Menu == mExtendDisplaysAction)
|
||||
{
|
||||
system("C:\\Windows\\System32\\DisplaySwitch.exe /extend");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -5,6 +5,8 @@
|
||||
#include <QSystemTrayIcon>
|
||||
#include <QMenu>
|
||||
#include <QAction>
|
||||
#include "TrayVolumeCtrl.h"
|
||||
|
||||
|
||||
class CSystemGui;
|
||||
|
||||
@ -12,7 +14,7 @@ class CSystemTrayManager: public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
CSystemTrayManager();
|
||||
CSystemTrayManager(CTrayVolumeCtrl *VolumeCtrlWidget);
|
||||
virtual ~CSystemTrayManager();
|
||||
CSystemGui *mProgramHandle;
|
||||
int NewSMSMessagesPendingCount(int count);
|
||||
@ -21,7 +23,8 @@ public:
|
||||
private:
|
||||
QSystemTrayIcon mSystemTrayIcon;
|
||||
QMenu *mTrayMenu;
|
||||
QAction *mQuitAction, *mShowSettingsGUIAction;
|
||||
// CTrayVolumeMenuAction *mTrayVolumeAction;
|
||||
QAction *mQuitAction, *mShowSettingsGUIAction, *mTrayVolumeMenuAction, *mCloneDisplaysAction, *mExtendDisplaysAction;
|
||||
|
||||
public slots:
|
||||
void TrayIconActivated(QSystemTrayIcon::ActivationReason);
|
||||
|
||||
89
Sources/TrayVolumeCtrl.cpp
Normal file
89
Sources/TrayVolumeCtrl.cpp
Normal file
@ -0,0 +1,89 @@
|
||||
#include "TrayVolumeCtrl.h"
|
||||
#include "AvReceiverGui.h"
|
||||
|
||||
|
||||
CTrayVolumeCtrl::CTrayVolumeCtrl(CAvReceiverGui *AvReceiverGuiPtr, QWidget *parent) :
|
||||
QWidget(parent)
|
||||
{
|
||||
mAvReceiverGuiHandle = AvReceiverGuiPtr;
|
||||
|
||||
mMainZoneSlider = new QSlider();
|
||||
mZone2Slider = new QSlider();
|
||||
mMainZoneLabel = new QLabel("Main\n0");
|
||||
mMainZoneLabel->setAlignment(Qt::AlignCenter);
|
||||
mZone2Label = new QLabel("Zone 2\n0");
|
||||
mZone2Label->setAlignment(Qt::AlignCenter);
|
||||
mLayout = new QGridLayout(this);
|
||||
mButton1 = new QPushButton("1");
|
||||
mButton2 = new QPushButton("2");
|
||||
mButton3 = new QPushButton("3");
|
||||
mButton4 = new QPushButton("4");
|
||||
|
||||
|
||||
mLayout->addWidget(mMainZoneLabel,0,0);
|
||||
mLayout->addWidget(mZone2Label,0,1);
|
||||
mLayout->addWidget(mMainZoneSlider,1,0,4,1);
|
||||
mLayout->addWidget(mZone2Slider,1,1,4,1);
|
||||
mLayout->addWidget(mButton1,1,2);
|
||||
mLayout->addWidget(mButton2,2,2);
|
||||
mLayout->addWidget(mButton3,3,2);
|
||||
mLayout->addWidget(mButton4,4,2);
|
||||
mButton1->setMaximumWidth(25);
|
||||
mButton2->setMaximumWidth(25);
|
||||
mButton3->setMaximumWidth(25);
|
||||
mButton4->setMaximumWidth(25);
|
||||
|
||||
mMainZoneSlider->setMaximum(182);
|
||||
mZone2Slider->setMaximum(182);
|
||||
|
||||
|
||||
connect(mMainZoneSlider,&QSlider::valueChanged,this,&CTrayVolumeCtrl::MainZoneSliderValueChanged);
|
||||
connect(mZone2Slider,&QSlider::valueChanged,this,&CTrayVolumeCtrl::Zone2SliderValueChanged);
|
||||
connect(mButton1,&QPushButton::clicked,mAvReceiverGuiHandle,&CAvReceiverGui::MainZoneScene1BtnClicked);
|
||||
connect(mButton2,&QPushButton::clicked,mAvReceiverGuiHandle,&CAvReceiverGui::MainZoneScene2BtnClicked);
|
||||
connect(mButton3,&QPushButton::clicked,mAvReceiverGuiHandle,&CAvReceiverGui::MainZoneScene3BtnClicked);
|
||||
connect(mButton4,&QPushButton::clicked,mAvReceiverGuiHandle,&CAvReceiverGui::MainZoneScene4BtnClicked);
|
||||
|
||||
}
|
||||
|
||||
CTrayVolumeCtrl::~CTrayVolumeCtrl()
|
||||
{
|
||||
delete mLayout;
|
||||
delete mMainZoneSlider;
|
||||
delete mZone2Slider;
|
||||
delete mZone2Label;
|
||||
delete mMainZoneLabel;
|
||||
}
|
||||
|
||||
|
||||
void CTrayVolumeCtrl::MainZoneSliderValueChanged()
|
||||
{
|
||||
float SetVolume = mAvReceiverGuiHandle->ConvertBarPositionToVolume(mMainZoneSlider->value());
|
||||
mMainZoneLabel->setText(QString("Main\n%1").arg(SetVolume));
|
||||
mAvReceiverGuiHandle->MainZoneVolumeSetChanged(mMainZoneSlider->value());
|
||||
}
|
||||
|
||||
void CTrayVolumeCtrl::Zone2SliderValueChanged()
|
||||
{
|
||||
float SetVolume = mAvReceiverGuiHandle->ConvertBarPositionToVolume(mZone2Slider->value());
|
||||
mZone2Label->setText(QString("Main\n%1").arg(SetVolume));
|
||||
mAvReceiverGuiHandle->Zone2VolumeSetChanged(mZone2Slider->value());
|
||||
}
|
||||
|
||||
int CTrayVolumeCtrl::SetMainZoneVolume(int SliderValue, float Volume)
|
||||
{
|
||||
mMainZoneSlider->blockSignals(true);
|
||||
mMainZoneLabel->setText(QString("Main\n%1").arg(Volume));
|
||||
mMainZoneSlider->setValue(SliderValue);
|
||||
mMainZoneSlider->blockSignals(false);
|
||||
mMainZoneCurVolume = Volume;
|
||||
}
|
||||
|
||||
int CTrayVolumeCtrl::SetZone2Volume(int SliderValue, float Volume)
|
||||
{
|
||||
mZone2Slider->blockSignals(true);
|
||||
mZone2Label->setText(QString("Zone 2\n%1").arg(Volume));
|
||||
mZone2Slider->setValue(SliderValue);
|
||||
mZone2Slider->blockSignals(false);
|
||||
mZone2CurVolume = Volume;
|
||||
}
|
||||
42
Sources/TrayVolumeCtrl.h
Normal file
42
Sources/TrayVolumeCtrl.h
Normal file
@ -0,0 +1,42 @@
|
||||
#ifndef TRAYVOLUMECTRL_H
|
||||
#define TRAYVOLUMECTRL_H
|
||||
|
||||
#include <QWidget>
|
||||
#include <QHBoxLayout>
|
||||
#include <QGridLayout>
|
||||
#include <QSlider>
|
||||
#include <QLabel>
|
||||
#include <QPushButton>
|
||||
|
||||
class CAvReceiverGui;
|
||||
|
||||
class CTrayVolumeCtrl : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit CTrayVolumeCtrl(CAvReceiverGui *AvReceiverGuiPtr,QWidget *parent = 0);
|
||||
~CTrayVolumeCtrl();
|
||||
//QHBoxLayout *mLayout;
|
||||
QGridLayout *mLayout;
|
||||
QSlider *mMainZoneSlider, *mZone2Slider;
|
||||
QLabel *mMainZoneLabel, *mZone2Label;
|
||||
QPushButton *mButton1, *mButton2, *mButton3, *mButton4;
|
||||
CAvReceiverGui *mAvReceiverGuiHandle;
|
||||
|
||||
int SetMainZoneVolume(int SliderValue, float Volume);
|
||||
int SetZone2Volume(int SliderValue, float Volume);
|
||||
|
||||
float mMainZoneCurVolume, mZone2CurVolume;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
public slots:
|
||||
|
||||
void MainZoneSliderValueChanged();
|
||||
void Zone2SliderValueChanged();
|
||||
|
||||
};
|
||||
|
||||
#endif // TRAYVOLUMECTRL_H
|
||||
@ -80,7 +80,9 @@ SOURCES += \
|
||||
Sources/Ispindel/IspindelData.cpp \
|
||||
Sources/LoRaModuleInterface/LoraModuleInterface.cpp \
|
||||
Sources/LoRaModuleInterface/LoraModuleIFMasterCtrlInterface.cpp \
|
||||
Sources/LoRaModuleInterface/LoraModuleInterfaceData.cpp
|
||||
Sources/LoRaModuleInterface/LoraModuleInterfaceData.cpp \
|
||||
Sources/TrayVolumeCtrl.cpp \
|
||||
Sources/AvReceiver/VolumeController.cpp
|
||||
|
||||
HEADERS += Sources/AbstractNetworkInterface.h \
|
||||
Sources/Chalet/CChalet.h \
|
||||
@ -131,7 +133,9 @@ HEADERS += Sources/AbstractNetworkInterface.h \
|
||||
Sources/Ispindel/IspindelData.h \
|
||||
Sources/LoRaModuleInterface/LoraModuleInterface.h \
|
||||
Sources/LoRaModuleInterface/LoraModuleIFMasterCtrlInterface.h \
|
||||
Sources/LoRaModuleInterface/LoraModuleInterfaceData.h
|
||||
Sources/LoRaModuleInterface/LoraModuleInterfaceData.h \
|
||||
Sources/TrayVolumeCtrl.h \
|
||||
Sources/AvReceiver/VolumeController.h
|
||||
|
||||
FORMS += \
|
||||
SMSGui.ui \
|
||||
@ -142,3 +146,7 @@ FORMS += \
|
||||
Sources/AvReceiver/AvReceiverGui.ui \
|
||||
Sources/Tower/TowerLightShowGui.ui \
|
||||
Sources/Ispindel/IspindelGUI.ui
|
||||
|
||||
#win32: LIBS += -luuid
|
||||
|
||||
win32: LIBS += -lole32
|
||||
|
||||
@ -12,6 +12,7 @@
|
||||
#include <QtCore/QVariant>
|
||||
#include <QtWidgets/QApplication>
|
||||
#include <QtWidgets/QCheckBox>
|
||||
#include <QtWidgets/QComboBox>
|
||||
#include <QtWidgets/QGroupBox>
|
||||
#include <QtWidgets/QLabel>
|
||||
#include <QtWidgets/QPushButton>
|
||||
@ -37,12 +38,14 @@ public:
|
||||
QSlider *mZone2VolumeSldBar;
|
||||
QLabel *mMainZoneSliderValueLbl;
|
||||
QLabel *mZone2SliderValueLbl;
|
||||
QComboBox *mZone2InputComboBx;
|
||||
QCheckBox *mZone2SyncVolumeChkBx;
|
||||
|
||||
void setupUi(QWidget *CAvReceiverGui)
|
||||
{
|
||||
if (CAvReceiverGui->objectName().isEmpty())
|
||||
CAvReceiverGui->setObjectName(QString::fromUtf8("CAvReceiverGui"));
|
||||
CAvReceiverGui->resize(796, 447);
|
||||
CAvReceiverGui->resize(883, 453);
|
||||
label = new QLabel(CAvReceiverGui);
|
||||
label->setObjectName(QString::fromUtf8("label"));
|
||||
label->setGeometry(QRect(230, 30, 201, 16));
|
||||
@ -93,6 +96,12 @@ public:
|
||||
mZone2SliderValueLbl->setObjectName(QString::fromUtf8("mZone2SliderValueLbl"));
|
||||
mZone2SliderValueLbl->setGeometry(QRect(490, 100, 51, 16));
|
||||
mZone2SliderValueLbl->setAlignment(Qt::AlignCenter);
|
||||
mZone2InputComboBx = new QComboBox(CAvReceiverGui);
|
||||
mZone2InputComboBx->setObjectName(QString::fromUtf8("mZone2InputComboBx"));
|
||||
mZone2InputComboBx->setGeometry(QRect(580, 180, 121, 21));
|
||||
mZone2SyncVolumeChkBx = new QCheckBox(CAvReceiverGui);
|
||||
mZone2SyncVolumeChkBx->setObjectName(QString::fromUtf8("mZone2SyncVolumeChkBx"));
|
||||
mZone2SyncVolumeChkBx->setGeometry(QRect(590, 120, 171, 17));
|
||||
|
||||
retranslateUi(CAvReceiverGui);
|
||||
|
||||
@ -114,6 +123,7 @@ public:
|
||||
MainZoneScene4Btn->setText(QCoreApplication::translate("CAvReceiverGui", "4", nullptr));
|
||||
mMainZoneSliderValueLbl->setText(QCoreApplication::translate("CAvReceiverGui", "TextLabel", nullptr));
|
||||
mZone2SliderValueLbl->setText(QCoreApplication::translate("CAvReceiverGui", "TextLabel", nullptr));
|
||||
mZone2SyncVolumeChkBx->setText(QCoreApplication::translate("CAvReceiverGui", "Sync volume with Main zone", nullptr));
|
||||
} // retranslateUi
|
||||
|
||||
};
|
||||
|
||||
@ -11,12 +11,14 @@
|
||||
|
||||
#include <QtCore/QVariant>
|
||||
#include <QtWidgets/QApplication>
|
||||
#include <QtWidgets/QButtonGroup>
|
||||
#include <QtWidgets/QCheckBox>
|
||||
#include <QtWidgets/QDateEdit>
|
||||
#include <QtWidgets/QGroupBox>
|
||||
#include <QtWidgets/QLabel>
|
||||
#include <QtWidgets/QLineEdit>
|
||||
#include <QtWidgets/QPushButton>
|
||||
#include <QtWidgets/QRadioButton>
|
||||
#include <QtWidgets/QSpinBox>
|
||||
#include <QtWidgets/QWidget>
|
||||
|
||||
@ -50,7 +52,7 @@ public:
|
||||
QDateEdit *mLogStartDateEdit;
|
||||
QPushButton *mGetChaletLogButton;
|
||||
QLabel *mChaletTemperatureLbl;
|
||||
QGroupBox *groupBox_2;
|
||||
QGroupBox *WifiSettingGroupBox;
|
||||
QLineEdit *mWifiAccessPtNameEditBx;
|
||||
QLabel *mAccessPtNameLabel;
|
||||
QLabel *mAccessPtPassLbl;
|
||||
@ -62,6 +64,8 @@ public:
|
||||
QCheckBox *mDHCPEnableChkBx;
|
||||
QPushButton *mWiFiGetRemoteSettingsBtn;
|
||||
QPushButton *mWiFiSetRemoteSettingsBtn;
|
||||
QRadioButton *mChaletWifiSelectionRadioBtn;
|
||||
QRadioButton *mLoraIFWifiSelectionRadioBtn;
|
||||
QLabel *mSolarPanelCurrentCnvLbl;
|
||||
QLabel *mFirmwareVersionLabel;
|
||||
QPushButton *mGetFirmwareVersionBtn;
|
||||
@ -79,6 +83,9 @@ public:
|
||||
QLabel *label_3;
|
||||
QLabel *label_4;
|
||||
QLabel *mLoraModuleCommActivityLbl;
|
||||
QPushButton *mGetLoraWifiStatusBtn;
|
||||
QLabel *mLoraModuleIPAddressLbl;
|
||||
QButtonGroup *buttonGroup;
|
||||
|
||||
void setupUi(QWidget *CChaletGui)
|
||||
{
|
||||
@ -156,7 +163,7 @@ public:
|
||||
mLostReqPercentLbl->setGeometry(QRect(430, 160, 241, 16));
|
||||
mPlotWidget = new QWidget(CChaletGui);
|
||||
mPlotWidget->setObjectName(QString::fromUtf8("mPlotWidget"));
|
||||
mPlotWidget->setGeometry(QRect(420, 240, 1021, 321));
|
||||
mPlotWidget->setGeometry(QRect(420, 260, 1021, 321));
|
||||
mChaletCommActivityLbl = new QLabel(CChaletGui);
|
||||
mChaletCommActivityLbl->setObjectName(QString::fromUtf8("mChaletCommActivityLbl"));
|
||||
mChaletCommActivityLbl->setGeometry(QRect(430, 140, 47, 16));
|
||||
@ -172,52 +179,62 @@ public:
|
||||
mChaletTemperatureLbl = new QLabel(CChaletGui);
|
||||
mChaletTemperatureLbl->setObjectName(QString::fromUtf8("mChaletTemperatureLbl"));
|
||||
mChaletTemperatureLbl->setGeometry(QRect(190, 340, 241, 16));
|
||||
groupBox_2 = new QGroupBox(CChaletGui);
|
||||
groupBox_2->setObjectName(QString::fromUtf8("groupBox_2"));
|
||||
groupBox_2->setGeometry(QRect(70, 380, 321, 231));
|
||||
mWifiAccessPtNameEditBx = new QLineEdit(groupBox_2);
|
||||
WifiSettingGroupBox = new QGroupBox(CChaletGui);
|
||||
WifiSettingGroupBox->setObjectName(QString::fromUtf8("WifiSettingGroupBox"));
|
||||
WifiSettingGroupBox->setGeometry(QRect(60, 380, 321, 251));
|
||||
mWifiAccessPtNameEditBx = new QLineEdit(WifiSettingGroupBox);
|
||||
mWifiAccessPtNameEditBx->setObjectName(QString::fromUtf8("mWifiAccessPtNameEditBx"));
|
||||
mWifiAccessPtNameEditBx->setGeometry(QRect(80, 110, 221, 20));
|
||||
mWifiAccessPtNameEditBx->setGeometry(QRect(80, 150, 221, 20));
|
||||
mWifiAccessPtNameEditBx->setAlignment(Qt::AlignCenter);
|
||||
mAccessPtNameLabel = new QLabel(groupBox_2);
|
||||
mAccessPtNameLabel = new QLabel(WifiSettingGroupBox);
|
||||
mAccessPtNameLabel->setObjectName(QString::fromUtf8("mAccessPtNameLabel"));
|
||||
mAccessPtNameLabel->setGeometry(QRect(10, 110, 71, 20));
|
||||
mAccessPtNameLabel->setGeometry(QRect(10, 150, 71, 20));
|
||||
QFont font2;
|
||||
font2.setPointSize(10);
|
||||
mAccessPtNameLabel->setFont(font2);
|
||||
mAccessPtPassLbl = new QLabel(groupBox_2);
|
||||
mAccessPtPassLbl = new QLabel(WifiSettingGroupBox);
|
||||
mAccessPtPassLbl->setObjectName(QString::fromUtf8("mAccessPtPassLbl"));
|
||||
mAccessPtPassLbl->setGeometry(QRect(10, 140, 71, 20));
|
||||
mAccessPtPassLbl->setGeometry(QRect(10, 180, 71, 20));
|
||||
mAccessPtPassLbl->setFont(font2);
|
||||
mWifiPasswordEditBx = new QLineEdit(groupBox_2);
|
||||
mWifiPasswordEditBx = new QLineEdit(WifiSettingGroupBox);
|
||||
mWifiPasswordEditBx->setObjectName(QString::fromUtf8("mWifiPasswordEditBx"));
|
||||
mWifiPasswordEditBx->setGeometry(QRect(80, 140, 221, 20));
|
||||
mWifiPasswordEditBx->setGeometry(QRect(80, 180, 221, 20));
|
||||
mWifiPasswordEditBx->setAlignment(Qt::AlignCenter);
|
||||
label = new QLabel(groupBox_2);
|
||||
label = new QLabel(WifiSettingGroupBox);
|
||||
label->setObjectName(QString::fromUtf8("label"));
|
||||
label->setGeometry(QRect(10, 50, 71, 20));
|
||||
label->setGeometry(QRect(10, 90, 71, 20));
|
||||
label->setFont(font2);
|
||||
mWiFiIPAddressEditBx = new QLineEdit(groupBox_2);
|
||||
mWiFiIPAddressEditBx = new QLineEdit(WifiSettingGroupBox);
|
||||
mWiFiIPAddressEditBx->setObjectName(QString::fromUtf8("mWiFiIPAddressEditBx"));
|
||||
mWiFiIPAddressEditBx->setGeometry(QRect(80, 50, 221, 20));
|
||||
mWiFiIPAddressEditBx->setGeometry(QRect(80, 90, 221, 20));
|
||||
mWiFiIPAddressEditBx->setAlignment(Qt::AlignCenter);
|
||||
label_2 = new QLabel(groupBox_2);
|
||||
label_2 = new QLabel(WifiSettingGroupBox);
|
||||
label_2->setObjectName(QString::fromUtf8("label_2"));
|
||||
label_2->setGeometry(QRect(10, 80, 71, 20));
|
||||
label_2->setGeometry(QRect(10, 120, 71, 20));
|
||||
label_2->setFont(font2);
|
||||
mWiFiGatewayAddressEditBx = new QLineEdit(groupBox_2);
|
||||
mWiFiGatewayAddressEditBx = new QLineEdit(WifiSettingGroupBox);
|
||||
mWiFiGatewayAddressEditBx->setObjectName(QString::fromUtf8("mWiFiGatewayAddressEditBx"));
|
||||
mWiFiGatewayAddressEditBx->setGeometry(QRect(80, 80, 221, 20));
|
||||
mWiFiGatewayAddressEditBx->setGeometry(QRect(80, 120, 221, 20));
|
||||
mWiFiGatewayAddressEditBx->setAlignment(Qt::AlignCenter);
|
||||
mDHCPEnableChkBx = new QCheckBox(groupBox_2);
|
||||
mDHCPEnableChkBx = new QCheckBox(WifiSettingGroupBox);
|
||||
mDHCPEnableChkBx->setObjectName(QString::fromUtf8("mDHCPEnableChkBx"));
|
||||
mDHCPEnableChkBx->setGeometry(QRect(20, 20, 70, 17));
|
||||
mWiFiGetRemoteSettingsBtn = new QPushButton(groupBox_2);
|
||||
mDHCPEnableChkBx->setGeometry(QRect(20, 60, 70, 17));
|
||||
mWiFiGetRemoteSettingsBtn = new QPushButton(WifiSettingGroupBox);
|
||||
mWiFiGetRemoteSettingsBtn->setObjectName(QString::fromUtf8("mWiFiGetRemoteSettingsBtn"));
|
||||
mWiFiGetRemoteSettingsBtn->setGeometry(QRect(70, 180, 75, 23));
|
||||
mWiFiSetRemoteSettingsBtn = new QPushButton(groupBox_2);
|
||||
mWiFiGetRemoteSettingsBtn->setGeometry(QRect(70, 220, 75, 23));
|
||||
mWiFiSetRemoteSettingsBtn = new QPushButton(WifiSettingGroupBox);
|
||||
mWiFiSetRemoteSettingsBtn->setObjectName(QString::fromUtf8("mWiFiSetRemoteSettingsBtn"));
|
||||
mWiFiSetRemoteSettingsBtn->setGeometry(QRect(170, 180, 75, 23));
|
||||
mWiFiSetRemoteSettingsBtn->setGeometry(QRect(170, 220, 75, 23));
|
||||
mChaletWifiSelectionRadioBtn = new QRadioButton(WifiSettingGroupBox);
|
||||
buttonGroup = new QButtonGroup(CChaletGui);
|
||||
buttonGroup->setObjectName(QString::fromUtf8("buttonGroup"));
|
||||
buttonGroup->addButton(mChaletWifiSelectionRadioBtn);
|
||||
mChaletWifiSelectionRadioBtn->setObjectName(QString::fromUtf8("mChaletWifiSelectionRadioBtn"));
|
||||
mChaletWifiSelectionRadioBtn->setGeometry(QRect(40, 20, 85, 20));
|
||||
mLoraIFWifiSelectionRadioBtn = new QRadioButton(WifiSettingGroupBox);
|
||||
buttonGroup->addButton(mLoraIFWifiSelectionRadioBtn);
|
||||
mLoraIFWifiSelectionRadioBtn->setObjectName(QString::fromUtf8("mLoraIFWifiSelectionRadioBtn"));
|
||||
mLoraIFWifiSelectionRadioBtn->setGeometry(QRect(140, 20, 101, 20));
|
||||
mSolarPanelCurrentCnvLbl = new QLabel(CChaletGui);
|
||||
mSolarPanelCurrentCnvLbl->setObjectName(QString::fromUtf8("mSolarPanelCurrentCnvLbl"));
|
||||
mSolarPanelCurrentCnvLbl->setGeometry(QRect(190, 280, 201, 16));
|
||||
@ -273,7 +290,14 @@ public:
|
||||
mLoraModuleCommActivityLbl = new QLabel(mLoraIFGroupBox);
|
||||
mLoraModuleCommActivityLbl->setObjectName(QString::fromUtf8("mLoraModuleCommActivityLbl"));
|
||||
mLoraModuleCommActivityLbl->setGeometry(QRect(390, 80, 47, 16));
|
||||
groupBox_2->raise();
|
||||
mGetLoraWifiStatusBtn = new QPushButton(mLoraIFGroupBox);
|
||||
mGetLoraWifiStatusBtn->setObjectName(QString::fromUtf8("mGetLoraWifiStatusBtn"));
|
||||
mGetLoraWifiStatusBtn->setGeometry(QRect(170, 130, 61, 20));
|
||||
mLoraModuleIPAddressLbl = new QLabel(mLoraIFGroupBox);
|
||||
mLoraModuleIPAddressLbl->setObjectName(QString::fromUtf8("mLoraModuleIPAddressLbl"));
|
||||
mLoraModuleIPAddressLbl->setGeometry(QRect(240, 130, 291, 16));
|
||||
mLoraModuleIPAddressLbl->setFont(font2);
|
||||
WifiSettingGroupBox->raise();
|
||||
groupBox->raise();
|
||||
MainPageLabel->raise();
|
||||
mInverterRlyStatusLabel->raise();
|
||||
@ -341,7 +365,7 @@ public:
|
||||
mLasCommRequestReceivedLbl->setText(QCoreApplication::translate("CChaletGui", "Last Request: ", nullptr));
|
||||
mGetChaletLogButton->setText(QCoreApplication::translate("CChaletGui", "PushButton", nullptr));
|
||||
mChaletTemperatureLbl->setText(QCoreApplication::translate("CChaletGui", "Temperature:", nullptr));
|
||||
groupBox_2->setTitle(QCoreApplication::translate("CChaletGui", "WiFi parameters (stored in flash)", nullptr));
|
||||
WifiSettingGroupBox->setTitle(QCoreApplication::translate("CChaletGui", "Wifi parameters stored in flash", nullptr));
|
||||
mWifiAccessPtNameEditBx->setText(QCoreApplication::translate("CChaletGui", "?", nullptr));
|
||||
mAccessPtNameLabel->setText(QCoreApplication::translate("CChaletGui", "Access Pt:", nullptr));
|
||||
mAccessPtPassLbl->setText(QCoreApplication::translate("CChaletGui", "Password:", nullptr));
|
||||
@ -353,6 +377,8 @@ public:
|
||||
mDHCPEnableChkBx->setText(QCoreApplication::translate("CChaletGui", "DHCP", nullptr));
|
||||
mWiFiGetRemoteSettingsBtn->setText(QCoreApplication::translate("CChaletGui", "GET", nullptr));
|
||||
mWiFiSetRemoteSettingsBtn->setText(QCoreApplication::translate("CChaletGui", "SET", nullptr));
|
||||
mChaletWifiSelectionRadioBtn->setText(QCoreApplication::translate("CChaletGui", "Chalet", nullptr));
|
||||
mLoraIFWifiSelectionRadioBtn->setText(QCoreApplication::translate("CChaletGui", "Lora Module IF", nullptr));
|
||||
mSolarPanelCurrentCnvLbl->setText(QCoreApplication::translate("CChaletGui", "Solar Panel Current (A):", nullptr));
|
||||
mFirmwareVersionLabel->setText(QCoreApplication::translate("CChaletGui", "Firmware Version: ?", nullptr));
|
||||
mGetFirmwareVersionBtn->setText(QCoreApplication::translate("CChaletGui", "GET", nullptr));
|
||||
@ -370,6 +396,8 @@ public:
|
||||
label_3->setText(QCoreApplication::translate("CChaletGui", "Module Channel", nullptr));
|
||||
label_4->setText(QCoreApplication::translate("CChaletGui", "Module Address", nullptr));
|
||||
mLoraModuleCommActivityLbl->setText(QCoreApplication::translate("CChaletGui", "Activity!!!", nullptr));
|
||||
mGetLoraWifiStatusBtn->setText(QCoreApplication::translate("CChaletGui", "GET", nullptr));
|
||||
mLoraModuleIPAddressLbl->setText(QCoreApplication::translate("CChaletGui", "Module IP Address:", nullptr));
|
||||
} // retranslateUi
|
||||
|
||||
};
|
||||
|
||||
57
ui_TrayVolumeCtrl.h
Normal file
57
ui_TrayVolumeCtrl.h
Normal file
@ -0,0 +1,57 @@
|
||||
/********************************************************************************
|
||||
** Form generated from reading UI file 'TrayVolumeCtrl.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_TRAYVOLUMECTRL_H
|
||||
#define UI_TRAYVOLUMECTRL_H
|
||||
|
||||
#include <QtCore/QVariant>
|
||||
#include <QtWidgets/QApplication>
|
||||
#include <QtWidgets/QSlider>
|
||||
#include <QtWidgets/QWidget>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class Ui_CTrayVolumeCtrl
|
||||
{
|
||||
public:
|
||||
QSlider *horizontalSlider;
|
||||
QSlider *horizontalSlider_2;
|
||||
|
||||
void setupUi(QWidget *CTrayVolumeCtrl)
|
||||
{
|
||||
if (CTrayVolumeCtrl->objectName().isEmpty())
|
||||
CTrayVolumeCtrl->setObjectName(QString::fromUtf8("CTrayVolumeCtrl"));
|
||||
CTrayVolumeCtrl->resize(441, 147);
|
||||
horizontalSlider = new QSlider(CTrayVolumeCtrl);
|
||||
horizontalSlider->setObjectName(QString::fromUtf8("horizontalSlider"));
|
||||
horizontalSlider->setGeometry(QRect(70, 40, 160, 16));
|
||||
horizontalSlider->setOrientation(Qt::Horizontal);
|
||||
horizontalSlider_2 = new QSlider(CTrayVolumeCtrl);
|
||||
horizontalSlider_2->setObjectName(QString::fromUtf8("horizontalSlider_2"));
|
||||
horizontalSlider_2->setGeometry(QRect(70, 70, 160, 16));
|
||||
horizontalSlider_2->setOrientation(Qt::Horizontal);
|
||||
|
||||
retranslateUi(CTrayVolumeCtrl);
|
||||
|
||||
QMetaObject::connectSlotsByName(CTrayVolumeCtrl);
|
||||
} // setupUi
|
||||
|
||||
void retranslateUi(QWidget *CTrayVolumeCtrl)
|
||||
{
|
||||
CTrayVolumeCtrl->setWindowTitle(QCoreApplication::translate("CTrayVolumeCtrl", "Form", nullptr));
|
||||
} // retranslateUi
|
||||
|
||||
};
|
||||
|
||||
namespace Ui {
|
||||
class CTrayVolumeCtrl: public Ui_CTrayVolumeCtrl {};
|
||||
} // namespace Ui
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // UI_TRAYVOLUMECTRL_H
|
||||
Loading…
x
Reference in New Issue
Block a user