jamulus/src/multicolorled.h

76 lines
1.9 KiB
C
Raw Normal View History

2013-01-23 11:41:13 +01:00
/******************************************************************************\
2020-01-01 15:41:43 +01:00
* Copyright (c) 2004-2020
2013-01-23 11:41:13 +01:00
*
* Author(s):
* Volker Fischer
*
* Description:
*
* SetLight():
* 0: Green
* 1: Yellow
* 2: Red
*
******************************************************************************
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
2013-01-23 11:41:13 +01:00
*
\******************************************************************************/
2019-07-09 08:52:38 +02:00
#pragma once
2013-01-23 11:41:13 +01:00
#include <QLabel>
#include <QPixmap>
#include <QIcon>
#include "global.h"
/* Classes ********************************************************************/
class CMultiColorLED : public QLabel
{
public:
enum ELightColor
{
RL_DISABLED,
RL_GREY,
RL_GREEN,
RL_YELLOW,
RL_RED
};
2019-05-17 22:55:46 +02:00
CMultiColorLED ( QWidget* parent = nullptr, Qt::WindowFlags f = nullptr );
void Reset();
void SetLight ( const ELightColor eNewStatus );
protected:
2013-01-23 11:41:13 +01:00
ELightColor eColorFlag;
virtual void changeEvent ( QEvent* curEvent );
void SetColor ( const ELightColor eNewColorFlag );
2013-01-23 11:41:13 +01:00
QPixmap BitmCubeDisabled;
QPixmap BitmCubeGrey;
QPixmap BitmCubeGreen;
QPixmap BitmCubeYellow;
QPixmap BitmCubeRed;
int iUpdateTime;
bool bFlagRedLi;
bool bFlagGreenLi;
bool bFlagYellowLi;
};