From 0922ea6d4aa2f56170e7369a59d9f7f60ebcad27 Mon Sep 17 00:00:00 2001 From: mlaurent Date: Sun, 31 Jul 2005 17:36:11 +0000 Subject: [PATCH] Port to qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/KDE/kdeaccessibility@441699 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kbstateapplet/Makefile.am | 4 +- kbstateapplet/kbstate.cpp | 14 +++-- kbstateapplet/kbstate.h | 15 +++-- kmag/kmag.cpp | 30 +++++---- kmag/kmag.h | 2 + kmag/kmagselrect.cpp | 18 +++--- kmag/kmagselrect.h | 6 +- kmag/kmagzoomview.cpp | 87 +++++++++++++++------------ kmag/kmagzoomview.h | 13 +++- kmousetool/kmousetool/kmousetool.cpp | 3 + kmousetool/kmousetool/kmousetool.h | 3 + kmousetool/kmousetool/main.cpp | 4 +- kmouth/kmouth.cpp | 4 +- kmouth/optionsdialog.cpp | 10 +-- kmouth/phraseedit.cpp | 2 + kmouth/phraseedit.h | 2 + kmouth/phraselist.cpp | 42 +++++++------ kmouth/phraselist.h | 4 +- kmouth/phraselistitem.cpp | 8 +-- kmouth/phraselistitem.h | 4 +- kmouth/speech.cpp | 10 +-- kmouth/texttospeechconfigurationwidget.cpp | 4 +- kmouth/texttospeechsystem.cpp | 10 +-- kmouth/texttospeechsystem.h | 4 +- kttsd/libkttsd/filterproc.cpp | 6 +- kttsd/libkttsd/filterproc.h | 6 +- kttsd/libkttsd/player.h | 4 +- kttsd/libkttsd/pluginconf.cpp | 4 +- kttsd/libkttsd/selecttalkerdlg.cpp | 18 +++--- kttsd/libkttsd/selecttalkerdlg.h | 2 +- kttsd/libkttsd/talkercode.cpp | 6 +- kttsd/libkttsd/talkercode.h | 4 +- kttsd/plugins/festivalint/festivalintconf.cpp | 5 +- kttsd/plugins/festivalint/festivalintconf.h | 4 +- kttsd/plugins/festivalint/festivalintproc.cpp | 4 +- 35 files changed, 222 insertions(+), 144 deletions(-) diff --git a/kbstateapplet/Makefile.am b/kbstateapplet/Makefile.am index d4990571..5fc99393 100644 --- a/kbstateapplet/Makefile.am +++ b/kbstateapplet/Makefile.am @@ -16,7 +16,7 @@ eventsrc_DATA = eventsrc EXTRA_DIST = $(lnk_DATA) kbstate_panelapplet_la_LDFLAGS = $(KDE_PLUGIN) -module $(all_libraries) -kbstate_panelapplet_la_LIBADD = $(LIB_KDEUI) +kbstate_panelapplet_la_LIBADD = $(LIB_KDEUI) -lkickermain messages: $(XGETTEXT) *.cpp *.h -o $(podir)/kbstateapplet.pot @@ -24,4 +24,4 @@ messages: srcdoc: kdoc -a -p -H -d $$HOME/web/src/kbstateapplet kbstateapplet *.h -lqt -lkdecore -lkdeui -lkfile -SUBDIRS = images \ No newline at end of file +SUBDIRS = images diff --git a/kbstateapplet/kbstate.cpp b/kbstateapplet/kbstate.cpp index a65913fd..977a4a13 100644 --- a/kbstateapplet/kbstate.cpp +++ b/kbstateapplet/kbstate.cpp @@ -20,7 +20,11 @@ #include #include #include -#include +#include +//Added by qt3to4: +#include +#include +#include #include #include @@ -52,7 +56,7 @@ extern "C" KDE_EXPORT KPanelApplet* init(QWidget *parent, const QString& configFile) { KGlobal::locale()->insertCatalogue("kbstateapplet"); - KbStateApplet *applet = new KbStateApplet(configFile, KPanelApplet::Normal, KPanelApplet::About, parent, "kbstateapplet"); + KbStateApplet *applet = new KbStateApplet(configFile, Plasma::Normal, Plasma::About, parent, "kbstateapplet"); return applet; } } @@ -119,7 +123,7 @@ static ModifierKey modifierKeys[] = { /********************************************************************/ -KbStateApplet::KbStateApplet(const QString& configFile, Type t, int actions, +KbStateApplet::KbStateApplet(const QString& configFile, Plasma::Type t, int actions, QWidget *parent, const char *name) : KPanelApplet( configFile, t, actions, parent, name ) { @@ -244,7 +248,7 @@ int KbStateApplet::heightForWidth(int w) const { } void KbStateApplet::mousePressEvent(QMouseEvent *e) { - if (e->button() == RightButton) + if (e->button() == Qt::RightButton) popup->popup(e->globalPos()); } @@ -266,7 +270,7 @@ void KbStateApplet::layout() { int size = this->size; int lines, length, x,y,dx,dy, ldx,ldy; - if (orientation() == Vertical) { + if (orientation() == Qt::Vertical) { calculateSizes (width(), showModifiers?modifiers.count():0, showLockkeys?lockkeys.count():0, showSlowkeys, lines, length, size); diff --git a/kbstateapplet/kbstate.h b/kbstateapplet/kbstate.h index aad6788e..d654af60 100644 --- a/kbstateapplet/kbstate.h +++ b/kbstateapplet/kbstate.h @@ -18,10 +18,17 @@ #ifndef __kbstate_h__ #define __kbstate_h__ -#include +#include #include -#include +#include #include +//Added by qt3to4: +#include +#include +#include +#include +#include +#include class QLabel; class QGridLayout; @@ -35,7 +42,7 @@ public: QSize minimumSizeHint () const; }; -typedef QPtrList IconList; +typedef Q3PtrList IconList; class TimeoutIcon : public StatusIcon { Q_OBJECT @@ -95,7 +102,7 @@ class KbStateApplet : public KPanelApplet { Q_OBJECT public: - KbStateApplet(const QString& configFile, Type t = Normal, int actions = 0, + KbStateApplet(const QString& configFile, Plasma::Type t = Plasma::Normal, int actions = 0, QWidget *parent = 0, const char *name = 0); ~KbStateApplet(); diff --git a/kmag/kmag.cpp b/kmag/kmag.cpp index 3a59cf22..5766dcaa 100644 --- a/kmag/kmag.cpp +++ b/kmag/kmag.cpp @@ -23,11 +23,15 @@ #include #include #include -#include -#include +#include +#include #include -#include - +#include +//Added by qt3to4: +#include +#include +#include +#include #include // include files for KDE @@ -73,7 +77,7 @@ #endif KmagApp::KmagApp(QWidget* , const char* name) - : KMainWindow(0, name, WStyle_MinMax | WType_TopLevel | WDestructiveClose | WStyle_ContextHelp | WStyle_StaysOnTop), + : KMainWindow(0, name, Qt::WStyle_MinMax | Qt::WType_TopLevel | Qt::WDestructiveClose | Qt::WStyle_ContextHelp | Qt::WStyle_StaysOnTop), m_defaultMouseCursorType(2) { config=kapp->config(); @@ -151,7 +155,7 @@ void KmagApp::initActions() m_pCopy->setWhatsThis(i18n("Click on this button to copy the current zoomed view to the clipboard which you can paste in other applications.")); m_pCopy->setToolTip(i18n("Copy zoomed image to clipboard")); - m_pShowMenu = new KToggleAction(i18n("Show &Menu"), "showmenu", CTRL+Key_M, this, + m_pShowMenu = new KToggleAction(i18n("Show &Menu"), "showmenu", Qt::CTRL+Qt::Key_M, this, SLOT(slotShowMenu()), actionCollection(),"show_menu"); #ifdef havesetCheckedState m_pShowMenu->setCheckedState(i18n("Hide &Menu")); @@ -172,21 +176,21 @@ void KmagApp::initActions() m_pShowSettingsToolBar->setCheckedState(i18n("Hide &Settings Toolbar")); #endif - m_modeFollowMouse = new KRadioAction(i18n("&Follow Mouse Mode"), "followmouse", Key_F1, this, + m_modeFollowMouse = new KRadioAction(i18n("&Follow Mouse Mode"), "followmouse", Qt::Key_F1, this, SLOT(slotModeFollowMouse()), actionCollection(), "mode_followmouse"); m_modeFollowMouse->setToolTip(i18n("Magnify around the mouse cursor")); m_modeFollowMouse->setWhatsThis(i18n("If selected, the area around the mouse cursor is magnified")); - m_modeSelWin = new KRadioAction(i18n("Se&lection Window Mode"), "window", Key_F2, this, + m_modeSelWin = new KRadioAction(i18n("Se&lection Window Mode"), "window", Qt::Key_F2, this, SLOT(slotModeSelWin()), actionCollection(), "mode_selectionwindow"); m_modeSelWin->setToolTip(i18n("Show a window for selecting the magnified area")); - m_modeWholeScreen = new KRadioAction(i18n("&Whole Screen Mode"), "window_fullscreen", Key_F3, this, + m_modeWholeScreen = new KRadioAction(i18n("&Whole Screen Mode"), "window_fullscreen", Qt::Key_F3, this, SLOT(slotModeWholeScreen()), actionCollection(),"mode_wholescreen"); m_modeWholeScreen->setToolTip(i18n("Magnify the whole screen")); m_modeWholeScreen->setWhatsThis(i18n("Click on this button to fit the zoom view to the zoom window.")); - m_hideCursor = new KToggleAction(i18n("Hide Mouse &Cursor"), "hidemouse", Key_F4, this, + m_hideCursor = new KToggleAction(i18n("Hide Mouse &Cursor"), "hidemouse", Qt::Key_F4, this, SLOT(slotToggleHideCursor()), actionCollection(), "hidecursor"); #ifdef havesetCheckedState m_hideCursor->setCheckedState(i18n("Show Mouse &Cursor")); @@ -227,8 +231,8 @@ void KmagApp::initView() { m_zoomView = new KMagZoomView( this, "ZoomView" ); m_zoomView->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, m_zoomView->sizePolicy().hasHeightForWidth() ) ); - m_zoomView->setFrameShape( QFrame::StyledPanel ); - m_zoomView->setFrameShadow( QFrame::Raised ); + m_zoomView->setFrameShape( Q3Frame::StyledPanel ); + m_zoomView->setFrameShadow( Q3Frame::Raised ); setCentralWidget(m_zoomView); } @@ -382,7 +386,7 @@ void KmagApp::contextMenuEvent ( QContextMenuEvent * e ) { // show popup KXMLGUIFactory *factory = this->factory(); - QPopupMenu *popup = (QPopupMenu *)factory->container("mainPopUp",this); + Q3PopupMenu *popup = (Q3PopupMenu *)factory->container("mainPopUp",this); if (popup != 0) popup->popup(e->globalPos(), 0); e->accept(); diff --git a/kmag/kmag.h b/kmag/kmag.h index 2af6f83a..f147bc1f 100644 --- a/kmag/kmag.h +++ b/kmag/kmag.h @@ -31,6 +31,8 @@ #include // include files for Qt #include +//Added by qt3to4: +#include // include files for KDE #include diff --git a/kmag/kmagselrect.cpp b/kmag/kmagselrect.cpp index ecea77dd..9814bf3f 100644 --- a/kmag/kmagselrect.cpp +++ b/kmag/kmagselrect.cpp @@ -24,7 +24,11 @@ #include #include #include - +//Added by qt3to4: +#include +#include +#include +#include #include #include @@ -191,8 +195,8 @@ void KMagSelRect::selWinResized() // KMagSelWin //-------------------------------------------------------------------------- -KMagSelWin::KMagSelWin ( QWidget * parent, const char * name, WFlags ) : - QWidget (parent, name, WStyle_Customize | WStyle_NoBorder | WStyle_StaysOnTop | WType_TopLevel | WX11BypassWM) +KMagSelWin::KMagSelWin ( QWidget * parent, const char * name, Qt::WFlags ) : + QWidget (parent, name, Qt::WStyle_Customize | Qt::WStyle_NoBorder | Qt::WStyle_StaysOnTop | Qt::WType_TopLevel | Qt::WX11BypassWM) { QBitmap line (8, 8, line_bits, true); setPaletteBackgroundPixmap (line); @@ -332,11 +336,11 @@ void KMagSelWin::bottomRightResized ( QPoint offset ) // KMagSelWinCorner //-------------------------------------------------------------------------- -KMagSelWinCorner::KMagSelWinCorner ( QWidget * parent, const char * name, WFlags f ) : +KMagSelWinCorner::KMagSelWinCorner ( QWidget * parent, const char * name, Qt::WFlags f ) : QLabel (parent, name, f) { - setBackgroundMode (QWidget::FixedColor); - setFrameStyle (QFrame::WinPanel | QFrame::Raised); + setBackgroundMode (Qt::FixedColor); + setFrameStyle (Q3Frame::WinPanel | Q3Frame::Raised); setLineWidth (1); } @@ -352,7 +356,7 @@ void KMagSelWinCorner::mousePressEvent ( QMouseEvent * e ) void KMagSelWinCorner::mouseReleaseEvent ( QMouseEvent * e ) { - setFrameShadow (QFrame::Raised); + setFrameShadow (Q3Frame::Raised); emit resized (e->globalPos () - oldPos); } diff --git a/kmag/kmagselrect.h b/kmag/kmagselrect.h index c881efaa..0ba6fc19 100644 --- a/kmag/kmagselrect.h +++ b/kmag/kmagselrect.h @@ -26,6 +26,8 @@ #include #include #include +//Added by qt3to4: +#include // Min function #define min(a,b) ((a) < (b) ? (a) : (b)) @@ -36,7 +38,7 @@ class KMagSelWinCorner : public QLabel public: - KMagSelWinCorner ( QWidget * parent = 0, const char * name = 0, WFlags f = 0 ); + KMagSelWinCorner ( QWidget * parent = 0, const char * name = 0, Qt::WFlags f = 0 ); virtual ~KMagSelWinCorner(); @@ -60,7 +62,7 @@ class KMagSelWin : public QWidget public: - KMagSelWin ( QWidget * parent = 0, const char * name = 0, WFlags f = 0 ); + KMagSelWin ( QWidget * parent = 0, const char * name = 0, Qt::WFlags f = 0 ); virtual ~KMagSelWin(); diff --git a/kmag/kmagzoomview.cpp b/kmag/kmagzoomview.cpp index c56be9f2..f0cabfe9 100644 --- a/kmag/kmagzoomview.cpp +++ b/kmag/kmagzoomview.cpp @@ -27,9 +27,17 @@ #include #include #include -#include +#include #include - +//Added by qt3to4: +#include +#include +#include +#include +#include +#include +#include +#include // include files for KDE #include #include @@ -74,7 +82,7 @@ static uchar phand_bits[] = { KMagZoomView::KMagZoomView(QWidget *parent, const char *name) - : QScrollView(parent, name), + : Q3ScrollView(parent, name), m_selRect(0, 0, 128, 128, this), m_grabTimer(parent), m_mouseViewTimer(parent), @@ -87,8 +95,8 @@ KMagZoomView::KMagZoomView(QWidget *parent, const char *name) { KApplication::setGlobalMouseTracking(TRUE); viewport()->setMouseTracking(TRUE); - viewport()->setBackgroundMode (NoBackground); - viewport()->setFocusPolicy(QWidget::StrongFocus); + viewport()->setBackgroundMode (Qt::NoBackground); + viewport()->setFocusPolicy(Qt::StrongFocus); // init the zoom matrix m_zoomMatrix.reset(); @@ -113,7 +121,7 @@ KMagZoomView::KMagZoomView(QWidget *parent, const char *name) // start the grabTimer @ 25 frames per second! m_mouseViewTimer.start(25); - QWhatsThis::add(this, i18n("This is the main window which shows the contents of the\ + Q3WhatsThis::add(this, i18n("This is the main window which shows the contents of the\ selected region. The contents will be magnified according to the zoom level that is set.")); // different ways to show the cursor. @@ -136,13 +144,13 @@ void KMagZoomView::followMouse(bool follow) if(follow) { m_followMouse = true; m_mouseMode = Normal; - setVScrollBarMode (QScrollView::AlwaysOff); - setHScrollBarMode (QScrollView::AlwaysOff); + setVScrollBarMode (Q3ScrollView::AlwaysOff); + setHScrollBarMode (Q3ScrollView::AlwaysOff); } else { m_followMouse = false; m_mouseMode = Normal; - setVScrollBarMode (QScrollView::AlwaysOn); - setHScrollBarMode (QScrollView::AlwaysOn); + setVScrollBarMode (Q3ScrollView::AlwaysOn); + setHScrollBarMode (Q3ScrollView::AlwaysOn); } } @@ -179,7 +187,7 @@ void KMagZoomView::showEvent( QShowEvent* ) */ void KMagZoomView::resizeEvent( QResizeEvent * e ) { - QScrollView::resizeEvent (e); + Q3ScrollView::resizeEvent (e); if(m_fitToWindow) fitToWindow(); } @@ -194,7 +202,7 @@ void KMagZoomView::drawContents ( QPainter * p, int clipx, int clipy, int clipw, if(m_grabbedZoomedPixmap.isNull()) return; - // Paint empty areas black + // Paint empty areas Qt::black if (contentsX()+contentsWidth() < visibleWidth()) p->fillRect ( QRect (contentsX()+contentsWidth(), clipy, visibleWidth()-contentsX()-contentsWidth(), cliph) @@ -253,7 +261,8 @@ void KMagZoomView::paintMouseCursor(QPaintDevice *dev, QPoint mousePos) case 1: // 1. Square around the pixel pz.setPen(Qt::white); - pz.setRasterOp(Qt::XorROP); +#warning "Port Qt4 pz.setRasterOp(Qt::XorROP);"; + //pz.setRasterOp(Qt::XorROP); pz.drawRect(mousePos.x()-1, mousePos.y()-1, (int)m_zoom+2, (int)m_zoom+2); break; @@ -289,7 +298,7 @@ void KMagZoomView::paintMouseCursor(QPaintDevice *dev, QPoint mousePos) break; kdDebug() << ">" << dummy->name() << ":" << dummy->cursor().shape() << "-" << endl; switch(this->cursor().shape()) { - case ArrowCursor : + case Qt::ArrowCursor : { // 2. Arrow cursor pz.setPen(Qt::black); @@ -359,7 +368,7 @@ QPoint KMagZoomView::calcMousePos(bool updateMousePos) void KMagZoomView::mousePressEvent(QMouseEvent *e) { switch(e->button()) { - case QMouseEvent::LeftButton : + case Qt::LeftButton : if(m_ctrlKeyPressed) { // check if currently in resize mode // don't do anything if fitToWindow is enabled @@ -368,7 +377,7 @@ void KMagZoomView::mousePressEvent(QMouseEvent *e) m_mouseMode = ResizeSelection; // set mouse cursor to "resize all direction" - setCursor(sizeAllCursor); + setCursor(Qt::sizeAllCursor); // backup the old position m_oldMousePos.setX(e->globalX()); @@ -393,7 +402,7 @@ void KMagZoomView::mousePressEvent(QMouseEvent *e) m_mouseMode = MoveSelection; // set mouse cursor to cross hair - setCursor(crossCursor); + setCursor(Qt::crossCursor); // backup the old position m_oldMousePos.setX(e->globalX()); @@ -438,14 +447,14 @@ void KMagZoomView::mousePressEvent(QMouseEvent *e) } break; - case QMouseEvent::MidButton : + case Qt::MidButton : // check if currently in move mode // don't do anything if follow mouse is enabled if ((m_mouseMode != MoveSelection) && !m_followMouse) { m_mouseMode = MoveSelection; // set mouse cursor to cross hair - setCursor(crossCursor); + setCursor(Qt::crossCursor); // backup the old position m_oldMousePos.setX(e->globalX()); @@ -483,8 +492,8 @@ void KMagZoomView::mousePressEvent(QMouseEvent *e) void KMagZoomView::mouseReleaseEvent(QMouseEvent *e) { switch(e->button()) { - case QMouseEvent::LeftButton : - case QMouseEvent::MidButton : + case Qt::LeftButton : + case Qt::MidButton : // check if currently in move mode if(m_mouseMode == MoveSelection) { // hide the selection window @@ -493,7 +502,7 @@ void KMagZoomView::mouseReleaseEvent(QMouseEvent *e) m_mouseMode = Normal; // restore the cursor shape - setCursor(arrowCursor); + setCursor(Qt::arrowCursor); // restore the cursor position QCursor::setPos(m_oldMousePos); @@ -504,7 +513,7 @@ void KMagZoomView::mouseReleaseEvent(QMouseEvent *e) m_mouseMode = Normal; // restore the cursor shape - setCursor(arrowCursor); + setCursor(Qt::arrowCursor); // restore the cursor position QCursor::setPos(m_oldMousePos); @@ -516,13 +525,13 @@ void KMagZoomView::mouseReleaseEvent(QMouseEvent *e) m_mouseMode = Normal; // restore the cursor shape - setCursor(arrowCursor); + setCursor(Qt::arrowCursor); } break; - case QMouseEvent::RightButton : + case Qt::RightButton : break; - case QMouseEvent::NoButton : + case Qt::NoButton : break; // do nothing @@ -612,16 +621,16 @@ void KMagZoomView::mouseMoveEvent(QMouseEvent *e) void KMagZoomView::keyPressEvent(QKeyEvent *e) { int offset = 16; - if (e->state() & QKeyEvent::ShiftButton) + if (e->state() & Qt::ShiftButton) offset = 1; - if (e->key() == QKeyEvent::Key_Control) + if (e->key() == Qt::Key_Control) m_ctrlKeyPressed = true; - else if (e->key() == QKeyEvent::Key_Shift) + else if (e->key() == Qt::Key_Shift) m_shiftKeyPressed = true; - else if (e->key() == QKeyEvent::Key_Left) + else if (e->key() == Qt::Key_Left) { - if (e->state() & QKeyEvent::ControlButton) + if (e->state() & Qt::ControlButton) { if (offset >= m_selRect.width()) m_selRect.setWidth (1); @@ -645,9 +654,9 @@ void KMagZoomView::keyPressEvent(QKeyEvent *e) } m_selRect.update(); } - else if (e->key() == QKeyEvent::Key_Right) + else if (e->key() == Qt::Key_Right) { - if (e->state() & QKeyEvent::ControlButton) + if (e->state() & Qt::ControlButton) { if (m_selRect.right()+offset >= QApplication::desktop()->width()) m_selRect.setRight (QApplication::desktop()->width()-1); @@ -671,9 +680,9 @@ void KMagZoomView::keyPressEvent(QKeyEvent *e) } m_selRect.update(); } - else if (e->key() == QKeyEvent::Key_Up) + else if (e->key() == Qt::Key_Up) { - if (e->state() & QKeyEvent::ControlButton) + if (e->state() & Qt::ControlButton) { if (offset >= m_selRect.height()) m_selRect.setHeight (1); @@ -697,9 +706,9 @@ void KMagZoomView::keyPressEvent(QKeyEvent *e) } m_selRect.update(); } - else if (e->key() == QKeyEvent::Key_Down) + else if (e->key() == Qt::Key_Down) { - if (e->state() & QKeyEvent::ControlButton) + if (e->state() & Qt::ControlButton) { if (m_selRect.bottom()+offset >= QApplication::desktop()->height()) m_selRect.setBottom (QApplication::desktop()->height()-1); @@ -729,9 +738,9 @@ void KMagZoomView::keyPressEvent(QKeyEvent *e) void KMagZoomView::keyReleaseEvent(QKeyEvent *e) { - if (e->key() == QKeyEvent::Key_Control) + if (e->key() == Qt::Key_Control) m_ctrlKeyPressed = false; - else if (e->key() == QKeyEvent::Key_Shift) + else if (e->key() == Qt::Key_Shift) m_shiftKeyPressed = false; else e->ignore(); diff --git a/kmag/kmagzoomview.h b/kmag/kmagzoomview.h index 91f409e4..6756d988 100644 --- a/kmag/kmagzoomview.h +++ b/kmag/kmagzoomview.h @@ -29,10 +29,17 @@ #include #include #include -#include +#include #include #include #include +//Added by qt3to4: +#include +#include +#include +#include +#include +#include //class KMagSelRect; #include "kmagselrect.h" @@ -42,7 +49,7 @@ * * @author Sarang Lakare */ -class KMagZoomView : public QScrollView +class KMagZoomView : public Q3ScrollView { Q_OBJECT public: @@ -171,7 +178,7 @@ class KMagZoomView : public QScrollView QTimer m_mouseViewTimer; /// Zoom matrix - QWMatrix m_zoomMatrix; + QMatrix m_zoomMatrix; /// Saves the mouse position when a button is clicked and b4 the cursor is moved to new position QPoint m_oldMousePos; diff --git a/kmousetool/kmousetool/kmousetool.cpp b/kmousetool/kmousetool/kmousetool.cpp index ee27ba46..83cdcb6c 100644 --- a/kmousetool/kmousetool/kmousetool.cpp +++ b/kmousetool/kmousetool/kmousetool.cpp @@ -33,6 +33,9 @@ #include #include #include +//Added by qt3to4: +#include +#include #include #include #include diff --git a/kmousetool/kmousetool/kmousetool.h b/kmousetool/kmousetool/kmousetool.h index 88a05eca..0a1097af 100644 --- a/kmousetool/kmousetool/kmousetool.h +++ b/kmousetool/kmousetool/kmousetool.h @@ -23,6 +23,9 @@ #define KMOUSETOOL_H #include +//Added by qt3to4: +#include +#include #ifdef HAVE_CONFIG_H #include diff --git a/kmousetool/kmousetool/main.cpp b/kmousetool/kmousetool/main.cpp index 29c5e302..c4a65df3 100644 --- a/kmousetool/kmousetool/main.cpp +++ b/kmousetool/kmousetool/main.cpp @@ -24,6 +24,8 @@ #include #include #include +//Added by qt3to4: +#include #include #include "kmousetool.h" @@ -58,7 +60,7 @@ int main(int argc, char *argv[]) DCOPClient *client = new DCOPClient(); client->attach(); QByteArray data; - QCString replyType; + Q3CString replyType; QByteArray replyData; if ( !client->call("kmousetool", "qt/KMouseToolUI", "show()", data, replyType, replyData, true) || diff --git a/kmouth/kmouth.cpp b/kmouth/kmouth.cpp index c78a0107..8f6ef305 100644 --- a/kmouth/kmouth.cpp +++ b/kmouth/kmouth.cpp @@ -18,6 +18,8 @@ // include files for QT #include #include +//Added by qt3to4: +#include // include files for KDE #include @@ -447,7 +449,7 @@ void KMouthApp::slotStatusMsg(const QString &text) void KMouthApp::slotPhrasebookConfirmed (PhraseBook &book) { QString name = "phrasebooks"; - QPopupMenu *popup = (QPopupMenu *)factory()->container(name, this); + Q3PopupMenu *popup = (Q3PopupMenu *)factory()->container(name, this); KToolBar *toolbar = toolBar ("phrasebookBar"); KActionPtrList actions = phrases->actions (); diff --git a/kmouth/optionsdialog.cpp b/kmouth/optionsdialog.cpp index 48731674..f4b883cf 100644 --- a/kmouth/optionsdialog.cpp +++ b/kmouth/optionsdialog.cpp @@ -18,8 +18,8 @@ #include #include -#include -#include +#include +#include #include #include #include @@ -120,7 +120,7 @@ OptionsDialog::OptionsDialog (QWidget *parent) setHelp ("config-dialog"); QPixmap iconGeneral = KGlobal::iconLoader()->loadIcon("configure", KIcon::NoGroup, KIcon::SizeMedium); - QGrid *pageGeneral = addGridPage (1, Qt::Horizontal, i18n("General Options"), QString::null, iconGeneral); + Q3Grid *pageGeneral = addGridPage (1, Qt::Horizontal, i18n("General Options"), QString::null, iconGeneral); tabCtl = new QTabWidget (pageGeneral, "general"); @@ -133,13 +133,13 @@ OptionsDialog::OptionsDialog (QWidget *parent) tabCtl->addTab (commandWidget, i18n("&Text-to-Speech")); QPixmap iconCompletion = KGlobal::iconLoader()->loadIcon("keyboard", KIcon::NoGroup, KIcon::SizeMedium); - QGrid *pageCompletion = addGridPage (1, Qt::Horizontal, i18n("Word Completion"), QString::null, iconCompletion); + Q3Grid *pageCompletion = addGridPage (1, Qt::Horizontal, i18n("Word Completion"), QString::null, iconCompletion); completionWidget = new WordCompletionWidget(pageCompletion, "Word Completion widget"); kttsd = loadKttsd(); if (kttsd != 0) { QPixmap iconKttsd = KGlobal::iconLoader()->loadIcon("multimedia", KIcon::NoGroup, KIcon::SizeMedium); - QGrid *pageKttsd = addGridPage (1, Qt::Horizontal, i18n("KTTSD Speech Service"), + Q3Grid *pageKttsd = addGridPage (1, Qt::Horizontal, i18n("KTTSD Speech Service"), i18n("KDE Text-to-Speech Daemon Configuration"), iconKttsd); kttsd->reparent(pageKttsd,0,QPoint(0,0),true); diff --git a/kmouth/phraseedit.cpp b/kmouth/phraseedit.cpp index 0f2e3198..ddb92c44 100644 --- a/kmouth/phraseedit.cpp +++ b/kmouth/phraseedit.cpp @@ -16,6 +16,8 @@ ***************************************************************************/ #include "phraseedit.h" +//Added by qt3to4: +#include PhraseEdit::PhraseEdit(const QString &string, QWidget *parent) : KLineEdit (string, parent) { diff --git a/kmouth/phraseedit.h b/kmouth/phraseedit.h index a7a065e8..c1fe6ea7 100644 --- a/kmouth/phraseedit.h +++ b/kmouth/phraseedit.h @@ -19,6 +19,8 @@ #define PHRASEEDIT_H #include +//Added by qt3to4: +#include /** * This class extends a KLineEdit by consuming fewer unused key presses. diff --git a/kmouth/phraselist.cpp b/kmouth/phraselist.cpp index d57682af..8a8e3b15 100644 --- a/kmouth/phraselist.cpp +++ b/kmouth/phraselist.cpp @@ -19,9 +19,13 @@ #include #include #include -#include -#include +#include +#include #include +//Added by qt3to4: +#include +#include +#include // include files for KDE #include @@ -52,8 +56,8 @@ PhraseList::PhraseList(QWidget *parent, const char *name) : QWidget(parent,name) listBox = new KListBox (this); listBox->setFocusPolicy(QWidget::NoFocus); - listBox->setSelectionMode (QListBox::Extended); - QWhatsThis::add (listBox, i18n("This list contains the history of spoken sentences. You can select sentences and press the speak button for re-speaking.")); + listBox->setSelectionMode (Q3ListBox::Extended); + Q3WhatsThis::add (listBox, i18n("This list contains the history of spoken sentences. You can select sentences and press the speak button for re-speaking.")); layout->addWidget(listBox); QHBoxLayout *rowLayout = new QHBoxLayout (); @@ -71,21 +75,21 @@ PhraseList::PhraseList(QWidget *parent, const char *name) : QWidget(parent,name) lineEdit->setEchoMode(QLineEdit::Normal); lineEdit->setCompletionObject (completion); lineEdit->setAutoDeleteCompletionObject(true); - QWhatsThis::add (lineEdit, i18n("Into this edit field you can type a phrase. Click on the speak button in order to speak the entered phrase.")); + Q3WhatsThis::add (lineEdit, i18n("Into this edit field you can type a phrase. Click on the speak button in order to speak the entered phrase.")); rowLayout->addWidget(lineEdit); lineEdit->setFocus(); - QIconSet icon = KGlobal::iconLoader()->loadIconSet("speak", KIcon::Small); + QIcon icon = KGlobal::iconLoader()->loadIconSet("speak", KIcon::Small); speakButton = new QPushButton (icon, i18n("&Speak"), this); speakButton->setFocusPolicy(QWidget::NoFocus); speakButton->setAutoDefault(false); - QWhatsThis::add (speakButton, i18n("Speaks the currently active sentence(s). If there is some text in the edit field it is spoken. Otherwise the selected sentences in the history (if any) are spoken.")); + Q3WhatsThis::add (speakButton, i18n("Speaks the currently active sentence(s). If there is some text in the edit field it is spoken. Otherwise the selected sentences in the history (if any) are spoken.")); rowLayout->addWidget(speakButton); connect(dictionaryCombo, SIGNAL (activated (const QString &)), completion, SLOT (setWordList(const QString &))); connect(completion, SIGNAL (wordListsChanged (const QStringList &)), this, SLOT (configureCompletionCombo (const QStringList &))); connect(listBox, SIGNAL(selectionChanged()), SLOT(selectionChanged())); - connect(listBox, SIGNAL(contextMenuRequested (QListBoxItem *, const QPoint &)), SLOT(contextMenuRequested (QListBoxItem *, const QPoint &))); + connect(listBox, SIGNAL(contextMenuRequested (Q3ListBoxItem *, const QPoint &)), SLOT(contextMenuRequested (Q3ListBoxItem *, const QPoint &))); connect(lineEdit, SIGNAL(returnPressed(const QString &)), SLOT(lineEntered(const QString &))); connect(lineEdit, SIGNAL(textChanged (const QString &)), SLOT(textChanged(const QString &))); connect(speakButton, SIGNAL( clicked ()), SLOT(speak())); @@ -99,7 +103,7 @@ PhraseList::~PhraseList() { void PhraseList::print(KPrinter *pPrinter) { PhraseBook book; - for (QListBoxItem *item = listBox->firstItem(); item != 0; item = item->next()) { + for (Q3ListBoxItem *item = listBox->firstItem(); item != 0; item = item->next()) { book += PhraseBookEntry(Phrase(item->text())); } @@ -109,7 +113,7 @@ void PhraseList::print(KPrinter *pPrinter) { QStringList PhraseList::getListSelection() { QStringList res = QStringList(); - for (QListBoxItem *item = listBox->firstItem(); item != 0; item = item->next()) { + for (Q3ListBoxItem *item = listBox->firstItem(); item != 0; item = item->next()) { if (item->isSelected()) res += item->text(); } @@ -118,7 +122,7 @@ QStringList PhraseList::getListSelection() { } bool PhraseList::existListSelection() { - for (QListBoxItem *item = listBox->firstItem(); item != 0; item = item->next()) { + for (Q3ListBoxItem *item = listBox->firstItem(); item != 0; item = item->next()) { if (item->isSelected()) return true; } @@ -133,7 +137,7 @@ bool PhraseList::existEditSelection() { void PhraseList::enableMenuEntries() { bool deselected = false; bool selected = false; - for (QListBoxItem *item = listBox->firstItem(); item != 0; item = item->next()) { + for (Q3ListBoxItem *item = listBox->firstItem(); item != 0; item = item->next()) { if (item->isSelected()) selected = true; else @@ -254,8 +258,8 @@ void PhraseList::speakListSelection () { } void PhraseList::removeListSelection () { - QListBoxItem *next; - for (QListBoxItem *item = listBox->firstItem(); item != 0; item = next) { + Q3ListBoxItem *next; + for (Q3ListBoxItem *item = listBox->firstItem(); item != 0; item = next) { next = item->next(); if (item->isSelected()) { @@ -306,7 +310,7 @@ void PhraseList::insertIntoPhraseList (const QString &phrase, bool clearEditLine enableMenuEntries (); } -void PhraseList::contextMenuRequested (QListBoxItem *, const QPoint &pos) { +void PhraseList::contextMenuRequested (Q3ListBoxItem *, const QPoint &pos) { QString name; if (existListSelection()) name = "phraselist_selection_popup"; @@ -315,7 +319,7 @@ void PhraseList::contextMenuRequested (QListBoxItem *, const QPoint &pos) { KMouthApp *theApp=(KMouthApp *) parentWidget(); KXMLGUIFactory *factory = theApp->factory(); - QPopupMenu *popup = (QPopupMenu *)factory->container(name,theApp); + Q3PopupMenu *popup = (Q3PopupMenu *)factory->container(name,theApp); if (popup != 0) { popup->popup(pos, 0); } @@ -359,7 +363,7 @@ void PhraseList::setEditLineText(const QString &s) { void PhraseList::keyPressEvent (QKeyEvent *e) { if (e->key() == Qt::Key_Up) { bool selected = false; - for (QListBoxItem *item = listBox->firstItem(); item != 0; item = item->next()) { + for (Q3ListBoxItem *item = listBox->firstItem(); item != 0; item = item->next()) { if (item->isSelected()) { selected = true; } @@ -396,7 +400,7 @@ void PhraseList::keyPressEvent (QKeyEvent *e) { } else if (e->key() == Qt::Key_Down) { bool selected = false; - for (QListBoxItem *item = listBox->firstItem(); item != 0; item = item->next()) { + for (Q3ListBoxItem *item = listBox->firstItem(); item != 0; item = item->next()) { if (item->isSelected()) { selected = true; } @@ -440,7 +444,7 @@ void PhraseList::save () { // format we use that method here. PhraseBook book; - for (QListBoxItem *item = listBox->firstItem(); item != 0; item = item->next()) { + for (Q3ListBoxItem *item = listBox->firstItem(); item != 0; item = item->next()) { book += PhraseBookEntry(Phrase(item->text())); } diff --git a/kmouth/phraselist.h b/kmouth/phraselist.h index 7f563060..1d7388da 100644 --- a/kmouth/phraselist.h +++ b/kmouth/phraselist.h @@ -26,6 +26,8 @@ // include files for Qt #include #include +//Added by qt3to4: +#include class WordCompletion; @@ -84,7 +86,7 @@ public slots: protected slots: void lineEntered (const QString &phrase); - void contextMenuRequested (QListBoxItem *, const QPoint &pos); + void contextMenuRequested (Q3ListBoxItem *, const QPoint &pos); void textChanged (const QString &s); void selectionChanged (); void keyPressEvent (QKeyEvent *e); diff --git a/kmouth/phraselistitem.cpp b/kmouth/phraselistitem.cpp index 6156054f..13519395 100644 --- a/kmouth/phraselistitem.cpp +++ b/kmouth/phraselistitem.cpp @@ -20,17 +20,17 @@ #include PhraseListItem::PhraseListItem (const QString & text) - : QListBoxText::QListBoxText(text) { + : QListBoxText::Q3ListBoxText(text) { } PhraseListItem::~PhraseListItem() { } bool PhraseListItem::drawCursor() const { - if ((QListBoxItem *)this != listBox()->item (listBox()->currentItem())) + if ((Q3ListBoxItem *)this != listBox()->item (listBox()->currentItem())) return false; - for (QListBoxItem *item = listBox()->firstItem(); item != 0; item = item->next() ) { + for (Q3ListBoxItem *item = listBox()->firstItem(); item != 0; item = item->next() ) { if (item->isSelected()) return true; } @@ -42,7 +42,7 @@ int PhraseListItem::rtti() const { } void PhraseListItem::paint (QPainter *p) { - QListBoxText::paint (p); + Q3ListBoxText::paint (p); if (drawCursor()) { QRect r (0, 0, listBox()->maxItemWidth(), height (listBox())); diff --git a/kmouth/phraselistitem.h b/kmouth/phraselistitem.h index 24d5e49f..ab2dd10a 100644 --- a/kmouth/phraselistitem.h +++ b/kmouth/phraselistitem.h @@ -18,7 +18,7 @@ #ifndef PHRASELISTITEM_H #define PHRASELISTITEM_H -#include +#include /** * This class represents a phrase in the list of spoken phrases. It extends @@ -26,7 +26,7 @@ * @author Gunnar Schmi Dt */ -class PhraseListItem : public QListBoxText { +class PhraseListItem : public Q3ListBoxText { public: PhraseListItem (const QString & text); ~PhraseListItem(); diff --git a/kmouth/speech.cpp b/kmouth/speech.cpp index d2f7db81..f61a85b4 100644 --- a/kmouth/speech.cpp +++ b/kmouth/speech.cpp @@ -17,12 +17,14 @@ #include "speech.h" #include -#include -#include +#include +#include #include #include #include #include +//Added by qt3to4: +#include #include #include @@ -48,7 +50,7 @@ QString Speech::prepareCommand (QString command, const QString &text, map['l'] = language; return KMacroExpander::expandMacrosShellQuote (command, map); #else - QValueStack stack; // saved isdoublequote values during parsing of braces + Q3ValueStack stack; // saved isdoublequote values during parsing of braces bool issinglequote=false; // inside '...' ? bool isdoublequote=false; // inside "..." ? int noreplace=0; // nested braces when within ${...} @@ -173,7 +175,7 @@ void Speech::speak(QString command, bool stdIn, const QString &text, const QStri if (text.length () > 0) { // 1. prepare the text: // 1.a) encode the text - QTextStream ts (encText, IO_WriteOnly); + QTextStream ts (encText, QIODevice::WriteOnly); if (encoding == Local) ts.setEncoding (QTextStream::Locale); else if (encoding == Latin1) diff --git a/kmouth/texttospeechconfigurationwidget.cpp b/kmouth/texttospeechconfigurationwidget.cpp index f697061d..34e3f52d 100644 --- a/kmouth/texttospeechconfigurationwidget.cpp +++ b/kmouth/texttospeechconfigurationwidget.cpp @@ -19,9 +19,9 @@ #include "texttospeechconfigurationwidget.h" #include #include -#include +#include #include -#include +#include #include #include #include diff --git a/kmouth/texttospeechsystem.cpp b/kmouth/texttospeechsystem.cpp index 4aeb0f9b..5f025bca 100644 --- a/kmouth/texttospeechsystem.cpp +++ b/kmouth/texttospeechsystem.cpp @@ -19,7 +19,9 @@ #include "texttospeechsystem.h" #include #include -#include +#include +//Added by qt3to4: +#include #include #include @@ -43,9 +45,9 @@ TextToSpeechSystem::~TextToSpeechSystem() { bool kttsdSay (const QString &text, const QString &language) { DCOPClient *client = kapp->dcopClient(); QByteArray data; - QCString replyType; + Q3CString replyType; QByteArray replyData; - QDataStream arg(data, IO_WriteOnly); + QDataStream arg(data, QIODevice::WriteOnly); arg << text << language; return client->call("kttsd", "KSpeech", "sayWarning(QString,QString)", data, replyType, replyData, true); @@ -104,7 +106,7 @@ void TextToSpeechSystem::saveOptions (KConfig *config, const QString &langGroup) } void TextToSpeechSystem::buildCodecList () { - codecList = new QPtrList; + codecList = new Q3PtrList; QTextCodec *codec; int i; for (i = 0; (codec = QTextCodec::codecForIndex(i)); i++) diff --git a/kmouth/texttospeechsystem.h b/kmouth/texttospeechsystem.h index fc9b0182..a8bec6e1 100644 --- a/kmouth/texttospeechsystem.h +++ b/kmouth/texttospeechsystem.h @@ -21,7 +21,7 @@ #include #include -#include +#include class KConfig; @@ -45,7 +45,7 @@ public slots: private: void buildCodecList (); - QPtrList *codecList; + Q3PtrList *codecList; int codec; QString ttsCommand; bool stdIn; diff --git a/kttsd/libkttsd/filterproc.cpp b/kttsd/libkttsd/filterproc.cpp index 2193594c..688812ca 100644 --- a/kttsd/libkttsd/filterproc.cpp +++ b/kttsd/libkttsd/filterproc.cpp @@ -27,6 +27,8 @@ // FilterProc includes. #include "filterproc.h" +//Added by qt3to4: +#include /** * Constructor. @@ -88,7 +90,7 @@ bool KttsFilterProc::init(KConfig* /*config*/, const QString& /*configGroup*/){ * Also useful for hints about how to do the filtering. */ /*virtual*/ QString KttsFilterProc::convert(const QString& inputText, TalkerCode* /*talkerCode*/, - const QCString& /*appId*/) + const Q3CString& /*appId*/) { return inputText; } @@ -108,7 +110,7 @@ bool KttsFilterProc::init(KConfig* /*config*/, const QString& /*configGroup*/){ * program must call @ref ackFinished to acknowledge the conversion. */ /*virtual*/ bool KttsFilterProc::asyncConvert(const QString& /*inputText*/, - TalkerCode* /*talkerCode*/, const QCString& /*appId*/) { return false; } + TalkerCode* /*talkerCode*/, const Q3CString& /*appId*/) { return false; } /** * Waits for a previous call to asyncConvert to finish. diff --git a/kttsd/libkttsd/filterproc.h b/kttsd/libkttsd/filterproc.h index c43ccad6..cbd2e787 100644 --- a/kttsd/libkttsd/filterproc.h +++ b/kttsd/libkttsd/filterproc.h @@ -28,6 +28,8 @@ // Qt includes. #include #include +//Added by qt3to4: +#include // KDE includes. #include @@ -97,7 +99,7 @@ public: * @param appId The DCOP appId of the application that queued the text. * Also useful for hints about how to do the filtering. */ - virtual QString convert(const QString& inputText, TalkerCode* talkerCode, const QCString& appId); + virtual QString convert(const QString& inputText, TalkerCode* talkerCode, const Q3CString& appId); /** * Convert input. Runs asynchronously. @@ -113,7 +115,7 @@ public: * program may then call @ref getOutput to retrieve converted text. Calling * program must call @ref ackFinished to acknowledge the conversion. */ - virtual bool asyncConvert(const QString& inputText, TalkerCode* talkerCode, const QCString& appId); + virtual bool asyncConvert(const QString& inputText, TalkerCode* talkerCode, const Q3CString& appId); /** * Waits for a previous call to asyncConvert to finish. diff --git a/kttsd/libkttsd/player.h b/kttsd/libkttsd/player.h index 810c22ae..66ded591 100644 --- a/kttsd/libkttsd/player.h +++ b/kttsd/libkttsd/player.h @@ -18,6 +18,8 @@ #include #include +//Added by qt3to4: +#include #include #include "kdeexportfix.h" @@ -48,7 +50,7 @@ public: virtual void seek(int seekTime) = 0; virtual void seekPosition(int position) = 0; - virtual QStringList getPluginList( const QCString& classname ) = 0; + virtual QStringList getPluginList( const Q3CString& classname ) = 0; virtual void setSinkName(const QString &sinkName) = 0; virtual bool requireVersion(uint major, uint minor, uint micro) = 0; diff --git a/kttsd/libkttsd/pluginconf.cpp b/kttsd/libkttsd/pluginconf.cpp index 03149518..fbcbf524 100644 --- a/kttsd/libkttsd/pluginconf.cpp +++ b/kttsd/libkttsd/pluginconf.cpp @@ -23,6 +23,8 @@ #include #include #include +//Added by qt3to4: +#include // KDE includes. #include @@ -209,7 +211,7 @@ QString PlugInConf::splitLanguageCode(const QString& languageCode, QString& coun QString result; QString def; QFile file(locate("data", "kttsd/kcmkttsd_testmessage.desktop")); - if (file.open(IO_ReadOnly)) + if (file.open(QIODevice::ReadOnly)) { QTextStream stream(&file); stream.setEncoding(QTextStream::UnicodeUTF8); diff --git a/kttsd/libkttsd/selecttalkerdlg.cpp b/kttsd/libkttsd/selecttalkerdlg.cpp index b5657f14..ffaa250f 100644 --- a/kttsd/libkttsd/selecttalkerdlg.cpp +++ b/kttsd/libkttsd/selecttalkerdlg.cpp @@ -27,8 +27,8 @@ // Qt includes. #include #include -#include -#include +#include +#include // KDE includes. #include @@ -160,18 +160,18 @@ QString SelectTalkerDlg::getSelectedTranslatedDescription() void SelectTalkerDlg::slotLanguageBrowseButton_clicked() { // Create a QHBox to host KListView. - QHBox* hBox = new QHBox(m_widget, "SelectLanguage_hbox"); + Q3HBox* hBox = new Q3HBox(m_widget, "SelectLanguage_hbox"); // Create a KListView and fill with all known languages. KListView* langLView = new KListView(hBox, "SelectLanguage_lview"); langLView->addColumn(i18n("Language")); langLView->addColumn(i18n("Code")); - langLView->setSelectionMode(QListView::Single); + langLView->setSelectionMode(Q3ListView::Single); QStringList allLocales = KGlobal::locale()->allLanguagesTwoAlpha(); QString locale; QString language; // Blank line so user can select no language. // Note: Don't use QString::null, which gets displayed at bottom of list, rather than top. - QListViewItem* item = new KListViewItem(langLView, "", ""); + Q3ListViewItem* item = new KListViewItem(langLView, "", ""); if (m_talkerCode.languageCode().isEmpty()) item->setSelected(true); int allLocalesCount = allLocales.count(); for (int ndx=0; ndx < allLocalesCount; ++ndx) @@ -217,7 +217,7 @@ void SelectTalkerDlg::slotLanguageBrowseButton_clicked() void SelectTalkerDlg::slotTalkersListView_selectionChanged() { - QListViewItem* item = m_widget->talkersListView->selectedItem(); + Q3ListViewItem* item = m_widget->talkersListView->selectedItem(); if ( !item ) return; if (!m_widget->useSpecificTalkerRadioButton->isChecked()) return; configChanged(); @@ -259,7 +259,7 @@ void SelectTalkerDlg::applyTalkerCodeToControls() // Select closest matching specific Talker. int talkerIndex = TalkerCode::findClosestMatchingTalker(m_talkers, m_talkerCode.getTalkerCode(), false); KListView* lv = m_widget->talkersListView; - QListViewItem* item = lv->firstChild(); + Q3ListViewItem* item = lv->firstChild(); if ( item ) { while ( talkerIndex > 0 ) @@ -297,7 +297,7 @@ void SelectTalkerDlg::applyControlsToTalkerCode() } else if (m_widget->useSpecificTalkerRadioButton->isChecked() ) { - QListViewItem* item = m_widget->talkersListView->selectedItem(); + Q3ListViewItem* item = m_widget->talkersListView->selectedItem(); if ( item ) { int itemIndex = -1; @@ -316,7 +316,7 @@ void SelectTalkerDlg::loadTalkers(bool /*runningTalkers*/) m_talkers.clear(); KListView* lv = m_widget->talkersListView; lv->clear(); - QListViewItem* item; + Q3ListViewItem* item; KConfig* config = new KConfig("kttsdrc"); config->setGroup("General"); QStringList talkerIDsList = config->readListEntry("TalkerIDs", ','); diff --git a/kttsd/libkttsd/selecttalkerdlg.h b/kttsd/libkttsd/selecttalkerdlg.h index ca324b6b..1564e90a 100644 --- a/kttsd/libkttsd/selecttalkerdlg.h +++ b/kttsd/libkttsd/selecttalkerdlg.h @@ -28,7 +28,7 @@ #define _SELECTTALKERDLG_H_ // Qt includes. -#include +#include // KDE includes. #include diff --git a/kttsd/libkttsd/talkercode.cpp b/kttsd/libkttsd/talkercode.cpp index 0be86c6f..42eafa87 100644 --- a/kttsd/libkttsd/talkercode.cpp +++ b/kttsd/libkttsd/talkercode.cpp @@ -30,6 +30,8 @@ // TalkerCode includes. #include "talkercode.h" +//Added by qt3to4: +#include /** * Constructor. @@ -356,7 +358,7 @@ void TalkerCode::parseTalkerCode(const QString &talkerCode) } // The talker that matches on the most priority attributes wins. int talkersCount = int(talkers.count()); - QMemArray priorityMatch(talkersCount); + Q3MemArray priorityMatch(talkersCount); for (int ndx = 0; ndx < talkersCount; ++ndx) { priorityMatch[ndx] = 0; @@ -412,7 +414,7 @@ void TalkerCode::parseTalkerCode(const QString &talkerCode) // (first configured) will be chosen. if (winnerCount > 1) { - QMemArray preferredMatch(talkersCount); + Q3MemArray preferredMatch(talkersCount); for (int ndx = 0; ndx < talkersCount; ++ndx) { preferredMatch[ndx] = 0; diff --git a/kttsd/libkttsd/talkercode.h b/kttsd/libkttsd/talkercode.h index 27ac40fe..8a0c77f9 100644 --- a/kttsd/libkttsd/talkercode.h +++ b/kttsd/libkttsd/talkercode.h @@ -30,7 +30,7 @@ #include #include #include "kdeexportfix.h" -#include +#include class KDE_EXPORT TalkerCode { @@ -49,7 +49,7 @@ class KDE_EXPORT TalkerCode */ ~TalkerCode(); - typedef QValueList TalkerCodeList; + typedef Q3ValueList TalkerCodeList; /** * Properties. diff --git a/kttsd/plugins/festivalint/festivalintconf.cpp b/kttsd/plugins/festivalint/festivalintconf.cpp index 9bbb54e1..e45d42b8 100644 --- a/kttsd/plugins/festivalint/festivalintconf.cpp +++ b/kttsd/plugins/festivalint/festivalintconf.cpp @@ -34,6 +34,9 @@ #include #include #include +//Added by qt3to4: +#include +#include // KDE includes. #include @@ -466,7 +469,7 @@ void FestivalIntConf::scanVoices() QString voicesFilename = KGlobal::dirs()->resourceDirs("data").last() + "/kttsd/festivalint/voices"; QDomDocument voicesDoc("Festival Voices"); QFile voicesFile(voicesFilename); - if (voicesFile.open(IO_ReadOnly)) voicesDoc.setContent(&voicesFile); + if (voicesFile.open(QIODevice::ReadOnly)) voicesDoc.setContent(&voicesFile); voicesFile.close(); QDomNodeList voices = voicesDoc.elementsByTagName("voice"); uint voicesCount = voices.count(); diff --git a/kttsd/plugins/festivalint/festivalintconf.h b/kttsd/plugins/festivalint/festivalintconf.h index 1b47b41f..1779f850 100644 --- a/kttsd/plugins/festivalint/festivalintconf.h +++ b/kttsd/plugins/festivalint/festivalintconf.h @@ -26,7 +26,7 @@ // Qt includes. #include -#include +#include // KDE includes. #include @@ -170,7 +170,7 @@ class FestivalIntConf : public PlugInConf { // Language country code (if any). QString m_countryCode; // List of voices */ - QValueList m_voiceList; + Q3ValueList m_voiceList; // Festival synthesizer. FestivalIntProc* m_festProc; // Synthesized wave file name. diff --git a/kttsd/plugins/festivalint/festivalintproc.cpp b/kttsd/plugins/festivalint/festivalintproc.cpp index 66782f0e..8a7bf0e2 100644 --- a/kttsd/plugins/festivalint/festivalintproc.cpp +++ b/kttsd/plugins/festivalint/festivalintproc.cpp @@ -29,6 +29,8 @@ #include #include #include +//Added by qt3to4: +#include // KDE includes. #include @@ -397,7 +399,7 @@ bool FestivalIntProc::sendIfReady() if (!m_festProc->isRunning()) return false; QString text = m_outputQueue[0]; text += "\n"; - QCString encodedText; + Q3CString encodedText; if (m_codec) encodedText = m_codec->fromUnicode(text); else -- 2.11.4.GIT