added light mux class and some ui interaction
This commit is contained in:
44
FilmLightController/lightmux.cpp
Normal file
44
FilmLightController/lightmux.cpp
Normal file
@ -0,0 +1,44 @@
|
||||
#include "lightmux.h"
|
||||
|
||||
LightMux::LightMux()
|
||||
{
|
||||
temperatur = warmest_temperature;
|
||||
brightness = 0;
|
||||
}
|
||||
|
||||
|
||||
void LightMux::decBrightness(){
|
||||
brightness--;
|
||||
if(brightness < 0){
|
||||
brightness = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void LightMux::incBrightness(){
|
||||
brightness++;
|
||||
if(brightness > 100){
|
||||
brightness = 100;
|
||||
}
|
||||
}
|
||||
|
||||
void LightMux::warm_Temperature(){
|
||||
temperatur = temperatur - steps_temperature;
|
||||
if(temperatur < warmest_temperature){
|
||||
temperatur = warmest_temperature;
|
||||
}
|
||||
}
|
||||
|
||||
void LightMux::cold_Temperature(){
|
||||
temperatur = temperatur + steps_temperature;
|
||||
if(temperatur > coldest_temperature){
|
||||
temperatur = coldest_temperature;
|
||||
}
|
||||
}
|
||||
|
||||
int LightMux::getBrightness(){
|
||||
return brightness;
|
||||
}
|
||||
|
||||
int LightMux::getTemperature(){
|
||||
return temperatur;
|
||||
}
|
Reference in New Issue
Block a user