preparations for adding LED bar GUI control
This commit is contained in:
parent
93aba4de44
commit
3537e2fc6d
7 changed files with 122 additions and 6 deletions
|
@ -1,6 +1,5 @@
|
|||
bin_PROGRAMS = llcon
|
||||
|
||||
|
||||
llcon_SOURCES = ../src/buffer.cpp \
|
||||
../src/main.cpp \
|
||||
../src/socket.cpp \
|
||||
|
@ -17,6 +16,7 @@ llcon_SOURCES = ../src/buffer.cpp \
|
|||
../src/settings.cpp \
|
||||
../src/protocol.cpp \
|
||||
../src/multicolorled.cpp \
|
||||
../src/multicolorledbar.cpp \
|
||||
../src/audiomixerboard.cpp \
|
||||
../src/soundbase.cpp \
|
||||
sound.cpp \
|
||||
|
@ -33,6 +33,7 @@ llcon_SOURCES = ../src/buffer.cpp \
|
|||
../src/settings.h \
|
||||
../src/protocol.h \
|
||||
../src/multicolorled.h \
|
||||
../src/multicolorledbar.h \
|
||||
../src/audiomixerboard.h \
|
||||
../src/soundbase.h \
|
||||
../src/llconserverdlg.h \
|
||||
|
@ -88,6 +89,7 @@ BUILT_SOURCES=moc/moc_server.cpp \
|
|||
moc/moc_channel.cpp \
|
||||
moc/moc_socket.cpp \
|
||||
moc/moc_multicolorled.cpp \
|
||||
moc/moc_multicolorledbar.cpp \
|
||||
moc/moc_audiomixerboard.cpp \
|
||||
moc/moc_util.cpp \
|
||||
moc/moc_llconclientdlg.cpp \
|
||||
|
@ -124,6 +126,9 @@ moc/moc_socket.cpp: ../src/socket.h
|
|||
moc/moc_multicolorled.cpp: ../src/multicolorled.h
|
||||
$(QT_MOC) ../src/multicolorled.h -o moc/moc_multicolorled.cpp
|
||||
|
||||
moc/moc_multicolorledbar.cpp: ../src/multicolorledbar.h
|
||||
$(QT_MOC) ../src/multicolorledbar.h -o moc/moc_multicolorledbar.cpp
|
||||
|
||||
moc/moc_audiomixerboard.cpp: ../src/audiomixerboard.h
|
||||
$(QT_MOC) ../src/audiomixerboard.h -o moc/moc_audiomixerboard.cpp
|
||||
|
||||
|
|
|
@ -31,10 +31,10 @@
|
|||
/* Implementation *************************************************************/
|
||||
CMultiColorLED::CMultiColorLED ( QWidget* parent, Qt::WindowFlags f )
|
||||
: QLabel ( parent, f ),
|
||||
BitmCubeGreen ( QString::fromUtf8 ( ":/png/LEDs/res/CLEDGreenSmall.png" ) ),
|
||||
BitmCubeRed ( QString::fromUtf8 ( ":/png/LEDs/res/CLEDRedSmall.png" ) ),
|
||||
BitmCubeGrey ( QString::fromUtf8 ( ":/png/LEDs/res/CLEDGreySmall.png" ) ),
|
||||
BitmCubeYellow ( QString::fromUtf8 ( ":/png/LEDs/res/CLEDYellowSmall.png" ) )
|
||||
BitmCubeGreen ( QString::fromUtf8 ( ":/png/LEDs/res/CLEDGreenSmall.png" ) ),
|
||||
BitmCubeYellow ( QString::fromUtf8 ( ":/png/LEDs/res/CLEDYellowSmall.png" ) ),
|
||||
BitmCubeRed ( QString::fromUtf8 ( ":/png/LEDs/res/CLEDRedSmall.png" ) )
|
||||
{
|
||||
// init color flags
|
||||
Reset();
|
||||
|
|
|
@ -65,10 +65,10 @@ protected:
|
|||
|
||||
void UpdateColor();
|
||||
|
||||
QPixmap BitmCubeGrey;
|
||||
QPixmap BitmCubeGreen;
|
||||
QPixmap BitmCubeYellow;
|
||||
QPixmap BitmCubeRed;
|
||||
QPixmap BitmCubeGrey;
|
||||
|
||||
QTimer TimerRedLight;
|
||||
QTimer TimerGreenLight;
|
||||
|
|
44
src/multicolorledbar.cpp
Executable file
44
src/multicolorledbar.cpp
Executable file
|
@ -0,0 +1,44 @@
|
|||
/******************************************************************************\
|
||||
* Copyright (c) 2004-2009
|
||||
*
|
||||
* Author(s):
|
||||
* Volker Fischer
|
||||
*
|
||||
* Description:
|
||||
* Implements a multi color LED bar
|
||||
*
|
||||
******************************************************************************
|
||||
*
|
||||
* 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.,
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
\******************************************************************************/
|
||||
|
||||
#include "multicolorledbar.h"
|
||||
|
||||
|
||||
/* Implementation *************************************************************/
|
||||
CMultiColorLEDBar::CMultiColorLEDBar ( QWidget* parent, Qt::WindowFlags f )
|
||||
: QLabel ( parent, f ),
|
||||
BitmCubeRoundGrey ( QString::fromUtf8 ( ":/png/LEDs/res/VRLEDGreySmall.png" ) ),
|
||||
BitmCubeRoundGreen ( QString::fromUtf8 ( ":/png/LEDs/res/VRLEDGreySmall.png" ) ),
|
||||
BitmCubeRoundYellow ( QString::fromUtf8 ( ":/png/LEDs/res/VRLEDGreySmall.png" ) ),
|
||||
BitmCubeRoundRed ( QString::fromUtf8 ( ":/png/LEDs/res/VRLEDGreySmall.png" ) ),
|
||||
BitmCubeEdgeGrey ( QString::fromUtf8 ( ":/png/LEDs/res/VLEDGreySmall.png" ) ),
|
||||
BitmCubeEdgeGreen ( QString::fromUtf8 ( ":/png/LEDs/res/VLEDGreySmall.png" ) ),
|
||||
BitmCubeEdgeYellow ( QString::fromUtf8 ( ":/png/LEDs/res/VLEDGreySmall.png" ) ),
|
||||
BitmCubeEdgeRed ( QString::fromUtf8 ( ":/png/LEDs/res/VLEDGreySmall.png" ) )
|
||||
{
|
||||
|
||||
}
|
53
src/multicolorledbar.h
Executable file
53
src/multicolorledbar.h
Executable file
|
@ -0,0 +1,53 @@
|
|||
/******************************************************************************\
|
||||
* Copyright (c) 2004-2009
|
||||
*
|
||||
* Author(s):
|
||||
* Volker Fischer
|
||||
*
|
||||
******************************************************************************
|
||||
*
|
||||
* 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.,
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
\******************************************************************************/
|
||||
|
||||
#if !defined ( _MULTCOLORLEDBAR_H__FD6B49B5_87DF_48DD_E1606C2AC__INCLUDED_ )
|
||||
#define _MULTCOLORLEDBAR_H__FD6B49B5_87DF_48DD_E1606C2AC__INCLUDED_
|
||||
|
||||
#include <qlabel.h>
|
||||
#include <qpixmap.h>
|
||||
#include <qtimer.h>
|
||||
#include "global.h"
|
||||
|
||||
|
||||
/* Classes ********************************************************************/
|
||||
class CMultiColorLEDBar : public QLabel
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
CMultiColorLEDBar ( QWidget* parent = 0, Qt::WindowFlags f = 0 );
|
||||
|
||||
protected:
|
||||
QPixmap BitmCubeRoundGrey;
|
||||
QPixmap BitmCubeRoundGreen;
|
||||
QPixmap BitmCubeRoundYellow;
|
||||
QPixmap BitmCubeRoundRed;
|
||||
QPixmap BitmCubeEdgeGrey;
|
||||
QPixmap BitmCubeEdgeGreen;
|
||||
QPixmap BitmCubeEdgeYellow;
|
||||
QPixmap BitmCubeEdgeRed;
|
||||
};
|
||||
|
||||
#endif // _MULTCOLORLEDBAR_H__FD6B49B5_87DF_48DD_E1606C2AC__INCLUDED_
|
|
@ -6,6 +6,7 @@ rem * Volker Fischer
|
|||
rem *
|
||||
rem * Description:
|
||||
rem * Script for compiling the QT resources under Windows (MOCing and UICing)
|
||||
rem *
|
||||
rem ******************************************************************************
|
||||
rem *
|
||||
rem * This program is free software; you can redistribute it and/or modify it under
|
||||
|
@ -28,6 +29,7 @@ rem\****************************************************************************
|
|||
rem .h --------------
|
||||
%qtdir%\bin\moc.exe ..\src\util.h -o moc\moc_util.cpp
|
||||
%qtdir%\bin\moc.exe ..\src\multicolorled.h -o moc\moc_multicolorled.cpp
|
||||
%qtdir%\bin\moc.exe ..\src\multicolorledbar.h -o moc\moc_multicolorledbar.cpp
|
||||
%qtdir%\bin\moc.exe ..\src\audiomixerboard.h -o moc\moc_audiomixerboard.cpp
|
||||
%qtdir%\bin\moc.exe ..\src\llconclientdlg.h -o moc\moc_llconclientdlg.cpp
|
||||
%qtdir%\bin\moc.exe ..\src\clientsettingsdlg.h -o moc\moc_clientsettingsdlg.cpp
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="8,00"
|
||||
Version="8.00"
|
||||
Name="llcon"
|
||||
ProjectGUID="{DBBC16FC-BBCA-4E3B-A9F4-0EC5202A8B2E}"
|
||||
RootNamespace="llcon"
|
||||
|
@ -439,6 +439,10 @@
|
|||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\src\multicolorledbar.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\src\protocol.cpp"
|
||||
>
|
||||
|
@ -758,6 +762,10 @@
|
|||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\moc\moc_multicolorledbar.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="moc\moc_protocol.cpp"
|
||||
>
|
||||
|
@ -974,6 +982,10 @@
|
|||
RelativePath="..\src\multicolorled.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\src\multicolorledbar.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\src\protocol.h"
|
||||
>
|
||||
|
|
Loading…
Reference in a new issue