added testbench template

This commit is contained in:
Volker Fischer 2009-05-09 12:24:33 +00:00
parent 7427171dd7
commit fad28f4322
5 changed files with 86 additions and 5 deletions

View file

@ -5,7 +5,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>483</width>
<width>471</width>
<height>324</height>
</rect>
</property>
@ -358,7 +358,7 @@
<item>
<widget class="QLabel" name="TextAudInFader" >
<property name="text" >
<string>Fader</string>
<string>Fader:</string>
</property>
<property name="alignment" >
<set>Qt::AlignCenter</set>
@ -374,7 +374,7 @@
</size>
</property>
<property name="text" >
<string>Level</string>
<string>Center</string>
</property>
<property name="alignment" >
<set>Qt::AlignCenter</set>
@ -470,7 +470,7 @@
<item>
<widget class="QLabel" name="TextLabelAudReverb" >
<property name="text" >
<string>Reverb</string>
<string>Reverb:</string>
</property>
<property name="alignment" >
<set>Qt::AlignCenter</set>

View file

@ -31,6 +31,14 @@
#include "settings.h"
/*
// TEST -> activate the following two lines to activate the test bench,
// currently only supported for Windows
#include "testbench.h"
CTestbench Testbench;
*/
// Implementation **************************************************************
// these pointers are only used for the post-event routine
QApplication* pApp = NULL;

63
src/testbench.h Executable file
View file

@ -0,0 +1,63 @@
/******************************************************************************\
* 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 ( TESTBENCH_HOIHJH8_3_43445KJIUHF1912__INCLUDED_ )
#define TESTBENCH_HOIHJH8_3_43445KJIUHF1912__INCLUDED_
#include <qobject.h>
#include <qtimer.h>
#include <qdatetime.h>
#include <qhostaddress.h>
#include "global.h"
#include "socket.h"
#include "util.h"
/* Classes ********************************************************************/
class CTestbench : public QObject
{
Q_OBJECT
public:
CTestbench() : Socket ( NULL, 22222 )
{
// connect and start the timer (testbench heartbeat)
QObject::connect ( &Timer, SIGNAL ( timeout() ),
this, SLOT ( OnTimer() ) );
Timer.start ( 1 ); // 1 ms
}
protected:
QTimer Timer;
CSocket Socket;
public slots:
void OnTimer()
{
}
};
#endif /* !defined ( TESTBENCH_HOIHJH8_3_43445KJIUHF1912__INCLUDED_ ) */

View file

@ -41,6 +41,7 @@ rem .h --------------
%qtdir%\bin\moc.exe ..\src\protocol.h -o moc\moc_protocol.cpp
%qtdir%\bin\moc.exe ..\src\channel.h -o moc\moc_channel.cpp
%qtdir%\bin\moc.exe ..\src\soundbase.h -o moc\moc_soundbase.cpp
%qtdir%\bin\moc.exe ..\src\testbench.h -o moc\moc_testbench.cpp
rem .ui -------------
@ -50,5 +51,6 @@ rem .ui -------------
%qtdir%\bin\uic.exe ..\src\llconserverdlgbase.ui -o moc\llconserverdlgbase.h
%qtdir%\bin\uic.exe ..\src\chatdlgbase.ui -o moc\chatdlgbase.h
rem .qrc ------------
%qtdir%\bin\rcc.exe ..\src\resources.qrc -o moc\resources.cpp

View file

@ -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"
@ -836,6 +836,10 @@
RelativePath=".\moc\moc_soundbase.cpp"
>
</File>
<File
RelativePath=".\moc\moc_testbench.cpp"
>
</File>
<File
RelativePath="moc\moc_util.cpp"
>
@ -1018,6 +1022,10 @@
RelativePath="..\src\soundbase.h"
>
</File>
<File
RelativePath="..\src\testbench.h"
>
</File>
<File
RelativePath="..\src\util.h"
>