Browse Source

Trinity Qt initial conversion


git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1157647 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
tags/v3.5.13
tpearson 9 years ago
parent
commit
ffe8a83e05
100 changed files with 2261 additions and 2261 deletions
  1. 37
    37
      KDE2PORTING.html
  2. 63
    63
      KDE3PORTING.html
  3. 2
    2
      arts/kde/kartsdispatcher.cc
  4. 2
    2
      arts/kde/kartsdispatcher.h
  5. 1
    1
      arts/kde/kartsfloatwatch.cpp
  6. 4
    4
      arts/kde/kartsfloatwatch.h
  7. 9
    9
      arts/kde/kartsserver.cpp
  8. 2
    2
      arts/kde/kartsserver.h
  9. 9
    9
      arts/kde/kaudioconverter.cc
  10. 3
    3
      arts/kde/kaudioconverter.h
  11. 7
    7
      arts/kde/kaudiomanagerplay.cpp
  12. 6
    6
      arts/kde/kaudiomanagerplay.h
  13. 9
    9
      arts/kde/kaudioplaystream.cpp
  14. 6
    6
      arts/kde/kaudioplaystream.h
  15. 3
    3
      arts/kde/kaudioplaystream_p.h
  16. 12
    12
      arts/kde/kaudiorecordstream.cpp
  17. 4
    4
      arts/kde/kaudiorecordstream.h
  18. 2
    2
      arts/kde/kaudiorecordstream_p.h
  19. 7
    7
      arts/kde/kconverttest.cc
  20. 1
    1
      arts/kde/kconverttest.h
  21. 2
    2
      arts/kde/kdatarequest_impl.h
  22. 22
    22
      arts/kde/kioinputstream_impl.cpp
  23. 7
    7
      arts/kde/kioinputstream_impl.h
  24. 16
    16
      arts/kde/kplayobject.cc
  25. 7
    7
      arts/kde/kplayobject.h
  26. 9
    9
      arts/kde/kplayobjectcreator.cc
  27. 3
    3
      arts/kde/kplayobjectcreator.h
  28. 11
    11
      arts/kde/kplayobjectfactory.cc
  29. 4
    4
      arts/kde/kplayobjectfactory.h
  30. 1
    1
      arts/kde/kplayobjectfactory_p.h
  31. 33
    33
      arts/kde/kvideowidget.cpp
  32. 16
    16
      arts/kde/kvideowidget.h
  33. 18
    18
      arts/kde/mcop-dcop/kmcop.cpp
  34. 3
    3
      arts/kde/mcop-dcop/kmcop.h
  35. 15
    15
      arts/kde/mcop-dcop/mcopdcopobject.cpp
  36. 14
    14
      arts/kde/mcop-dcop/mcopdcopobject.h
  37. 4
    4
      arts/kde/mcop-dcop/mcopdcoptools.h
  38. 75
    75
      arts/knotify/knotify.cpp
  39. 20
    20
      arts/knotify/knotify.h
  40. 5
    5
      arts/message/artsmessage.cc
  41. 60
    60
      common_texts.cpp
  42. 68
    68
      dcop/client/dcop.cpp
  43. 31
    31
      dcop/client/dcopfind.cpp
  44. 15
    15
      dcop/client/dcopstart.cpp
  45. 74
    74
      dcop/client/marshall.cpp
  46. 15
    15
      dcop/dcop_deadlock_test.cpp
  47. 8
    8
      dcop/dcop_deadlock_test.h
  48. 4
    4
      dcop/dcopc.c
  49. 311
    311
      dcop/dcopclient.cpp
  50. 86
    86
      dcop/dcopclient.h
  51. 9
    9
      dcop/dcopidl/dcopidl_test.h
  52. 5
    5
      dcop/dcopidl/main.cpp
  53. 10
    10
      dcop/dcopidl/scanner.cc
  54. 63
    63
      dcop/dcopidl/yacc.cc
  55. 1
    1
      dcop/dcopidl/yacc.cc.h
  56. 30
    30
      dcop/dcopidl2cpp/dcopidl_test.h
  57. 11
    11
      dcop/dcopidl2cpp/main.cpp
  58. 5
    5
      dcop/dcopidl2cpp/main.h
  59. 60
    60
      dcop/dcopidl2cpp/skel.cpp
  60. 24
    24
      dcop/dcopidl2cpp/stub.cpp
  61. 35
    35
      dcop/dcopidl2cpp/stubimpl.cpp
  62. 4
    4
      dcop/dcopidl2cpp/type.h
  63. 38
    38
      dcop/dcopobject.cpp
  64. 37
    37
      dcop/dcopobject.h
  65. 18
    18
      dcop/dcopref.cpp
  66. 176
    176
      dcop/dcopref.h
  67. 149
    149
      dcop/dcopserver.cpp
  68. 38
    38
      dcop/dcopserver.h
  69. 2
    2
      dcop/dcopserver_shutdown.c
  70. 10
    10
      dcop/dcopserver_shutdown_win.cpp
  71. 2
    2
      dcop/dcopserver_win.cpp
  72. 15
    15
      dcop/dcopsignals.cpp
  73. 21
    21
      dcop/dcopsignals.h
  74. 4
    4
      dcop/dcopstub.cpp
  75. 7
    7
      dcop/dcopstub.h
  76. 27
    27
      dcop/dcoptypes.h
  77. 7
    7
      dcop/kdatastream.h
  78. 56
    56
      dcop/testdcop.cpp
  79. 13
    13
      dcop/testdcop.h
  80. 5
    5
      dcop/tests/driver.cpp
  81. 2
    2
      dcop/tests/driver.h
  82. 1
    1
      dcop/tests/test.cpp
  83. 19
    19
      dnssd/domainbrowser.cpp
  84. 9
    9
      dnssd/domainbrowser.h
  85. 20
    20
      dnssd/publicservice.cpp
  86. 13
    13
      dnssd/publicservice.h
  87. 18
    18
      dnssd/query.cpp
  88. 4
    4
      dnssd/query.h
  89. 14
    14
      dnssd/remoteservice.cpp
  90. 7
    7
      dnssd/remoteservice.h
  91. 7
    7
      dnssd/responder.cpp
  92. 6
    6
      dnssd/responder.h
  93. 15
    15
      dnssd/sdevent.h
  94. 18
    18
      dnssd/servicebase.cpp
  95. 17
    17
      dnssd/servicebase.h
  96. 38
    38
      dnssd/servicebrowser.cpp
  97. 14
    14
      dnssd/servicebrowser.h
  98. 8
    8
      interfaces/khexedit/byteseditinterface.h
  99. 3
    3
      interfaces/khexedit/charcolumninterface.h
  100. 0
    0
      interfaces/khexedit/clipboardinterface.h

+ 37
- 37
KDE2PORTING.html View File

@@ -136,7 +136,7 @@ or <a href="http://doc.trolltech.com/porting.html">this page online</a>.<P>
generalFont() and fixedFont() are deprecated and will be removed soon.
Please use KGlobalSettings::generalFont() and KGlobalSettings::fixedFont() instead.<P>

appName() is deprecated. Please use QApplication::name() or instanceName
appName() is deprecated. Please use TQApplication::name() or instanceName
instead.<P>

The methods tempSaveName() and checkRecoverFile() return QString
@@ -189,7 +189,7 @@ or <a href="http://doc.trolltech.com/porting.html">this page online</a>.<P>
to klocale-&gt;translate with i18n.<P>

The return value of i18n is also no longer a const char*,
but a unicode QString.<P>
but a unicode TQString.<P>

<H4><P ALIGN="RIGHT"><A HREF="#TOC">Return to the Table of Contents</A></P></H4>

@@ -216,7 +216,7 @@ must have created a KApplication object before the methods can be used.<P>
<PRE>
...
KConfig *appcfg = KGlobal::config();
QString mystr = i18n( "This is a string" );
TQString mystr = i18n( "This is a string" );


KIconLoader *loader = KGlobal::iconLoader();
@@ -277,9 +277,9 @@ Both the "About KDE" and the "About &lt;Application&gt;" dialog boxes
are now modeless. "About KDE" is a completely new widget.<P>

If you used in the toplevel window (that is derived from KMainWindow)
"kapp-&gt;helpMenu( bool, QString )" to get the help menu
you must now change this to "helpMenu( QString )". The QString defaults
to QString::null so it is sufficient to write helpMenu().<P>
"kapp-&gt;helpMenu( bool, TQString )" to get the help menu
you must now change this to "helpMenu( TQString )". The TQString defaults
to TQString::null so it is sufficient to write helpMenu().<P>

The old aboutKDE(), aboutApp() and appHelpActivated() of KApplication
have all been removed. If you need direct access to these or need
@@ -365,7 +365,7 @@ khtmlw has been replaced with khtml.<BR>
of the api has changed. In all functions:<P>
<PRE>
const char * -&gt; QString
QStrList -&gt; QStringList
TQStrList -&gt; QStringList
</PRE>
The only exception for the moment is KHTMLWidget::write(), which does
also exist in a const char * version.<P>
@@ -373,7 +373,7 @@ khtmlw has been replaced with khtml.<BR>

<LI>you won't need the getKHTMLWiget function anymore. Just replace
getKHTMLWidget-&gt;xxx() with xxx()<P>
<LI>xxx(QString) -&gt; xxx(const QString &amp;)<P>
<LI>xxx(TQString) -&gt; xxx(const TQString &amp;)<P>
<LI>consistent naming. All getXyz() functions are renamed to xyz()<P>
<LI>replaced/changed functions:<P>
<TABLE BORDER="1">
@@ -386,8 +386,8 @@ khtmlw has been replaced with khtml.<BR>
<TD>-&gt; contentsX/Y()</TD>
</TR>
<TR>
<TD>getSelectedText(QString &amp;)</TD>
<TD>-&gt; QString selectedText()</TD>
<TD>getSelectedText(TQString &amp;)</TD>
<TD>-&gt; TQString selectedText()</TD>
</TR>
<TR>
<TD COLSPAN="2" ROWSPAN="0">findTextEnd() has vanished. just remove the call from your code</TD>
@@ -448,7 +448,7 @@ are necessary to convert your old KDND-based stuff to Qt DND.<P>
<LI>You should be aware that to handle drops, you will either have to
inherit a widget and then override the methods mentioned above,
or install an event handler for the widget in that widget's parent,
and then handle QEvent::DragMove or QEvent::Drop inside there (if
and then handle TQEvent::DragMove or TQEvent::Drop inside there (if
you want to avoid inheritance).<P>
<LI>You can emulate the old DndURL drop-type behavior with the Qt
Drag Object type QUriList.<P>
@@ -456,12 +456,12 @@ are necessary to convert your old KDND-based stuff to Qt DND.<P>
method if you wish.<P>
<LI>Qt includes a Drag and Drop tutorial. We suggest you read that
now if you are confused.<P>
<LI>QMultiLineEdit has already a DnD interface that accepts text/*
<LI>TQMultiLineEdit has already a DnD interface that accepts text/*
If you want to add support for other mimetypes, you need to
re-implement all DnD-methods (also dragMoveEvent()) and pass
QTextDrag's to the parent methods.<P>
<LI>QTextDrag also accepts text/uri-list, which means that you
always need to check for QUriDrag first if you want to get
<LI>TQTextDrag also accepts text/uri-list, which means that you
always need to check for TQUriDrag first if you want to get
both working.<P>
<LI>The mimetype for Uri's is now text/uri-list. If you've used
the proprietary Qt 1.x url/url, you need to adjust that.
@@ -474,8 +474,8 @@ are necessary to convert your old KDND-based stuff to Qt DND.<P>
These classes have been largely re-implemented. The external API
remains mostly the same, with the single notable change that
the groupIterator and entryIterator methods have been removed and
instead replaced by groupList (which returns a QStringList of groups)
and entryMap(const QString &amp;group) (which returns a QMap of entries
instead replaced by groupList (which returns a TQStringList of groups)
and entryMap(const TQString &amp;group) (which returns a TQMap of entries
in the specified group). This is due to internal changes in KConfig
which would make providing iterators possibly rather difficult.<P>

@@ -487,8 +487,8 @@ are necessary to convert your old KDND-based stuff to Qt DND.<P>
this:<P>
<PRE>

QMap&lt;QString, QString&gt; tmpMap = config-&lt;entryMap(myGroup);
QMap&lt;QString, QString&gt;::Iterator aIt(tmpMap.begin());
TQMap&lt;TQString, TQString&gt; tmpMap = config-&lt;entryMap(myGroup);
TQMap&lt;TQString, TQString&gt;::Iterator aIt(tmpMap.begin());

for (; aIt != tmpMap.end(); ++aIt) {
// body here. Access iterator key as aIt.key(),
@@ -537,7 +537,7 @@ Most applications will only need to replace kapp-&gt;getKCharsets() with
KGlobal::charsets().<P>

For conversion of various input formats to QStrings, please have a
look at QTextCodec and classes derived from it.<P>
look at TQTextCodec and classes derived from it.<P>

Character entities are now converted from and to QChars. The name has
changed from convertTag to fromEntity and toEntity.<P>
@@ -551,7 +551,7 @@ input font most closely, but can display the given charset.<P>

<H3><A NAME="KWizard">KWizard, KNoteBook</A></H3>

KWizard is based on QWizard now. The API has changed. Consult Qt's
KWizard is based on TQWizard now. The API has changed. Consult Qt's
documentation and kdelibs/kdetest/kwizardtest.cpp for an example use.<P>
KNoteBook (deeply entwined with the former KWizard) has been removed until
someone is willing to port it to work with the new wizard. If you want to
@@ -561,7 +561,7 @@ use it you'll find the necessary files in kdegraphics/kiconedit.<P>

<H3><A NAME="KSpinBox">KSpinBox, KNumericSpinBox</A></H3>

These classes have been replaced by QSpinBox. API is almost the same
These classes have been replaced by TQSpinBox. API is almost the same
HINTS:<P>
<UL>
<LI>valueincreased()/valuedecreased -&gt; valueChanged()
@@ -580,16 +580,16 @@ version had, and more.<P>

<H3><A NAME="KPanner">KPanner, KNewPanner</A></H3>

KPanner and KNewPanner have been removed. QSplitter does everything
KPanner and KNewPanner have been removed. TQSplitter does everything
KPanner did and more. The api is similar, but not compatible.
Basically to set it up so that you have a vertical splitter between a
listbox, a listview and multi line editor, you would do something like
this:<P>
<TABLE><TR><TD>
QSplitter *split = new QSplitter( parent );<BR>
QListBox *lb = new QListBox( split );<BR>
TQSplitter *split = new TQSplitter( parent );<BR>
TQListBox *lb = new TQListBox( split );<BR>
KListView *lv = new KListView( split );<BR>
QMultiLineEdit *ed = new QMultiLineEdit( split );
TQMultiLineEdit *ed = new TQMultiLineEdit( split );
</TD></TR></TABLE>

As you can see you are not limited to two children. Additionally, you
@@ -600,26 +600,26 @@ possible if you call setOpaqueResize(true).<P>

<H3><A NAME="KTreeList">KTreeList, KTreeListItem</A></H3>

Use KListView, QListViewItem instead. API is almost the same, you only
Use KListView, TQListViewItem instead. API is almost the same, you only
need to add a Column (KListView::addColum) before KListView is useable.<P>

KListView has no addChild(), insertItem() and removeItem() calls. Inserting
a root item is done by constructing a QListViewItem with the KListView
a root item is done by constructing a TQListViewItem with the KListView
passed as the parent widget. adding a child item is done by constructing
a QListViewItem with the parent item as parameter. removeItem() should
a TQListViewItem with the parent item as parameter. removeItem() should
be replaced by delete &lt;pointer to item&gt;.<P>

The root items are not shown in a tree fashion by default. to get this,
use KListView::setDecorativeRoot(true).<P>

Expanding and collapsing can by done by using QListViewItem::setOpen(bool).<P>
Expanding and collapsing can by done by using TQListViewItem::setOpen(bool).<P>


<H4><P ALIGN="RIGHT"><A HREF="#TOC">Return to the Table of Contents</A></P></H4>

<H3><A NAME="KMsgBox">KMsgBox</A></H3>

KMsgBox has been superseded by QMessageBox. Which has been superseded
KMsgBox has been superseded by TQMessageBox. Which has been superseded
by KMessageBox.<P>
<UL>
<LI>KMsgBox had return codes starting with 1 for the first button, 2 for
@@ -642,7 +642,7 @@ KComboBox::setEditText.<P>

<H3><A NAME="KQuickHelp">KQuickHelp</A></H3>

KQuickHelp, the "super-tooltip" widget, has been replaced by QWhatsThis.
KQuickHelp, the "super-tooltip" widget, has been replaced by TQWhatsThis.
It provides a compatible API and almost the same look and feel, in addition
to some new functionality.<P>

@@ -652,7 +652,7 @@ to some new functionality.<P>

Instead of old KPixmap::gradientFill, use:<P>

KPixmapEffect::gradient(KPixmap&amp;, QColor, QColor, enum KPixmapEffect::GradientType, int)<P>
KPixmapEffect::gradient(KPixmap&amp;, TQColor, TQColor, enum KPixmapEffect::GradientType, int)<P>

Hence:<P>

@@ -710,7 +710,7 @@ declared globally in kaccel.h are now static methods in KAccel.<P>

The KString class is obsolete and is not defined in
kstring.h anymore. The header file only existed for compatibility reasons.
The file has been removed completely, use QString instead. (<A HREF="mailto:mirko@kde.org">mirko@kde.org</A>)<P>
The file has been removed completely, use TQString instead. (<A HREF="mailto:mirko@kde.org">mirko@kde.org</A>)<P>

<H4><P ALIGN="RIGHT"><A HREF="#TOC">Return to the Table of Contents</A></P></H4>

@@ -723,7 +723,7 @@ exist in KDE 2. (<A HREF="mailto:mirko@kde.org">mirko@kde.org</A>)<P>

<H3><A NAME="kbutton">kbutton.h / KButton</A></H3>

Since Qt 2.0, the class QToolButton provides the functionality of
Since Qt 2.0, the class TQToolButton provides the functionality of
buttons that raise when the mouse is moved over them, so there is no
reason to have a class providing the same feature in KDE libs. All
occurrences of KButton in the KDE CVS have been replaced by QToolButtons,
@@ -831,11 +831,11 @@ Werner Trobin &lt;<A HREF="mailto:wtrobin@carinthia.com">wtrobin@carinthia.com</
There is also a new preview mode which is quite different to the one we had in
the KDE 1.x KFD. There are no preview modules you have to register but there
is a single method you can use to set a preview widget. This widget has to
inherit QWidget and you have to implement a slot (showPreview(const KURL &amp;))
inherit TQWidget and you have to implement a slot (showPreview(const KURL &amp;))
in this class. This slot is called each time the selected file/dir changes.
In this slot you have to react appropriate (i.e. show the preview :). The
easiest way this can be done is to derive your class from QWidgetStack and
add a Object (derived from QWidget) for each file type. In the showPreview
easiest way this can be done is to derive your class from TQWidgetStack and
add a Object (derived from TQWidget) for each file type. In the showPreview
method you just raise the matching widget. If you can't find an appropriate
widget just hide() the widget stack.<P>
If you need some "inspiration" on how that could be done, please have a look

+ 63
- 63
KDE3PORTING.html View File

@@ -68,7 +68,7 @@ The old name will still work unless KDE_NO_COMPAT is defined.
<H3><A NAME="kdecore">Changes in kdecore</A></H3>

<H4>KDesktopWidget</H4>
KDesktopWidget is obsolete. Include &lt;qdesktopwidget.h&gt; and use QDesktopWidget
KDesktopWidget is obsolete. Include &lt;tqdesktopwidget.h&gt; and use QDesktopWidget
instead, everything else is source compatible.

<H4>Header file names</H4>
@@ -112,13 +112,13 @@ The old name will still work unless KDE_NO_COMPAT is defined.
KPixmapSplitter has now been moved to the new kdefx library.

<H4>KStringHandler</H4>
The <i>matchFilename( const QString& filename, const QString& pattern )</i> method has been
renamed to <br><i>matchFileName( const QString& filename, const QString& pattern )</i>.
The <i>matchFilename( const TQString& filename, const TQString& pattern )</i> method has been
renamed to <br><i>matchFileName( const TQString& filename, const TQString& pattern )</i>.
The old name will still work unless KDE_NO_COMPAT is defined.

<H4>KStyle</H4>
Due to the major changes in the QStyle API in Qt3, KStyle has been completely
re-written. KStyle is now a thin wrapper around QCommonStyle with a few extra
Due to the major changes in the TQStyle API in Qt3, KStyle has been completely
re-written. KStyle is now a thin wrapper around TQCommonStyle with a few extra
primitive elements and a simple popupMenu transparency engine. All KStyles can
now style Qt apps like designer and assistant automatically. KStyle is no longer
present in kdecore. It is now in a new library called kdefx to allow Qt apps to
@@ -131,20 +131,20 @@ The old name will still work unless KDE_NO_COMPAT is defined.

<H4>KMD5</H4>
HASHHEX and HASH has been removed to make this class namespace clean.
They have been replaced by QCString and KMD5::Digest. <br>
They have been replaced by TQCString and KMD5::Digest. <br>
The API has been cleaned up, it is no longer necessary to call finalize().
Simply remove any calls to it.

<H4>KLocale</H4>
<li>charset() has been removed. You might want to use encoding() instead.
<li>setCharset(const QString &amp;) has been removed. You might want to use
<li>setCharset(const TQString &amp;) has been removed. You might want to use
setEncoding(int) instead.
<li>formatMoney(const QString &amp;) has been removed.
<li>formatNumber(const QString &amp;) has been removed.
<li>formatMoney(const TQString &amp;) has been removed.
<li>formatNumber(const TQString &amp;) has been removed.
<li>languages() has been removed. Use languageList() instead.
<li>All references to monthName(), monthNamePossessive(), and weekDayName()
should be replaced with methods from KLocale::calendar().
<li>Hard coded date handling or date handling with QDate should in most
<li>Hard coded date handling or date handling with TQDate should in most
cases be replaced by methods in KLocale::calendar().

<H4>Accelerators Keys</H4>
@@ -155,12 +155,12 @@ not be available.
<li> KAccel::insertItem() and KAccel::connectItem().
<pre>
- kaccel-&gt;insertItem( i18n("Scroll Up"), "Scroll Up", "Up" );
- kaccel-&gt;connectItem( "Scroll Up", this, SLOT(scrollUp()) );
+ kaccel-&gt;insert( "Scroll Up", i18n("Scroll Up"), QString::null,
Key_Up, this, SLOT(scrollUp()) );
- kaccel-&gt;connectItem( "Scroll Up", this, TQT_SLOT(scrollUp()) );
+ kaccel-&gt;insert( "Scroll Up", i18n("Scroll Up"), TQString::null,
Key_Up, this, TQT_SLOT(scrollUp()) );
</pre>
Note that a What's This parameter is now a part of the insert function.
You might replace the QString::null parameter with
You might replace the TQString::null parameter with
<pre> i18n("Scroll the current document's contents up by one line.") </pre>
for example.</li>
<li> KAccel::changeMenuAccel() has been deprecated because it was
@@ -176,7 +176,7 @@ not be available.
The preferred means of defining a shortcut, however, is to use <b>KAction</b>.
<pre>
new KAction( i18n("Scroll Up"), Key_Up,
this, SLOT(scrollUp()), actionCollection(), "Scroll Up" );
this, TQT_SLOT(scrollUp()), actionCollection(), "Scroll Up" );
</pre>

<h5>KGlobalAccel</h5>
@@ -200,12 +200,12 @@ The preferred means of defining a shortcut, however, is to use <b>KAction</b>.
<li>The following functions have been deprecated and will need to be changed if KDE_NO_COMPAT is defined:
<table border=1>
<tr><th>Old</th><th>New</th></tr>
<tr><td>QString action(StdAccel id)</td><td>QString name(StdAccel id)</td></tr>
<tr><td>TQString action(StdAccel id)</td><td>TQString name(StdAccel id)</td></tr>
<tr><td>int defaultKey(StdAccel accel)</td><td>KShortcut shortcutDefault(StdAccel id)</td></tr>
<tr><td>QString description(StdAccel id)</td><td>QString label(StdAccel id)</td></tr>
<tr><td>bool isEqual(const QKeyEvent* pEvent, int keyQt)</td>
<tr><td>TQString description(StdAccel id)</td><td>TQString label(StdAccel id)</td></tr>
<tr><td>bool isEqual(const TQKeyEvent* pEvent, int keyQt)</td>
<td>The best method for replacing this varies. One possibility is to use
<i>KKey(const QKeyEvent*) == KKey(int)</i>. Another is to use
<i>KKey(const TQKeyEvent*) == KKey(int)</i>. Another is to use
<i>KShortcut::contains( const KKey&/KKeySequence& )</i>.</td></tr>
<tr><td>int key(StdAccel)</td><td>const KShortcut& shortcut(StdAccel)</td></tr>
</table></li-->
@@ -261,7 +261,7 @@ This class has been removed, use Qt layouts instead.
<H4>KCommand</H4>
This class has been made lighter: the name isn't stored into the command anymore,
but must be provided by the inherited class, as the result of the virtual name() function.
This saves storing a QString into each command in memory.
This saves storing a TQString into each command in memory.
The former behavior is available in the class KNamedCommand, so for a quick port
simply replace KCommand with KNamedCommand.

@@ -273,7 +273,7 @@ The deprecated getMainWidget() method has been removed. Use mainWidget() instead
functionality.

<H4>KDockWidget</H4>
The WidgetList parameter has been renamed to QWidgetList. Behaviour
The WidgetList parameter has been renamed to TQWidgetList. Behaviour
is identical.

<H4>KEdit</H4>
@@ -306,11 +306,11 @@ for more informations on this new extension.
PixmapEffect has now been moved to the new kdefx library.

<H4>KProgress</H4>
KProgress is now based on QProgressBar.
KProgress is now based on TQProgressBar.
This has led to a few API changes. In particular the constructors have been
simplified, you simply need to pass the total number of steps instead of
min / max / initialvalue / orientation. See documentation of both KProgress
and QProgressBar.
and TQProgressBar.

<H4>KRootPixmap</H4>
The KRootPixmap class has been extended to make it more flexible, and the
@@ -324,7 +324,7 @@ as its use is basically limited to KThemeStyle.

<H4>KAction, KToolBar, KToolBarButton and icons</H4>
The preferred way for specifying icons is passing the icon names (and the icons will be loaded by KIconLoader),
instead of using QIconSet or QPixmap. This results in always using the correct icon size and allows delayed
instead of using TQIconSet or TQPixmap. This results in always using the correct icon size and allows delayed
on-demand icon loading.
<p>
Method KAction::hasIconSet() has been renamed to KAction::hasIcon(), the old name will still work unless KDE_NO_COMPAT is defined.
@@ -335,13 +335,13 @@ KToolBarButton methods setPixmap(), setDefaultPixmap(), setDisabledPixmap(), set
Use KToolBarButton::setIcon() (preferred) or KToolBarButton::setIconSet() instead.

<H4>KAction and derived classes</H4>
The protected set* methods have been renamed to update* and they now take only one argument (i.e. setText(int, const QString&)
The protected set* methods have been renamed to update* and they now take only one argument (i.e. setText(int, const TQString&)
is now updateText(int) ). Because the former second argument was always the value of the a corresponding data member, you
can simply call the accessor method (i.e. in updateText() call text() to get the text).

<H4>KToggleAction</H4>
exclusiveGroup() is no more virtual. setExclusiveGroup(const
QString&) is not a slot anymore.
TQString&) is not a slot anymore.

<H4><P ALIGN="RIGHT"><A HREF="#TOC">Return to the Table of Contents</A></P></H4>

@@ -350,7 +350,7 @@ QString&) is not a slot anymore.
<H4>KPropertiesDialog</H4>
<ul>
<li>The header file has been renamed from kpropsdlg.h to kpropertiesdialog.h.</li>
<li>KPropertiesDialog::KPropertiesDialog(const KURL&, mode_t, QWidget*,
<li>KPropertiesDialog::KPropertiesDialog(const KURL&, mode_t, TQWidget*,
const char*, bool, bool ) has been removed since mode_t was no longer
used. Simply omit the mode_t parameter.</li>
</ul>
@@ -362,15 +362,15 @@ QString&) is not a slot anymore.
<li>A base class KArchive has been written, to support other archive formats in the future</li>
<li>KTarEntry is now KArchiveEntry, KTarDirectory is now KArchiveDirectory, and KTarFile is now KArchiveFile.</li>
<li>The classes ProgressBase, StatusbarProgress and DefaultProgress have been moved to the KIO namespace.</li>
<li>The signal KDirLister::started(const QString &amp;url) has changed to KDirLister::started(const KURL &amp;url).<li>
<li>KServiceTypeProfile::preferredService( const QString &amp; serviceType, bool needApp ) has been removed, use
<li>The signal KDirLister::started(const TQString &amp;url) has changed to KDirLister::started(const KURL &amp;url).<li>
<li>KServiceTypeProfile::preferredService( const TQString &amp; serviceType, bool needApp ) has been removed, use
KServiceTypeProfile::preferredService( ..., "Application") if needApp was true, or
KServiceTypeProfile::preferredService( ..., QString::null) if needApp was false.
KServiceTypeProfile::preferredService( ..., TQString::null) if needApp was false.
<li>The following functions in KProtocolManager have been replaced:
<ul>
<li>ftpProxy(), use proxyFor("ftp") instead.
<li>httpProxy(), use proxyFor("http") instead.
<li>slaveProtocol(const QString&amp;), use slaveProtocol(const KURL &amp;url, QString &amp;proxy) instead.
<li>slaveProtocol(const TQString&amp;), use slaveProtocol(const KURL &amp;url, TQString &amp;proxy) instead.
<li>defaultReadTimeout(), use DEFAULT_READ_TIMEOUT instead. (See ioslave_defaults.h)
<li>defaultProxyConnectTimeout(), use DEFAULT_PROXY_CONNECT_TIMEOUT instead. (See ioslave_defaults.h)
<li>defaultResponseTimeout(), use DEFAULT_RESPONSE_TIMEOUT instead. (See ioslave_defaults.h)
@@ -378,7 +378,7 @@ QString&) is not a slot anymore.
</ul>
<li>The following functions in KProtocolManager have been removed:
<ul>
<li>setUserAgentList( const QStringList&amp; )
<li>setUserAgentList( const TQStringList&amp; )
<li>userAgentList();
<li>setReadTimeout()
<li>setConnectTimeout( int )
@@ -396,11 +396,11 @@ QString&) is not a slot anymore.
<li>setUseReverseProxy( bool )
<li>setProxyType( ProxyType )
<li>setProxyAuthMode( ProxyAuthMode )
<li>setFtpProxy( const QString&amp; )
<li>setHttpProxy( const QString&amp; )
<li>setProxyFor( const QString&amp;, const QString&amp; )
<li>setNoProxyFor( const QString&amp; )
<li>setProxyConfigScript( const QString&amp; )
<li>setFtpProxy( const TQString&amp; )
<li>setHttpProxy( const TQString&amp; )
<li>setProxyFor( const TQString&amp;, const TQString&amp; )
<li>setNoProxyFor( const TQString&amp; )
<li>setProxyConfigScript( const TQString&amp; )
</ul>
</li>
<li>In order to support files &gt; 4Gb, the file size / file-offset argument
@@ -428,10 +428,10 @@ The createFilterDevice method is deprecated. Use deviceForFile instead.

<H4>KDirWatch</H4>
<ul>
<li>The signal fileDirty( const QString&amp; ) has been removed</li>
<li>The signal created( const QString&amp; ) has been added</li>
<li>The signal deleted( const QString&amp; ) has been added</li>
<li>The signal dirty( const QString&amp; ) may be emitted with a file name, not only
<li>The signal fileDirty( const TQString&amp; ) has been removed</li>
<li>The signal created( const TQString&amp; ) has been added</li>
<li>The signal deleted( const TQString&amp; ) has been added</li>
<li>The signal dirty( const TQString&amp; ) may be emitted with a file name, not only
a directory name. This depends on which backend is used but will probably always be
the case in KDE 3.1. You should prepare to receive dirty( dirname ) or dirty( filename )
when a file has changed.
@@ -473,18 +473,18 @@ setURLArgs does the job.
<H4>KSpell</H4>
The API has been cleaned up to be in line with the rest of kdelibs, in particular:
<ul>
<li>suggestions() now returns a QStringList instead of a pointer to a QStringList
<li>intermediateBuffer() now returns a QString instead of a pointer to a QString
<li>The signal <b>misspelling(QString, QStringList *, unsigned)</b> has changed to
misspelling(const QString &amp;, const QStringList &amp;, unsigned int)
<li>The signal <b>corrected(QString, QString, unsigned)</b> has changed to
corrected(const QString &amp;, const QString &amp;, unsigned int)
<li>The signal <b>ignoreall(QString)</b> has changed to
ignoreall(const QString &amp;)
<li>The signal <b>ignoreword(QString)</b> has changed to
ignoreword(const QString &amp;)
<li>The signal <b>addword(QString)</b> has changed to
addword(const QString &amp;)
<li>suggestions() now returns a TQStringList instead of a pointer to a QStringList
<li>intermediateBuffer() now returns a TQString instead of a pointer to a QString
<li>The signal <b>misspelling(TQString, TQStringList *, unsigned)</b> has changed to
misspelling(const TQString &amp;, const TQStringList &amp;, unsigned int)
<li>The signal <b>corrected(TQString, TQString, unsigned)</b> has changed to
corrected(const TQString &amp;, const TQString &amp;, unsigned int)
<li>The signal <b>ignoreall(TQString)</b> has changed to
ignoreall(const TQString &amp;)
<li>The signal <b>ignoreword(TQString)</b> has changed to
ignoreword(const TQString &amp;)
<li>The signal <b>addword(TQString)</b> has changed to
addword(const TQString &amp;)
</ul>

Make sure to check if you use the above signals since your compiler
@@ -551,7 +551,7 @@ This class has been merged with KDirLister from kio.
<tr><td>saveConfig()</td><td>writeConfig()</td></tr>
<tr><td>setFileReader()</td><td>setDirLister()</td></tr>
<tr><td>fileReader()</td><td>dirLister()</td></tr>
<tr><td>activatedMenu( const KFileViewItem * )</td><td>activatedMenu( const KFileItem *, const QPoint& pos )</td></tr>
<tr><td>activatedMenu( const KFileViewItem * )</td><td>activatedMenu( const KFileItem *, const TQPoint& pos )</td></tr>
</table>

<H4>KFileDetailView</H4>
@@ -564,25 +564,25 @@ flexibility and efficiency.
Sorting has changed radically. Previously, KFileView had protected methods QuickSort,
compareItems() and mergeLists() to sort directory entries for displaying in the views. Now,
KFileView does not do any sorting anymore. Instead, the view's (i.e. KIconView, KListView)
sorting is utilized by letting its view-items provide a QString key() method. Therefore,
sorting is utilized by letting its view-items provide a TQString key() method. Therefore,
KFileView offers the two methods
<ul>
<li>QString sortingKey( const QString&amp; value, bool isDir, int sortSpec )</li>
<li>QString sortingKey( KIO::filesize_t value, bool isDir, int sortSpec )</li>
<li>TQString sortingKey( const TQString&amp; value, bool isDir, int sortSpec )</li>
<li>TQString sortingKey( KIO::filesize_t value, bool isDir, int sortSpec )</li>
</ul>
which the view-classes can use to generate the string for the key() method. The KFile::SortMode
enum has been removed, as QDir::SortSpec is used entirely.
enum has been removed, as TQDir::SortSpec is used entirely.

<br><br>
Further changes:
<table>
<tr><th>Old:</th><th>New:</th></tr>
<tr><td>not existant</td><td>virtual void readConfig( KConfig *, const QString&amp; group = QString::null )</td></tr>
<tr><td>not existant</td><td>void writeConfig( KConfig *, const QString&amp; group = QString::null)</td></tr>
<tr><td>virtual void setCurrentItem( const QString&amp; filename, KFileViewItem * )</td><td>Replaced with the two methods below.</td></tr>
<tr><td>&nbsp;</td><td>void setCurrentItem( const QString&amp; filename );</td></tr>
<tr><td>not existant</td><td>virtual void readConfig( KConfig *, const TQString&amp; group = TQString::null )</td></tr>
<tr><td>not existant</td><td>void writeConfig( KConfig *, const TQString&amp; group = TQString::null)</td></tr>
<tr><td>virtual void setCurrentItem( const TQString&amp; filename, KFileViewItem * )</td><td>Replaced with the two methods below.</td></tr>
<tr><td>&nbsp;</td><td>void setCurrentItem( const TQString&amp; filename );</td></tr>
<tr><td>&nbsp;</td><td>virtual void setCurrentItem( const KFileViewItem * ) = 0;</td></tr>
<tr><td>setOperator( QObject * )</td><td>setParentView( KFileView * )</td></tr>
<tr><td>setOperator( TQObject * )</td><td>setParentView( KFileView * )</td></tr>
<tr><td>virtual void insertSorted( KFileViewItem *, uint count )</td><td>virtual void insertItem( KFileItem * )</td></tr>
<tr><td>virtual void addItemList( const KFileViewItemList &amp;list )</td><td>not virtual anymore. Sufficient to reimplement insertItem()</td></tr>
</table>

+ 2
- 2
arts/kde/kartsdispatcher.cc View File

@@ -30,8 +30,8 @@ int KArtsDispatcher::m_refCount = 0;
Arts::Dispatcher *KArtsDispatcher::artsDispatcher = 0;
Arts::QIOManager *KArtsDispatcher::artsQIOManager = 0;

KArtsDispatcher::KArtsDispatcher(QObject *parent, const char *name)
: QObject(parent, name)
KArtsDispatcher::KArtsDispatcher(TQObject *parent, const char *name)
: TQObject(parent, name)
{
m_refCount++;
if(artsDispatcher == 0)

+ 2
- 2
arts/kde/kartsdispatcher.h View File

@@ -22,7 +22,7 @@
#ifndef KARTSDISPATCHER_H
#define KARTSDISPATCHER_H

#include <qobject.h>
#include <tqobject.h>

#include <kdelibs_export.h>

@@ -71,7 +71,7 @@ public:
* @param parent the parent Qt object
* @param name the Qt object name of this object
*/
KArtsDispatcher(QObject *parent = 0, const char *name = 0);
KArtsDispatcher(TQObject *parent = 0, const char *name = 0);

/**
* Destructor

+ 1
- 1
arts/kde/kartsfloatwatch.cpp View File

@@ -46,7 +46,7 @@ public:
}

KArtsFloatWatch::KArtsFloatWatch(Arts::Object object, const char *stream,
QObject *parent, const char *name) : QObject(parent, name)
TQObject *parent, const char *name) : TQObject(parent, name)
{
d = new KArtsFloatWatchPrivate();
d->proxy = KFloatWatchProxy::_from_base(new KFloatWatchProxy_impl(this));

+ 4
- 4
arts/kde/kartsfloatwatch.h View File

@@ -21,7 +21,7 @@
*/

#include "common.h"
#include <qobject.h>
#include <tqobject.h>

class KArtsFloatWatchPrivate;
namespace Arts { class KFloatWatchProxy_impl; }
@@ -44,10 +44,10 @@ namespace Arts { class KFloatWatchProxy_impl; }
* \code
* StereoVolumeControl stereoVolumeControl = ...;
* KArtsFloatWatch *w = new KArtsFloatWatch(stereoVolumeControl, "scaleFactor_changed", this);
* connect(w, SIGNAL(valueChanged(float)), this, SLOT(setValue(float)));
* connect(w, TQT_SIGNAL(valueChanged(float)), this, TQT_SLOT(setValue(float)));
* \endcode
*/
class KArtsFloatWatch : public QObject {
class KArtsFloatWatch : public TQObject {
Q_OBJECT
private:
KArtsFloatWatchPrivate *d;
@@ -67,7 +67,7 @@ public:
* @param parent the parent Qt object
* @param name the Qt object name of this object
*/
KArtsFloatWatch(Arts::Object object, const char *stream, QObject *parent = 0, const char *name = 0);
KArtsFloatWatch(Arts::Object object, const char *stream, TQObject *parent = 0, const char *name = 0);

/**
* Destructor

+ 9
- 9
arts/kde/kartsserver.cpp View File

@@ -22,8 +22,8 @@
#include <ksimpleconfig.h>
#include <kprocess.h>
#include <kstandarddirs.h>
#include <qdir.h>
#include <qfile.h>
#include <tqdir.h>
#include <tqfile.h>
#include "kartsserver.h"

struct KArtsServer::Data
@@ -31,8 +31,8 @@ struct KArtsServer::Data
Arts::SoundServerV2 server;
};

KArtsServer::KArtsServer(QObject *parent, const char *name)
: QObject(parent, name)
KArtsServer::KArtsServer(TQObject *parent, const char *name)
: TQObject(parent, name)
, d(new Data)
{
d->server = Arts::SoundServerV2::null();
@@ -68,7 +68,7 @@ Arts::SoundServerV2 KArtsServer::server(void)
bool x11Comm = config.readBoolEntry("X11GlobalComm", false);

// put the value of x11Comm into .mcoprc
KSimpleConfig X11CommConfig(QDir::homeDirPath()+"/.mcoprc");
KSimpleConfig X11CommConfig(TQDir::homeDirPath()+"/.mcoprc");

if(x11Comm)
X11CommConfig.writeEntry("GlobalComm", "Arts::X11GlobalComm");
@@ -77,14 +77,14 @@ Arts::SoundServerV2 KArtsServer::server(void)

X11CommConfig.sync();
proc << QFile::encodeName(KStandardDirs::findExe(QString::fromLatin1("kdeinit_wrapper")));
proc << TQFile::encodeName(KStandardDirs::findExe(TQString::fromLatin1("kdeinit_wrapper")));

if(rt)
proc << QFile::encodeName(KStandardDirs::findExe(QString::fromLatin1("artswrapper")));
proc << TQFile::encodeName(KStandardDirs::findExe(TQString::fromLatin1("artswrapper")));
else
proc << QFile::encodeName(KStandardDirs::findExe(QString::fromLatin1("artsd")));
proc << TQFile::encodeName(KStandardDirs::findExe(TQString::fromLatin1("artsd")));

proc << QStringList::split( " ", config.readEntry( "Arguments", "-F 10 -S 4096 -s 60 -m artsmessage -l 3 -f" ) );
proc << TQStringList::split( " ", config.readEntry( "Arguments", "-F 10 -S 4096 -s 60 -m artsmessage -l 3 -f" ) );

if(proc.start(KProcess::Block) && proc.normalExit())
{

+ 2
- 2
arts/kde/kartsserver.h View File

@@ -22,7 +22,7 @@
#define KARTSSERVER_H

#include "kmedia2.h"
#include <qobject.h>
#include <tqobject.h>
#include "soundserver.h"
#include <kdelibs_export.h>

@@ -43,7 +43,7 @@ public:
* Create a new KArtsServer. Don't forget to create a KArtsDispatcher
* before using KArtsServer.
*/
KArtsServer(QObject *parent = 0, const char *name = 0);
KArtsServer(TQObject *parent = 0, const char *name = 0);
virtual ~KArtsServer(void);

/**

+ 9
- 9
arts/kde/kaudioconverter.cc View File

@@ -31,8 +31,8 @@

#include <iostream>

#include <qfile.h>
#include <qtimer.h>
#include <tqfile.h>
#include <tqtimer.h>

#include <kurl.h>
#include <kdebug.h>
@@ -71,7 +71,7 @@ bool KAudioConverter::setup(int samplingRate)
return true;
}

void KAudioConverter::slotMimeType(const QString &mimeType)
void KAudioConverter::slotMimeType(const TQString &mimeType)
{
m_mimeType = mimeType;
kapp->exit_loop();
@@ -88,7 +88,7 @@ void KAudioConverter::requestPlayObject(const KURL &url)
Arts::KIOInputStream_impl *inputStreamImpl = new Arts::KIOInputStream_impl();
inputStream = Arts::KIOInputStream::_from_base(inputStreamImpl);

QObject::connect(inputStreamImpl, SIGNAL(mimeTypeFound(const QString &)), SLOT(slotMimeType(const QString &)));
TQObject::connect(inputStreamImpl, TQT_SIGNAL(mimeTypeFound(const TQString &)), TQT_SLOT(slotMimeType(const TQString &)));

inputStream.openURL(url.url().latin1());
inputStream.streamStart();
@@ -134,7 +134,7 @@ void KAudioConverter::requestPlayObject(const KURL &url)
{
Arts::PlayObject result = Arts::SubClass(objectType);

if(result.loadMedia(string(QFile::encodeName(url.path()))))
if(result.loadMedia(string(TQFile::encodeName(url.path()))))
{
result._node()->start();
m_incoming = new KPlayObject(result, false);
@@ -161,9 +161,9 @@ void KAudioConverter::start()
Arts::connect(m_incoming->object(), "left", m_request, "left");
Arts::connect(m_incoming->object(), "right", m_request, "right");

QObject::connect(requestImpl, SIGNAL(newBlockSize(long)), SIGNAL(newBlockSize(long)));
QObject::connect(requestImpl, SIGNAL(newBlockPointer(long)), SIGNAL(newBlockPointer(long)));
QObject::connect(requestImpl, SIGNAL(newData()), SIGNAL(newData()));
TQObject::connect(requestImpl, TQT_SIGNAL(newBlockSize(long)), TQT_SIGNAL(newBlockSize(long)));
TQObject::connect(requestImpl, TQT_SIGNAL(newBlockPointer(long)), TQT_SIGNAL(newBlockPointer(long)));
TQObject::connect(requestImpl, TQT_SIGNAL(newData()), TQT_SIGNAL(newData()));

// Special mpeglib case
// TODO: needed at all??
@@ -174,7 +174,7 @@ void KAudioConverter::start()
m_request.start();
// TODO: Maybe do this async, using QTimer::singleShot
// TODO: Maybe do this async, using TQTimer::singleShot
// But jowenn i think jowenn is right -> this would
// lead to problems in slotNewData() when accessing the data
// (could already be overwritten...)

+ 3
- 3
arts/kde/kaudioconverter.h View File

@@ -22,7 +22,7 @@
#ifndef KAUDIOCONVERTER_H
#define KAUDIOCONVERTER_H

#include <qobject.h>
#include <tqobject.h>
#include "artskde.h"
#include "kplayobject.h"

@@ -52,12 +52,12 @@ signals:
void rawStreamFinished();

private slots:
void slotMimeType(const QString &mimeType);
void slotMimeType(const TQString &mimeType);
private:
Arts::KDataRequest m_request;
KPlayObject *m_incoming;
QString m_mimeType;
TQString m_mimeType;

bool m_started;
};

+ 7
- 7
arts/kde/kaudiomanagerplay.cpp View File

@@ -23,7 +23,7 @@
#include <soundserver.h>
#include <string>

KAudioManagerPlay::KAudioManagerPlay( KArtsServer * server, const QString & title )
KAudioManagerPlay::KAudioManagerPlay( KArtsServer * server, const TQString & title )
{
d = new PrivateData;
d->amanPlay = Arts::DynamicCast( server->server().createObject( "Arts::Synth_AMAN_PLAY" ) );
@@ -49,24 +49,24 @@ bool KAudioManagerPlay::isNull() const
return d->amanPlay.isNull();
}

void KAudioManagerPlay::setTitle( const QString & title )
void KAudioManagerPlay::setTitle( const TQString & title )
{
d->amanPlay.title( std::string( title.local8Bit() ) );
}

QString KAudioManagerPlay::title()
TQString KAudioManagerPlay::title()
{
return QString::fromLocal8Bit( d->amanPlay.title().c_str() );
return TQString::fromLocal8Bit( d->amanPlay.title().c_str() );
}

void KAudioManagerPlay::setAutoRestoreID( const QString & autoRestoreID )
void KAudioManagerPlay::setAutoRestoreID( const TQString & autoRestoreID )
{
d->amanPlay.autoRestoreID( std::string( autoRestoreID.local8Bit() ) );
}

QString KAudioManagerPlay::autoRestoreID()
TQString KAudioManagerPlay::autoRestoreID()
{
return QString::fromLocal8Bit( d->amanPlay.autoRestoreID().c_str() );
return TQString::fromLocal8Bit( d->amanPlay.autoRestoreID().c_str() );
}

void KAudioManagerPlay::start()

+ 6
- 6
arts/kde/kaudiomanagerplay.h View File

@@ -21,7 +21,7 @@
#define KAUDIOMANAGERPLAY_H

#include <artsflow.h>
#include <qstring.h>
#include <tqstring.h>
#include <kdelibs_export.h>

class KArtsServer;
@@ -38,7 +38,7 @@ class QString;
class KDE_ARTS_EXPORT KAudioManagerPlay
{
public:
KAudioManagerPlay( KArtsServer * server, const QString & title = QString::null );
KAudioManagerPlay( KArtsServer * server, const TQString & title = TQString::null );
~KAudioManagerPlay();

/**
@@ -57,15 +57,15 @@ class KDE_ARTS_EXPORT KAudioManagerPlay
/**
* Set the name of the output in the AudioManager
*/
void setTitle( const QString & title );
void setTitle( const TQString & title );

/**
* returns the name of the output as it appears in the AudioManager
*/
QString title();
TQString title();

void setAutoRestoreID( const QString & autoRestoreID );
QString autoRestoreID();
void setAutoRestoreID( const TQString & autoRestoreID );
TQString autoRestoreID();

void start();
void stop();

+ 9
- 9
arts/kde/kaudioplaystream.cpp View File

@@ -29,16 +29,16 @@
#include <kglobal.h>
#include <kdebug.h>

#include <qstring.h>
//#include <qptrqueue.h>
//#include <qcstring.h> //QByteArray
#include <tqstring.h>
//#include <tqptrqueue.h>
//#include <tqcstring.h> //QByteArray

#include <string.h> // for strncpy

//#include <assert.h>

KAudioPlayStreamPrivate::KAudioPlayStreamPrivate( KArtsServer* server, const QString title, QObject* p, const char* n )
: QObject( p,n )
KAudioPlayStreamPrivate::KAudioPlayStreamPrivate( KArtsServer* server, const TQString title, TQObject* p, const char* n )
: TQObject( p,n )
, _server( server )
, _play( new KAudioManagerPlay( _server, title ) )
, _effectrack( Arts::StereoEffectStack::null() )
@@ -82,8 +82,8 @@ void KAudioPlayStreamPrivate::initaRts() {
if ( _effects ) _effectrack.start();
}

KAudioPlayStream::KAudioPlayStream( KArtsServer* server, const QString title, QObject* p, const char* n )
: QObject( p,n )
KAudioPlayStream::KAudioPlayStream( KArtsServer* server, const TQString title, TQObject* p, const char* n )
: TQObject( p,n )
, d( new KAudioPlayStreamPrivate( server, title, this ) )
{
kdDebug( 400 ) << k_funcinfo << endl;
@@ -147,7 +147,7 @@ void KAudioPlayStream::stop()
}
}

void KAudioPlayStream::write( QByteArray& )
void KAudioPlayStream::write( TQByteArray& )
{
}

@@ -156,7 +156,7 @@ void KAudioPlayStream::fillData( Arts::DataPacket<Arts::mcopbyte> *packet )
//kdDebug( 400 ) << k_funcinfo << "packet->size=" << packet->size << endl;
if ( d->_polling )
{
QByteArray bytearray( packet->size );
TQByteArray bytearray( packet->size );
bytearray.setRawData( ( char* )packet->contents, packet->size );
bytearray.fill( 0 );
emit requestData( bytearray );

+ 6
- 6
arts/kde/kaudioplaystream.h View File

@@ -20,9 +20,9 @@
#ifndef KAUDIOPLAYSTREAM_H
#define KAUDIOPLAYSTREAM_H

#include <qobject.h>
#include <tqobject.h>

#include <qcstring.h>
#include <tqcstring.h>
#include <stdsynthmodule.h>

#include <kdelibs_export.h>
@@ -39,7 +39,7 @@ class KAudioPlayStreamPrivate;
* @since 3.2
*/

class KDE_ARTS_EXPORT KAudioPlayStream : public QObject {
class KDE_ARTS_EXPORT KAudioPlayStream : public TQObject {
Q_OBJECT
public:
/**
@@ -51,7 +51,7 @@ public:
* @param parent You will propably want to pass the server as parent to so this stream gets deleted before the server disappears.
* @param name The name of the stream.
*/
KAudioPlayStream( KArtsServer* server, const QString title, QObject* parent=0, const char* name=0 );
KAudioPlayStream( KArtsServer* server, const TQString title, TQObject* parent=0, const char* name=0 );
/**
* Destructs the KAudioPlayStream.
*/
@@ -96,13 +96,13 @@ public slots:
* Write data into the inputbuffer.
* If you ignore the signal noData() it will play 0 ( silence ).
*/
void write( QByteArray& data );
void write( TQByteArray& data );
signals:
/**
* This signal is emitted when audio should be played.
* You have to fill the array with data.
*/
void requestData( QByteArray& );
void requestData( TQByteArray& );

/**
* Is emitted when the state changes.

+ 3
- 3
arts/kde/kaudioplaystream_p.h View File

@@ -23,7 +23,7 @@
#include <soundserver.h>
#include <stdsynthmodule.h>

#include <qobject.h>
#include <tqobject.h>

class KArtsServer;
class KAudioManagerPlay;
@@ -36,10 +36,10 @@ namespace Arts {
class KAudioPlayStream;
class KByteSoundProducer;

class KAudioPlayStreamPrivate : public QObject {
class KAudioPlayStreamPrivate : public TQObject {
Q_OBJECT
public:
KAudioPlayStreamPrivate( KArtsServer*, const QString title, QObject*, const char* =0 );
KAudioPlayStreamPrivate( KArtsServer*, const TQString title, TQObject*, const char* =0 );
~KAudioPlayStreamPrivate();

KArtsServer* _server;

+ 12
- 12
arts/kde/kaudiorecordstream.cpp View File

@@ -32,9 +32,9 @@
#include <kglobal.h>
#include <kdebug.h>

#include <qstring.h>
#include <qptrqueue.h>
#include <qcstring.h> //QByteArray
#include <tqstring.h>
#include <tqptrqueue.h>
#include <tqcstring.h> //QByteArray

#include <assert.h>

@@ -50,12 +50,12 @@ struct KAudioRecordStream::Data
bool blocking;
bool polling;
unsigned int pos;
QPtrQueue<QByteArray> inqueue;
QString title;
TQPtrQueue<TQByteArray> inqueue;
TQString title;
};

KAudioRecordStream::KAudioRecordStream( KArtsServer * kserver, const QString & title, QObject * parent, const char * name )
: QObject( parent, name )
KAudioRecordStream::KAudioRecordStream( KArtsServer * kserver, const TQString & title, TQObject * parent, const char * name )
: TQObject( parent, name )
, d( new Data )
{
d->kserver = kserver;
@@ -66,7 +66,7 @@ KAudioRecordStream::KAudioRecordStream( KArtsServer * kserver, const QString & t
d->inqueue.setAutoDelete( true );
d->title = title;

connect( d->kserver, SIGNAL( restartedServer() ), SLOT( slotRestartedServer() ) );
connect( d->kserver, TQT_SIGNAL( restartedServer() ), TQT_SLOT( slotRestartedServer() ) );

d->in = Arts::DynamicCast( d->kserver->server().createObject( "Arts::Synth_AMAN_RECORD" ) );
d->effectStack = Arts::DynamicCast( d->kserver->server().createObject( "Arts::StereoEffectStack" ) );
@@ -109,7 +109,7 @@ int KAudioRecordStream::read( char * buffer, int size )
if( d->inqueue.isEmpty() )
return size - remaining;
}
QByteArray * data = d->inqueue.head();
TQByteArray * data = d->inqueue.head();
unsigned int tocopy = kMin( remaining, data->size() - d->pos );
memcpy( buffer, data->data() + d->pos, tocopy );
d->pos += tocopy;
@@ -196,8 +196,8 @@ void KAudioRecordStream::start( int samplingRate, int bits, int channels )

d->receiver_base = new KByteSoundReceiver( samplingRate, bits, channels, d->title.local8Bit() );
d->receiver = Arts::ByteSoundReceiver::_from_base( d->receiver_base );
connect( d->receiver_base, SIGNAL( data( const char *, unsigned int ) ),
SLOT( slotData( const char *, unsigned int ) ) );
connect( d->receiver_base, TQT_SIGNAL( data( const char *, unsigned int ) ),
TQT_SLOT( slotData( const char *, unsigned int ) ) );
Arts::connect( d->convert, "outdata", d->receiver, "indata" );

d->convert.start();
@@ -222,7 +222,7 @@ void KAudioRecordStream::slotRestartedServer() { }
void KAudioRecordStream::slotData( const char * contents, unsigned int size )
{
//kdDebug( 400 ) << k_funcinfo << endl;
QByteArray * bytearray = new QByteArray( size );
TQByteArray * bytearray = new TQByteArray( size );
// copy the contents to the bytearray
// this has to be deleted later
bytearray->duplicate( contents, size );

+ 4
- 4
arts/kde/kaudiorecordstream.h View File

@@ -25,7 +25,7 @@
#ifndef _KAUDIORECORDSTREAM__H
#define _KAUDIORECORDSTREAM__H

#include <qobject.h>
#include <tqobject.h>

#include <kdelibs_export.h>

@@ -51,7 +51,7 @@ class KDE_ARTS_EXPORT KAudioRecordStream : public QObject
* @param parent You will propably want to pass the server as parent to so this stream gets deleted before the server disappears.
* @param name The name of the stream.
*/
KAudioRecordStream( KArtsServer * server, const QString & title, QObject * parent = 0, const char * name = 0 );
KAudioRecordStream( KArtsServer * server, const TQString & title, TQObject * parent = 0, const char * name = 0 );

~KAudioRecordStream();

@@ -137,12 +137,12 @@ class KDE_ARTS_EXPORT KAudioRecordStream : public QObject
signals:
/**
* Data from the aRts server has arrived. You should copy the data
* because the passed QByteArray will be deleted right after
* because the passed TQByteArray will be deleted right after
* returning from your slot(s).
*
* @param data the data from the server
*/
void data( QByteArray & data );
void data( TQByteArray & data );

/**
* Wether this RecordStream is recording or not.

+ 2
- 2
arts/kde/kaudiorecordstream_p.h View File

@@ -26,9 +26,9 @@
#include <soundserver.h>
#include <stdsynthmodule.h>

#include <qobject.h>
#include <tqobject.h>

class KByteSoundReceiver : public QObject,
class KByteSoundReceiver : public TQObject,
public Arts::ByteSoundReceiver_skel,
public Arts::StdSynthModule
{

+ 7
- 7
arts/kde/kconverttest.cc View File

@@ -1,7 +1,7 @@
#include <stdio.h>

#include <qfile.h>
#include <qobject.h>
#include <tqfile.h>
#include <tqobject.h>

#include <klocale.h>
#include <kaboutdata.h>
@@ -81,13 +81,13 @@ int main(int argc, char **argv)
// converter.setup(44100);
converter.requestPlayObject(url);

QObject::connect(&converter, SIGNAL(rawStreamStart()), get, SLOT(slotRawStreamStart()));
TQObject::connect(&converter, TQT_SIGNAL(rawStreamStart()), get, TQT_SLOT(slotRawStreamStart()));

QObject::connect(&converter, SIGNAL(newBlockSize(long)), get, SLOT(slotNewBlockSize(long)));
QObject::connect(&converter, SIGNAL(newBlockPointer(long)), get, SLOT(slotNewBlockPointer(long)));
QObject::connect(&converter, SIGNAL(newData()), get, SLOT(slotNewData()));
TQObject::connect(&converter, TQT_SIGNAL(newBlockSize(long)), get, TQT_SLOT(slotNewBlockSize(long)));
TQObject::connect(&converter, TQT_SIGNAL(newBlockPointer(long)), get, TQT_SLOT(slotNewBlockPointer(long)));
TQObject::connect(&converter, TQT_SIGNAL(newData()), get, TQT_SLOT(slotNewData()));
QObject::connect(&converter, SIGNAL(rawStreamFinished()), get, SLOT(slotRawStreamFinished()));
TQObject::connect(&converter, TQT_SIGNAL(rawStreamFinished()), get, TQT_SLOT(slotRawStreamFinished()));

converter.start();


+ 1
- 1
arts/kde/kconverttest.h View File

@@ -22,7 +22,7 @@
#ifndef KCONVERTTEST_H
#define KCONVERTTEST_H

#include <qobject.h>
#include <tqobject.h>

class KConvertTest : public QObject
{

+ 2
- 2
arts/kde/kdatarequest_impl.h View File

@@ -22,14 +22,14 @@
#ifndef KDATAREQUEST_IMPL
#define KDATAREQUEST_IMPL

#include <qobject.h>
#include <tqobject.h>
#include "artskde.h"
#include "stdsynthmodule.h"

namespace Arts
{

class KDataRequest_impl : public QObject, virtual public KDataRequest_skel,
class KDataRequest_impl : public TQObject, virtual public KDataRequest_skel,
virtual public StdSynthModule
{
Q_OBJECT

+ 22
- 22
arts/kde/kioinputstream_impl.cpp View File

@@ -34,8 +34,8 @@
#include <kio/job.h>
#include <kio/kmimetype.h>
#include <kio/jobclasses.h>
#include <qtimer.h>
#include <qdatastream.h>
#include <tqtimer.h>
#include <tqdatastream.h>
#include "artsversion.h"
#include "kioinputstream_impl.moc"

@@ -78,16 +78,16 @@ void KIOInputStream_impl::streamStart()
m_job = KIO::get(m_url, false, false);

m_job->addMetaData("accept", "audio/x-mp3, video/mpeg, application/ogg");
m_job->addMetaData("UserAgent", QString::fromLatin1("aRts/") + QString::fromLatin1(ARTS_VERSION));
m_job->addMetaData("UserAgent", TQString::fromLatin1("aRts/") + TQString::fromLatin1(ARTS_VERSION));

QObject::connect(m_job, SIGNAL(data(KIO::Job *, const QByteArray &)),
this, SLOT(slotData(KIO::Job *, const QByteArray &)));
QObject::connect(m_job, SIGNAL(result(KIO::Job *)),
this, SLOT(slotResult(KIO::Job *)));
QObject::connect(m_job, SIGNAL(mimetype(KIO::Job *, const QString &)),
this, SLOT(slotScanMimeType(KIO::Job *, const QString &)));
QObject::connect(m_job, SIGNAL(totalSize( KIO::Job *, KIO::filesize_t)),
this, SLOT(slotTotalSize(KIO::Job *, KIO::filesize_t)));
TQObject::connect(m_job, TQT_SIGNAL(data(KIO::Job *, const TQByteArray &)),
this, TQT_SLOT(slotData(KIO::Job *, const TQByteArray &)));
TQObject::connect(m_job, TQT_SIGNAL(result(KIO::Job *)),
this, TQT_SLOT(slotResult(KIO::Job *)));
TQObject::connect(m_job, TQT_SIGNAL(mimetype(KIO::Job *, const TQString &)),
this, TQT_SLOT(slotScanMimeType(KIO::Job *, const TQString &)));
TQObject::connect(m_job, TQT_SIGNAL(totalSize( KIO::Job *, KIO::filesize_t)),
this, TQT_SLOT(slotTotalSize(KIO::Job *, KIO::filesize_t)));

m_streamStarted = true;
}
@@ -98,14 +98,14 @@ void KIOInputStream_impl::streamEnd()

if(m_job != 0)
{
QObject::disconnect(m_job, SIGNAL(data(KIO::Job *, const QByteArray &)),
this, SLOT(slotData(KIO::Job *, const QByteArray &)));
QObject::disconnect(m_job, SIGNAL(result(KIO::Job *)),
this, SLOT(slotResult(KIO::Job *)));
QObject::disconnect(m_job, SIGNAL(mimetype(KIO::Job *, const QString &)),
this, SLOT(slotScanMimeType(KIO::Job *, const QString &)));
QObject::disconnect(m_job, SIGNAL(totalSize( KIO::Job *, KIO::filesize_t)),
this, SLOT(slotTotalSize(KIO::Job *, KIO::filesize_t)));
TQObject::disconnect(m_job, TQT_SIGNAL(data(KIO::Job *, const TQByteArray &)),
this, TQT_SLOT(slotData(KIO::Job *, const TQByteArray &)));
TQObject::disconnect(m_job, TQT_SIGNAL(result(KIO::Job *)),
this, TQT_SLOT(slotResult(KIO::Job *)));
TQObject::disconnect(m_job, TQT_SIGNAL(mimetype(KIO::Job *, const TQString &)),
this, TQT_SLOT(slotScanMimeType(KIO::Job *, const TQString &)));
TQObject::disconnect(m_job, TQT_SIGNAL(totalSize( KIO::Job *, KIO::filesize_t)),
this, TQT_SLOT(slotTotalSize(KIO::Job *, KIO::filesize_t)));

if ( m_streamPulled )
outdata.endPull();
@@ -124,12 +124,12 @@ bool KIOInputStream_impl::openURL(const std::string& url)
return true;
}

void KIOInputStream_impl::slotData(KIO::Job *, const QByteArray &data)
void KIOInputStream_impl::slotData(KIO::Job *, const TQByteArray &data)
{
if(m_finished)
m_finished = false;

QDataStream dataStream(m_data, IO_WriteOnly | IO_Append);
TQDataStream dataStream(m_data, IO_WriteOnly | IO_Append);
dataStream.writeRawBytes(data.data(), data.size());
//kdDebug( 400 ) << "STREAMING: buffersize = " << m_data.size() << " bytes" << endl;
@@ -151,7 +151,7 @@ void KIOInputStream_impl::slotResult(KIO::Job *job)
}
}

void KIOInputStream_impl::slotScanMimeType(KIO::Job *, const QString &mimetype)
void KIOInputStream_impl::slotScanMimeType(KIO::Job *, const TQString &mimetype)
{
kdDebug( 400 ) << "got mimetype: " << mimetype << endl;
emit mimeTypeFound(mimetype);

+ 7
- 7
arts/kde/kioinputstream_impl.h View File

@@ -22,8 +22,8 @@
#ifndef KIOINPUTSTREAM_IMPL
#define KIOINPUTSTREAM_IMPL

#include <qobject.h>
#include <qcstring.h>
#include <tqobject.h>
#include <tqcstring.h>
#include <kio/jobclasses.h>
#include <kurl.h>
#include "artskde.h"
@@ -31,7 +31,7 @@

namespace Arts {

class KIOInputStream_impl : public QObject, virtual public KIOInputStream_skel,
class KIOInputStream_impl : public TQObject, virtual public KIOInputStream_skel,
virtual public InputStream_skel,
virtual public StdSynthModule
{
@@ -59,18 +59,18 @@ public:
long packetSize() { return m_packetSize; }

signals:
void mimeTypeFound(const QString & mimetype);
void mimeTypeFound(const TQString & mimetype);
private slots:
void slotData(KIO::Job *, const QByteArray &);
void slotData(KIO::Job *, const TQByteArray &);
void slotResult(KIO::Job *);
void slotScanMimeType(KIO::Job *, const QString &mimetype);
void slotScanMimeType(KIO::Job *, const TQString &mimetype);
void slotTotalSize(KIO::Job *, KIO::filesize_t size);

private:
KURL m_url;
KIO::TransferJob *m_job;
QByteArray m_data;
TQByteArray m_data;
bool m_finished;
bool m_firstBuffer;
bool m_streamStarted;

+ 16
- 16
arts/kde/kplayobject.cc View File

@@ -24,13 +24,13 @@
#include "kplayobjectcreator.h"
#include <kdebug.h>

KPlayObject::KPlayObject() : QObject()
KPlayObject::KPlayObject() : TQObject()
{
m_playObject = Arts::PlayObject::null();
m_isStream = false;
}

KPlayObject::KPlayObject(Arts::PlayObject playobject, bool isStream) : QObject()
KPlayObject::KPlayObject(Arts::PlayObject playobject, bool isStream) : TQObject()
{
m_playObject = playobject;
m_isStream = isStream;
@@ -63,9 +63,9 @@ void KPlayObject::halt()
object().halt();
}

QString KPlayObject::description()
TQString KPlayObject::description()
{
return QString::fromLatin1(object().description().c_str());
return TQString::fromLatin1(object().description().c_str());
}

Arts::poTime KPlayObject::currentTime()
@@ -83,9 +83,9 @@ Arts::poCapabilities KPlayObject::capabilities()
return object().capabilities();
}

QString KPlayObject::mediaName()
TQString KPlayObject::mediaName()
{
return QString::fromLatin1(object().mediaName().c_str());
return TQString::fromLatin1(object().mediaName().c_str());
}

Arts::poState KPlayObject::state()
@@ -131,14 +131,14 @@ struct KDE::PlayObject::PrivateData
KURL url;
};

KDE::PlayObject::PlayObject() : QObject()
KDE::PlayObject::PlayObject() : TQObject()
{
m_playObject = Arts::PlayObject::null();
m_isStream = false;
d = new PrivateData;
}

KDE::PlayObject::PlayObject(Arts::PlayObject playobject, bool isStream) : QObject()
KDE::PlayObject::PlayObject(Arts::PlayObject playobject, bool isStream) : TQObject()
{
m_playObject = playobject;
m_isStream = isStream;
@@ -150,7 +150,7 @@ KDE::PlayObject::PlayObject(Arts::PlayObject playobject, bool isStream) : QObjec
//emit playObjectCreated();
}

KDE::PlayObject::PlayObject( Arts::SoundServerV2 server, const KURL& url, bool isStream, bool createBUS ) : QObject()
KDE::PlayObject::PlayObject( Arts::SoundServerV2 server, const KURL& url, bool isStream, bool createBUS ) : TQObject()
{
kdDebug( 400 ) << "KDE::PlayObject: created as proxy for URL " << url.url()<< endl;

@@ -179,7 +179,7 @@ void KDE::PlayObject::play()
if ( d->creator )
delete d->creator;
d->creator = new KDE::PlayObjectCreator( d->server );
d->creator->create( d->url, d->createBUS, this, SLOT( attachPlayObject( Arts::PlayObject ) ) );
d->creator->create( d->url, d->createBUS, this, TQT_SLOT( attachPlayObject( Arts::PlayObject ) ) );
kdDebug( 400 ) << "KDE::PlayObject::play(): creator called" << endl;
d->internalState = Arts::posPlaying;
}
@@ -239,11 +239,11 @@ void KDE::PlayObject::halt()
d->internalState = Arts::posIdle;
}

QString KDE::PlayObject::description()
TQString KDE::PlayObject::description()
{
if ( object().isNull() )
return QString();
return QString::fromLatin1(object().description().c_str());
return TQString();
return TQString::fromLatin1(object().description().c_str());
}

Arts::poTime KDE::PlayObject::currentTime()
@@ -267,11 +267,11 @@ Arts::poCapabilities KDE::PlayObject::capabilities()
return object().capabilities();
}

QString KDE::PlayObject::mediaName()
TQString KDE::PlayObject::mediaName()
{
if ( object().isNull() )
return QString();
return QString::fromLatin1(object().mediaName().c_str());
return TQString();
return TQString::fromLatin1(object().mediaName().c_str());
}

Arts::poState KDE::PlayObject::state()

+ 7
- 7
arts/kde/kplayobject.h View File

@@ -25,7 +25,7 @@
#include "kmedia2.h"
#include "soundserver.h"
#include <kurl.h>
#include <qobject.h>
#include <tqobject.h>

class KDE_EXPORT KPlayObject : public QObject
{
@@ -84,7 +84,7 @@ public:
/**
* Reimplemented (Arts::PlayObject Wrapper)
*/
QString description();
TQString description();
/**
* Reimplemented (Arts::PlayObject Wrapper)
@@ -104,7 +104,7 @@ public:
/**
* Reimplemented (Arts::PlayObject Wrapper)
*/
QString mediaName();
TQString mediaName();
/**
* Reimplemented (Arts::PlayObject Wrapper)
@@ -163,7 +163,7 @@ class PlayObjectFactory;
* This has some side effects that developers need to be aware of:
* Until the real Arts::PlayObject got created,
* - the capabilities() method returns "zero" capabilities,
* - description() and mediaName() will return a null QString,
* - description() and mediaName() will return a null TQString,
* - currentTime() and overallTime() will return "zero",
* - despite the fact that isNull() returns "false", object().isNull()
* will return "true". If you need to directly access methods of the
@@ -239,7 +239,7 @@ public:
/**
* Reimplemented (Arts::PlayObject Wrapper)
*/
QString description();
TQString description();
/**
* Reimplemented (Arts::PlayObject Wrapper)
@@ -260,7 +260,7 @@ public:
/**
* Reimplemented (Arts::PlayObject Wrapper)
*/
QString mediaName();
TQString mediaName();
/**
* returns the internal state of the PlayObject. The state can be
@@ -293,7 +293,7 @@ private:

/* private constructors, to prevent instantiation and copying */
PlayObject();
PlayObject( const PlayObject& ) : QObject() {};
PlayObject( const PlayObject& ) : TQObject() {};
PlayObject(Arts::PlayObject playobject, bool isStream);
PlayObject( Arts::SoundServerV2 server, const KURL& url, bool isStream, bool createBUS );


+ 9
- 9
arts/kde/kplayobjectcreator.cc View File

@@ -25,7 +25,7 @@
#include "kplayobjectcreator.moc"
#include "kioinputstream_impl.h"

#include <qfile.h>
#include <tqfile.h>

#include <kdebug.h>

@@ -38,13 +38,13 @@ KDE::PlayObjectCreator::~PlayObjectCreator()
{
}

bool KDE::PlayObjectCreator::create(const KURL& url, bool createBUS, const QObject* receiver, const char* slot)
bool KDE::PlayObjectCreator::create(const KURL& url, bool createBUS, const TQObject* receiver, const char* slot)
{
// no need to go any further, and I hate deep indentation
if (m_server.isNull() || url.isEmpty() )
return false;

connect( this, SIGNAL( playObjectCreated( Arts::PlayObject ) ),
connect( this, TQT_SIGNAL( playObjectCreated( Arts::PlayObject ) ),
receiver, slot );

// check if the URL is a local file
@@ -57,8 +57,8 @@ bool KDE::PlayObjectCreator::create(const KURL& url, bool createBUS, const QObje
m_instream = Arts::KIOInputStream::_from_base(instream_impl);

// signal will be called once the ioslave knows the mime-type of the stream
connect(instream_impl, SIGNAL(mimeTypeFound(const QString &)),
this, SLOT(slotMimeType(const QString &)));
connect(instream_impl, TQT_SIGNAL(mimeTypeFound(const TQString &)),
this, TQT_SLOT(slotMimeType(const TQString &)));

// GO!
m_instream.openURL(url.url().latin1());
@@ -71,22 +71,22 @@ bool KDE::PlayObjectCreator::create(const KURL& url, bool createBUS, const QObje
// usual stuff if we have a local file
KMimeType::Ptr mimetype = KMimeType::findByURL(url);
emit playObjectCreated (
m_server.createPlayObjectForURL(std::string(QFile::encodeName(url.path())),
m_server.createPlayObjectForURL(std::string(TQFile::encodeName(url.path())),
std::string(mimetype->name().latin1()),
createBUS)
);
return true;
}

void KDE::PlayObjectCreator::slotMimeType(const QString& mimetype)
void KDE::PlayObjectCreator::slotMimeType(const TQString& mimetype)
{

kdDebug( 400 ) << "slotMimeType called: " << mimetype << endl;

QString mimetype_copy = mimetype;
TQString mimetype_copy = mimetype;

if ( mimetype_copy == "application/octet-stream" )
mimetype_copy = QString("audio/x-mp3");
mimetype_copy = TQString("audio/x-mp3");

if (mimetype_copy == "application/x-zerosize")
emit playObjectCreated(Arts::PlayObject::null());

+ 3
- 3
arts/kde/kplayobjectcreator.h View File

@@ -23,7 +23,7 @@
#define KPLAYOBJECTCREATOR_H

#include <kurl.h>
#include <qobject.h>
#include <tqobject.h>
#include "soundserver.h"
#include "kioinputstream_impl.h"

@@ -36,13 +36,13 @@ public:
PlayObjectCreator(Arts::SoundServerV2 server);
~PlayObjectCreator();

bool create(const KURL& url, bool createBUS, const QObject* receiver, const char* slot);
bool create(const KURL& url, bool createBUS, const TQObject* receiver, const char* slot);

signals:
void playObjectCreated(Arts::PlayObject playObject);

private slots:
void slotMimeType(const QString &mimetype);
void slotMimeType(const TQString &mimetype);

private:
Arts::SoundServerV2 m_server;

+ 11
- 11
arts/kde/kplayobjectfactory.cc View File

@@ -29,7 +29,7 @@
#include "kartsdispatcher.h"
#include "kartsserver.h"

#include <qfile.h>
#include <tqfile.h>
#include <kdebug.h>
#include "kaudiomanagerplay.h"
#include <flowsystem.h>
@@ -62,7 +62,7 @@ KPlayObject *KPlayObjectFactory::createPlayObject(const KURL& url, bool createBU
}


KPlayObject *KPlayObjectFactory::createPlayObject(const KURL& _url, const QString &mimetype, bool createBUS)
KPlayObject *KPlayObjectFactory::createPlayObject(const KURL& _url, const TQString &mimetype, bool createBUS)
{
// WHY DOES BROKEN KIO_MEDIA GIVE WRONG URLS?
// I hate it
@@ -84,7 +84,7 @@ KPlayObject *KPlayObjectFactory::createPlayObject(const KURL& _url, const QStrin
return new KPlayObject(m_server.createPlayObjectForStream(instream, string("audio/x-mp3"), createBUS), true);
}
else
return new KPlayObject(m_server.createPlayObjectForURL(string(QFile::encodeName(url.path())), string(mimetype.latin1()), createBUS), false);
return new KPlayObject(m_server.createPlayObjectForURL(string(TQFile::encodeName(url.path())), string(mimetype.latin1()), createBUS), false);
}
else
return new KPlayObject();
@@ -133,7 +133,7 @@ KDE::PlayObject *KDE::PlayObjectFactory::createPlayObject(const KURL& url, bool
return createPlayObject(url, mimetype->name(), createBUS);
}

KDE::PlayObject *KDE::PlayObjectFactory::createPlayObject(const KURL& _url, const QString &mimetype, bool createBUS)
KDE::PlayObject *KDE::PlayObjectFactory::createPlayObject(const KURL& _url, const TQString &mimetype, bool createBUS)
{
// WHY DOES BROKEN KIO_MEDIA GIVE WRONG URLS?
// I hate it
@@ -158,7 +158,7 @@ KDE::PlayObject *KDE::PlayObjectFactory::createPlayObject(const KURL& _url, cons
if ( url.isLocalFile() || !d->allowStreaming || (url.protocol() == "audiocd" && mimetype == "application/x-cda" && mimeTypes().contains( "application/x-cda" ) ) )
{
// we rely on the delivered mimetype if it's a local file
d->playObj = new KDE::PlayObject( d->server.createPlayObjectForURL( string( QFile::encodeName( url.path() ) ), string( mimetype.latin1() ), createBUS ), false );
d->playObj = new KDE::PlayObject( d->server.createPlayObjectForURL( string( TQFile::encodeName( url.path() ) ), string( mimetype.latin1() ), createBUS ), false );
}
else
{
@@ -179,7 +179,7 @@ KDE::PlayObject *KDE::PlayObjectFactory::createPlayObject(const KURL& _url, cons
d->helper->po = d->playObj;
d->helper->ap = d->amanPlay;
if( d->playObj->object().isNull() && d->amanPlay )
QObject::connect( d->playObj, SIGNAL( playObjectCreated() ), d->helper, SLOT( connectAmanPlay() ) );
TQObject::connect( d->playObj, TQT_SIGNAL( playObjectCreated() ), d->helper, TQT_SLOT( connectAmanPlay() ) );
else
d->helper->connectAmanPlay();
}
@@ -187,13 +187,13 @@ KDE::PlayObject *KDE::PlayObjectFactory::createPlayObject(const KURL& _url, cons
return d->playObj;
}

QStringList KDE::PlayObjectFactory::mimeTypes(void)
TQStringList KDE::PlayObjectFactory::mimeTypes(void)
{
KArtsDispatcher dispatcher; // we need such a thing, otherwise we crash
Arts::TraderQuery query;
vector<Arts::TraderOffer> *offers = query.query();

QStringList results;
TQStringList results;
for(vector<Arts::TraderOffer>::iterator offer = offers->begin();
offer != offers->end(); ++offer)
{
@@ -202,7 +202,7 @@ QStringList KDE::PlayObjectFactory::mimeTypes(void)
for(vector<string>::iterator mimetype = mimetypes->begin();
mimetype != mimetypes->end(); ++mimetype)
{
QString name = QString::fromLocal8Bit((*mimetype).c_str()).stripWhiteSpace();
TQString name = TQString::fromLocal8Bit((*mimetype).c_str()).stripWhiteSpace();
if(KMimeType::mimeType(name))
results.append(name);
}
@@ -213,9 +213,9 @@ QStringList KDE::PlayObjectFactory::mimeTypes(void)

// clean out duplicates
results.sort();
for(QStringList::iterator result = results.begin(); result != results.end(); )
for(TQStringList::iterator result = results.begin(); result != results.end(); )
{
QStringList::iterator previous = result;
TQStringList::iterator previous = result;
++result;
if(result != results.end() && *result == *previous)
{

+ 4
- 4
arts/kde/kplayobjectfactory.h View File

@@ -51,7 +51,7 @@ public:
~KPlayObjectFactory();

KPlayObject *createPlayObject(const KURL& url, bool createBUS);
KPlayObject *createPlayObject(const KURL& url, const QString &mimetype, bool createBUS);
KPlayObject *createPlayObject(const KURL& url, const TQString &mimetype, bool createBUS);

void setAllowStreaming(bool s) { m_allowStreaming = s; }
bool allowStreaming() { return m_allowStreaming; }
@@ -76,7 +76,7 @@ class POFHelper;
* use the KDE multimedia framework can be found in the documentation
* for KDE::PlayObject.
*/
class KDE_EXPORT PlayObjectFactory// : public QObject ### for KDE4 make it a QObject to be able to receive signals
class KDE_EXPORT PlayObjectFactory// : public TQObject ### for KDE4 make it a TQObject to be able to receive signals
{
public:
/**
@@ -116,7 +116,7 @@ public:
* This method also creates a KDE::PlayObject, but does no automatic
* mimetype detection. Use this method with care.
*/
KDE::PlayObject *createPlayObject(const KURL& url, const QString &mimetype, bool createBUS);
KDE::PlayObject *createPlayObject(const KURL& url, const TQString &mimetype, bool createBUS);

/**
* setAllowStreaming( true ) allows the factory to create a
@@ -134,7 +134,7 @@ public:
/**
* Return the mimetypes that are playable
*/
static QStringList mimeTypes(void);
static TQStringList mimeTypes(void);

/*private slots: ### KDE4 and remove Helper class
void connectAmanPlay();*/

+ 1
- 1
arts/kde/kplayobjectfactory_p.h View File

@@ -20,7 +20,7 @@
#ifndef KPLAYOBJECTFACTORY_P_H
#define KPLAYOBJECTFACTORY_P_H

#include <qobject.h>
#include <tqobject.h>
#include "kplayobjectfactory.h"

namespace KDE

+ 33
- 33
arts/kde/kvideowidget.cpp View File

@@ -16,8 +16,8 @@
#ifdef HAVE_USLEEP
#include <unistd.h>
#endif
#include <qaccel.h>
#include <qcursor.h>
#include <tqaccel.h>
#include <tqcursor.h>

#if defined Q_WS_X11 && ! defined K_WS_QTONLY
#include <X11/Xlib.h>
@@ -49,7 +49,7 @@ KFullscreenVideoWidget::KFullscreenVideoWidget( KVideoWidget *parent, const char
{
this->videoWidget = parent;
setEraseColor( black );
setCursor(QCursor(Qt::BlankCursor));
setCursor(TQCursor(Qt::BlankCursor));
}

void KFullscreenVideoWidget::windowActivationChange( bool )
@@ -73,18 +73,18 @@ bool KFullscreenVideoWidget::x11Event( XEvent *event )
return false;
}

KVideoWidget::KVideoWidget( KXMLGUIClient *clientParent, QWidget *parent, const char *name, WFlags f )
KVideoWidget::KVideoWidget( KXMLGUIClient *clientParent, TQWidget *parent, const char *name, WFlags f )
: KXMLGUIClient( clientParent ),
QWidget( parent, name, f )
TQWidget( parent, name, f )
{
init();
// ???
QString toolbarName = i18n("Video Toolbar");
setXML(QString("<!DOCTYPE kpartgui>\n<kpartgui name=\"kvideowidget\" version=\"1\"><MenuBar><Menu name=\"edit\"><Separator/><Action name=\"double_size\"/><Action name=\"normal_size\"/><Action name=\"half_size\"/><Separator/><Action name=\"fullscreen_mode\"/></Menu></MenuBar><Toolbar name=\"VideoToolbar\"><text>Video Toolbar</text><Action name=\"fullscreen_mode\"/></Toolbar></kpartgui>"), true);
TQString toolbarName = i18n("Video Toolbar");
setXML(TQString("<!DOCTYPE kpartgui>\n<kpartgui name=\"kvideowidget\" version=\"1\"><MenuBar><Menu name=\"edit\"><Separator/><Action name=\"double_size\"/><Action name=\"normal_size\"/><Action name=\"half_size\"/><Separator/><Action name=\"fullscreen_mode\"/></Menu></MenuBar><Toolbar name=\"VideoToolbar\"><text>Video Toolbar</text><Action name=\"fullscreen_mode\"/></Toolbar></kpartgui>"), true);
}

KVideoWidget::KVideoWidget( QWidget *parent, const char *name, WFlags f )
: QWidget( parent, name, f )
KVideoWidget::KVideoWidget( TQWidget *parent, const char *name, WFlags f )
: TQWidget( parent, name, f )
{
init();
}
@@ -92,7 +92,7 @@ KVideoWidget::KVideoWidget( QWidget *parent, const char *name, WFlags f )
void KVideoWidget::init(void)
{
setMinimumSize(0, 0);
setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ) );
setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding ) );
setFocusPolicy( ClickFocus );

fullscreenWidget = 0;
@@ -102,16 +102,16 @@ void KVideoWidget::init(void)

// Setup actions
new KToggleAction( i18n("Fullscreen &Mode"), "window_fullscreen",
CTRL+SHIFT+Key_F, this, SLOT(fullscreenActivated()),
CTRL+SHIFT+Key_F, this, TQT_SLOT(fullscreenActivated()),
actionCollection(), "fullscreen_mode" );
new KRadioAction( i18n("&Half Size"), ALT+Key_0,
this, SLOT(halfSizeActivated()),
this, TQT_SLOT(halfSizeActivated()),
actionCollection(), "half_size" );
new KRadioAction( i18n("&Normal Size"), ALT+Key_1,
this, SLOT(normalSizeActivated()),
this, TQT_SLOT(normalSizeActivated()),
actionCollection(), "normal_size" );
new KRadioAction( i18n("&Double Size"), ALT+Key_2,
this, SLOT(doubleSizeActivated()),
this, TQT_SLOT(doubleSizeActivated()),
actionCollection(), "double_size" );

((KToggleAction *)action( "half_size" ))->setExclusiveGroup( "KVideoWidget::zoom" );
@@ -189,7 +189,7 @@ void KVideoWidget::embed( Arts::VideoPlayObject vpo )
action("fullscreen_mode")->setEnabled(enable);
}

QImage KVideoWidget::snapshot( Arts::VideoPlayObject vpo )
TQImage KVideoWidget::snapshot( Arts::VideoPlayObject vpo )
{
#if defined Q_WS_X11 && ! defined K_WS_QTONLY
Window root;
@@ -199,7 +199,7 @@ QImage KVideoWidget::snapshot( Arts::VideoPlayObject vpo )
int x, y;

if (vpo.isNull() || (long)(pixmap = vpo.x11Snapshot()) == -1)
return QImage();
return TQImage();

// Get 32bit RGBA image data (stored in 1bpp pixmap)
XGetGeometry( qt_xdisplay(), pixmap, &root, &x, &y, &width, &height, &border, &depth );
@@ -209,11 +209,11 @@ QImage KVideoWidget::snapshot( Arts::VideoPlayObject vpo )
if (xImage == 0)
{
XFreePixmap( qt_xdisplay(), pixmap );
return QImage();
return TQImage();
}

// Convert 32bit RGBA image data into Qt image
QImage qImage = QImage( (uchar *)xImage->data, width/32, height, 32, (QRgb *)0, 0, QImage::IgnoreEndian ).copy();
TQImage qImage = TQImage( (uchar *)xImage->data, width/32, height, 32, (QRgb *)0, 0, TQImage::IgnoreEndian ).copy();

// Free X11 resources and return Qt image
XDestroyImage( xImage );
@@ -286,9 +286,9 @@ void KVideoWidget::setDoubleSize()
doubleSizeActivated();
}

QSize KVideoWidget::sizeHint() const
TQSize KVideoWidget::sizeHint() const
{
return QSize( videoWidth, videoHeight );
return TQSize( videoWidth, videoHeight );
}

int KVideoWidget::heightForWidth( int w ) const
@@ -299,9 +299,9 @@ int KVideoWidget::heightForWidth( int w ) const
return int( double(w)*double(videoHeight)/double(videoWidth) );
}

void KVideoWidget::mousePressEvent( QMouseEvent *event )
void KVideoWidget::mousePressEvent( TQMouseEvent *event )
{
QPoint pos = mapToGlobal( event->pos() );
TQPoint pos = mapToGlobal( event->pos() );

emit mouseButtonPressed( event->button(), pos, event->state() );

@@ -310,14 +310,14 @@ void KVideoWidget::mousePressEvent( QMouseEvent *event )
emit rightButtonPressed( pos );
}

void KVideoWidget::mouseDoubleClickEvent( QMouseEvent *event )
void KVideoWidget::mouseDoubleClickEvent( TQMouseEvent *event )
{
emit mouseButtonDoubleClick( mapToGlobal( event->pos() ), event->state() );
}

void KVideoWidget::resizeEvent( QResizeEvent *event )
void KVideoWidget::resizeEvent( TQResizeEvent *event )
{
QWidget::resizeEvent( event );
TQWidget::resizeEvent( event );

if (width() > minimumWidth() || height() > minimumHeight())
{
@@ -379,20 +379,20 @@ void KVideoWidget::fullscreenActivated()
fullscreenWidget = new KFullscreenVideoWidget( this );

// Interconnect mouse button signals
connect( fullscreenWidget, SIGNAL(mouseButtonPressed( int, const QPoint &, int )),
this, SIGNAL(mouseButtonPressed( int, const QPoint &, int)) );
connect( fullscreenWidget, TQT_SIGNAL(mouseButtonPressed( int, const TQPoint &, int )),
this, TQT_SIGNAL(mouseButtonPressed( int, const TQPoint &, int)) );

connect( fullscreenWidget, SIGNAL(mouseButtonDoubleClick( const QPoint &, int )),
this, SIGNAL(mouseButtonDoubleClick( const QPoint &, int )) );
connect( fullscreenWidget, TQT_SIGNAL(mouseButtonDoubleClick( const TQPoint &, int )),
this, TQT_SIGNAL(mouseButtonDoubleClick( const TQPoint &, int )) );

// ### Remove in KDE4
connect( fullscreenWidget, SIGNAL(rightButtonPressed(const QPoint &)),
this, SIGNAL(rightButtonPressed(const QPoint &)) );
connect( fullscreenWidget, TQT_SIGNAL(rightButtonPressed(const TQPoint &)),
this, TQT_SIGNAL(rightButtonPressed(const TQPoint &)) );
// Leave fullscreen mode with <Escape> key
QAccel *a = new QAccel( fullscreenWidget );
TQAccel *a = new TQAccel( fullscreenWidget );
a->connectItem( a->insertItem( Key_Escape ),
this, SLOT(setWindowed()) );
this, TQT_SLOT(setWindowed()) );

fullscreenWidget->setFocus();
fullscreenWidget->showFullScreen();

+ 16
- 16
arts/kde/kvideowidget.h View File

@@ -11,24 +11,24 @@
#ifndef ARTSKDE_KVIDEOWIDGET_H
#define ARTSKDE_KVIDEOWIDGET_H

#include <qevent.h>
#include <qimage.h>
#include <qwidget.h>
#include <tqevent.h>
#include <tqimage.h>
#include <tqwidget.h>
#include <kmedia2.h>
#include <kxmlguiclient.h>


class KDE_ARTS_EXPORT KVideoWidget : public QWidget, virtual public KXMLGUIClient
class KDE_ARTS_EXPORT KVideoWidget : public TQWidget, virtual public KXMLGUIClient
{
Q_OBJECT

public:
KVideoWidget( KXMLGUIClient *clientParent, QWidget *parent = 0, const char *name = 0, WFlags f = 0 );
KVideoWidget( QWidget *parent = 0, const char *name = 0, WFlags f = 0 );
KVideoWidget( KXMLGUIClient *clientParent, TQWidget *parent = 0, const char *name = 0, WFlags f = 0 );
KVideoWidget( TQWidget *parent = 0, const char *name = 0, WFlags f = 0 );
virtual ~KVideoWidget();

void embed( Arts::VideoPlayObject vpo );
static QImage snapshot( Arts::VideoPlayObject vpo );
static TQImage snapshot( Arts::VideoPlayObject vpo );

bool isEmbedded();
bool isFullscreen();
@@ -36,14 +36,14 @@ public:
bool isNormalSize();
bool isDoubleSize();

QSize sizeHint() const;
TQSize sizeHint() const;

virtual int heightForWidth ( int w ) const;

protected:
virtual void mousePressEvent( QMouseEvent *event );
virtual void mouseDoubleClickEvent( QMouseEvent *event);
virtual void resizeEvent( QResizeEvent *event );
virtual void mousePressEvent( TQMouseEvent *event );
virtual void mouseDoubleClickEvent( TQMouseEvent *event);
virtual void resizeEvent( TQResizeEvent *event );
virtual bool x11Event( XEvent *event );

public slots:
@@ -63,17 +63,17 @@ protected slots:

signals:
void adaptSize( int width, int height );
void mouseButtonPressed( int type, const QPoint &, int state );
void mouseButtonDoubleClick( const QPoint &, int state );