summaryrefslogtreecommitdiffstats
path: root/KDE3PORTING.html
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-02-01 15:13:01 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-02-01 15:13:01 -0600
commitdeac2ca49faed824fe83066080714eb6d653615b (patch)
tree8b5bf97c5acaaf5285985b87fa76dbea0f35e4fa /KDE3PORTING.html
parent0c9d97065a3d6ceb12d687555a1a33d90db96238 (diff)
downloadtdelibs-deac2ca49faed824fe83066080714eb6d653615b.tar.gz
tdelibs-deac2ca49faed824fe83066080714eb6d653615b.zip
Rename a number of classes to enhance compatibility with KDE4
Diffstat (limited to 'KDE3PORTING.html')
-rw-r--r--KDE3PORTING.html54
1 files changed, 27 insertions, 27 deletions
diff --git a/KDE3PORTING.html b/KDE3PORTING.html
index b3fdff0d0..407d5c5ad 100644
--- a/KDE3PORTING.html
+++ b/KDE3PORTING.html
@@ -148,11 +148,11 @@ should be replaced with methods from TDELocale::calendar().
cases be replaced by methods in TDELocale::calendar().
<H4>Accelerators Keys</H4>
-<h5>KAccel</h5>
+<h5>TDEAccel</h5>
The following methods of been deprecated, and if KDE_NO_COMPAT is defined they will
not be available.
<ul>
- <li> KAccel::insertItem() and KAccel::connectItem().
+ <li> TDEAccel::insertItem() and TDEAccel::connectItem().
<pre>
- kaccel-&gt;insertItem( i18n("Scroll Up"), "Scroll Up", "Up" );
- kaccel-&gt;connectItem( "Scroll Up", this, TQT_SLOT(scrollUp()) );
@@ -163,19 +163,19 @@ not be available.
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
+ <li> TDEAccel::changeMenuAccel() has been deprecated because it was
never used in cvs. If you've used it in your application, the following
can replace it. Note, however, that this would be handled automatically
- by using KAction instead.
+ by using TDEAction instead.
<pre>
- kaccel-&gt;changeMenuAccel( menu, id, "file_open" );
+ menu-&gt;setAccel( kaccel-&gt;shortcut( "file_open" ).keyCodeQt(), id );
</pre>
</li>
</ul>
-The preferred means of defining a shortcut, however, is to use <b>KAction</b>.
+The preferred means of defining a shortcut, however, is to use <b>TDEAction</b>.
<pre>
- new KAction( i18n("Scroll Up"), Key_Up,
+ new TDEAction( i18n("Scroll Up"), Key_Up,
this, TQT_SLOT(scrollUp()), actionCollection(), "Scroll Up" );
</pre>
@@ -189,25 +189,25 @@ The preferred means of defining a shortcut, however, is to use <b>KAction</b>.
shortcut reassignments, which in turn used to make an expensive ungrab
of the old key and second grab of the new key necessary.</li>
</ul>
-<h5>KStdAccel</h5>
+<h5>TDEStdAccel</h5>
<ul>
<li><i>StdAccel::WhatThis</i> has been renamed to <i>StdAccel::WhatsThis</i>.
<li><i>StdAccel::Insert</i> and the corresponding <i>insert()</i>
have been removed. (Nobody on the list knew what its function was
supposed to be.) Calls to <i>insert()</i> and the equivalent
- <i>key(KStdAccel::Insert)</i> can be replaced with the former default
+ <i>key(TDEStdAccel::Insert)</i> can be replaced with the former default
of <i>Qt::CTRL+Qt::Key_Insert</i>.</li>
<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>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>int defaultKey(StdAccel accel)</td><td>TDEShortcut shortcutDefault(StdAccel id)</td></tr>
<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 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>
+ <i>TDEShortcut::contains( const KKey&/KKeySequence& )</i>.</td></tr>
+ <tr><td>int key(StdAccel)</td><td>const TDEShortcut& shortcut(StdAccel)</td></tr>
</table></li-->
</ul>
@@ -221,27 +221,27 @@ KURLBar and KURLBarItem.
<H3><A NAME="tdeui">Changes in tdeui</A></H3>
-<H4>KAccelMenu</H4>
+<H4>TDEAccelMenu</H4>
This class has been removed, Qt offers the same functionality.
-Use QPopupMenu/KPopupMenu or the XML-UI method for building menus.
+Use QPopupMenu/TDEPopupMenu or the XML-UI method for building menus.
-<H4>KAction</H4>
+<H4>TDEAction</H4>
<ul>
<li>The following methods have been deprecated and will need to be
replaced if KDE_NO_COMPAT is defined.
<table border=1>
<tr><th>Old</th><th>New</th></tr>
- <tr><td>int accel()</td><td>const KShortcut&amp; shortcut()</td></tr>
+ <tr><td>int accel()</td><td>const TDEShortcut&amp; shortcut()</td></tr>
<tr><td>int menuId()</td><td>int itemId()</td></tr>
- <tr><td>void setAccel(int)</td><td>void setShortcut(const KShortcut&amp;)</td></tr>
+ <tr><td>void setAccel(int)</td><td>void setShortcut(const TDEShortcut&amp;)</td></tr>
</table></li>
</ul>
-<h4>KActionCollection</h4>
+<h4>TDEActionCollection</h4>
<ul>
- <li>When constructing a KActionCollection object, a pointer to the focus widget should be passed.</li>
+ <li>When constructing a TDEActionCollection object, a pointer to the focus widget should be passed.</li>
<li>The insert(), remove(), and take() methods have been deprecated.
- If you wish to keep a list of actions, use the KActionPtrList container instead.
+ If you wish to keep a list of actions, use the TDEActionPtrList container instead.
If you want to configure the shortcuts from multiple actions collections,
pass each collection to KKeyChooser or KKeyDialog via their insert() methods.</li>
</ul>
@@ -322,24 +322,24 @@ KThemeBase and KThemeStyle have been ported over to the new QStyle/KStyle API
present in Qt3/KDE3. KThemeBase is no longer in tdeui, but in kstyles/kthemestyle
as its use is basically limited to KThemeStyle.
-<H4>KAction, KToolBar, KToolBarButton and icons</H4>
+<H4>TDEAction, TDEToolBar, TDEToolBarButton 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 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.
-KAction::iconSet() now has an argument specifying icon group, the old KAction::iconSet() is still available unless KDE_NO_COMPAT
+Method TDEAction::hasIconSet() has been renamed to TDEAction::hasIcon(), the old name will still work unless KDE_NO_COMPAT is defined.
+TDEAction::iconSet() now has an argument specifying icon group, the old TDEAction::iconSet() is still available unless KDE_NO_COMPAT
is defined and returns KIcon::Small iconset, just like in KDE2.
<p>
-KToolBarButton methods setPixmap(), setDefaultPixmap(), setDisabledPixmap(), setDefaultIcon() and setDisabledIcon() are deprecated.
-Use KToolBarButton::setIcon() (preferred) or KToolBarButton::setIconSet() instead.
+TDEToolBarButton methods setPixmap(), setDefaultPixmap(), setDisabledPixmap(), setDefaultIcon() and setDisabledIcon() are deprecated.
+Use TDEToolBarButton::setIcon() (preferred) or TDEToolBarButton::setIconSet() instead.
-<H4>KAction and derived classes</H4>
+<H4>TDEAction 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 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>
+<H4>TDEToggleAction</H4>
exclusiveGroup() is no more virtual. setExclusiveGroup(const
TQString&) is not a slot anymore.
@@ -563,7 +563,7 @@ flexibility and efficiency.
<br><br>
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)
+KFileView does not do any sorting anymore. Instead, the view's (i.e. KIconView, TDEListView)
sorting is utilized by letting its view-items provide a TQString key() method. Therefore,
KFileView offers the two methods
<ul>