Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:redwil:15.4
ihu
0002-qt4-port.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0002-qt4-port.patch of Package ihu
Only in a: acinclude.m4 diff -aur a/AUTHORS b/AUTHORS --- a/AUTHORS +++ b/AUTHORS @@ -4,3 +4,4 @@ Many thanks to: Alex Masoch - The official 16552 km far-away IHU beta-tester +Alexei Sorokin - The Qt4 port diff -aur a/configure.ac b/configure.ac --- a/configure.ac +++ b/configure.ac @@ -22,13 +22,11 @@ AC_PROG_CXX AC_PROG_INSTALL -BNV_HAVE_QT - -if test "$have_qt" = "no"; -then - AC_MSG_ERROR([QT LIBRARIES NOT FOUND. They might be in a non-standard path (then use --with-Qt-dir option), or they need to be installed.]) -fi - +PKG_CHECK_MODULES(QT, [QtCore QtGui QtNetwork QtXml Qt3Support], [ + AC_PATH_PROGS(QT_MOC, [moc-qt4 moc], moc,`eval $PKG_CONFIG --variable=exec_prefix QtCore`/bin) + ], [ + AC_MSG_ERROR([QT 4.x LIBRARIES NOT FOUND.]) +]) AC_CHECK_HEADER([gmpxx.h],, [AC_MSG_ERROR([GNU MP not found, download at http://swox.com/gmp])]) AC_CHECK_LIB(asound, snd_pcm_writei,, [AC_MSG_ERROR(ALSA needed! Download at http://www.alsa-prject.org)]) diff -aur a/Makefile.am b/Makefile.am --- a/Makefile.am +++ b/Makefile.am @@ -48,7 +48,7 @@ SUBDIRS = doc icon -ihu_CXXFLAGS = @QT_CXXFLAGS@ -Wall +ihu_CXXFLAGS = @QT_CFLAGS@ -Wall ihu_LDADD = @QT_LIBS@ @OGG_LIBS@ -lSoundTouch -lgmp -lgmpxx -lX11 moc_%.cpp: %.hpp diff -aur a/src/Call.hpp b/src/Call.hpp --- a/src/Call.hpp +++ b/src/Call.hpp @@ -27,11 +27,9 @@ #include "config.h" #endif +#include <Qt3Support> #include <stdio.h> #include <stdlib.h> -#include <qobject.h> -#include <qstring.h> -#include <qtimer.h> #include <speex/speex.h> diff -aur a/src/CallTab.cpp b/src/CallTab.cpp --- a/src/CallTab.cpp +++ b/src/CallTab.cpp @@ -23,38 +23,28 @@ #include "CallTab.hpp" #include "Config.h" -#include <qvariant.h> -#include <qlayout.h> -#include <qpushbutton.h> -#include <qtoolbutton.h> -#include <qlabel.h> -#include <qcombobox.h> -#include <qstring.h> -#include <qtooltip.h> -#include <qlistbox.h> -#include <qlineedit.h> -#include <qstatusbar.h> -#include <qstring.h> +#include <QtGui> +#include <Qt3Support> #define STAT_TIME 1000 -CallTab::CallTab( int id, QString hosts[], int maxhost, QWidget* parent, const char* name, WFlags fl ) +CallTab::CallTab( int id, QString hosts[], int maxhost, QWidget* parent, const char* name, Qt::WFlags fl ) : QWidget( parent, name, fl ) { setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)1, 0, 0, sizePolicy().hasHeightForWidth() ) ); callName = QString(name); - QBoxLayout *mainLayout = new QVBoxLayout( this, 0, 10); + Q3BoxLayout *mainLayout = new Q3VBoxLayout( this, 0, 10); - mainFrame = new QFrame( this, "ledFrame" ); + mainFrame = new Q3Frame( this, "ledFrame" ); mainLayout->addWidget(mainFrame); - QBoxLayout *mLayout = new QVBoxLayout( mainFrame, 0, 10); + Q3BoxLayout *mLayout = new Q3VBoxLayout( mainFrame, 0, 10); mLayout->addSpacing(10); - QBoxLayout *mhLayout = new QHBoxLayout(mLayout); + Q3BoxLayout *mhLayout = new Q3HBoxLayout(mLayout); hostname = new QLabel( mainFrame, "hostname" ); QFont hostname_font( hostname->font() ); @@ -68,13 +58,13 @@ mLayout->addStretch(); - QBoxLayout *mhLayout0 = new QHBoxLayout(mLayout); + Q3BoxLayout *mhLayout0 = new Q3HBoxLayout(mLayout); - hostEdit = new QComboBox( TRUE, mainFrame, "hostEdit" ); + hostEdit = new Q3ComboBox( TRUE, mainFrame, "hostEdit" ); hostEdit->setMinimumSize( QSize(100, 30) ); hostEdit->setAutoCompletion(TRUE); hostEdit->setDuplicatesEnabled(FALSE); - hostEdit->setInsertionPolicy(QComboBox::NoInsertion); + hostEdit->setInsertionPolicy(Q3ComboBox::NoInsert); hostEdit->clear(); mhLayout0->addSpacing(5); @@ -83,48 +73,48 @@ mLayout->addStretch(); - QBoxLayout *mhLayout1 = new QHBoxLayout(mLayout, 25); + Q3BoxLayout *mhLayout1 = new Q3HBoxLayout(mLayout, 25); mhLayout1->addSpacing(5); callButton = new QPushButton( mainFrame, "callButton" ); callButton->setMinimumSize( QSize(130, 35) ); - callButton->setIconSet( QIconSet( QPixmap::fromMimeSource( "call.png" ) ) ); + callButton->setIconSet( QIcon( qPixmapFromMimeSource( "call.png" ) ) ); mhLayout1->addWidget(callButton, 2); ringButton = new QToolButton( mainFrame, "ringButton" ); ringButton->setFixedSize( QSize(40, 35) ); ringButton->setToggleButton(TRUE); - ringButton->setIconSet( QIconSet( QPixmap::fromMimeSource( "bell.png" ) ) ); + ringButton->setIconSet( QIcon( qPixmapFromMimeSource( "bell.png" ) ) ); ringButton->setEnabled(FALSE); mhLayout1->addWidget(ringButton, 1); stopButton = new QPushButton( mainFrame, "stopButton" ); stopButton->setMinimumSize( QSize(130, 35) ); stopButton->setEnabled( FALSE ); - stopButton->setIconSet( QIconSet( QPixmap::fromMimeSource( "hangup.png" ) ) ); + stopButton->setIconSet( QIcon( qPixmapFromMimeSource( "hangup.png" ) ) ); mhLayout1->addWidget(stopButton, 2); mhLayout1->addSpacing(5); mLayout->addStretch(); - QBoxLayout *mhLayout2 = new QHBoxLayout(mLayout); + Q3BoxLayout *mhLayout2 = new Q3HBoxLayout(mLayout); mhLayout2->addSpacing(30); muteMicButton = new QToolButton( mainFrame, "muteMicButton" ); muteMicButton->setMinimumSize( QSize(30, 30) ); muteMicButton->setToggleButton(TRUE); - muteMicButton->setIconSet( QIconSet( QPixmap::fromMimeSource( "mic.png" ) ) ); + muteMicButton->setIconSet( QIcon( qPixmapFromMimeSource( "mic.png" ) ) ); mhLayout2->addWidget(muteMicButton); mhLayout2->addStretch(); - ledFrame = new QFrame( mainFrame, "ledFrame" ); - ledFrame->setFrameStyle( QFrame::Panel | QFrame::Sunken ); + ledFrame = new Q3Frame( mainFrame, "ledFrame" ); + ledFrame->setFrameStyle( Q3Frame::Panel | Q3Frame::Sunken ); - QBoxLayout *ledLayout = new QHBoxLayout(ledFrame, 3, 10); + Q3BoxLayout *ledLayout = new Q3HBoxLayout(ledFrame, 3, 10); ledLayout->addSpacing(10); @@ -133,7 +123,7 @@ ledLayout->addWidget(tx); txPixmap = new QLabel( ledFrame, "txPixmap" ); - txPixmap->setPixmap( QPixmap::fromMimeSource( "red.png" ) ); + txPixmap->setPixmap( qPixmapFromMimeSource( "red.png" ) ); txPixmap->setEnabled(FALSE); ledLayout->addWidget(txPixmap); @@ -141,7 +131,7 @@ ledLayout->addStretch(); lockPixmap = new QLabel( ledFrame, "lockPixmap" ); - lockPixmap->setPixmap( QPixmap::fromMimeSource( "lock.png" ) ); + lockPixmap->setPixmap( qPixmapFromMimeSource( "lock.png" ) ); lockPixmap->setEnabled( FALSE ); ledLayout->addWidget(lockPixmap); @@ -149,7 +139,7 @@ ledLayout->addSpacing(5); rxPixmap = new QLabel( ledFrame, "rxPixmap" ); - rxPixmap->setPixmap( QPixmap::fromMimeSource( "green.png" ) ); + rxPixmap->setPixmap( qPixmapFromMimeSource( "green.png" ) ); rxPixmap->setEnabled(FALSE); ledLayout->addWidget(rxPixmap); @@ -166,7 +156,7 @@ muteSpkButton = new QToolButton( mainFrame, "muteSpkButton" ); muteSpkButton->setMinimumSize( QSize(30, 30) ); muteSpkButton->setToggleButton(TRUE); - muteSpkButton->setIconSet( QIconSet( QPixmap::fromMimeSource( "speaker.png" ) ) ); + muteSpkButton->setIconSet( QIcon( qPixmapFromMimeSource( "speaker.png" ) ) ); mhLayout2->addWidget(muteSpkButton); mhLayout2->addSpacing(30); @@ -175,7 +165,7 @@ statusbar->setSizeGripEnabled(FALSE); QWidget *trafficWidget = new QWidget( this, "trafficWidget"); - QBoxLayout *tLayout = new QHBoxLayout(trafficWidget); + Q3BoxLayout *tLayout = new Q3HBoxLayout(trafficWidget); trafficLabel = new QLabel( trafficWidget, "trafficLabel" ); trafficLabel->setEnabled(FALSE); tLayout->addWidget(trafficLabel); @@ -370,12 +360,12 @@ if (on) { message("Audio input disabled."); - muteMicButton->setIconSet( QIconSet( QPixmap::fromMimeSource( "mic_mute.png" ) ) ); + muteMicButton->setIconSet( QIcon( qPixmapFromMimeSource( "mic_mute.png" ) ) ); } else { message("Audio input enabled."); - muteMicButton->setIconSet( QIconSet( QPixmap::fromMimeSource( "mic.png" ) ) ); + muteMicButton->setIconSet( QIcon( qPixmapFromMimeSource( "mic.png" ) ) ); } emit muteMicSignal(callId, on); } @@ -386,12 +376,12 @@ if (on) { message("Audio output disabled."); - muteSpkButton->setIconSet( QIconSet( QPixmap::fromMimeSource( "speaker_mute.png" ) ) ); + muteSpkButton->setIconSet( QIcon( qPixmapFromMimeSource( "speaker_mute.png" ) ) ); } else { message("Audio output enabled."); - muteSpkButton->setIconSet( QIconSet( QPixmap::fromMimeSource( "speaker.png" ) ) ); + muteSpkButton->setIconSet( QIcon( qPixmapFromMimeSource( "speaker.png" ) ) ); } emit muteSpkSignal(callId, on); } diff -aur a/src/CallTab.hpp b/src/CallTab.hpp --- a/src/CallTab.hpp +++ b/src/CallTab.hpp @@ -23,33 +23,25 @@ #ifndef CALLTAB_H #define CALLTAB_H -#include <qobject.h> -#include <qvariant.h> -#include <qwidget.h> - -class QFrame; -class QLabel; -class QComboBox; -class QPushButton; -class QToolButton; -class QStatusBar; +#include <QtGui> +#include <Qt3Support> class CallTab : public QWidget { Q_OBJECT public: - CallTab( int, QString[], int, QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); + CallTab( int, QString[], int, QWidget* parent = 0, const char* name = 0, Qt::WFlags fl = 0 ); ~CallTab(); QStatusBar* statusbar; - QFrame* mainFrame; - QFrame* ledFrame; + Q3Frame* mainFrame; + Q3Frame* ledFrame; QLabel* hostname; QLabel* tx; QLabel* rx; - QComboBox* hostEdit; + Q3ComboBox* hostEdit; QPushButton* callButton; QPushButton* stopButton; QToolButton* ringButton; diff -aur a/src/Config.cpp b/src/Config.cpp --- a/src/Config.cpp +++ b/src/Config.cpp @@ -23,12 +23,10 @@ #include "Error.h" #include "Config.h" -#include <stdlib.h> +#include <QtXml> +#include <Qt3Support> -#include <qdom.h> -#include <qfile.h> -#include <qstring.h> -#include <qtextstream.h> +#include <stdlib.h> Config::Config(const char *fname) { @@ -63,7 +61,7 @@ bool ret = false; QDomDocument doc( "IhuConfigXML" ); QFile confFile( fileName ); - if( confFile.open( IO_ReadOnly ) ) + if( confFile.open( QIODevice::ReadOnly ) ) { if( doc.setContent( &confFile ) ) { @@ -258,9 +256,9 @@ root.appendChild(host); QFile confFile( fname ); - if( confFile.open( IO_WriteOnly ) ) + if( confFile.open( QIODevice::WriteOnly ) ) { - QTextStream ts( &confFile ); + Q3TextStream ts( &confFile ); ts << doc.toString(); confFile.close(); } diff -aur a/src/Config.h b/src/Config.h --- a/src/Config.h +++ b/src/Config.h @@ -27,7 +27,8 @@ #include "config.h" #endif -#include <qstring.h> +#include <QtGui> +#include <Qt3Support> #define IHU_DEFAULT_CONFIG_FILE ".ihu.xml" diff -aur a/src/Error.h b/src/Error.h --- a/src/Error.h +++ b/src/Error.h @@ -27,7 +27,7 @@ #include "config.h" #endif -#include <qstring.h> +#include <Qt3Support> class Error { public: diff -aur a/src/FilePlayer.cpp b/src/FilePlayer.cpp --- a/src/FilePlayer.cpp +++ b/src/FilePlayer.cpp @@ -33,9 +33,7 @@ #include <sys/types.h> #include <sys/stat.h> -#include <qobject.h> -#include <qstring.h> -#include <qthread.h> +#include <Qt3Support> #define MAXBUFSIZE 65536 #define IN_BUFSIZE 32768 diff -aur a/src/FilePlayer.hpp b/src/FilePlayer.hpp --- a/src/FilePlayer.hpp +++ b/src/FilePlayer.hpp @@ -27,11 +27,9 @@ #include "config.h" #endif +#include <Qt3Support> #include <stdio.h> #include <stdlib.h> -#include <qobject.h> -#include <qstring.h> -#include <qtimer.h> #include <speex/speex.h> diff -aur a/src/Ihu2Spx.h b/src/Ihu2Spx.h --- a/src/Ihu2Spx.h +++ b/src/Ihu2Spx.h @@ -27,9 +27,9 @@ #include "config.h" #endif +#include <Qt3Support> #include <stdio.h> #include <stdlib.h> -#include <qstring.h> #include <speex/speex.h> #include <speex/speex_header.h> diff -aur a/src/Ihu.cpp b/src/Ihu.cpp --- a/src/Ihu.cpp +++ b/src/Ihu.cpp @@ -22,28 +22,8 @@ #include <stdlib.h> -#include <qvariant.h> -#include <qlabel.h> -#include <qpushbutton.h> -#include <qslider.h> -#include <qtoolbutton.h> -#include <qlayout.h> -#include <qtooltip.h> -#include <qfiledialog.h> -#include <qwhatsthis.h> -#include <qaction.h> -#include <qmenubar.h> -#include <qpopupmenu.h> -#include <qtoolbar.h> -#include <qimage.h> -#include <qpixmap.h> -#include <qmessagebox.h> -#include <qstatusbar.h> -#include <qinputdialog.h> -#include <qcombobox.h> -#include <qlistbox.h> -#include <qtabwidget.h> -#include <qprogressbar.h> +#include <QtGui> +#include <Qt3Support> #include "Error.h" #include "Ihu.hpp" @@ -64,40 +44,40 @@ * name 'name' and widget flags set to 'f'. * */ -Ihu::Ihu( Config& ihucfg, QWidget* parent, const char* name, WFlags fl ) - : QMainWindow( parent, name, fl ), ihuconfig(ihucfg) +Ihu::Ihu( Config& ihucfg, QWidget* parent, const char* name, Qt::WFlags fl ) + : Q3MainWindow( parent, name, fl ), ihuconfig(ihucfg) { setName( "IHU" ); - setIcon( QPixmap::fromMimeSource( "ihu.png" ) ); + setIcon( qPixmapFromMimeSource( "ihu.png" ) ); setCentralWidget( new QWidget( this, "qt_central_widget" ) ); setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)1, 0, 0, sizePolicy().hasHeightForWidth() ) ); setMinimumSize(QSize(300, 400)); resize( QSize(300, 400).expandedTo(minimumSizeHint()) ); - QBoxLayout *ihuLayout = new QVBoxLayout( centralWidget(), 15, 15 ); + Q3BoxLayout *ihuLayout = new Q3VBoxLayout( centralWidget(), 15, 15 ); - callFrame = new QFrame( centralWidget(), "callFrame" ); - callFrame->setFrameStyle( QFrame::Panel | QFrame::Raised ); + callFrame = new Q3Frame( centralWidget(), "callFrame" ); + callFrame->setFrameStyle( Q3Frame::Panel | Q3Frame::Raised ); ihuLayout->addWidget(callFrame); - QBoxLayout *mLayout = new QVBoxLayout( callFrame, 0, 0); + Q3BoxLayout *mLayout = new Q3VBoxLayout( callFrame, 0, 0); callWidget = new QTabWidget(callFrame, "callTabWidget"); mLayout->addWidget(callWidget); ihuLayout->addStretch(); - waitFrame = new QFrame( centralWidget(), "waitFrame" ); + waitFrame = new Q3Frame( centralWidget(), "waitFrame" ); ihuLayout->addWidget(waitFrame); - QBoxLayout *whLayout = new QHBoxLayout(waitFrame, 0, 0); + Q3BoxLayout *whLayout = new Q3HBoxLayout(waitFrame, 0, 0); whLayout->addSpacing(30); muteMicButton = new QToolButton( waitFrame, "muteMicButton" ); muteMicButton->setMinimumSize( QSize(40, 40) ); muteMicButton->setToggleButton(TRUE); - muteMicButton->setIconSet( QIconSet( QPixmap::fromMimeSource( "mic.png" ) ) ); + muteMicButton->setIconSet( QIcon( qPixmapFromMimeSource( "mic.png" ) ) ); whLayout->addWidget(muteMicButton); whLayout->addStretch(); @@ -105,7 +85,7 @@ waitButton = new QPushButton( waitFrame, "waitButton" ); waitButton->setMinimumSize( QSize(160, 40) ); waitButton->setToggleButton(TRUE); - waitButton->setIconSet( QIconSet( QPixmap::fromMimeSource( "phone_no.png" ) ) ); + waitButton->setIconSet( QIcon( qPixmapFromMimeSource( "phone_no.png" ) ) ); whLayout->addWidget(waitButton); whLayout->addStretch(); @@ -113,32 +93,32 @@ muteSpkButton = new QToolButton( waitFrame, "muteSpkButton" ); muteSpkButton->setMinimumSize( QSize(40, 40) ); muteSpkButton->setToggleButton(TRUE); - muteSpkButton->setIconSet( QIconSet( QPixmap::fromMimeSource( "speaker.png" ) ) ); + muteSpkButton->setIconSet( QIcon( qPixmapFromMimeSource( "speaker.png" ) ) ); whLayout->addWidget(muteSpkButton); whLayout->addSpacing(30); ihuLayout->addStretch(); - otherFrame = new QFrame( centralWidget(), "otherFrame" ); - otherFrame->setFrameStyle( QFrame::Box | QFrame::Sunken ); + otherFrame = new Q3Frame( centralWidget(), "otherFrame" ); + otherFrame->setFrameStyle( Q3Frame::Box | Q3Frame::Sunken ); ihuLayout->addWidget(otherFrame); - QBoxLayout *oLayout = new QVBoxLayout( otherFrame, 15, 15); + Q3BoxLayout *oLayout = new Q3VBoxLayout( otherFrame, 15, 15); - QGridLayout *gLayout = new QGridLayout( oLayout, 2, 2, 10); + Q3GridLayout *gLayout = new Q3GridLayout( oLayout, 2, 2, 10); threshold = new QLabel( otherFrame, "threshold" ); thSlider = new QSlider( otherFrame, "thSlider" ); thSlider->setTracking(TRUE); - thSlider->setOrientation( QSlider::Horizontal ); + thSlider->setOrientation( Qt::Horizontal ); thSlider->setRange(-96, 0); soundLabel = new QLabel( otherFrame, "soundLabel" ); soundLabel->setEnabled(FALSE); - soundLevel = new QProgressBar( otherFrame, "soundLevel" ); + soundLevel = new Q3ProgressBar( otherFrame, "soundLevel" ); soundLevel->setMaximumHeight(20); soundLevel->setPercentageVisible(FALSE); soundLevel->reset(); @@ -152,14 +132,14 @@ statusbar = statusBar(); QWidget *delayWidget = new QWidget( this, "delayWidget"); - QBoxLayout *dLayout = new QHBoxLayout(delayWidget); + Q3BoxLayout *dLayout = new Q3HBoxLayout(delayWidget); delayLabel = new QLabel( delayWidget, "delayLabel" ); delayLabel->setEnabled(FALSE); dLayout->addWidget(delayLabel); statusbar->addWidget( delayWidget, 0, TRUE); QWidget *trafficWidget = new QWidget( this, "trafficWidget"); - QBoxLayout *tLayout = new QHBoxLayout(trafficWidget); + Q3BoxLayout *tLayout = new Q3HBoxLayout(trafficWidget); trafficLabel = new QLabel( trafficWidget, "trafficLabel" ); tLayout->addWidget(trafficLabel); statusbar->addWidget( trafficWidget, 0, TRUE); @@ -172,7 +152,7 @@ helpContentsAction = new QAction( this, "helpContentsAction" ); helpAboutAction = new QAction( this, "helpAboutAction" ); settingsAction = new QAction( this, "settingsAction" ); - settingsAction->setIconSet( QIconSet( QPixmap::fromMimeSource( "configure.png" ) ) ); + settingsAction->setIconSet( QIcon( qPixmapFromMimeSource( "configure.png" ) ) ); logAction = new QAction( this, "logAction" ); cryptAction = new QAction( this, "cryptAction" ); cryptAction->setToggleAction(TRUE); @@ -193,7 +173,7 @@ // menubar menubar = new QMenuBar( this, "menubar" ); - fileMenu = new QPopupMenu( this ); + fileMenu = new QMenu( this ); newCallAction->addTo( fileMenu ); closeCallAction->addTo( fileMenu ); fileMenu->insertSeparator(); @@ -202,7 +182,7 @@ fileMenu->insertSeparator(); fileQuitAction->addTo( fileMenu ); - callMenu = new QPopupMenu( this ); + callMenu = new QMenu( this ); cryptAction->addTo( callMenu ); changeKeyAction->addTo( callMenu ); setDecKeyAction->addTo( callMenu ); @@ -210,7 +190,7 @@ dumpRXAction->addTo( callMenu ); dumpTXAction->addTo( callMenu ); - optionsMenu = new QPopupMenu( this ); + optionsMenu = new QMenu( this ); adrAction->addTo( optionsMenu ); agcAction->addTo( optionsMenu ); optionsMenu->insertSeparator(); @@ -219,7 +199,7 @@ optionsMenu->insertSeparator(); settingsAction->addTo( optionsMenu ); - helpMenu = new QPopupMenu( this ); + helpMenu = new QMenu( this ); helpContentsAction->addTo( helpMenu ); helpMenu->insertSeparator(); @@ -298,7 +278,7 @@ helpContentsAction->setStatusTip( tr( "Shows help contents" ) ); helpAboutAction->setText( tr( "About" ) ); helpAboutAction->setMenuText( tr( "&About" ) ); - helpAboutAction->setAccel( QString::null ); + helpAboutAction->setAccel( QKeySequence(QString::null) ); helpAboutAction->setStatusTip( tr( "Show info on IHU" ) ); filePlayFileAction->setText( tr( "File Player" ) ); filePlayFileAction->setMenuText( tr( "File &Player" ) ); @@ -444,7 +424,7 @@ if (trayIcon == NULL) { icon_status = IHU_ICON_NORMAL; - trayIcon = new TrayIcon( this, "trayIcon", QPixmap::fromMimeSource( "ihu_tray.png" ), "IHU" ); + trayIcon = new TrayIcon( this, "trayIcon", qPixmapFromMimeSource( "ihu_tray.png" ), "IHU" ); trayIcon->show(); connect( trayIcon, SIGNAL( clicked() ), this, SLOT( toggleVisibility() ) ); connect( trayIcon, SIGNAL( contextMenuRequested( const QPoint& ) ), this, SLOT( trayMenuRequested( const QPoint& ) ) ); @@ -538,7 +518,7 @@ try { phone->waitCalls(ihuconfig.getInPort(), ihuconfig.getUDP(), ihuconfig.getTCP()); - waitButton->setIconSet( QIconSet( QPixmap::fromMimeSource( "phone.png" ) ) ); + waitButton->setIconSet( QIcon( qPixmapFromMimeSource( "phone.png" ) ) ); waitButton->setText( tr( "&Waiting for calls" ) ); logViewer->addLog(logger->logStartReceiver()); } @@ -550,7 +530,7 @@ else { phone->stopWaiting(); - waitButton->setIconSet( QIconSet( QPixmap::fromMimeSource( "phone_no.png" ) ) ); + waitButton->setIconSet( QIcon( qPixmapFromMimeSource( "phone_no.png" ) ) ); waitButton->setText( tr( "&Wait for calls" ) ); logViewer->addLog(logger->logStopReceiver()); } @@ -583,7 +563,7 @@ connect( callTab[id], SIGNAL(stopSignal(int)), this, SLOT(stopCall(int)) ); connect( callTab[id], SIGNAL(muteMicSignal(int, bool)), this, SLOT(muteMic(int, bool)) ); connect( callTab[id], SIGNAL(muteSpkSignal(int, bool)), this, SLOT(muteSpk(int, bool)) ); - callWidget->addTab((QWidget *)callTab[id], QIconSet( QPixmap::fromMimeSource( "phone.png" ) ), callName); + callWidget->addTab((QWidget *)callTab[id], QIcon( qPixmapFromMimeSource( "phone.png" ) ), callName); if (autocrypt) crypt(id, true); message("New call created."); @@ -630,7 +610,7 @@ { callTab[id]->setRingButton(TRUE); callTab[id]->startCall(); - callWidget->setTabIconSet(callTab[id], QPixmap::fromMimeSource( "ihu_talk.png" ) ); + callWidget->setTabIconSet(callTab[id], qPixmapFromMimeSource( "ihu_talk.png" ) ); } ihuconfig.addHost(host); } @@ -659,7 +639,7 @@ if (callTab[id]) { callTab[id]->receivedCall(phone->getCallerIp(id)); - callWidget->setTabIconSet(callTab[id], QPixmap::fromMimeSource( "ihu_alarm.png" ) ); + callWidget->setTabIconSet(callTab[id], qPixmapFromMimeSource( "ihu_alarm.png" ) ); if (autoanswer) { callTab[id]->startCall(); @@ -675,7 +655,7 @@ { callTab[id]->connectedCall(); callTab[id]->message(QString("Connected with %1 (%2)").arg(phone->getCallerName(id)).arg(phone->getCallerIp(id))); - callWidget->setTabIconSet(callTab[id], QPixmap::fromMimeSource( "ihu_talk.png" ) ); + callWidget->setTabIconSet(callTab[id], qPixmapFromMimeSource( "ihu_talk.png" ) ); } logViewer->addLog(logger->logConnectedCall(phone->getCallerIp(id), phone->getCallerName(id))); } @@ -685,7 +665,7 @@ if (callTab[id]) { callTab[id]->stopCall(); - callWidget->setTabIconSet(callTab[id], QPixmap::fromMimeSource( "phone.png" ) ); + callWidget->setTabIconSet(callTab[id], qPixmapFromMimeSource( "phone.png" ) ); } logViewer->addLog(logger->logStop(phone->getCallerIp(id), phone->getCallRX(id), phone->getCallTX(id))); } @@ -696,7 +676,7 @@ if (callTab[id]) { callTab[id]->message("Closing communication..."); - callWidget->setTabIconSet(callTab[id], QPixmap::fromMimeSource( "phone.png" ) ); + callWidget->setTabIconSet(callTab[id], qPixmapFromMimeSource( "phone.png" ) ); } } @@ -1025,9 +1005,9 @@ try { if (on) - muteMicButton->setIconSet( QIconSet( QPixmap::fromMimeSource( "mic_mute.png" ) ) ); + muteMicButton->setIconSet( QIcon( qPixmapFromMimeSource( "mic_mute.png" ) ) ); else - muteMicButton->setIconSet( QIconSet( QPixmap::fromMimeSource( "mic.png" ) ) ); + muteMicButton->setIconSet( QIcon( qPixmapFromMimeSource( "mic.png" ) ) ); phone->disableRecorder(on); message(QString("Audio input globally %1.").arg(tempmsg)); } @@ -1043,9 +1023,9 @@ try { if (on) - muteSpkButton->setIconSet( QIconSet( QPixmap::fromMimeSource( "speaker_mute.png" ) ) ); + muteSpkButton->setIconSet( QIcon( qPixmapFromMimeSource( "speaker_mute.png" ) ) ); else - muteSpkButton->setIconSet( QIconSet( QPixmap::fromMimeSource( "speaker.png" ) ) ); + muteSpkButton->setIconSet( QIcon( qPixmapFromMimeSource( "speaker.png" ) ) ); phone->disablePlayer(on); message(QString("Audio output globally %1.").arg(tempmsg)); } @@ -1159,7 +1139,7 @@ void Ihu::trayMenuRequested( const QPoint& pos ) { - QPopupMenu* trayMenu = new QPopupMenu(this); + QMenu* trayMenu = new QMenu(this); trayMenu->setCheckable(TRUE); trayMenu->insertItem( isVisible() ? "Hide IHU" : "Show IHU" , this, SLOT( toggleVisibility() ), 0, 0 ); trayMenu->insertSeparator(); @@ -1168,10 +1148,10 @@ { if (callTab[i]) { - QPopupMenu* callMenu = new QPopupMenu(trayMenu); - callMenu->insertItem( QIconSet( QPixmap::fromMimeSource( "call.png" ) ), callTab[i]->getCallButtonText(), callTab[i], SLOT( callButtonClicked() ), 0, 1 ); + QMenu* callMenu = new QMenu(trayMenu); + callMenu->insertItem( QIcon( qPixmapFromMimeSource( "call.png" ) ), callTab[i]->getCallButtonText(), callTab[i], SLOT( callButtonClicked() ), 0, 1 ); callMenu->setItemEnabled(1, callTab[i]->isCallButtonEnabled()); - callMenu->insertItem( QIconSet( QPixmap::fromMimeSource( "hangup.png" ) ), callTab[i]->getStopButtonText(), callTab[i], SLOT( stopButtonClicked() ), 0, 2 ); + callMenu->insertItem( QIcon( qPixmapFromMimeSource( "hangup.png" ) ), callTab[i]->getStopButtonText(), callTab[i], SLOT( stopButtonClicked() ), 0, 2 ); callMenu->setItemEnabled(2, callTab[i]->isStopButtonEnabled()); trayMenu->insertItem( callWidget->tabIconSet(callTab[i]), callWidget->tabLabel(callTab[i]), callMenu ); } @@ -1198,16 +1178,16 @@ switch(icon_status) { case IHU_ICON_NORMAL: - trayIcon->setPixmap( QPixmap::fromMimeSource( "ihu_tray.png" ) ); + trayIcon->setPixmap( qPixmapFromMimeSource( "ihu_tray.png" ) ); break; case IHU_ICON_WAIT: - trayIcon->setPixmap( QPixmap::fromMimeSource( "ihu_wait.png" ) ); + trayIcon->setPixmap( qPixmapFromMimeSource( "ihu_wait.png" ) ); break; case IHU_ICON_ALARM: - trayIcon->setPixmap( QPixmap::fromMimeSource( "ihu_alarm.png" ) ); + trayIcon->setPixmap( qPixmapFromMimeSource( "ihu_alarm.png" ) ); break; case IHU_ICON_TALK: - trayIcon->setPixmap( QPixmap::fromMimeSource( "ihu_talk.png" ) ); + trayIcon->setPixmap( qPixmapFromMimeSource( "ihu_talk.png" ) ); break; } } @@ -1262,7 +1242,7 @@ QString Ihu::getFileName() { - QString name=QFileDialog::getSaveFileName("","*"IHU_EXT, this, 0, "Save stream to file..."); + QString name=Q3FileDialog::getSaveFileName("","*"IHU_EXT, this, 0, "Save stream to file..."); if (!name.isEmpty()) { if (!name.endsWith(IHU_EXT)) diff -aur a/src/Ihu.hpp b/src/Ihu.hpp --- a/src/Ihu.hpp +++ b/src/Ihu.hpp @@ -27,9 +27,8 @@ #include "config.h" #endif -#include <qvariant.h> -#include <qmainwindow.h> -#include <qtimer.h> +#include <QtGui> +#include <Qt3Support> #include "Config.h" #include "PlayerDialog.hpp" @@ -40,54 +39,37 @@ #include "trayicon.hpp" -class QFrame; -class QVBoxLayout; -class QHBoxLayout; -class QGridLayout; -class QAction; -class QActionGroup; -class QToolBar; -class QPopupMenu; -class QLabel; -class QComboBox; -class QPushButton; -class QSlider; -class QToolButton; -class QTabWidget; -class QProgressBar; -class QStatusBar; - class LogViewer; -class Ihu : public QMainWindow +class Ihu : public Q3MainWindow { Q_OBJECT public: - Ihu( Config&, QWidget* parent = 0, const char* name = 0, WFlags fl = WType_TopLevel ); + Ihu( Config&, QWidget* parent = 0, const char* name = 0, Qt::WFlags fl = Qt::WType_TopLevel ); ~Ihu(); enum icon_type { IHU_ICON_NORMAL = 0, IHU_ICON_WAIT, IHU_ICON_ALARM, IHU_ICON_TALK }; QStatusBar* statusbar; QTabWidget *callWidget; - QFrame *callFrame; - QFrame *waitFrame; - QFrame *otherFrame; + Q3Frame *callFrame; + Q3Frame *waitFrame; + Q3Frame *otherFrame; QLabel* threshold; QLabel* trafficLabel; QLabel* soundLabel; QLabel* delayLabel; QPushButton* waitButton; QSlider* thSlider; - QProgressBar* soundLevel; + Q3ProgressBar* soundLevel; QToolButton* muteSpkButton; QToolButton* muteMicButton; QMenuBar *menubar; - QPopupMenu *fileMenu; - QPopupMenu *callMenu; - QPopupMenu *optionsMenu; - QPopupMenu *helpMenu; + QMenu *fileMenu; + QMenu *callMenu; + QMenu *optionsMenu; + QMenu *helpMenu; QAction* newCallAction; QAction* closeCallAction; QAction* filePlayFileAction; diff -aur a/src/IhuNoGui.cpp b/src/IhuNoGui.cpp --- a/src/IhuNoGui.cpp +++ b/src/IhuNoGui.cpp @@ -22,9 +22,8 @@ #include <stdlib.h> -#include <qstring.h> -#include <qtimer.h> - +#include <Qt3Support> + #include "Error.h" #include "IhuNoGui.hpp" @@ -124,7 +123,7 @@ } catch (Error e) { - warning(e.getText()); + qWarning(e.getText()); } autocrypt = ihuconfig.getCrypt(); @@ -221,7 +220,7 @@ { try { - warning("Playing " + name + "..."); + qWarning("Playing " + name + "..."); fileplayer->playFile(name); } catch (Error e) @@ -248,7 +247,7 @@ } catch (Error e) { - warning(e.getText()); + qWarning(e.getText()); } } @@ -271,7 +270,7 @@ { int len = ihuconfig.getKeyLen()/8; phone->enableRandomCrypt(id, len); - warning("Encryption enabled."); + qWarning("Encryption enabled."); } catch (Error e) { diff -aur a/src/IhuNoGui.hpp b/src/IhuNoGui.hpp --- a/src/IhuNoGui.hpp +++ b/src/IhuNoGui.hpp @@ -27,9 +27,7 @@ #include "config.h" #endif -#include <qobject.h> -#include <qstring.h> -#include <qtimer.h> +#include <Qt3Support> #include "Error.h" #include "Config.h" diff -aur a/src/Images.cpp b/src/Images.cpp --- a/src/Images.cpp +++ b/src/Images.cpp @@ -20,10 +20,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA. */ -#include <qimage.h> -#include <qdict.h> -#include <qmime.h> -#include <qdragobject.h> +#include <Qt3Support> // images/configure.png static const unsigned char image_1_data[] = { @@ -888,35 +885,35 @@ return QImage(); } -class MimeSourceFactory_ihu : public QMimeSourceFactory +class MimeSourceFactory_ihu : public Q3MimeSourceFactory { public: MimeSourceFactory_ihu() {} ~MimeSourceFactory_ihu() {} const QMimeSource* data( const QString& abs_name ) const { - const QMimeSource* d = QMimeSourceFactory::data( abs_name ); + const QMimeSource* d = Q3MimeSourceFactory::data( abs_name ); if ( d || abs_name.isNull() ) return d; QImage img = uic_findImage( abs_name ); if ( !img.isNull() ) - ((QMimeSourceFactory*)this)->setImage( abs_name, img ); - return QMimeSourceFactory::data( abs_name ); + ((Q3MimeSourceFactory*)this)->setImage( abs_name, img ); + return Q3MimeSourceFactory::data( abs_name ); }; }; -static QMimeSourceFactory* factory = 0; +static Q3MimeSourceFactory* factory = 0; void qInitImages_ihu() { if ( !factory ) { factory = new MimeSourceFactory_ihu; - QMimeSourceFactory::defaultFactory()->addFactory( factory ); + Q3MimeSourceFactory::defaultFactory()->addFactory( factory ); } } void qCleanupImages_ihu() { if ( factory ) { - QMimeSourceFactory::defaultFactory()->removeFactory( factory ); + Q3MimeSourceFactory::defaultFactory()->removeFactory( factory ); delete factory; factory = 0; } diff -aur a/src/Logger.cpp b/src/Logger.cpp --- a/src/Logger.cpp +++ b/src/Logger.cpp @@ -20,11 +20,12 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA. */ +#include <Qt3Support> + #include "Error.h" #include "Logger.h" #include <string.h> #include <errno.h> -#include <qdatetime.h> Logger::Logger() { diff -aur a/src/Logger.h b/src/Logger.h --- a/src/Logger.h +++ b/src/Logger.h @@ -27,9 +27,9 @@ #include "config.h" #endif +#include <Qt3Support> #include <stdio.h> #include <stdlib.h> -#include <qstring.h> class Logger { diff -aur a/src/LogViewer.cpp b/src/LogViewer.cpp --- a/src/LogViewer.cpp +++ b/src/LogViewer.cpp @@ -20,28 +20,21 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA. */ +#include <QtGui> +#include <Qt3Support> + #include "LogViewer.hpp" #include <errno.h> -#include <qvariant.h> -#include <qlayout.h> -#include <qpushbutton.h> -#include <qlabel.h> -#include <qtextedit.h> -#include <qfile.h> -#include <qtextstream.h> -#include <qfiledialog.h> -#include <qmessagebox.h> - -LogViewer::LogViewer( QWidget* parent, const char* name, bool modal, WFlags fl ) +LogViewer::LogViewer( QWidget* parent, const char* name, bool modal, Qt::WindowFlags fl ) : QDialog( parent, name, modal, fl ) { setName( "LogViewer" ); setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)1, 0, 0, sizePolicy().hasHeightForWidth() ) ); - QBoxLayout *logLayout = new QVBoxLayout( this, 5, 5); + Q3BoxLayout *logLayout = new Q3VBoxLayout( this, 5, 5); - textLog = new QTextEdit(this); + textLog = new Q3TextEdit(this); textLog->setMinimumSize( QSize( 200, 80) ); textLog->setTextFormat(Qt::LogText); QFont text_font( textLog->font() ); @@ -55,14 +48,13 @@ logLayout->addWidget( textLog, 2 ); - QBoxLayout *hLayout = new QHBoxLayout( logLayout ); + Q3BoxLayout *hLayout = new Q3HBoxLayout( logLayout ); hLayout->addWidget(clearButton); hLayout->addWidget(saveButton); hLayout->addWidget(closeButton); languageChange(); resize( QSize(700, 300).expandedTo(minimumSizeHint()) ); - clearWState( WState_Polished ); // signals and slots connections connect( clearButton, SIGNAL( clicked() ), this, SLOT( clearLog() ) ); @@ -87,7 +79,7 @@ setCaption( tr( "IHU Log Viewer" ) ); clearButton->setText( tr( "Clear" ) ); saveButton->setText( tr( "Save" ) ); - saveButton->setIconSet( QIconSet( QPixmap::fromMimeSource( "save.png" ) ) ); + saveButton->setIconSet( QIcon( qPixmapFromMimeSource( "save.png" ) ) ); closeButton->setText( tr( "Close" ) ); } @@ -103,7 +95,7 @@ void LogViewer::saveLog() { - QString name = QFileDialog::getSaveFileName("", "*.*", this, 0, "Save to file..."); + QString name = Q3FileDialog::getSaveFileName("", "*.*", this, 0, "Save to file..."); if (!name.isEmpty()) { FILE *logfile = fopen(name.ascii(), "a"); @@ -113,7 +105,7 @@ } else { - QTextStream(logfile, IO_WriteOnly) << textLog->text(); + Q3TextStream(logfile, QIODevice::WriteOnly) << textLog->text(); fclose(logfile); } } diff -aur a/src/LogViewer.hpp b/src/LogViewer.hpp --- a/src/LogViewer.hpp +++ b/src/LogViewer.hpp @@ -23,24 +23,20 @@ #ifndef LOGVIEWER_H #define LOGVIEWER_H -#include <qvariant.h> -#include <qdialog.h> - -class QPushButton; -class QLabel; -class QTextEdit; +#include <QtGui> +#include <Qt3Support> class LogViewer : public QDialog { Q_OBJECT public: - LogViewer( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); + LogViewer( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, Qt::WindowFlags fl = 0 ); ~LogViewer(); QPushButton* clearButton; QPushButton* saveButton; QPushButton* closeButton; - QTextEdit* textLog; + Q3TextEdit* textLog; public slots: virtual void addLog(QString); diff -aur a/src/main.cpp b/src/main.cpp --- a/src/main.cpp +++ b/src/main.cpp @@ -25,7 +25,7 @@ #include <string.h> #include <signal.h> -#include <qapplication.h> +#include <Qt3Support> #include "Config.h" #include "Error.h" diff -aur a/src/Phone.hpp b/src/Phone.hpp --- a/src/Phone.hpp +++ b/src/Phone.hpp @@ -27,18 +27,17 @@ #include "config.h" #endif +#include <QtNetwork> +#include <Qt3Support> + #include <stdio.h> #include <stdlib.h> -#include <qobject.h> -#include <qtimer.h> -#include <qstring.h> #include <sys/types.h> #include <sys/socket.h> #include <unistd.h> #include <netinet/in.h> #include <arpa/inet.h> #include <netdb.h> -#include <qsocketnotifier.h> #include <speex/speex.h> diff -aur a/src/PlayerDialog.cpp b/src/PlayerDialog.cpp --- a/src/PlayerDialog.cpp +++ b/src/PlayerDialog.cpp @@ -22,27 +22,15 @@ #include "PlayerDialog.hpp" +#include <QtGui> +#include <Qt3Support> + #include "Config.h" #include "Error.h" -#include <qvariant.h> -#include <qlayout.h> -#include <qframe.h> -#include <qwidget.h> -#include <qpushbutton.h> -#include <qlabel.h> -#include <qinputdialog.h> -#include <qfiledialog.h> -#include <qmessagebox.h> -#include <qslider.h> -#include <qstring.h> -#include <qstatusbar.h> -#include <qtimer.h> -#include <qprogressbar.h> - #define STAT_TIME 1000 -PlayerDialog::PlayerDialog( QWidget* parent, const char* name, bool modal, WFlags fl ) +PlayerDialog::PlayerDialog( QWidget* parent, const char* name, bool modal, Qt::WFlags fl ) : QDialog( parent, name, modal, fl ) { setName( "PlayerDialog" ); @@ -50,17 +38,17 @@ setMaximumSize(600, 150); - QBoxLayout *playerLayout = new QVBoxLayout( this, 0, 0); + Q3BoxLayout *playerLayout = new Q3VBoxLayout( this, 0, 0); - playerFrame = new QFrame( this, "playerFrame" ); + playerFrame = new Q3Frame( this, "playerFrame" ); - QBoxLayout *playLayout = new QVBoxLayout( playerFrame, 5, 5 ); + Q3BoxLayout *playLayout = new Q3VBoxLayout( playerFrame, 5, 5 ); playLayout->addStretch(); slider = new QSlider( playerFrame, "slider" ); slider->setTracking(FALSE); - slider->setOrientation( QSlider::Horizontal ); + slider->setOrientation( Qt::Horizontal ); slider->setMinValue(0); slider->setMaxValue(100); slider->setEnabled(FALSE); @@ -76,7 +64,7 @@ stopButton = new QPushButton( playerFrame, "stopButton" ); stopButton->setEnabled(FALSE); - QBoxLayout *h2Layout = new QHBoxLayout( playLayout ); + Q3BoxLayout *h2Layout = new Q3HBoxLayout( playLayout ); h2Layout->addWidget(openButton); h2Layout->addWidget(pauseButton); h2Layout->addWidget(stopButton); @@ -92,8 +80,8 @@ QWidget *progressWidget = new QWidget( this, "progressWidget"); progressWidget->setMaximumHeight(16); progressWidget->setMaximumWidth(80); - QBoxLayout *pLayout = new QHBoxLayout(progressWidget); - progressBar = new QProgressBar( progressWidget, "progressBar" ); + Q3BoxLayout *pLayout = new Q3HBoxLayout(progressWidget); + progressBar = new Q3ProgressBar( progressWidget, "progressBar" ); progressBar->setMaximumHeight(16); progressBar->setMaximumWidth(80); progressBar->reset(); @@ -107,7 +95,6 @@ statTimer = new QTimer(this); languageChange(); - clearWState( WState_Polished ); // signals and slots connections connect( openButton, SIGNAL( clicked() ), this, SLOT( playFile() ) ); @@ -146,20 +133,20 @@ { setCaption( tr( "IHU File Player" ) ); openButton->setText( tr( "&Open File..." ) ); - openButton->setIconSet( QIconSet( QPixmap::fromMimeSource( "open.png" ) ) ); + openButton->setIconSet( QIcon( qPixmapFromMimeSource( "open.png" ) ) ); openButton->setAccel( QString("Ctrl+O") ); convertButton->setText( tr( "&Convert to .spx" ) ); - convertButton->setIconSet( QIconSet( QPixmap::fromMimeSource( "save.png" ) ) ); + convertButton->setIconSet( QIcon( qPixmapFromMimeSource( "save.png" ) ) ); pauseButton->setText( tr( "&Pause" ) ); - pauseButton->setIconSet( QIconSet( QPixmap::fromMimeSource( "pause.png" ) ) ); + pauseButton->setIconSet( QIcon( qPixmapFromMimeSource( "pause.png" ) ) ); stopButton->setText( tr( "&Stop" ) ); - stopButton->setIconSet( QIconSet( QPixmap::fromMimeSource( "stop.png" ) ) ); + stopButton->setIconSet( QIcon( qPixmapFromMimeSource( "stop.png" ) ) ); statusbar->message("Please open a file to play/convert"); } void PlayerDialog::playFile() { - QString fName = QFileDialog::getOpenFileName("", "*"IHU_EXT, this, 0, "Open IHU file to play..."); + QString fName = Q3FileDialog::getOpenFileName("", "*"IHU_EXT, this, 0, "Open IHU file to play..."); if (!fName.isEmpty()) { playFile(fName); @@ -194,7 +181,7 @@ fileplayer->end(); try { - fileName=QFileDialog::getOpenFileName("", "*"IHU_EXT, this, 0, "Open IHU file to convert..."); + fileName=Q3FileDialog::getOpenFileName("", "*"IHU_EXT, this, 0, "Open IHU file to convert..."); if (!fileName.isEmpty()) { fileplayer->convertFile(fileName); diff -aur a/src/PlayerDialog.hpp b/src/PlayerDialog.hpp --- a/src/PlayerDialog.hpp +++ b/src/PlayerDialog.hpp @@ -23,28 +23,19 @@ #ifndef PLAYERDIALOG_H #define PLAYERDIALOG_H -#include "FilePlayer.hpp" +#include <QtGui> +#include <Qt3Support> -#include <qvariant.h> -#include <qdialog.h> -#include <qstring.h> - -class QFrame; -class QPushButton; -class QLabel; -class QSlider; -class QStatusBar; -class QProgressBar; -class QTimer; +#include "FilePlayer.hpp" class PlayerDialog : public QDialog { Q_OBJECT public: - PlayerDialog( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); + PlayerDialog( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, Qt::WFlags fl = 0 ); ~PlayerDialog(); - QFrame *playerFrame; + Q3Frame *playerFrame; QPushButton* openButton; QPushButton* convertButton; QPushButton* pauseButton; @@ -52,7 +43,7 @@ QSlider* slider; QStatusBar* statusbar; QTimer *statTimer; - QProgressBar* progressBar; + Q3ProgressBar* progressBar; FilePlayer* fileplayer; diff -aur a/src/Player.hpp b/src/Player.hpp --- a/src/Player.hpp +++ b/src/Player.hpp @@ -27,10 +27,9 @@ #include "config.h" #endif +#include <Qt3Support> #include <stdio.h> #include <stdlib.h> -#include <qobject.h> -#include <qstring.h> #include <alsa/asoundlib.h> #include <soundtouch/SoundTouch.h> diff -aur a/src/Receiver.cpp b/src/Receiver.cpp --- a/src/Receiver.cpp +++ b/src/Receiver.cpp @@ -25,6 +25,9 @@ #include "Receiver.hpp" #include "PacketHandler.h" +#include <QtNetwork> +#include <Qt3Support> + #include <stdio.h> #include <fcntl.h> #include <string.h> @@ -33,11 +36,6 @@ #include <sys/stat.h> #include <unistd.h> -#include <qobject.h> -#include <qstring.h> -#include <qtimer.h> -#include <qsocketnotifier.h> - #define MAXBUFSIZE 65536 #define IN_BUFSIZE 16384 diff -aur a/src/Receiver.hpp b/src/Receiver.hpp --- a/src/Receiver.hpp +++ b/src/Receiver.hpp @@ -27,18 +27,16 @@ #include "config.h" #endif +#include <QtNetwork> +#include <Qt3Support> #include <stdio.h> #include <stdlib.h> -#include <qobject.h> -#include <qstring.h> -#include <qtimer.h> #include <sys/types.h> #include <sys/socket.h> #include <unistd.h> #include <netinet/in.h> #include <arpa/inet.h> #include <netdb.h> -#include <qsocketnotifier.h> #include "Config.h" #include "Packet.h" diff -aur a/src/Recorder.hpp b/src/Recorder.hpp --- a/src/Recorder.hpp +++ b/src/Recorder.hpp @@ -27,8 +27,7 @@ #include "config.h" #endif -#include <qobject.h> -#include <qtimer.h> +#include <Qt3Support> #include <alsa/asoundlib.h> #ifdef HAVE_LIBJACK diff -aur a/src/ring_sounds.h b/src/ring_sounds.h --- a/src/ring_sounds.h +++ b/src/ring_sounds.h @@ -25,7 +25,7 @@ #define SIZE_RING_32 3200 -static const short ring_32[SIZE_RING_32] = +static const int ring_32[SIZE_RING_32] = { 0x6d, 0xa56, 0x160b, 0x20de, 0x27c0, 0x2806, 0x2036, 0x1074, 0xfa9c, 0xe200, 0xca96, 0xb821, 0xad5c, 0xab6a, 0xb19d, 0xbdd6, 0xcd3c, 0xdcd8, 0xea8a, 0xf54e, diff -aur a/src/Settings.cpp b/src/Settings.cpp --- a/src/Settings.cpp +++ b/src/Settings.cpp @@ -20,27 +20,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA. */ -#include <qvariant.h> -#include <qgroupbox.h> -#include <qcheckbox.h> -#include <qlabel.h> -#include <qlineedit.h> -#include <qpushbutton.h> -#include <qtoolbutton.h> -#include <qspinbox.h> -#include <qlayout.h> -#include <qtooltip.h> -#include <qwhatsthis.h> -#include <qimage.h> -#include <qpixmap.h> -#include <qiconset.h> -#include <qcombobox.h> -#include <qmessagebox.h> -#include <qfiledialog.h> -#include <qradiobutton.h> -#include <qbuttongroup.h> -#include <qslider.h> -#include <qinputdialog.h> +#include <Qt3Support> #include <alsa/asoundlib.h> @@ -56,14 +36,14 @@ * The dialog will by default be modeless, unless you set 'modal' to * TRUE to construct a modal dialog. */ -Settings::Settings( Config& ihucfg, QWidget* parent, const char* name, bool modal, WFlags fl ) - : QTabDialog( parent, name, modal, fl ), ihuconfig(ihucfg) +Settings::Settings( Config& ihucfg, QWidget* parent, const char* name, bool modal, Qt::WindowFlags fl ) + : Q3TabDialog( parent, name, modal, fl ), ihuconfig(ihucfg) { setName( "Settings" ); setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)1, 0, 0, sizePolicy().hasHeightForWidth() ) ); - setMinimumSize(QSize(500, 300)); - resize( QSize(500, 300).expandedTo(minimumSizeHint()) ); + setMinimumSize(QSize(600, 425)); + resize( QSize(600, 425).expandedTo(minimumSizeHint()) ); generalWidget = new QWidget( this, "generalWidget"); netWidget = new QWidget( this, "netWidget"); @@ -72,20 +52,20 @@ optionsWidget = new QWidget( this, "optionsWidget"); securityWidget = new QWidget( this, "securityWidget"); - QBoxLayout *gLayout = new QVBoxLayout( generalWidget, 10 ); + Q3BoxLayout *gLayout = new Q3VBoxLayout( generalWidget, 10 ); - generalGroup = new QGroupBox( generalWidget, "generalGroup" ); + generalGroup = new Q3GroupBox( generalWidget, "generalGroup" ); generalGroup->setMargin( 0 ); generalGroup->setMidLineWidth( 0 ); gLayout->addWidget(generalGroup); - QBoxLayout *gtopLayout = new QVBoxLayout( generalGroup, 20 ); + Q3BoxLayout *gtopLayout = new Q3VBoxLayout( generalGroup, 20 ); - QBoxLayout *glay1 = new QHBoxLayout( gtopLayout, 10 ); - QBoxLayout *glay2 = new QHBoxLayout( gtopLayout, 10 ); - QBoxLayout *glay3 = new QHBoxLayout( gtopLayout, 10 ); - QBoxLayout *glay4 = new QHBoxLayout( gtopLayout, 10 ); + Q3BoxLayout *glay1 = new Q3HBoxLayout( gtopLayout, 10 ); + Q3BoxLayout *glay2 = new Q3HBoxLayout( gtopLayout, 10 ); + Q3BoxLayout *glay3 = new Q3HBoxLayout( gtopLayout, 10 ); + Q3BoxLayout *glay4 = new Q3HBoxLayout( gtopLayout, 10 ); nameLabel = new QLabel( generalGroup, "nameLabel" ); @@ -140,23 +120,23 @@ glay4->addWidget(maxHostLabel); glay4->addWidget(maxHostBox); - QBoxLayout *nLayout = new QVBoxLayout( netWidget, 20 ); + Q3BoxLayout *nLayout = new Q3VBoxLayout( netWidget, 20 ); - netGroup = new QGroupBox( netWidget, "netGroup" ); + netGroup = new Q3GroupBox( netWidget, "netGroup" ); netGroup->setMargin( 0 ); netGroup->setMidLineWidth( 0 ); nLayout->addWidget(netGroup); - netOutGroup = new QButtonGroup( netWidget, "netOutGroup" ); + netOutGroup = new Q3ButtonGroup( netWidget, "netOutGroup" ); netOutGroup->setMargin( 0 ); netOutGroup->setMidLineWidth( 0 ); netOutGroup->setRadioButtonExclusive(TRUE); nLayout->addWidget(netOutGroup); - QBoxLayout *ntopLayout = new QVBoxLayout( netGroup, 20 ); - QBoxLayout *nlay1 = new QHBoxLayout( ntopLayout, 10 ); + Q3BoxLayout *ntopLayout = new Q3VBoxLayout( netGroup, 20 ); + Q3BoxLayout *nlay1 = new Q3HBoxLayout( ntopLayout, 10 ); inprotocolLabel = new QLabel( netGroup, "inprotocolLabel" ); @@ -183,8 +163,8 @@ nlay1->addWidget(inportBox); nlay1->addStretch(1); - QBoxLayout *nouttopLayout = new QVBoxLayout( netOutGroup, 20); - QBoxLayout *nlay2 = new QHBoxLayout( nouttopLayout, 10 ); + Q3BoxLayout *nouttopLayout = new Q3VBoxLayout( netOutGroup, 20); + Q3BoxLayout *nlay2 = new Q3HBoxLayout( nouttopLayout, 10 ); protocolLabel = new QLabel( netOutGroup, "protocolLabel" ); @@ -211,20 +191,20 @@ nlay2->addWidget(outportBox); nlay2->addStretch(1); - QBoxLayout *sLayout = new QVBoxLayout( soundWidget, 10 ); + Q3BoxLayout *sLayout = new Q3VBoxLayout( soundWidget, 10 ); - soundGroup = new QGroupBox( soundWidget, "soundGroup" ); + soundGroup = new Q3GroupBox( soundWidget, "soundGroup" ); soundGroup->setMargin( 0 ); soundGroup->setMidLineWidth( 0 ); sLayout->addWidget(soundGroup); - QBoxLayout *stopLayout = new QVBoxLayout( soundGroup, 20 ); + Q3BoxLayout *stopLayout = new Q3VBoxLayout( soundGroup, 20 ); - QBoxLayout *slay1 = new QHBoxLayout( stopLayout, 10 ); - QBoxLayout *slay2 = new QHBoxLayout( stopLayout, 10 ); - QBoxLayout *slay3 = new QHBoxLayout( stopLayout, 10 ); - QBoxLayout *slay4 = new QHBoxLayout( stopLayout, 10 ); + Q3BoxLayout *slay1 = new Q3HBoxLayout( stopLayout, 10 ); + Q3BoxLayout *slay2 = new Q3HBoxLayout( stopLayout, 10 ); + Q3BoxLayout *slay3 = new Q3HBoxLayout( stopLayout, 10 ); + Q3BoxLayout *slay4 = new Q3HBoxLayout( stopLayout, 10 ); dspLabel = new QLabel( soundGroup, "dspInLabel" ); @@ -323,19 +303,19 @@ slay4->addWidget(prepacketsLabel); slay4->addWidget(prepacketsBox); - QBoxLayout *eLayout = new QVBoxLayout( encoderWidget, 10 ); + Q3BoxLayout *eLayout = new Q3VBoxLayout( encoderWidget, 10 ); - encoderGroup = new QGroupBox( encoderWidget, "soundGroup" ); + encoderGroup = new Q3GroupBox( encoderWidget, "soundGroup" ); encoderGroup->setMargin( 0 ); encoderGroup->setMidLineWidth( 0 ); eLayout->addWidget(encoderGroup); - QBoxLayout *etopLayout = new QVBoxLayout( encoderGroup, 20); + Q3BoxLayout *etopLayout = new Q3VBoxLayout( encoderGroup, 20); - QBoxLayout *elay1 = new QHBoxLayout( etopLayout, 10 ); - QBoxLayout *elay2 = new QHBoxLayout( etopLayout, 10 ); - QBoxLayout *elay3 = new QHBoxLayout( etopLayout, 10 ); + Q3BoxLayout *elay1 = new Q3HBoxLayout( etopLayout, 10 ); + Q3BoxLayout *elay2 = new Q3HBoxLayout( etopLayout, 10 ); + Q3BoxLayout *elay3 = new Q3HBoxLayout( etopLayout, 10 ); bitrateLabel = new QLabel( encoderGroup, "bitrateLabel" ); @@ -393,24 +373,24 @@ elay3->addStretch(); elay3->addWidget(dtxBox); - QBoxLayout *oLayout = new QVBoxLayout( optionsWidget, 10 ); + Q3BoxLayout *oLayout = new Q3VBoxLayout( optionsWidget, 10 ); - adrGroup = new QGroupBox( optionsWidget, "adrGroup" ); + adrGroup = new Q3GroupBox( optionsWidget, "adrGroup" ); adrGroup->setMargin( 0 ); adrGroup->setMidLineWidth( 0 ); oLayout->addWidget(adrGroup); - agcGroup = new QGroupBox( optionsWidget, "agcGroup" ); + agcGroup = new Q3GroupBox( optionsWidget, "agcGroup" ); agcGroup->setMargin( 0 ); agcGroup->setMidLineWidth( 0 ); oLayout->addWidget(agcGroup); - QBoxLayout *otopLayout = new QVBoxLayout( adrGroup, 20 ); + Q3BoxLayout *otopLayout = new Q3VBoxLayout( adrGroup, 20 ); otopLayout->addSpacing(5); - QBoxLayout *olay1 = new QHBoxLayout( otopLayout, 10 ); - QBoxLayout *olay2 = new QHBoxLayout( otopLayout, 10 ); + Q3BoxLayout *olay1 = new Q3HBoxLayout( otopLayout, 10 ); + Q3BoxLayout *olay2 = new Q3HBoxLayout( otopLayout, 10 ); adrmindelayLabel = new QLabel( adrGroup, "adrmindelayLabel" ); @@ -441,9 +421,9 @@ olay2->addWidget(adrmaxdelayLabel); olay2->addWidget(adrmaxdelayBox); - QBoxLayout *ootopLayout = new QVBoxLayout( agcGroup, 20); + Q3BoxLayout *ootopLayout = new Q3VBoxLayout( agcGroup, 20); ootopLayout->addSpacing(5); - QBoxLayout *agclay1 = new QHBoxLayout( ootopLayout, 10 ); + Q3BoxLayout *agclay1 = new Q3HBoxLayout( ootopLayout, 10 ); agchwBox = new QCheckBox( agcGroup, "agchwBox" ); @@ -482,12 +462,12 @@ agclay1->addStretch(); agclay1->addWidget(agcswBox); - QGridLayout *gridLayout = new QGridLayout( ootopLayout, 2, 2, 5); + Q3GridLayout *gridLayout = new Q3GridLayout( ootopLayout, 2, 2, 5); agcStepLabel = new QLabel( agcGroup, "agcStepLabel" ); agcstep = new QSlider( agcGroup, "agcstep" ); - agcstep->setOrientation( QSlider::Horizontal ); + agcstep->setOrientation( Qt::Horizontal ); agcstep->setRange( 1, 100 ); agcstep->setTracking(TRUE); agcstep->setValue( ihuconfig.getAGCStep() ); @@ -495,7 +475,7 @@ agcLevelLabel = new QLabel( agcGroup, "agcLevelLabel" ); agclevel = new QSlider( agcGroup, "agclevel" ); - agclevel->setOrientation( QSlider::Horizontal ); + agclevel->setOrientation( Qt::Horizontal ); agclevel->setRange( -96, 0 ); agclevel->setTracking(TRUE); agclevel->setValue( ihuconfig.getAGCLevel() ); @@ -505,21 +485,21 @@ gridLayout->addWidget(agcStepLabel, 0, 1, Qt::AlignBottom | Qt::AlignHCenter); gridLayout->addWidget(agcstep, 1, 1, Qt::AlignTop); - QBoxLayout *kLayout = new QVBoxLayout( securityWidget, 10 ); + Q3BoxLayout *kLayout = new Q3VBoxLayout( securityWidget, 10 ); - securityGroup = new QButtonGroup( securityWidget, "securityGroup" ); + securityGroup = new Q3ButtonGroup( securityWidget, "securityGroup" ); securityGroup->setRadioButtonExclusive(TRUE); securityGroup->setMargin( 0 ); securityGroup->setMidLineWidth( 0 ); kLayout->addWidget(securityGroup); - QBoxLayout *ktopLayout = new QVBoxLayout( securityGroup, 20, 10 ); + Q3BoxLayout *ktopLayout = new Q3VBoxLayout( securityGroup, 20, 10 ); - QBoxLayout *klay0 = new QHBoxLayout( ktopLayout, 10 ); - QBoxLayout *klay1 = new QHBoxLayout( ktopLayout, 10 ); - QBoxLayout *klay2 = new QHBoxLayout( ktopLayout, 10 ); - QBoxLayout *klay3 = new QHBoxLayout( ktopLayout, 10 ); + Q3BoxLayout *klay0 = new Q3HBoxLayout( ktopLayout, 10 ); + Q3BoxLayout *klay1 = new Q3HBoxLayout( ktopLayout, 10 ); + Q3BoxLayout *klay2 = new Q3HBoxLayout( ktopLayout, 10 ); + Q3BoxLayout *klay3 = new Q3HBoxLayout( ktopLayout, 10 ); cryptBox = new QCheckBox( securityGroup, "cryptBox" ); if (ihuconfig.getCrypt()) @@ -544,16 +524,16 @@ passButton = new QPushButton( securityGroup, "passButton" ); - QBoxLayout *hklay1 = new QHBoxLayout( klay1 ); - QBoxLayout *kklay1 = new QHBoxLayout( hklay1 ); + Q3BoxLayout *hklay1 = new Q3HBoxLayout( klay1 ); + Q3BoxLayout *kklay1 = new Q3HBoxLayout( hklay1 ); kklay1->addWidget(keyLabel); - QBoxLayout *hklay2 = new QHBoxLayout( klay1 ); - QBoxLayout *kklay2 = new QVBoxLayout( hklay2 ); - QBoxLayout *kkklay1 = new QHBoxLayout( kklay2 ); + Q3BoxLayout *hklay2 = new Q3HBoxLayout( klay1 ); + Q3BoxLayout *kklay2 = new Q3VBoxLayout( hklay2 ); + Q3BoxLayout *kkklay1 = new Q3HBoxLayout( kklay2 ); kkklay1->addWidget(randomRadioButton); kkklay1->addWidget(bitsBox); kklay2->addSpacing(10); - QBoxLayout *kkklay2 = new QHBoxLayout( kklay2 ); + Q3BoxLayout *kkklay2 = new Q3HBoxLayout( kklay2 ); kkklay2->addWidget(passwordRadioButton); kkklay2->addWidget(passButton); @@ -570,7 +550,7 @@ logBox->setChecked(TRUE); logNameLabel = new QLabel( securityGroup, "logNameLabel" ); - logNameLabel->setFrameStyle( QFrame::Panel | QFrame::Sunken ); + logNameLabel->setFrameStyle( Q3Frame::Panel | Q3Frame::Sunken ); logNameLabel->setMinimumWidth(300); logNameLabel->setText(fileName(logFile)); @@ -613,7 +593,7 @@ */ void Settings::languageChange() { - setCaption( tr( "Settings" ) ); + this->setCaption( tr( "Settings" ) ); generalGroup->setTitle( tr( "General settings" ) ); netGroup->setTitle( tr( "Receiver settings (for incoming calls)" ) ); netOutGroup->setTitle( tr( "Caller settings (for outgoing calls)" ) ); @@ -665,53 +645,53 @@ passButton->setText( tr( "Save Passphrase")); logBox->setText( tr( "Log file")); - setOkButton(QString::null); - setHelpButton("Save to file..."); - setApplyButton("OK"); - setCancelButton(); - setDefaultButton(); - - QWhatsThis::add(nameEdit, tr("Your name, nickname, address, or whatever you want that your partner will see in order to recognize you. This information will be shown only to the person who's talking with you (leave empty to be anonymous).")); - QWhatsThis::add(answerBox, tr("When you check this option, IHU will automatically answer the incoming calls, without need to click on Answer button.")); - QWhatsThis::add(trayBox, tr("Enable/disable the IHU icon in the system tray.")); - QWhatsThis::add(waitBox, tr("To wait for calls immediately when you launch IHU, without need to click on Wait for calls button.")); - QWhatsThis::add(hideBox, tr("This will hide the main window and will automatically minimize IHU to system tray at startup.")); - QWhatsThis::add(maxCallBox, tr("This is the maximum number of calls per session.")); - QWhatsThis::add(maxHostBox, tr("This is the number of addresses saved from the host history.")); - QWhatsThis::add(udpBox, tr("Enable/disable receiving calls with UDP protocol.")); - QWhatsThis::add(tcpBox, tr("Enable/disable receiving calls with TCP protocol.")); - QWhatsThis::add(inportBox, tr("This port will be used to receive calls on the selected protocols.")); - QWhatsThis::add(udpRadioButton, tr("UDP is the default protocol. Choose this protocol for standard calls.")); - QWhatsThis::add(tcpRadioButton, tr("Choose TCP if remote Receiver only supports this protocol, or you prefer reliable connections.")); - QWhatsThis::add(outportBox, tr("This port is the Receiver port of the remote computer that you want to call. It will be used for your outgoing calls.")); - QWhatsThis::add(dspBox, tr("Sound driver for capture and playback. ALSA is the default driver.")); - QWhatsThis::add(interfInBox, tr("Input sound interface (ALSA). I recommend using plughw or hw interface, but if you need to use more capture streams, then choose another interface. If you have more than one soundcard, you can choose the sound card by changing the device number (for example hw:2).")); - QWhatsThis::add(interfOutBox, tr("Output sound interface (ALSA). I recommend using plughw or hw interface. If you have more than one soundcard, you can choose the sound card by changing the device number (for example hw:2).")); - QWhatsThis::add(modeBox, tr("The input format determines the audio quality and the network usage for your voice. To improve the sound quality of your voice, choose a higher sample rate.")); - QWhatsThis::add(stoptxBox, tr("When you are using a threshold greater than zero, it's useful to continue the transmission for some seconds, to preserve the stream against small speech pauses.")); - QWhatsThis::add(ringVolumeBox, tr("Here you can adjust the volume of ring tone for incoming calls.")); - QWhatsThis::add(prepacketsBox, tr("Number of packets to prebuffer before starting to play. A high number of packets ensure audio continuity, but it could increase the audio delay.")); - QWhatsThis::add(adrmindelayBox, tr("This is the minimum audio delay on the output sound interface. When ADR is activated, if the delay is smaller than maximum, IHU will try to increase the delay to this value in order to avoid sound crackle.")); - QWhatsThis::add(adrmaxdelayBox, tr("This is the maximum audio delay on the output sound interface. When ADR is activated, if the delay is greater than minimum, IHU will try to reduce the delay to this value.")); - QWhatsThis::add(adrstretchBox, tr("This is the time change percentage for ADR. If the current playback delay is smaller/greater than reference values, than IHU will adjust the current audio stream. A higher time stretch means faster adjustment.")); - QWhatsThis::add(agcstep, tr("This value will influence the rapidity of AGC volume adjustment.")); - QWhatsThis::add(bitrateBox, tr("Choose the encoding bitrate type for your voice beetween: Constant (CBR), Variable (VBR), Average (ABR).")); - QWhatsThis::add(complexityBox, tr("Algorithmic quality. 0 means less CPU computation but lower quality, 10 means highest quality but more computation.")); - QWhatsThis::add(cbrqualityBox, tr("CBR quality: 0 lowest bitrate, 10 highest bitrate.")); - QWhatsThis::add(vbrqualityBox, tr("VBR quality: 0 lowest bitrate, 10 highest bitrate.")); - QWhatsThis::add(abrBox, tr("ABR bitrate (kilobit per second). You can specify your preferred bitrate average value.")); - QWhatsThis::add(vadBox, tr("When enabled, it detects whether the audio being encoded is speech or silence/background noise. VAD is implicitly activated when encoding is VBR.")); - QWhatsThis::add(dtxBox, tr("It's an addition to VAD/VBR operation, that allows to stop transmitting completely when background noise is stationary.")); - QWhatsThis::add(adrGroup, tr("The ADR option is useful to reduce the audio delay that could build up in the player due to network delay.")); - QWhatsThis::add(agcGroup, tr("The AGC option is useful to automatically regulate or to maintain stationary the volume level of your recorded voice.")); - QWhatsThis::add(agchwBox, tr("The ALSA Mixer Control method will automatically adjust the specified mixer control to reach the volume level. Disable this if you have problems or if you don't want IHU to change your mixer settings.")); - QWhatsThis::add(agcswBox, tr("The IHU Internal Control will amplify or soften the recorded samples to reach the volume level, but no mixer level will be touched.")); - QWhatsThis::add(cryptBox, tr("When you check this option, IHU will automatically encrypt the outgoing stream of the call.")); - QWhatsThis::add(randomRadioButton, tr("IHU will automatically choose a new random key.")); - QWhatsThis::add(passwordRadioButton, tr("IHU will ask you a passphrase when you enable encryption or when you change the encryption key.")); - QWhatsThis::add(bitsBox, tr("Key length (in bits) of random key.")); - QWhatsThis::add(showkeyBox, tr("This option will show the decryption passphrase of the incoming stream in the Log. Be careful, this might show confidential informations!")); - QWhatsThis::add(logBox, tr("Write a copy of the log to file.")); + this->setOkButton(QString::null); + this->setHelpButton("Save to file..."); + this->setApplyButton("OK"); + this->setCancelButton(); + this->setDefaultButton(); + + Q3WhatsThis::add(nameEdit, tr("Your name, nickname, address, or whatever you want that your partner will see in order to recognize you. This information will be shown only to the person who's talking with you (leave empty to be anonymous).")); + Q3WhatsThis::add(answerBox, tr("When you check this option, IHU will automatically answer the incoming calls, without need to click on Answer button.")); + Q3WhatsThis::add(trayBox, tr("Enable/disable the IHU icon in the system tray.")); + Q3WhatsThis::add(waitBox, tr("To wait for calls immediately when you launch IHU, without need to click on Wait for calls button.")); + Q3WhatsThis::add(hideBox, tr("This will hide the main window and will automatically minimize IHU to system tray at startup.")); + Q3WhatsThis::add(maxCallBox, tr("This is the maximum number of calls per session.")); + Q3WhatsThis::add(maxHostBox, tr("This is the number of addresses saved from the host history.")); + Q3WhatsThis::add(udpBox, tr("Enable/disable receiving calls with UDP protocol.")); + Q3WhatsThis::add(tcpBox, tr("Enable/disable receiving calls with TCP protocol.")); + Q3WhatsThis::add(inportBox, tr("This port will be used to receive calls on the selected protocols.")); + Q3WhatsThis::add(udpRadioButton, tr("UDP is the default protocol. Choose this protocol for standard calls.")); + Q3WhatsThis::add(tcpRadioButton, tr("Choose TCP if remote Receiver only supports this protocol, or you prefer reliable connections.")); + Q3WhatsThis::add(outportBox, tr("This port is the Receiver port of the remote computer that you want to call. It will be used for your outgoing calls.")); + Q3WhatsThis::add(dspBox, tr("Sound driver for capture and playback. ALSA is the default driver.")); + Q3WhatsThis::add(interfInBox, tr("Input sound interface (ALSA). I recommend using plughw or hw interface, but if you need to use more capture streams, then choose another interface. If you have more than one soundcard, you can choose the sound card by changing the device number (for example hw:2).")); + Q3WhatsThis::add(interfOutBox, tr("Output sound interface (ALSA). I recommend using plughw or hw interface. If you have more than one soundcard, you can choose the sound card by changing the device number (for example hw:2).")); + Q3WhatsThis::add(modeBox, tr("The input format determines the audio quality and the network usage for your voice. To improve the sound quality of your voice, choose a higher sample rate.")); + Q3WhatsThis::add(stoptxBox, tr("When you are using a threshold greater than zero, it's useful to continue the transmission for some seconds, to preserve the stream against small speech pauses.")); + Q3WhatsThis::add(ringVolumeBox, tr("Here you can adjust the volume of ring tone for incoming calls.")); + Q3WhatsThis::add(prepacketsBox, tr("Number of packets to prebuffer before starting to play. A high number of packets ensure audio continuity, but it could increase the audio delay.")); + Q3WhatsThis::add(adrmindelayBox, tr("This is the minimum audio delay on the output sound interface. When ADR is activated, if the delay is smaller than maximum, IHU will try to increase the delay to this value in order to avoid sound crackle.")); + Q3WhatsThis::add(adrmaxdelayBox, tr("This is the maximum audio delay on the output sound interface. When ADR is activated, if the delay is greater than minimum, IHU will try to reduce the delay to this value.")); + Q3WhatsThis::add(adrstretchBox, tr("This is the time change percentage for ADR. If the current playback delay is smaller/greater than reference values, than IHU will adjust the current audio stream. A higher time stretch means faster adjustment.")); + Q3WhatsThis::add(agcstep, tr("This value will influence the rapidity of AGC volume adjustment.")); + Q3WhatsThis::add(bitrateBox, tr("Choose the encoding bitrate type for your voice beetween: Constant (CBR), Variable (VBR), Average (ABR).")); + Q3WhatsThis::add(complexityBox, tr("Algorithmic quality. 0 means less CPU computation but lower quality, 10 means highest quality but more computation.")); + Q3WhatsThis::add(cbrqualityBox, tr("CBR quality: 0 lowest bitrate, 10 highest bitrate.")); + Q3WhatsThis::add(vbrqualityBox, tr("VBR quality: 0 lowest bitrate, 10 highest bitrate.")); + Q3WhatsThis::add(abrBox, tr("ABR bitrate (kilobit per second). You can specify your preferred bitrate average value.")); + Q3WhatsThis::add(vadBox, tr("When enabled, it detects whether the audio being encoded is speech or silence/background noise. VAD is implicitly activated when encoding is VBR.")); + Q3WhatsThis::add(dtxBox, tr("It's an addition to VAD/VBR operation, that allows to stop transmitting completely when background noise is stationary.")); + Q3WhatsThis::add(adrGroup, tr("The ADR option is useful to reduce the audio delay that could build up in the player due to network delay.")); + Q3WhatsThis::add(agcGroup, tr("The AGC option is useful to automatically regulate or to maintain stationary the volume level of your recorded voice.")); + Q3WhatsThis::add(agchwBox, tr("The ALSA Mixer Control method will automatically adjust the specified mixer control to reach the volume level. Disable this if you have problems or if you don't want IHU to change your mixer settings.")); + Q3WhatsThis::add(agcswBox, tr("The IHU Internal Control will amplify or soften the recorded samples to reach the volume level, but no mixer level will be touched.")); + Q3WhatsThis::add(cryptBox, tr("When you check this option, IHU will automatically encrypt the outgoing stream of the call.")); + Q3WhatsThis::add(randomRadioButton, tr("IHU will automatically choose a new random key.")); + Q3WhatsThis::add(passwordRadioButton, tr("IHU will ask you a passphrase when you enable encryption or when you change the encryption key.")); + Q3WhatsThis::add(bitsBox, tr("Key length (in bits) of random key.")); + Q3WhatsThis::add(showkeyBox, tr("This option will show the decryption passphrase of the incoming stream in the Log. Be careful, this might show confidential informations!")); + Q3WhatsThis::add(logBox, tr("Write a copy of the log to file.")); } void Settings::saveAndClose() @@ -881,7 +861,7 @@ { if (logBox->isOn()) { - QString name=QFileDialog::getSaveFileName(ihuconfig.getLogFile(),"*.*", this, 0, "Save to file..."); + QString name=Q3FileDialog::getSaveFileName(ihuconfig.getLogFile(),"*.*", this, 0, "Save to file..."); if (!name.isEmpty()) logFile = name; else @@ -950,7 +930,7 @@ { if(saveSettings()) { - QString name = QFileDialog::getSaveFileName(ihuconfig.getFileName(),"*.xml", this, 0, "Save config to file..."); + QString name = Q3FileDialog::getSaveFileName(ihuconfig.getFileName(),"*.xml", this, 0, "Save config to file..."); if (!name.isEmpty()) { try @@ -968,7 +948,7 @@ void Settings::passButtonClicked() { bool ok; - QString text = QInputDialog::getText(QString("Encryption passphrase"), QString("IMPORTANT: THE PASSPHRASE IS SAVED AS CLEARTEXT IN THE CONFIG FILE!\nIf you don't want to save the passphrase, you can always use the main window to set it when needed.\nEnter the encryption passphrase (max 56 chars, please use at least 30 chars, leave blank to reset):"), QLineEdit::Password, ihuconfig.getPasswd(), &ok, this ); + QString text = QInputDialog::getText(this, QString("Encryption passphrase"), QString("IMPORTANT: THE PASSPHRASE IS SAVED AS CLEARTEXT IN THE CONFIG FILE!\nIf you don't want to save the passphrase, you can always use the main window to set it when needed.\nEnter the encryption passphrase (max 56 chars, please use at least 30 chars, leave blank to reset):"), QLineEdit::Password, ihuconfig.getPasswd(), &ok); if (ok) { ihuconfig.setPasswd(text); diff -aur a/src/Settings.hpp b/src/Settings.hpp --- a/src/Settings.hpp +++ b/src/Settings.hpp @@ -27,31 +27,17 @@ #include "config.h" #endif -#include <qvariant.h> -#include <qtabdialog.h> +#include <QtGui> +#include <Qt3Support> #include "Config.h" -class QVBoxLayout; -class QHBoxLayout; -class QGridLayout; -class QCheckBox; -class QLabel; -class QLineEdit; -class QPushButton; -class QSpinBox; -class QGroupBox; -class QComboBox; -class QRadioButton; -class QButtonGroup; -class QSlider; - -class Settings : public QTabDialog +class Settings : public Q3TabDialog { Q_OBJECT public: - Settings( Config&, QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); + Settings( Config&, QWidget* parent = 0, const char* name = 0, bool modal = FALSE, Qt::WindowFlags fl = 0 ); ~Settings(); QWidget* generalWidget; @@ -60,14 +46,14 @@ QWidget* encoderWidget; QWidget* optionsWidget; QWidget* securityWidget; - QGroupBox* generalGroup; - QGroupBox* netGroup; - QButtonGroup* netOutGroup; - QGroupBox* soundGroup; - QGroupBox* encoderGroup; - QGroupBox* adrGroup; - QGroupBox* agcGroup; - QButtonGroup* securityGroup; + Q3GroupBox* generalGroup; + Q3GroupBox* netGroup; + Q3ButtonGroup* netOutGroup; + Q3GroupBox* soundGroup; + Q3GroupBox* encoderGroup; + Q3GroupBox* adrGroup; + Q3GroupBox* agcGroup; + Q3ButtonGroup* securityGroup; QLineEdit *nameEdit; QLabel* nameLabel; QCheckBox* answerBox; @@ -132,7 +118,7 @@ QCheckBox* agcswBox; QRadioButton* randomRadioButton; QRadioButton* passwordRadioButton; - QButtonGroup* securityButtonGroup; + Q3ButtonGroup* securityButtonGroup; QLabel* keyLabel; QSpinBox* bitsBox; QCheckBox* logBox; diff -aur a/src/TcpServer.cpp b/src/TcpServer.cpp --- a/src/TcpServer.cpp +++ b/src/TcpServer.cpp @@ -20,13 +20,13 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA. */ -#include <qstring.h> -#include <qsocketdevice.h> +#include <QtNetwork> +#include <Qt3Support> #include "TcpServer.hpp" #include "Error.h" TcpServer::TcpServer( QObject* parent=0, int port = 0) : - QServerSocket(port,1,parent) + Q3ServerSocket(port,1,parent) { if ( !ok() ) throw Error(tr("Can't listen on TCP port %1 (already in use?)").arg(port)); diff -aur a/src/TcpServer.hpp b/src/TcpServer.hpp --- a/src/TcpServer.hpp +++ b/src/TcpServer.hpp @@ -27,12 +27,12 @@ #include "config.h" #endif +#include <QtNetwork> +#include <Qt3Support> #include <stdio.h> #include <stdlib.h> -#include <qobject.h> -#include <qserversocket.h> -class TcpServer : public QServerSocket +class TcpServer : public Q3ServerSocket { Q_OBJECT public: diff -aur a/src/Transmitter.hpp b/src/Transmitter.hpp --- a/src/Transmitter.hpp +++ b/src/Transmitter.hpp @@ -27,10 +27,8 @@ #include "config.h" #endif +#include <Qt3Support> #include <stdio.h> -#include <qobject.h> -#include <qstring.h> -#include <qtimer.h> #include <sys/types.h> #include <sys/socket.h> #include <unistd.h> diff -aur a/src/trayicon.cpp b/src/trayicon.cpp --- a/src/trayicon.cpp +++ b/src/trayicon.cpp @@ -19,9 +19,8 @@ #include "trayicon.hpp" -#include <qtooltip.h> -#include <qbitmap.h> -#include <qimage.h> +#include <QX11Info> +#include <Qt3Support> #include <X11/Xatom.h> #include <X11/Xlib.h> @@ -36,13 +35,14 @@ // Constructor. TrayIcon::TrayIcon ( QWidget *pParent, const char *pszName, const QPixmap &pm, const char *pszLabel = NULL) - : QLabel(pParent, pszName, WMouseNoMask | WRepaintNoErase | WType_TopLevel | WStyle_Customize | WStyle_NoBorder | WStyle_StaysOnTop) + : QLabel(QString(pszName), pParent, Qt::Window | Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint) { + QLabel::setAttribute(Qt::WA_MouseNoMask); QLabel::setMinimumSize(22, 22); QLabel::setBackgroundMode(Qt::X11ParentRelative); QLabel::setBackgroundOrigin(QWidget::WindowOrigin); - Display *dpy = qt_xdisplay(); + Display *dpy = QX11Info::display(); WId trayWin = winId(); // System Tray Protocol Specification. @@ -79,7 +79,7 @@ trayAtom = XInternAtom(dpy, "KWM_DOCKWINDOW", false); XChangeProperty(dpy, trayWin, trayAtom, trayAtom, 32, PropModeReplace, (unsigned char *) &data, 1); // For not so older KDE's... - WId forWin = pParent ? pParent->topLevelWidget()->winId() : qt_xrootwin(); + WId forWin = pParent ? pParent->topLevelWidget()->winId() : QApplication::desktop()->winId(); trayAtom = XInternAtom(dpy, "_KDE_NET_WM_SYSTEM_TRAY_WINDOW_FOR", false); XChangeProperty(dpy, trayWin, trayAtom, XA_WINDOW, 32, PropModeReplace, (unsigned char *) &forWin, 1); @@ -103,12 +103,12 @@ switch (pMouseEvent->button()) { - case LeftButton: + case Qt::LeftButton: // Toggle parent widget visibility. emit clicked(); break; - case RightButton: + case Qt::RightButton: // Just signal we're on to context menu. emit contextMenuRequested(pMouseEvent->globalPos()); break; diff -aur a/src/trayicon.hpp b/src/trayicon.hpp --- a/src/trayicon.hpp +++ b/src/trayicon.hpp @@ -20,9 +20,8 @@ #ifndef __trayicon_h #define __trayicon_h -#include <qlabel.h> -#include <qpixmap.h> - +#include <QtGui> +#include <Qt3Support> //---------------------------------------------------------------------------- // TrayIcon -- Custom system tray widget.
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor