first attempt to port to QT4, not working, still a lot to do...

This commit is contained in:
Volker Fischer 2008-01-14 22:14:17 +00:00
parent 3ea7dc0424
commit 6608de0bdc
22 changed files with 115 additions and 135 deletions

View file

@ -149,7 +149,7 @@ CVector<unsigned char> CImaAdpcm::Encode ( const CVector<short>& vecsAudio )
// init diff and step
int diff = vecsAudio[i] - iPrevAudio;
ASSERT ( iStepindEnc < IMA_STEP_SIZE_TAB_LEN );
Q_ASSERT ( iStepindEnc < IMA_STEP_SIZE_TAB_LEN );
int step = ima_step_size[iStepindEnc];
short bytecode = 0;
@ -183,7 +183,7 @@ CVector<unsigned char> CImaAdpcm::Encode ( const CVector<short>& vecsAudio )
}
// adjust step size
ASSERT ( bytecode < IMA_INDX_ADJUST_TAB_LEN );
Q_ASSERT ( bytecode < IMA_INDX_ADJUST_TAB_LEN );
iStepindEnc += ima_indx_adjust[bytecode];
// check that values do not exceed the bounds
@ -249,7 +249,7 @@ CVector<short> CImaAdpcm::Decode ( const CVector<unsigned char>& vecbyAdpcm )
{
const short bytecode = vecsAudio[i] & 0xF ;
ASSERT ( iStepindDec < IMA_STEP_SIZE_TAB_LEN );
Q_ASSERT ( iStepindDec < IMA_STEP_SIZE_TAB_LEN );
short step = ima_step_size[iStepindDec];
int current = vecsAudio[i - 1];
@ -274,7 +274,7 @@ CVector<short> CImaAdpcm::Decode ( const CVector<unsigned char>& vecbyAdpcm )
current += diff;
ASSERT ( bytecode < IMA_INDX_ADJUST_TAB_LEN );
Q_ASSERT ( bytecode < IMA_INDX_ADJUST_TAB_LEN );
iStepindDec += ima_indx_adjust[bytecode];
// check that values do not exceed the bounds

View file

@ -34,13 +34,13 @@ CChannelFader::CChannelFader ( QWidget* pNW,
QString sName )
{
// create new GUI control objects and store pointers to them
pMainGrid = new QGridLayout ( 2, 1 );
pFader = new QSlider ( Qt::Vertical, pNW );
pLabel = new QLabel ( "", pNW );
pMainGrid = new QGridLayout();
pFader = new QSlider ( Qt::Vertical, pNW );
pLabel = new QLabel ( "", pNW );
// setup slider
pFader->setPageStep ( 1 );
pFader->setTickmarks ( QSlider::Both );
pFader->setTickPosition ( QSlider::TicksBothSides );
pFader->setRange ( 0, AUD_MIX_FADER_MAX );
pFader->setTickInterval ( AUD_MIX_FADER_MAX / 9 );
pFader->setValue ( 0 ); // set init value
@ -57,11 +57,11 @@ CChannelFader::CChannelFader ( QWidget* pNW,
pParentLayout->insertLayout ( 0, pMainGrid );
// add help text to controls
QWhatsThis::add ( pFader, "<b>Mixer Fader:</b> Adjusts the audio level of this "
pFader->setWhatsThis ( "<b>Mixer Fader:</b> Adjusts the audio level of this "
"channel. All connected clients at the server will be assigned an audio "
"fader at each client" );
QWhatsThis::add ( pLabel, "<b>Mixer Fader Label:</b> Label (fader tag) identifying "
pLabel->setWhatsThis ( "<b>Mixer Fader Label:</b> Label (fader tag) identifying "
"the connected client. The tag name can be set in the clients main window." );
@ -104,17 +104,17 @@ void CChannelFader::SetText ( const std::string sText )
pLabel->setText ( sModText );
}
CAudioMixerBoard::CAudioMixerBoard ( QWidget* parent,
const char* name,
WFlags f ) :
QFrame ( parent, name, f )
CAudioMixerBoard::CAudioMixerBoard ( QWidget* parent, Qt::WindowFlags f ) : QFrame ( parent, f )
{
// set modified style
setFrameShape ( QFrame::StyledPanel );
setFrameShadow ( QFrame::Sunken );
// add hboxlayout with horizontal spacer
pMainLayout = new QHBoxLayout ( this, 11, 0 );
// TODO is this ok this way? Don't we need the border 11 and space 0?
pMainLayout = new QHBoxLayout ( this );//, 11, 0 );
pMainLayout->addItem ( new QSpacerItem ( 0, 0, QSizePolicy::Expanding ) );
// create all mixer controls and make them invisible
@ -194,7 +194,7 @@ std::string CAudioMixerBoard::GenFaderText ( CChannelShortInfo& ChanInfo )
{
// convert IP address to text and show it
const QHostAddress addrTest ( ChanInfo.iIpAddr );
return addrTest.toString().latin1();
return std::string ( addrTest.toString().toLatin1() );
}
else
{

View file

@ -84,7 +84,7 @@ class CAudioMixerBoard : public QFrame
Q_OBJECT
public:
CAudioMixerBoard ( QWidget* parent = 0, const char* name = 0, WFlags f = 0 );
CAudioMixerBoard ( QWidget* parent = 0, Qt::WindowFlags f = 0 );
void HideAll();
void ApplyNewConClientList ( CVector<CChannelShortInfo>& vecChanInfo );

View file

@ -99,7 +99,7 @@ CVector<CChannelShortInfo> CChannelSet::CreateChannelList()
// append channel ID, IP address and channel name to storing vectors
vecChanInfo.Add ( CChannelShortInfo (
i, // ID
vecChannels[i].GetAddress().InetAddr.ip4Addr(), // IP address
vecChannels[i].GetAddress().InetAddr.toIPv4Address(), // IP address
vecChannels[i].GetName() /* name */ ) );
}
}
@ -549,7 +549,7 @@ void CChannel::OnJittBufSizeChange ( int iNewJitBufSize )
void CChannel::OnChangeChanGain ( int iChanID, double dNewGain )
{
ASSERT ( ( iChanID >= 0 ) && ( iChanID < MAX_NUM_CHANNELS ) );
Q_ASSERT ( ( iChanID >= 0 ) && ( iChanID < MAX_NUM_CHANNELS ) );
// set value
vecdGains[iChanID] = dNewGain;
@ -685,8 +685,8 @@ for ( int i = 0; i < iCurNetwInBlSiFact * MIN_BLOCK_SIZE_SAMPLES; i++ ) {
{
// log new connection
CHostAddress address ( GetAddress() );
qDebug ( CLogTimeDate::toString() + "Connected with IP %s",
address.InetAddr.toString().latin1() );
qDebug() << CLogTimeDate::toString() << "Connected with IP " <<
address.InetAddr.toString().toLatin1();
emit NewConnection();
}

View file

@ -97,7 +97,7 @@ bool CClient::SetServerAddr ( QString strNAddr )
// it was no vaild IP address, try to get host by name, assuming
// that the string contains a valid host name string
const hostent* HostInf = gethostbyname ( strNAddr.latin1() );
const hostent* HostInf = gethostbyname ( strNAddr.toLatin1() );
if ( HostInf )
{

View file

@ -53,7 +53,7 @@
/* Classes ********************************************************************/
class CClient : public QObject, public QThread
class CClient : public QThread
{
Q_OBJECT

View file

@ -27,8 +27,7 @@
/* Implementation *************************************************************/
CClientSettingsDlg::CClientSettingsDlg ( CClient* pNCliP, QWidget* parent,
const char* name, bool modal, WFlags f) : pClient ( pNCliP ),
CClientSettingsDlgBase ( parent, name, modal, f )
Qt::WindowFlags f ) : pClient ( pNCliP ), QDialog ( parent, f )
{
/* Init timing jitter text label */
TextLabelStdDevTimer->setText ( "" );

View file

@ -49,20 +49,20 @@
/* Classes ********************************************************************/
class CClientSettingsDlg : public CClientSettingsDlgBase
class CClientSettingsDlg : public QDialog, private Ui_CClientSettingsDlgBase
{
Q_OBJECT
public:
CClientSettingsDlg ( CClient* pNCliP, QWidget* parent = 0,
const char* name = 0, bool modal = FALSE, WFlags f = 0 );
Qt::WindowFlags f = 0 );
void SetStatus ( const int iMessType, const int iStatus );
protected:
CClient* pClient;
QTimer TimerStatus;
void UpdateDisplay();
CClient* pClient;
QTimer TimerStatus;
void UpdateDisplay();
public slots:
void OnTimerStatus() { UpdateDisplay(); }

View file

@ -30,6 +30,7 @@
#include <string>
#include <qstring.h>
#include <qevent.h>
#include <qdebug.h>
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
@ -147,11 +148,11 @@ public:
QString strError;
};
class CLlconEvent : public QCustomEvent
class CLlconEvent : public QEvent
{
public:
CLlconEvent ( int iNewMeTy, int iNewSt, int iNewChN = 0 ) :
QCustomEvent ( QEvent::User + 11 ), iMessType ( iNewMeTy ), iStatus ( iNewSt ),
QEvent ( QEvent::Type ( QEvent::User + 11 ) ), iMessType ( iNewMeTy ), iStatus ( iNewSt ),
iChanNum ( iNewChN ) {}
int iMessType;
@ -162,9 +163,9 @@ public:
/* Prototypes for global functions ********************************************/
// command line parsing, TODO do not declare functions globally but in a class
std::string UsageArguments ( char **argv );
bool GetFlagArgument ( int, char **argv, int &i, std::string strShortOpt, std::string strLongOpt );
bool GetStringArgument ( int argc, char **argv, int &i, std::string strShortOpt, std::string strLongOpt, std::string & strArg );
std::string UsageArguments ( char **argv );
bool GetFlagArgument ( int, char **argv, int &i, std::string strShortOpt, std::string strLongOpt );
bool GetStringArgument ( int argc, char **argv, int &i, std::string strShortOpt, std::string strLongOpt, std::string & strArg );
bool GetNumericArgument ( int argc, char **argv, int &i, std::string strShortOpt, std::string strLongOpt, double rRangeStart, double rRangeStop, double & rValue);
// posting a window message

View file

@ -26,62 +26,61 @@
/* Implementation *************************************************************/
CLlconClientDlg::CLlconClientDlg ( CClient* pNCliP, QWidget* parent,
const char* name, bool modal, WFlags f ) : pClient ( pNCliP ),
CLlconClientDlgBase ( parent, name, modal, f ),
ClientSettingsDlg ( pNCliP, 0, 0, FALSE, Qt::WStyle_MinMax )
CLlconClientDlg::CLlconClientDlg ( CClient* pNCliP, QWidget* parent )
: pClient ( pNCliP ), QDialog ( parent ),
ClientSettingsDlg ( pNCliP, 0, Qt::WindowMinMaxButtonsHint )
{
/* add help text to controls */
QString strInpLevH = tr ( "<b>Input level meter:</b> Shows the level of the "
"input audio signal of the sound card. The level is in dB. Overload "
"should be avoided." );
QWhatsThis::add ( TextLabelInputLevel, strInpLevH );
QWhatsThis::add ( ProgressBarInputLevelL, strInpLevH );
QWhatsThis::add ( ProgressBarInputLevelR, strInpLevH );
TextLabelInputLevel->setWhatsThis ( strInpLevH );
ProgressBarInputLevelL->setWhatsThis ( strInpLevH );
ProgressBarInputLevelR->setWhatsThis ( strInpLevH );
QWhatsThis::add(PushButtonConnect, tr ( "<b>Connect / Disconnect Button:"
PushButtonConnect->setWhatsThis ( tr ( "<b>Connect / Disconnect Button:"
"</b> Push this button to connect the server. A valid IP address has "
"to be specified before. If the client is connected, pressing this "
"button will disconnect the connection." ) );
QWhatsThis::add(TextLabelStatus, tr ( "<b>Status Bar:</b> In the status bar "
TextLabelStatus->setWhatsThis ( tr ( "<b>Status Bar:</b> In the status bar "
"different messages are displayed. E.g., if an error occurred or the "
"status of the connection is shown." ) );
QString strServAddrH = tr ( "<b>Server Address:</b> In this edit control, "
"the IP address of the server can be set. If an invalid address was "
"chosen, an error message is shown in the status bar." );
QWhatsThis::add ( TextLabelServerAddr, strServAddrH );
QWhatsThis::add ( LineEditServerAddr, strServAddrH );
TextLabelServerAddr->setWhatsThis ( strServAddrH );
LineEditServerAddr->setWhatsThis ( strServAddrH );
QString strFaderTag = tr ( "<b>Fader Tag:</b> In this edit control, "
"the tag string of your fader can be set. This tag will appear "
"at your fader on the mixer board when connected to the server.");
QWhatsThis::add ( TextLabelServerTag, strFaderTag );
QWhatsThis::add ( LineEditFaderTag, strFaderTag );
TextLabelServerTag->setWhatsThis ( strFaderTag );
LineEditFaderTag->setWhatsThis ( strFaderTag );
QString strAudFader = tr ( "<b>Audio Fader:</b> With the audio fader "
"control the level of left and right audio input channels can "
"be controlled." );
QWhatsThis::add ( TextAudInFader, strAudFader );
QWhatsThis::add ( SliderAudInFader, strAudFader );
TextAudInFader->setWhatsThis ( strAudFader );
SliderAudInFader->setWhatsThis ( strAudFader );
QString strAudReverb = tr ( "<b>Reverberation Level:</b> The level of "
"reverberation effect can be set with this control. The channel to "
"which that reverberation effect shall be applied can be chosen "
"with the Reverberation Channel Selection radio buttons." );
QWhatsThis::add ( TextLabelAudReverb, strAudReverb );
QWhatsThis::add ( SliderAudReverb, strAudReverb );
TextLabelAudReverb->setWhatsThis ( strAudReverb );
SliderAudReverb->setWhatsThis ( strAudReverb );
QString strRevChanSel = tr ( "<b>Reverberation Channel Selection:</b> "
"With these radio buttons the audio input channel on which the "
"reverberation effect is applied can be chosen. Either the left "
"or right input channel can be selected." );
QWhatsThis::add ( TextLabelReverbSelection, strRevChanSel );
QWhatsThis::add ( RadioButtonRevSelL, strRevChanSel );
QWhatsThis::add ( RadioButtonRevSelR, strRevChanSel );
TextLabelReverbSelection->setWhatsThis ( strRevChanSel );
RadioButtonRevSelL->setWhatsThis ( strRevChanSel );
RadioButtonRevSelR->setWhatsThis ( strRevChanSel );
QWhatsThis::add ( LEDOverallStatus, tr ( "<b>Overall Status:</b> "
LEDOverallStatus->setWhatsThis ( tr ( "<b>Overall Status:</b> "
"The overall status of the software is shown. If either the "
"network or sound interface has bad status, this LED will show "
"red color." ) );
@ -210,10 +209,10 @@ CLlconClientDlg::~CLlconClientDlg()
void CLlconClientDlg::closeEvent ( QCloseEvent * Event )
{
// store IP address
pClient->strIPAddress = LineEditServerAddr->text().latin1();
pClient->strIPAddress = LineEditServerAddr->text().toLatin1();
// store fader tag
pClient->strName = LineEditFaderTag->text().latin1();
pClient->strName = LineEditFaderTag->text().toLatin1();
// default implementation of this event handler routine
Event->accept();
@ -279,7 +278,7 @@ void CLlconClientDlg::OnOpenGeneralSettings()
void CLlconClientDlg::OnFaderTagTextChanged ( const QString& strNewName )
{
// refresh internal name parameter
pClient->strName = strNewName.latin1();
pClient->strName = strNewName.toLatin1();
// update name at server
pClient->SetRemoteName();

View file

@ -63,14 +63,12 @@
/* Classes ********************************************************************/
class CLlconClientDlg : public CLlconClientDlgBase
class CLlconClientDlg : public QDialog, private Ui_CLlconClientDlgBase
{
Q_OBJECT
public:
CLlconClientDlg ( CClient* pNCliP, QWidget* parent = 0,
const char* name = 0, bool modal = FALSE, WFlags f = 0 );
CLlconClientDlg ( CClient* pNCliP, QWidget* parent = 0 );
virtual ~CLlconClientDlg();
protected:

View file

@ -26,9 +26,8 @@
/* Implementation *************************************************************/
CLlconServerDlg::CLlconServerDlg ( CServer* pNServP, QWidget* parent,
const char* name, bool modal, WFlags f ) : pServer ( pNServP ),
CLlconServerDlgBase ( parent, name, modal, f )
CLlconServerDlg::CLlconServerDlg ( CServer* pNServP, QWidget* parent )
: pServer ( pNServP ), QDialog ( parent )
{
/* set text for version and application name */
TextLabelNameVersion->setText ( QString ( APP_NAME ) +
@ -116,11 +115,11 @@ void CLlconServerDlg::OnTimer()
/* fill list with connected clients */
for ( int i = 0; i < MAX_NUM_CHANNELS; i++ )
{
if ( ! ( vecHostAddresses[i].InetAddr == QHostAddress ( (Q_UINT32) 0 ) ) )
if ( !( vecHostAddresses[i].InetAddr == QHostAddress ( (quint32) 0 ) ) )
{
// IP, port number
vecpListViewItems[i]->setText ( 0, QString().sprintf ( "%s : %d",
vecHostAddresses[i].InetAddr.toString().latin1(),
vecHostAddresses[i].InetAddr.toString().toLatin1(),
vecHostAddresses[i].iPort ) /* IP, port */);
// name

View file

@ -46,14 +46,12 @@
/* Classes ********************************************************************/
class CLlconServerDlg : public CLlconServerDlgBase
class CLlconServerDlg : public QDialog, private Ui_CLlconServerDlgBase
{
Q_OBJECT
public:
CLlconServerDlg ( CServer* pNServP, QWidget* parent = 0,
const char* name = 0, bool modal = FALSE, WFlags f = 0 );
CLlconServerDlg ( CServer* pNServP, QWidget* parent = 0 );
virtual ~CLlconServerDlg() {}
protected:

View file

@ -176,8 +176,7 @@ void CMultiColorLEDbase::SetUpdateTime ( int iNUTi )
}
CMultiColorLED::CMultiColorLED ( QWidget* parent, const char* name, WFlags f ) :
QLabel ( parent, name, f )
CMultiColorLED::CMultiColorLED ( QWidget* parent, Qt::WindowFlags f ) : QLabel ( parent, f )
{
// set modified style
setFrameShape ( QFrame::Panel );

View file

@ -36,7 +36,8 @@
#include <qlabel.h>
#include <qpixmap.h>
#include <qtimer.h>
#include <qlistview.h>
#include <qtreewidget.h>
#include <qicon.h>
#include "global.h"
@ -48,7 +49,7 @@
/* Classes ********************************************************************/
class CMultiColorLEDbase : public QObject
class CMultiColorLEDbase : public QLabel
{
Q_OBJECT
@ -88,10 +89,10 @@ protected slots:
};
class CMultiColorLED : public QLabel, public CMultiColorLEDbase
class CMultiColorLED : public CMultiColorLEDbase
{
public:
CMultiColorLED ( QWidget* parent, const char* name = 0, WFlags f = 0 );
CMultiColorLED ( QWidget* parent = 0, Qt::WindowFlags f = 0 );
protected:
virtual void SetPixmap ( QPixmap& NewBitmap ) { setPixmap ( NewBitmap ); }
@ -104,7 +105,7 @@ public:
CMultColLEDListViewItem ( const int iNewCol ) : iColumn ( iNewCol ),
pListViewItem ( NULL ) {}
void SetListViewItemPointer ( QListViewItem* pNewListViewItem )
void SetListViewItemPointer ( QTreeWidgetItem* pNewListViewItem )
{
pListViewItem = pNewListViewItem;
}
@ -114,20 +115,20 @@ protected:
{
if ( pListViewItem != NULL )
{
pListViewItem->setPixmap ( iColumn, NewBitmap );
pListViewItem->setIcon ( iColumn, QIcon ( NewBitmap ) );
}
}
QListViewItem* pListViewItem;
int iColumn;
QTreeWidgetItem* pListViewItem;
int iColumn;
};
class CServerListViewItem : public QListViewItem
class CServerListViewItem : public QTreeWidgetItem
{
public:
CServerListViewItem ( QListView* parent ) : LED0 ( 2 ), LED1 ( 3 ),
QListViewItem ( parent )
CServerListViewItem ( QTreeWidget* parent ) : LED0 ( 2 ), LED1 ( 3 ),
QTreeWidgetItem ( parent )
{
LED0.SetListViewItemPointer ( this );
LED1.SetListViewItemPointer ( this );

View file

@ -702,8 +702,8 @@ uint32_t CProtocol::GetValFromStream ( const CVector<uint8_t>& vecIn,
note: iPos is automatically incremented in this function
*/
// 4 bytes maximum since we return uint32
ASSERT ( ( iNumOfBytes > 0 ) && ( iNumOfBytes <= 4 ) );
ASSERT ( vecIn.Size() >= iPos + iNumOfBytes );
Q_ASSERT ( ( iNumOfBytes > 0 ) && ( iNumOfBytes <= 4 ) );
Q_ASSERT ( vecIn.Size() >= iPos + iNumOfBytes );
uint32_t iRet = 0;
for ( int i = 0; i < iNumOfBytes; i++ )
@ -781,8 +781,8 @@ void CProtocol::PutValOnStream ( CVector<uint8_t>& vecIn,
note: iPos is automatically incremented in this function
*/
// 4 bytes maximum since we use uint32
ASSERT ( ( iNumOfBytes > 0 ) && ( iNumOfBytes <= 4 ) );
ASSERT ( vecIn.Size() >= iPos + iNumOfBytes );
Q_ASSERT ( ( iNumOfBytes > 0 ) && ( iNumOfBytes <= 4 ) );
Q_ASSERT ( vecIn.Size() >= iPos + iNumOfBytes );
for ( int i = 0; i < iNumOfBytes; i++ )
{

View file

@ -26,7 +26,7 @@
#define PROTOCOL_H__3B123453_4344_BB2392354455IUHF1912__INCLUDED_
#include <qglobal.h>
#include <qthread.h>
#include <qmutex.h>
#include <qtimer.h>
#include <list>
#include "global.h"

View file

@ -33,7 +33,7 @@ void CSocket::Init()
// initialize the listening socket
bool bSuccess = SocketDevice.bind (
QHostAddress ( (Q_UINT32) 0 ), // INADDR_ANY
QHostAddress ( (quint32) 0 ), // INADDR_ANY
LLCON_PORT_NUMBER );
if ( bIsClient )
@ -44,7 +44,7 @@ void CSocket::Init()
// if server and client is on same machine, decrease port number by
// one by definition
bSuccess = SocketDevice.bind (
QHostAddress( (Q_UINT32) 0 ), // INADDR_ANY
QHostAddress( (quint32) 0 ), // INADDR_ANY
LLCON_PORT_NUMBER - 1 );
}
}

View file

@ -28,8 +28,7 @@
#include <vector>
#include <qobject.h>
#include <qmessagebox.h>
#include <qsocket.h>
#include <qsocketdevice.h>
#include <qudpsocket.h>
#include <qsocketnotifier.h>
#include "global.h"
#include "channel.h"
@ -47,13 +46,11 @@ class CSocket : public QObject
Q_OBJECT
public:
CSocket(CChannel* pNewChannel) : pChannel(pNewChannel),
SocketDevice(QSocketDevice::Datagram /* UDP */), bIsClient(true)
{Init();}
CSocket(CChannel* pNewChannel) : pChannel(pNewChannel), bIsClient(true)
{ Init(); }
CSocket(CChannelSet* pNewChannelSet, QObject* pNServP) :
pChannelSet(pNewChannelSet), pServer ( pNServP ),
SocketDevice(QSocketDevice::Datagram /* UDP */), bIsClient(false)
{Init();}
pChannelSet(pNewChannelSet), pServer ( pNServP ), bIsClient(false)
{ Init(); }
virtual ~CSocket() {}
void SendPacket ( const CVector<unsigned char>& vecbySendBuf,
@ -62,7 +59,7 @@ public:
protected:
void Init();
QSocketDevice SocketDevice;
QUdpSocket SocketDevice;
CVector<unsigned char> vecbyRecBuf;
CHostAddress RecHostAddr;

View file

@ -269,9 +269,10 @@ double CAudioReverb::ProcessSample ( const double input )
* GUI utilities *
\******************************************************************************/
/* About dialog ------------------------------------------------------------- */
CAboutDlg::CAboutDlg ( QWidget* parent, const char* name, bool modal, WFlags f )
: CAboutDlgBase ( parent, name, modal, f )
CAboutDlg::CAboutDlg ( QWidget* parent ) : QDialog ( parent )
{
setupUi ( this );
// set the text for the about dialog html text control
TextViewCredits->setText (
"<p>" // general description of llcon software

View file

@ -26,9 +26,9 @@
#define UTIL_HOIH934256GEKJH98_3_43445KJIUHF1912__INCLUDED_
#include <qhostaddress.h>
#include <qpopupmenu.h>
#include <qmenu.h>
#include <qwhatsthis.h>
#include <qtextview.h>
#include <qtextbrowser.h>
#include <qlabel.h>
#include <qdatetime.h>
#include <vector>
@ -314,20 +314,19 @@ template<class TData> void CMovingAv<TData>::Add ( const TData tNewD )
* GUI utilities *
\******************************************************************************/
/* About dialog ------------------------------------------------------------- */
class CAboutDlg : public CAboutDlgBase
class CAboutDlg : public QDialog, private Ui_CAboutDlgBase
{
Q_OBJECT
public:
CAboutDlg ( QWidget* parent = 0, const char* name = 0, bool modal = FALSE,
WFlags f = 0 );
CAboutDlg ( QWidget* parent = 0 );
static QString GetVersionAndNameStr ( const bool bWithHtml = true );
};
/* Help menu ---------------------------------------------------------------- */
class CLlconHelpMenu : public QPopupMenu
class CLlconHelpMenu : public QMenu
{
Q_OBJECT
@ -362,8 +361,8 @@ protected:
class CHostAddress
{
public:
CHostAddress() : InetAddr ( (Q_UINT32) 0 ), iPort ( 0 ) {}
CHostAddress ( const QHostAddress NInetAddr, const Q_UINT16 iNPort ) :
CHostAddress() : InetAddr ( (quint32) 0 ), iPort ( 0 ) {}
CHostAddress ( const QHostAddress NInetAddr, const quint16 iNPort ) :
InetAddr ( NInetAddr ), iPort ( iNPort ) {}
CHostAddress ( const CHostAddress& NHAddr ) :
InetAddr ( NHAddr.InetAddr ), iPort ( NHAddr.iPort ) {}
@ -375,7 +374,7 @@ public:
{ return ( ( CompAddr.InetAddr == InetAddr ) && ( CompAddr.iPort == iPort ) ); }
QHostAddress InetAddr;
Q_UINT16 iPort;
quint16 iPort;
};
class CChannelShortInfo
@ -513,7 +512,7 @@ public:
{
if ( bDoLogging )
{
fprintf ( pFile, "%s\n", sNewStr.latin1() );
fprintf ( pFile, "%s\n", sNewStr.toLatin1() );
fflush ( pFile );
}
}

View file

@ -25,33 +25,22 @@ rem *
rem\******************************************************************************/
rem .h --------------
rem .h --------------
%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\audiomixerboard.h -o moc\moc_audiomixerboard.cpp
%qtdir%\bin\moc.exe ..\src\llconclientdlg.h -o moc\moc_llconclientdlg.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\clientsettingsdlg.h -o moc\moc_clientsettingsdlg.cpp
%qtdir%\bin\moc.exe ..\src\llconserverdlg.h -o moc\moc_llconserverdlg.cpp
%qtdir%\bin\moc.exe ..\src\server.h -o moc\moc_server.cpp
%qtdir%\bin\moc.exe ..\src\server.h -o moc\moc_server.cpp
%qtdir%\bin\moc.exe ..\src\client.h -o moc\moc_client.cpp
%qtdir%\bin\moc.exe ..\src\socket.h -o moc\moc_socket.cpp
%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\protocol.h -o moc\moc_protocol.cpp
%qtdir%\bin\moc.exe ..\src\channel.h -o moc\moc_channel.cpp
rem .ui -------------
%qtdir%\bin\uic.exe ..\src\aboutdlgbase.ui -o moc\aboutdlgbase.h
%qtdir%\bin\uic.exe ..\src\aboutdlgbase.ui -i aboutdlgbase.h -o moc\aboutdlgbase.cpp
%qtdir%\bin\moc.exe moc\aboutdlgbase.h -o moc\moc_aboutdlgbase.cpp
%qtdir%\bin\uic.exe ..\src\llconclientdlgbase.ui -o moc\llconclientdlgbase.h
%qtdir%\bin\uic.exe ..\src\llconclientdlgbase.ui -i llconclientdlgbase.h -o moc\llconclientdlgbase.cpp
%qtdir%\bin\moc.exe moc\llconclientdlgbase.h -o moc\moc_llconclientdlgbase.cpp
%qtdir%\bin\uic.exe ..\src\clientsettingsdlgbase.ui -o moc\clientsettingsdlgbase.h
%qtdir%\bin\uic.exe ..\src\clientsettingsdlgbase.ui -i clientsettingsdlgbase.h -o moc\clientsettingsdlgbase.cpp
%qtdir%\bin\moc.exe moc\clientsettingsdlgbase.h -o moc\moc_clientsettingsdlgbase.cpp
%qtdir%\bin\uic.exe ..\src\llconserverdlgbase.ui -o moc\llconserverdlgbase.h
%qtdir%\bin\uic.exe ..\src\llconserverdlgbase.ui -i llconserverdlgbase.h -o moc\llconserverdlgbase.cpp
%qtdir%\bin\moc.exe moc\llconserverdlgbase.h -o moc\moc_llconserverdlgbase.cpp
rem .ui -------------
%qtdir%\bin\uic.exe ..\src\aboutdlgbase_qt4.ui -o moc\aboutdlgbase.h
%qtdir%\bin\uic.exe ..\src\llconclientdlgbase_qt4.ui -o moc\llconclientdlgbase.h
%qtdir%\bin\uic.exe ..\src\clientsettingsdlgbase_qt4.ui -o moc\clientsettingsdlgbase.h
%qtdir%\bin\uic.exe ..\src\llconserverdlgbase_qt4.ui -o moc\llconserverdlgbase.h