diff --git a/src/llconserverdlg.cpp b/src/llconserverdlg.cpp index c8dda8c7..529af7dd 100755 --- a/src/llconserverdlg.cpp +++ b/src/llconserverdlg.cpp @@ -38,8 +38,7 @@ CLlconServerDlg::CLlconServerDlg ( CServer* pNServP, QWidget* parent ) // set up list view for connected clients ListViewClients->setColumnWidth ( 0, 170 ); ListViewClients->setColumnWidth ( 1, 130 ); - ListViewClients->setColumnWidth ( 2, 40 ); - ListViewClients->setColumnWidth ( 3, 40 ); + ListViewClients->setColumnWidth ( 2, 60 ); ListViewClients->clear(); // insert items in reverse order because in Windows all of them are @@ -51,9 +50,6 @@ CLlconServerDlg::CLlconServerDlg ( CServer* pNServP, QWidget* parent ) vecpListViewItems[i]->setHidden ( true ); } - // Init timing jitter text label - TextLabelResponseTime->setText ( "" ); - // Main menu bar ----------------------------------------------------------- pMenu = new QMenuBar ( this ); @@ -79,56 +75,46 @@ void CLlconServerDlg::OnTimer() CVector vecsName; CVector veciJitBufNumFrames; CVector veciNetwFrameSizeFact; - double dCurTiStdDev; ListViewMutex.lock(); - - pServer->GetConCliParam ( vecHostAddresses, vecsName, veciJitBufNumFrames, - veciNetwFrameSizeFact ); - - // fill list with connected clients - for ( int i = 0; i < USED_NUM_CHANNELS; i++ ) { - if ( !( vecHostAddresses[i].InetAddr == QHostAddress ( (quint32) 0 ) ) ) + pServer->GetConCliParam ( vecHostAddresses, + vecsName, + veciJitBufNumFrames, + veciNetwFrameSizeFact ); + + // fill list with connected clients + for ( int i = 0; i < USED_NUM_CHANNELS; i++ ) { - // IP, port number - vecpListViewItems[i]->setText ( 0, QString("%1 : %2" ). - arg ( vecHostAddresses[i].InetAddr.toString() ). - arg ( vecHostAddresses[i].iPort ) ); + if ( !( vecHostAddresses[i].InetAddr == QHostAddress ( (quint32) 0 ) ) ) + { + // IP, port number + vecpListViewItems[i]->setText ( 0, QString("%1 : %2" ). + arg ( vecHostAddresses[i].InetAddr.toString() ). + arg ( vecHostAddresses[i].iPort ) ); - // name - vecpListViewItems[i]->setText ( 1, vecsName[i] ); + // name + vecpListViewItems[i]->setText ( 1, vecsName[i] ); - // jitter buffer size (polling for updates) - vecpListViewItems[i]->setText ( 4, - QString().setNum ( veciJitBufNumFrames[i] ) ); + // jitter buffer size (polling for updates) + vecpListViewItems[i]->setText ( 3, + QString().setNum ( veciJitBufNumFrames[i] ) ); - // out network block size - vecpListViewItems[i]->setText ( 5, - QString().setNum ( static_cast ( - veciNetwFrameSizeFact[i] * SYSTEM_BLOCK_DURATION_MS_FLOAT - ), 'f', 2 ) ); + // out network block size + vecpListViewItems[i]->setText ( 4, + QString().setNum ( static_cast ( + veciNetwFrameSizeFact[i] * SYSTEM_BLOCK_DURATION_MS_FLOAT + ), 'f', 2 ) ); - vecpListViewItems[i]->setHidden ( false ); - } - else - { - vecpListViewItems[i]->setHidden ( true ); + vecpListViewItems[i]->setHidden ( false ); + } + else + { + vecpListViewItems[i]->setHidden ( true ); + } } } - ListViewMutex.unlock(); - - // response time (if available) - if ( pServer->GetTimingStdDev ( dCurTiStdDev ) ) - { - TextLabelResponseTime->setText ( QString(). - setNum ( dCurTiStdDev, 'f', 2 ) + " ms" ); - } - else - { - TextLabelResponseTime->setText ( "---" ); - } } void CLlconServerDlg::customEvent ( QEvent* Event ) @@ -136,22 +122,19 @@ void CLlconServerDlg::customEvent ( QEvent* Event ) if ( Event->type() == QEvent::User + 11 ) { ListViewMutex.lock(); - - const int iMessType = ( (CLlconEvent*) Event )->iMessType; - const int iStatus = ( (CLlconEvent*) Event )->iStatus; - const int iChanNum = ( (CLlconEvent*) Event )->iChanNum; - - switch(iMessType) { - case MS_JIT_BUF_PUT: - vecpListViewItems[iChanNum]->SetLight ( 0, iStatus ); - break; + const int iMessType = ( (CLlconEvent*) Event )->iMessType; + const int iStatus = ( (CLlconEvent*) Event )->iStatus; + const int iChanNum = ( (CLlconEvent*) Event )->iChanNum; - case MS_JIT_BUF_GET: - vecpListViewItems[iChanNum]->SetLight ( 1, iStatus ); - break; + switch(iMessType) + { + case MS_JIT_BUF_PUT: + case MS_JIT_BUF_GET: + vecpListViewItems[iChanNum]->SetLight ( iStatus ); + break; + } } - ListViewMutex.unlock(); } } diff --git a/src/llconserverdlgbase.ui b/src/llconserverdlgbase.ui index 2dcd7da4..f453d0b4 100755 --- a/src/llconserverdlgbase.ui +++ b/src/llconserverdlgbase.ui @@ -5,7 +5,7 @@ 0 0 - 765 + 580 315 @@ -51,22 +51,17 @@ - Put + Buffers - Get + Jitter Buffer Size - Jitter buffer size - - - - - Block Size Out + Block Size Out/ms @@ -98,42 +93,6 @@ - - - - Qt::Horizontal - - - QSizePolicy::Fixed - - - - 72 - 20 - - - - - - - - Timing Standard Deviation: - - - false - - - - - - - TextLabelResponseTime - - - false - - - diff --git a/src/multicolorled.h b/src/multicolorled.h index 4eb7d3e7..193a5815 100755 --- a/src/multicolorled.h +++ b/src/multicolorled.h @@ -132,28 +132,18 @@ class CServerListViewItem : public QTreeWidgetItem { public: CServerListViewItem ( QTreeWidget* parent ) - : QTreeWidgetItem ( parent ), LED0 ( 2 ), LED1 ( 3 ) + : QTreeWidgetItem ( parent ), LED ( 2 ) { - LED0.SetListViewItemPointer ( this ); - LED1.SetListViewItemPointer ( this ); + LED.SetListViewItemPointer ( this ); } - void SetLight ( int iWhichLED, int iNewStatus ) + void SetLight ( int iNewStatus ) { - switch ( iWhichLED ) - { - case 0: - LED0.SetLight ( iNewStatus ); - break; - - case 1: - LED1.SetLight ( iNewStatus ); - break; - } + LED.SetLight ( iNewStatus ); } protected: - CMultColLEDListViewItem LED0, LED1; + CMultColLEDListViewItem LED; };