85 lines
1.5 KiB
C++
Executable File
85 lines
1.5 KiB
C++
Executable File
/**
|
|
* @RDE_HEADER@
|
|
* HMI Plugin for Observer Controller - Settings Dialog
|
|
* $Id$
|
|
* $HeadURL$
|
|
* $Author$
|
|
* Created by Patric Karwat, SLSE, 2018-01-17
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <QMediaPlayer>
|
|
|
|
#include <LtsWidgets/lts_dialog.h>
|
|
#include <LtsSession/lts_session.h>
|
|
|
|
#ifdef WIN32
|
|
#include <windows.h>
|
|
#include <ntddvdeo.h>
|
|
#endif
|
|
namespace SituationMap
|
|
{
|
|
class ForeignGuiInterface;
|
|
}
|
|
|
|
namespace LtsUtils
|
|
{
|
|
class OperatorSettings;
|
|
}
|
|
|
|
namespace Ui
|
|
{
|
|
class Settings;
|
|
}
|
|
namespace OcSituationClient
|
|
{
|
|
|
|
class Settings : public LtsWidgets::LtsDialog
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit Settings(LtsSession::LtsSession *session, QWidget *parent = nullptr);
|
|
~Settings();
|
|
void setMonitorLightBrightness(const int value);
|
|
int getMonitorCurrentLightBrightness();
|
|
|
|
#ifdef WIN32
|
|
typedef struct _DISPLAY_BRIGHTNESS {
|
|
UCHAR ucDisplayPolicy;
|
|
UCHAR ucACBrightness;
|
|
UCHAR ucDCBrightness;
|
|
} DISPLAY_BRIGHTNESS, *PDISPLAY_BRIGHTNESS;
|
|
#endif
|
|
|
|
private Q_SLOTS:
|
|
void onResetRange();
|
|
void onSoundCheck();
|
|
private:
|
|
void loadOperatorSettings();
|
|
void retranslate() override;
|
|
bool apply() override;
|
|
|
|
private:
|
|
static const int WARNINGRANGEDEFAULT = 100;
|
|
QMediaPlayer *m_mediaplayer;
|
|
QString m_ocGroupString;
|
|
LtsUtils::OperatorSettings *m_opSettings;
|
|
|
|
std::shared_ptr<SituationMap::ForeignGuiInterface> m_sitMapGuiIfc;
|
|
|
|
Ui::Settings *m_ui;
|
|
int m_monitorLightBrightness;
|
|
|
|
|
|
#ifdef WIN32
|
|
DISPLAY_BRIGHTNESS m_displayBrightness;
|
|
HANDLE m_handler;
|
|
#endif
|
|
//LOGGER_T m_logger;
|
|
|
|
};
|
|
|
|
} // namespace OcSituationClient
|