bug fix for server
This commit is contained in:
parent
6d8160c518
commit
25161fa55a
5 changed files with 74 additions and 65 deletions
|
@ -114,7 +114,7 @@
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="TextLabelCopyright" >
|
<widget class="QLabel" name="TextLabelCopyright" >
|
||||||
<property name="text" >
|
<property name="text" >
|
||||||
<string>Copyright (C) 2005 - 2006</string>
|
<string>Copyright (C) 2005 - 2008</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="wordWrap" >
|
<property name="wordWrap" >
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/******************************************************************************\
|
/******************************************************************************\
|
||||||
* Copyright (c) 2004-2006
|
* Copyright (c) 2004-2008
|
||||||
*
|
*
|
||||||
* Author(s):
|
* Author(s):
|
||||||
* Volker Fischer
|
* Volker Fischer
|
||||||
|
@ -63,7 +63,7 @@ CLlconServerDlg::CLlconServerDlg ( CServer* pNServP, QWidget* parent )
|
||||||
for ( int i = MAX_NUM_CHANNELS - 1; i >= 0; i-- )
|
for ( int i = MAX_NUM_CHANNELS - 1; i >= 0; i-- )
|
||||||
{
|
{
|
||||||
vecpListViewItems[i] = new CServerListViewItem ( ListViewClients );
|
vecpListViewItems[i] = new CServerListViewItem ( ListViewClients );
|
||||||
vecpListViewItems[i]->setHidden ( false );
|
vecpListViewItems[i]->setHidden ( true );
|
||||||
}
|
}
|
||||||
|
|
||||||
// Init timing jitter text label
|
// Init timing jitter text label
|
||||||
|
@ -108,9 +108,9 @@ void CLlconServerDlg::OnTimer()
|
||||||
if ( !( vecHostAddresses[i].InetAddr == QHostAddress ( (quint32) 0 ) ) )
|
if ( !( vecHostAddresses[i].InetAddr == QHostAddress ( (quint32) 0 ) ) )
|
||||||
{
|
{
|
||||||
// IP, port number
|
// IP, port number
|
||||||
vecpListViewItems[i]->setText ( 0, QString().sprintf ( "%s : %d",
|
vecpListViewItems[i]->setText ( 0, QString("%1 : %2" ).
|
||||||
vecHostAddresses[i].InetAddr.toString(),
|
arg ( vecHostAddresses[i].InetAddr.toString() ).
|
||||||
vecHostAddresses[i].iPort ) /* IP, port */);
|
arg ( vecHostAddresses[i].iPort ) );
|
||||||
|
|
||||||
// name
|
// name
|
||||||
vecpListViewItems[i]->setText ( 1, vecsName[i] );
|
vecpListViewItems[i]->setText ( 1, vecsName[i] );
|
||||||
|
@ -123,15 +123,15 @@ void CLlconServerDlg::OnTimer()
|
||||||
vecpListViewItems[i]->setText ( 5,
|
vecpListViewItems[i]->setText ( 5,
|
||||||
QString().setNum (
|
QString().setNum (
|
||||||
double ( veciNetwInBlSiFact[i] * MIN_BLOCK_DURATION_MS ), 'f', 2 ) );
|
double ( veciNetwInBlSiFact[i] * MIN_BLOCK_DURATION_MS ), 'f', 2 ) );
|
||||||
vecpListViewItems[i]->setText(6,
|
vecpListViewItems[i]->setText ( 6,
|
||||||
QString().setNum (
|
QString().setNum (
|
||||||
double ( veciNetwOutBlSiFact[i] * MIN_BLOCK_DURATION_MS ), 'f', 2 ) );
|
double ( veciNetwOutBlSiFact[i] * MIN_BLOCK_DURATION_MS ), 'f', 2 ) );
|
||||||
|
|
||||||
vecpListViewItems[i]->setHidden ( true );
|
vecpListViewItems[i]->setHidden ( false );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
vecpListViewItems[i]->setHidden ( false );
|
vecpListViewItems[i]->setHidden ( true );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -70,6 +70,9 @@ CMultiColorLED::CMultiColorLED ( QWidget* parent, Qt::WindowFlags f )
|
||||||
this, SLOT ( OnTimerGreenLight() ) );
|
this, SLOT ( OnTimerGreenLight() ) );
|
||||||
connect ( &TimerYellowLight, SIGNAL ( timeout() ),
|
connect ( &TimerYellowLight, SIGNAL ( timeout() ),
|
||||||
this, SLOT ( OnTimerYellowLight() ) );
|
this, SLOT ( OnTimerYellowLight() ) );
|
||||||
|
|
||||||
|
connect ( this, SIGNAL ( newPixmap ( const QPixmap& ) ),
|
||||||
|
this, SLOT ( OnNewPixmap ( const QPixmap& ) ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
void CMultiColorLED::Reset()
|
void CMultiColorLED::Reset()
|
||||||
|
@ -109,7 +112,8 @@ void CMultiColorLED::UpdateColor()
|
||||||
{
|
{
|
||||||
if ( eColorFlag != RL_RED )
|
if ( eColorFlag != RL_RED )
|
||||||
{
|
{
|
||||||
setPixmap ( BitmCubeRed );
|
//setPixmap ( BitmCubeRed );
|
||||||
|
emit newPixmap ( BitmCubeRed );
|
||||||
eColorFlag = RL_RED;
|
eColorFlag = RL_RED;
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
@ -119,7 +123,8 @@ void CMultiColorLED::UpdateColor()
|
||||||
{
|
{
|
||||||
if ( eColorFlag != RL_YELLOW )
|
if ( eColorFlag != RL_YELLOW )
|
||||||
{
|
{
|
||||||
setPixmap ( BitmCubeYellow );
|
//setPixmap ( BitmCubeYellow );
|
||||||
|
emit newPixmap ( BitmCubeYellow );
|
||||||
eColorFlag = RL_YELLOW;
|
eColorFlag = RL_YELLOW;
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
@ -129,7 +134,8 @@ void CMultiColorLED::UpdateColor()
|
||||||
{
|
{
|
||||||
if ( eColorFlag != RL_GREEN )
|
if ( eColorFlag != RL_GREEN )
|
||||||
{
|
{
|
||||||
setPixmap ( BitmCubeGreen );
|
//setPixmap ( BitmCubeGreen );
|
||||||
|
emit newPixmap ( BitmCubeGreen );
|
||||||
eColorFlag = RL_GREEN;
|
eColorFlag = RL_GREEN;
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -85,15 +85,17 @@ protected slots:
|
||||||
void OnTimerRedLight();
|
void OnTimerRedLight();
|
||||||
void OnTimerGreenLight();
|
void OnTimerGreenLight();
|
||||||
void OnTimerYellowLight();
|
void OnTimerYellowLight();
|
||||||
|
virtual void OnNewPixmap ( const QPixmap& newPixmap ) { setPixmap ( newPixmap ); }
|
||||||
|
|
||||||
|
signals:
|
||||||
|
void newPixmap ( const QPixmap& newPixmap );
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// TODO list view item LED does not work anymore
|
|
||||||
|
|
||||||
class CMultColLEDListViewItem : public CMultiColorLED
|
class CMultColLEDListViewItem : public CMultiColorLED
|
||||||
{
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CMultColLEDListViewItem ( const int iNewCol ) : iColumn ( iNewCol ),
|
CMultColLEDListViewItem ( const int iNewCol ) : iColumn ( iNewCol ),
|
||||||
pListViewItem ( NULL ) {}
|
pListViewItem ( NULL ) {}
|
||||||
|
@ -103,15 +105,16 @@ public:
|
||||||
pListViewItem = pNewListViewItem;
|
pListViewItem = pNewListViewItem;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
protected slots:
|
||||||
virtual void SetPixmap ( QPixmap& NewBitmap )
|
virtual void OnNewPixmap ( const QPixmap& newPixmap )
|
||||||
{
|
{
|
||||||
if ( pListViewItem != NULL )
|
if ( pListViewItem != NULL )
|
||||||
{
|
{
|
||||||
pListViewItem->setIcon ( iColumn, QIcon ( NewBitmap ) );
|
pListViewItem->setIcon ( iColumn, QIcon ( newPixmap ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected:
|
||||||
QTreeWidgetItem* pListViewItem;
|
QTreeWidgetItem* pListViewItem;
|
||||||
int iColumn;
|
int iColumn;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue