2006-12-18 15:39:33 +01:00
|
|
|
/******************************************************************************\
|
2009-02-22 12:07:18 +01:00
|
|
|
* Copyright (c) 2004-2009
|
2006-12-18 15:39:33 +01:00
|
|
|
*
|
|
|
|
* 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
|
|
|
|
*
|
|
|
|
\******************************************************************************/
|
|
|
|
|
2008-01-20 19:07:13 +01:00
|
|
|
#include <qlabel.h>
|
|
|
|
#include <qstring.h>
|
|
|
|
#include <qlineedit.h>
|
|
|
|
#include <qpushbutton.h>
|
|
|
|
#include <qprogressbar.h>
|
|
|
|
#include <qwhatsthis.h>
|
|
|
|
#include <qtimer.h>
|
|
|
|
#include <qslider.h>
|
|
|
|
#include <qradiobutton.h>
|
|
|
|
#include <qmenubar.h>
|
|
|
|
#include <qlayout.h>
|
2008-08-10 10:14:30 +02:00
|
|
|
#include <qbuttongroup.h>
|
2006-12-18 15:39:33 +01:00
|
|
|
#include "global.h"
|
|
|
|
#include "client.h"
|
|
|
|
#include "multicolorled.h"
|
|
|
|
#ifdef _WIN32
|
|
|
|
# include "../windows/moc/clientsettingsdlgbase.h"
|
|
|
|
#else
|
|
|
|
# include "moc/clientsettingsdlgbase.h"
|
|
|
|
#endif
|
2006-11-03 19:54:12 +01:00
|
|
|
|
|
|
|
|
|
|
|
/* Definitions ****************************************************************/
|
2007-09-08 12:45:14 +02:00
|
|
|
// update time for GUI controls
|
|
|
|
#define DISPLAY_UPDATE_TIME 1000 // ms
|
2008-08-03 00:01:19 +02:00
|
|
|
#define PING_UPDATE_TIME 500 // ms
|
2006-12-18 15:39:33 +01:00
|
|
|
|
|
|
|
|
|
|
|
/* Classes ********************************************************************/
|
2008-01-14 23:14:17 +01:00
|
|
|
class CClientSettingsDlg : public QDialog, private Ui_CClientSettingsDlgBase
|
2006-12-18 15:39:33 +01:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2006-11-25 15:46:57 +01:00
|
|
|
CClientSettingsDlg ( CClient* pNCliP, QWidget* parent = 0,
|
2008-01-14 23:14:17 +01:00
|
|
|
Qt::WindowFlags f = 0 );
|
2006-11-03 19:54:12 +01:00
|
|
|
|
2006-12-18 15:39:33 +01:00
|
|
|
void SetStatus ( const int iMessType, const int iStatus );
|
|
|
|
|
|
|
|
protected:
|
2008-08-10 10:14:30 +02:00
|
|
|
CClient* pClient;
|
|
|
|
QTimer TimerStatus;
|
|
|
|
QTimer TimerPing;
|
|
|
|
QButtonGroup AudioCompressionButtonGroup;
|
|
|
|
void UpdateDisplay();
|
2006-12-18 15:39:33 +01:00
|
|
|
|
2008-08-03 00:01:19 +02:00
|
|
|
virtual void showEvent ( QShowEvent* showEvent );
|
|
|
|
virtual void hideEvent ( QHideEvent* hideEvent );
|
|
|
|
|
2009-02-12 15:48:35 +01:00
|
|
|
void UpdateJitterBufferFrame();
|
2009-03-03 19:04:51 +01:00
|
|
|
void UpdateSoundCardFrame();
|
2008-11-01 12:48:17 +01:00
|
|
|
|
2006-12-18 15:39:33 +01:00
|
|
|
public slots:
|
|
|
|
void OnTimerStatus() { UpdateDisplay(); }
|
2008-08-03 00:01:19 +02:00
|
|
|
void OnTimerPing();
|
2006-11-25 15:46:57 +01:00
|
|
|
void OnSliderNetBuf ( int value );
|
2009-03-03 19:04:51 +01:00
|
|
|
void OnSliderSndCrdBufferDelay ( int value );
|
2009-02-22 12:07:18 +01:00
|
|
|
void OnAutoJitBuf ( int value );
|
2008-07-24 18:20:25 +02:00
|
|
|
void OnOpenChatOnNewMessageStateChanged ( int value );
|
2008-08-10 10:14:30 +02:00
|
|
|
void OnAudioCompressionButtonGroupClicked ( QAbstractButton* button );
|
2008-08-02 15:42:24 +02:00
|
|
|
void OnPingTimeResult ( int iPingTime );
|
2008-10-31 00:23:26 +01:00
|
|
|
void OnSoundCrdSelection ( int iSndDevIdx );
|
2009-03-03 14:37:28 +01:00
|
|
|
void OnDriverSetupBut();
|
2006-12-18 15:39:33 +01:00
|
|
|
};
|