Files
qt-migration-legatus/qt6-after/qt6-migrated-legatus/Lts/Plugins/OcSituationClient/Gui/System/osc_settings.h
T

80 lines
1.3 KiB
C++
Executable File

#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:
NGL::INGLLogger &m_logger;
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
};
}