preparations for adding LED bar GUI control

This commit is contained in:
Volker Fischer 2009-05-01 10:55:51 +00:00
parent 93aba4de44
commit 3537e2fc6d
7 changed files with 122 additions and 6 deletions

View file

@ -1,6 +1,5 @@
bin_PROGRAMS = llcon bin_PROGRAMS = llcon
llcon_SOURCES = ../src/buffer.cpp \ llcon_SOURCES = ../src/buffer.cpp \
../src/main.cpp \ ../src/main.cpp \
../src/socket.cpp \ ../src/socket.cpp \
@ -17,6 +16,7 @@ llcon_SOURCES = ../src/buffer.cpp \
../src/settings.cpp \ ../src/settings.cpp \
../src/protocol.cpp \ ../src/protocol.cpp \
../src/multicolorled.cpp \ ../src/multicolorled.cpp \
../src/multicolorledbar.cpp \
../src/audiomixerboard.cpp \ ../src/audiomixerboard.cpp \
../src/soundbase.cpp \ ../src/soundbase.cpp \
sound.cpp \ sound.cpp \
@ -33,6 +33,7 @@ llcon_SOURCES = ../src/buffer.cpp \
../src/settings.h \ ../src/settings.h \
../src/protocol.h \ ../src/protocol.h \
../src/multicolorled.h \ ../src/multicolorled.h \
../src/multicolorledbar.h \
../src/audiomixerboard.h \ ../src/audiomixerboard.h \
../src/soundbase.h \ ../src/soundbase.h \
../src/llconserverdlg.h \ ../src/llconserverdlg.h \
@ -88,6 +89,7 @@ BUILT_SOURCES=moc/moc_server.cpp \
moc/moc_channel.cpp \ moc/moc_channel.cpp \
moc/moc_socket.cpp \ moc/moc_socket.cpp \
moc/moc_multicolorled.cpp \ moc/moc_multicolorled.cpp \
moc/moc_multicolorledbar.cpp \
moc/moc_audiomixerboard.cpp \ moc/moc_audiomixerboard.cpp \
moc/moc_util.cpp \ moc/moc_util.cpp \
moc/moc_llconclientdlg.cpp \ moc/moc_llconclientdlg.cpp \
@ -124,6 +126,9 @@ moc/moc_socket.cpp: ../src/socket.h
moc/moc_multicolorled.cpp: ../src/multicolorled.h moc/moc_multicolorled.cpp: ../src/multicolorled.h
$(QT_MOC) ../src/multicolorled.h -o moc/moc_multicolorled.cpp $(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 moc/moc_audiomixerboard.cpp: ../src/audiomixerboard.h
$(QT_MOC) ../src/audiomixerboard.h -o moc/moc_audiomixerboard.cpp $(QT_MOC) ../src/audiomixerboard.h -o moc/moc_audiomixerboard.cpp

View file

@ -31,10 +31,10 @@
/* Implementation *************************************************************/ /* Implementation *************************************************************/
CMultiColorLED::CMultiColorLED ( QWidget* parent, Qt::WindowFlags f ) CMultiColorLED::CMultiColorLED ( QWidget* parent, Qt::WindowFlags f )
: QLabel ( parent, 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" ) ), 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 // init color flags
Reset(); Reset();

View file

@ -65,10 +65,10 @@ protected:
void UpdateColor(); void UpdateColor();
QPixmap BitmCubeGrey;
QPixmap BitmCubeGreen; QPixmap BitmCubeGreen;
QPixmap BitmCubeYellow; QPixmap BitmCubeYellow;
QPixmap BitmCubeRed; QPixmap BitmCubeRed;
QPixmap BitmCubeGrey;
QTimer TimerRedLight; QTimer TimerRedLight;
QTimer TimerGreenLight; QTimer TimerGreenLight;

44
src/multicolorledbar.cpp Executable file
View 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
View 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_

View file

@ -6,6 +6,7 @@ rem * Volker Fischer
rem * rem *
rem * Description: rem * Description:
rem * Script for compiling the QT resources under Windows (MOCing and UICing) rem * Script for compiling the QT resources under Windows (MOCing and UICing)
rem *
rem ****************************************************************************** rem ******************************************************************************
rem * rem *
rem * This program is free software; you can redistribute it and/or modify it under rem * This program is free software; you can redistribute it and/or modify it under
@ -28,6 +29,7 @@ rem\****************************************************************************
rem .h -------------- rem .h --------------
%qtdir%\bin\moc.exe ..\src\util.h -o moc\moc_util.cpp %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\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\audiomixerboard.h -o moc\moc_audiomixerboard.cpp
%qtdir%\bin\moc.exe ..\src\llconclientdlg.h -o moc\moc_llconclientdlg.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 %qtdir%\bin\moc.exe ..\src\clientsettingsdlg.h -o moc\moc_clientsettingsdlg.cpp

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="Windows-1252"?> <?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject <VisualStudioProject
ProjectType="Visual C++" ProjectType="Visual C++"
Version="8,00" Version="8.00"
Name="llcon" Name="llcon"
ProjectGUID="{DBBC16FC-BBCA-4E3B-A9F4-0EC5202A8B2E}" ProjectGUID="{DBBC16FC-BBCA-4E3B-A9F4-0EC5202A8B2E}"
RootNamespace="llcon" RootNamespace="llcon"
@ -439,6 +439,10 @@
/> />
</FileConfiguration> </FileConfiguration>
</File> </File>
<File
RelativePath="..\src\multicolorledbar.cpp"
>
</File>
<File <File
RelativePath="..\src\protocol.cpp" RelativePath="..\src\protocol.cpp"
> >
@ -758,6 +762,10 @@
/> />
</FileConfiguration> </FileConfiguration>
</File> </File>
<File
RelativePath=".\moc\moc_multicolorledbar.cpp"
>
</File>
<File <File
RelativePath="moc\moc_protocol.cpp" RelativePath="moc\moc_protocol.cpp"
> >
@ -974,6 +982,10 @@
RelativePath="..\src\multicolorled.h" RelativePath="..\src\multicolorled.h"
> >
</File> </File>
<File
RelativePath="..\src\multicolorledbar.h"
>
</File>
<File <File
RelativePath="..\src\protocol.h" RelativePath="..\src\protocol.h"
> >