Rename a number of classes to enhance compatibility with KDE4

pull/16/head
Timothy Pearson 12 years ago
parent 0c9d97065a
commit deac2ca49f

@ -26,7 +26,7 @@ or <a href="http://doc.trolltech.com/porting.html">this page online</a>.<P>
<LI><A HREF="#KIconLoader">KIconLoader</A></LI>
<LI><A HREF="#KTMainWindow">KTMainWindow</A></LI>
<LI><A HREF="#KHelpMenu">KHelpMenu</A></LI>
<LI><A HREF="#KToolBar">KToolBar</A></LI>
<LI><A HREF="#TDEToolBar">TDEToolBar</A></LI>
<LI><A HREF="#launching">Starting other programs</A></LI>
<LI><A HREF="#tdehtmlw">tdehtmlw</A></LI>
<LI><A HREF="#KIntegerLine">KIntegerLine, KIntLineEdit</A></LI>
@ -45,8 +45,8 @@ or <a href="http://doc.trolltech.com/porting.html">this page online</a>.<P>
<LI><A HREF="#KQuickHelp">KQuickHelp</A></LI>
<LI><A HREF="#KPixmapgradientFill">KPixmap::gradientFill</A></LI>
<LI><A HREF="#KTabListBox">KTabListBox</A></LI>
<LI><A HREF="#KToolBarButton">KToolBarButton &amp; KRadioGroup</A></LI>
<LI><A HREF="#KAccel">KAccel</A></LI>
<LI><A HREF="#TDEToolBarButton">TDEToolBarButton &amp; TDERadioGroup</A></LI>
<LI><A HREF="#TDEAccel">TDEAccel</A></LI>
<LI><A HREF="#kstring">kstring.h / KString</A></LI>
<LI><A HREF="#ktopwidget">ktopwidget.h / KTopWidget</A></LI>
<LI><A HREF="#kbutton">kbutton.h / KButton</A></LI>
@ -142,8 +142,8 @@ or <a href="http://doc.trolltech.com/porting.html">this page online</a>.<P>
The methods tempSaveName() and checkRecoverFile() return QString
now. The returned values must _not_ be free()d.<P>
helpMenu() has been moved to KMainWindow. aboutKDE(), aboutApp() and
appHelpActivated() have all been removed See section for KMainWindow
helpMenu() has been moved to TDEMainWindow. aboutKDE(), aboutApp() and
appHelpActivated() have all been removed See section for TDEMainWindow
for more info.<P>
The TDEApplication constructor has changed. Command line arguments and
@ -248,9 +248,9 @@ in stripping off the .xpm part<P>
<H3><A NAME="KTMainWindow">KTMainWindow</A></H3>
KTMainWindow has been replaced with KMainWindow.<p>
KTMainWindow has been replaced with TDEMainWindow.<p>
The KMainWindow constructor needs a parent widget as first argument.
The TDEMainWindow constructor needs a parent widget as first argument.
You can use 0 for this.<p>
setView() has been replaced with setCentralWidget().<p>
view() has been replaced with centralWidget().<p>
@ -271,12 +271,12 @@ mainViewGeometry() instead.<P>
<H3><A NAME="KHelpMenu">KHelpMenu</A></H3>
helpMenu() has been moved to KMainWindow from TDEApplication (kapp).<P>
helpMenu() has been moved to TDEMainWindow from TDEApplication (kapp).<P>
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)
If you used in the toplevel window (that is derived from TDEMainWindow)
"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>
@ -284,13 +284,13 @@ to TQString::null so it is sufficient to write helpMenu().<P>
The old aboutKDE(), aboutApp() and appHelpActivated() of TDEApplication
have all been removed. If you need direct access to these or need
access to a help menu in a class that is not derived from
KMainWindow then allocate an instance of the new class KHelpMenu.
TDEMainWindow then allocate an instance of the new class KHelpMenu.
See KDE 2.0 API reference or khelpmenu.h (tdeui) for additional info.<P>
Espen Sand &lt;<A HREF="mailto:espen@kde.org">espen@kde.org</A>&gt;<P>
<H4><P ALIGN="RIGHT"><A HREF="#TOC">Return to the Table of Contents</A></P></H4>
<H3><A NAME="KToolBar">KToolBar</A></H3>
<H3><A NAME="TDEToolBar">TDEToolBar</A></H3>
enable(...) is depreciated, use show()/hide() instead.<p>
enableFloating(...) has been removed, use enableMoving() instead.<p>
@ -588,7 +588,7 @@ this:<P>
<TABLE><TR><TD>
TQSplitter *split = new TQSplitter( parent );<BR>
TQListBox *lb = new TQListBox( split );<BR>
KListView *lv = new KListView( split );<BR>
TDEListView *lv = new TDEListView( split );<BR>
TQMultiLineEdit *ed = new TQMultiLineEdit( split );
</TD></TR></TABLE>
@ -600,17 +600,17 @@ possible if you call setOpaqueResize(true).<P>
<H3><A NAME="KTreeList">KTreeList, KTreeListItem</A></H3>
Use KListView, TQListViewItem instead. API is almost the same, you only
need to add a Column (KListView::addColum) before KListView is useable.<P>
Use TDEListView, TQListViewItem instead. API is almost the same, you only
need to add a Column (TDEListView::addColum) before TDEListView is useable.<P>
KListView has no addChild(), insertItem() and removeItem() calls. Inserting
a root item is done by constructing a TQListViewItem with the KListView
TDEListView has no addChild(), insertItem() and removeItem() calls. Inserting
a root item is done by constructing a TQListViewItem with the TDEListView
passed as the parent widget. adding a child item is done by constructing
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>
use TDEListView::setDecorativeRoot(true).<P>
Expanding and collapsing can by done by using TQListViewItem::setOpen(bool).<P>
@ -685,24 +685,24 @@ unbalancedGradient(), hash(), desaturate(), pattern(), fade(), blend() etc.<P>
<H3><A NAME="KTabListBox">KTabListBox</A></H3>
This widget has been replaced by the almighty KListView. Everything said
This widget has been replaced by the almighty TDEListView. Everything said
about KTreeList could be repeated here. The good thing is, that you now
can combine TreeView's and normal Tablists without problems.<P>
<H4><P ALIGN="RIGHT"><A HREF="#TOC">Return to the Table of Contents</A></P></H4>
<H3><A NAME="KToolBarButton">KToolBarButton &amp; KRadioGroup</A></H3>
<H3><A NAME="TDEToolBarButton">TDEToolBarButton &amp; TDERadioGroup</A></H3>
If you need to do anything with KToolBarButton you now need to include
&lt;ktoolbarbutton.h&gt; KRadioGroup has been renamed to KToolBarRadioGroup and
If you need to do anything with TDEToolBarButton you now need to include
&lt;ktoolbarbutton.h&gt; TDERadioGroup has been renamed to TDEToolBarRadioGroup and
requires you to include &lt;ktoolbarradiogroup.h&gt;<P>
<H4><P ALIGN="RIGHT"><A HREF="#TOC">Return to the Table of Contents</A></P></H4>
<H3><A NAME="KAccel">KAccel</A></H3>
<H3><A NAME="TDEAccel">TDEAccel</A></H3>
The functions keyToString() and stringToKey() which were previously
declared globally in kaccel.h are now static methods in KAccel.<P>
declared globally in kaccel.h are now static methods in TDEAccel.<P>
<H4><P ALIGN="RIGHT"><A HREF="#TOC">Return to the Table of Contents</A></P></H4>
@ -716,7 +716,7 @@ The file has been removed completely, use TQString instead. (<A HREF="mailto:mir
<H3><A NAME="ktopwidget">ktopwidget.h / KTopWidget</A></H3>
KMainWindow replaces this class completely. ktopwidget.h does not
TDEMainWindow replaces this class completely. ktopwidget.h does not
exist in KDE 2. (<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>
@ -754,7 +754,7 @@ Please adjust your code accordingly.<P>
<H3><A NAME="KDockWidget">KDockWidget</A></H3>
KDockWidget inherits form KMainWindow instead of KTMainWindow now.
KDockWidget inherits form TDEMainWindow instead of KTMainWindow now.
See <A HREF="KTMainWindow">KTMainWindow</A> for more details.
<H4><P ALIGN="RIGHT"><A HREF="#TOC">Return to the Table of Contents</A></P></H4>

@ -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>

14
TODO

@ -33,7 +33,7 @@ that we would like to make for the next binary incompatible release.
- Clean up the uses of virtual_hook, use normal virtuals instead (e.g. KZip/KArchive)
- Make it possible to create a KSystemTray without a KMainWindow and instead lazily
- Make it possible to create a KSystemTray without a TDEMainWindow and instead lazily
create the main window on demand.
- Make KSystemTray's Quit option in the context menu call kapp->quit() instead of
@ -94,12 +94,12 @@ that we would like to make for the next binary incompatible release.
QFont/QPoint/QSize is cheap enough to justify a consistent and usable API (IMHO) .
Keep source compatibility.
- Sort out reference counting of applications and KMainWindows: Add a setRefCountEnabled()
- Sort out reference counting of applications and TDEMainWindows: Add a setRefCountEnabled()
function to TDEApplication; deref()ing the last reference should only quit the application
if reference counts are enabled, and the reference count should be disabled by default
so apps that don't use a KMainWindow mostly continue to work. Make the KMainWindow
constructor call setRefCountEnabled(true), and make each KMainWindow hold its own
reference to the application. The KMainWindow should drop its app reference on hide, and
so apps that don't use a TDEMainWindow mostly continue to work. Make the TDEMainWindow
constructor call setRefCountEnabled(true), and make each TDEMainWindow hold its own
reference to the application. The TDEMainWindow should drop its app reference on hide, and
regain it on show.
Make KSysTray also hold a reference to the app. Then apps that use more than one main
@ -159,7 +159,7 @@ that we would like to make for the next binary incompatible release.
- Make API use US English, (eg. KCatalogue -> KCatalog)
- It would be nice if some insan^H^H^H brave soul had a look at the KAccel/KShortcut/KKeyWhatever
- It would be nice if some insan^H^H^H brave soul had a look at the TDEAccel/TDEShortcut/KKeyWhatever
classes and cleaned it up.
- KKeyDialog needs to be improved. It should simplify using KKeyChooser by not having to instantiate
@ -209,7 +209,7 @@ an alternative help->contents action)
- Dump KPixmapIO class. QPixmap with qt-copy patches #0005 and #0007 can perform just as well,
KPixmapIO can't dither, and it generally doesn't make much sense to have this class.
- KListView: merge setDropHighlighter and setDropVisualizer, add a setDnDMode to choose between
- TDEListView: merge setDropHighlighter and setDropVisualizer, add a setDnDMode to choose between
"dnd to move items" (e.g. keditbookmarks) and "dnd onto items" (e.g. kmail). Unless Qt4 does it all :)
- Move TDEIO::findDeviceMountPoint, findPathMoundPoint, probably_slow_mounted, and testFileSystemFlag to KMountPoint,

@ -101,22 +101,22 @@ void KVideoWidget::init(void)
videoHeight = 0;
// Setup actions
new KToggleAction( i18n("Fullscreen &Mode"), "window_fullscreen",
new TDEToggleAction( i18n("Fullscreen &Mode"), "window_fullscreen",
CTRL+SHIFT+Key_F, TQT_TQOBJECT(this), TQT_SLOT(fullscreenActivated()),
actionCollection(), "fullscreen_mode" );
new KRadioAction( i18n("&Half Size"), ALT+Key_0,
new TDERadioAction( i18n("&Half Size"), ALT+Key_0,
TQT_TQOBJECT(this), TQT_SLOT(halfSizeActivated()),
actionCollection(), "half_size" );
new KRadioAction( i18n("&Normal Size"), ALT+Key_1,
new TDERadioAction( i18n("&Normal Size"), ALT+Key_1,
TQT_TQOBJECT(this), TQT_SLOT(normalSizeActivated()),
actionCollection(), "normal_size" );
new KRadioAction( i18n("&Double Size"), ALT+Key_2,
new TDERadioAction( i18n("&Double Size"), ALT+Key_2,
TQT_TQOBJECT(this), TQT_SLOT(doubleSizeActivated()),
actionCollection(), "double_size" );
((KToggleAction *)action( "half_size" ))->setExclusiveGroup( "KVideoWidget::zoom" );
((KToggleAction *)action( "normal_size" ))->setExclusiveGroup( "KVideoWidget::zoom" );
((KToggleAction *)action( "double_size" ))->setExclusiveGroup( "KVideoWidget::zoom" );
((TDEToggleAction *)action( "half_size" ))->setExclusiveGroup( "KVideoWidget::zoom" );
((TDEToggleAction *)action( "normal_size" ))->setExclusiveGroup( "KVideoWidget::zoom" );
((TDEToggleAction *)action( "double_size" ))->setExclusiveGroup( "KVideoWidget::zoom" );
action("double_size")->setEnabled(false);
action("half_size")->setEnabled(false);
@ -232,29 +232,29 @@ bool KVideoWidget::isEmbedded()
bool KVideoWidget::isFullscreen()
{
return ((KToggleAction *)action( "fullscreen_mode" ))->isChecked();
return ((TDEToggleAction *)action( "fullscreen_mode" ))->isChecked();
}
bool KVideoWidget::isHalfSize()
{
return ((KToggleAction *)action( "half_size" ))->isChecked();
return ((TDEToggleAction *)action( "half_size" ))->isChecked();
}
bool KVideoWidget::isNormalSize()
{
return ((KToggleAction *)action( "normal_size" ))->isChecked();
return ((TDEToggleAction *)action( "normal_size" ))->isChecked();
}
bool KVideoWidget::isDoubleSize()
{
return ((KToggleAction *)action( "double_size" ))->isChecked();
return ((TDEToggleAction *)action( "double_size" ))->isChecked();
}
void KVideoWidget::setFullscreen()
{
if (!isFullscreen())
{
((KToggleAction *)action( "fullscreen_mode" ))->setChecked( true );
((TDEToggleAction *)action( "fullscreen_mode" ))->setChecked( true );
fullscreenActivated();
}
}
@ -263,26 +263,26 @@ void KVideoWidget::setWindowed()
{
if (isFullscreen())
{
((KToggleAction *)action( "fullscreen_mode" ))->setChecked( false );
((TDEToggleAction *)action( "fullscreen_mode" ))->setChecked( false );
fullscreenActivated();
}
}
void KVideoWidget::setHalfSize()
{
((KToggleAction *)action( "half_size" ))->setChecked( true );
((TDEToggleAction *)action( "half_size" ))->setChecked( true );
halfSizeActivated();
}
void KVideoWidget::setNormalSize()
{
((KToggleAction *)action( "normal_size" ))->setChecked( true );
((TDEToggleAction *)action( "normal_size" ))->setChecked( true );
normalSizeActivated();
}
void KVideoWidget::setDoubleSize()
{
((KToggleAction *)action( "double_size" ))->setChecked( true );
((TDEToggleAction *)action( "double_size" ))->setChecked( true );
doubleSizeActivated();
}
@ -323,18 +323,18 @@ void KVideoWidget::resizeEvent( TQResizeEvent *event )
{
if (width() == QMAX( (videoWidth / 2), minimumWidth() ) &&
height() == QMAX( (videoHeight / 2), minimumHeight() ))
((KToggleAction *)action( "half_size" ))->setChecked( true );
((TDEToggleAction *)action( "half_size" ))->setChecked( true );
else if (width() == QMAX( videoWidth, minimumWidth() ) &&
height() == QMAX( videoHeight, minimumHeight() ))
((KToggleAction *)action( "normal_size" ))->setChecked( true );
((TDEToggleAction *)action( "normal_size" ))->setChecked( true );
else if (width() == QMAX( (2 * videoWidth), minimumWidth() ) &&
height() == QMAX( (2 * videoHeight), minimumHeight() ))
((KToggleAction *)action( "double_size" ))->setChecked( true );
((TDEToggleAction *)action( "double_size" ))->setChecked( true );
else
{
((KToggleAction *)action( "half_size" ))->setChecked( false );
((KToggleAction *)action( "normal_size" ))->setChecked( false );
((KToggleAction *)action( "double_size" ))->setChecked( false );
((TDEToggleAction *)action( "half_size" ))->setChecked( false );
((TDEToggleAction *)action( "normal_size" ))->setChecked( false );
((TDEToggleAction *)action( "double_size" ))->setChecked( false );
}
}
}

@ -309,8 +309,8 @@ in that case the signal connection will always be deleted.
A receiver can create a non-volatile connection while the sender doesn't (yet)
exist. An anonymous DCOP connection should always be non-volatile.
The following example shows how KLauncher emits a signal whenever it notices
that an application that was started via KLauncher terminates.
The following example shows how TDELauncher emits a signal whenever it notices
that an application that was started via TDELauncher terminates.
QByteArray params;
QDataStream stream(params, IO_WriteOnly);
@ -319,7 +319,7 @@ that an application that was started via KLauncher terminates.
The task manager of the TDE panel connects to this signal. It uses an
anonymous connection (it doesn't require that the signal is being emitted
by KLauncher) that is non-volatile:
by TDELauncher) that is non-volatile:
connectDCOPSignal(0, 0, "clientDied(pid_t)", "clientDied(pid_t)", false);

@ -541,8 +541,8 @@ in that case the signal connection will always be deleted.
A receiver can create a non-volatile connection while the sender doesn't (yet)
exist. An anonymous DCOP connection should always be non-volatile.
The following example shows how KLauncher emits a signal whenever it notices
that an application that was started via KLauncher terminates:
The following example shows how TDELauncher emits a signal whenever it notices
that an application that was started via TDELauncher terminates:
\code
QByteArray params;
@ -553,7 +553,7 @@ kapp->dcopClient()->emitDCOPSignal("clientDied(pid_t)", params);
The task manager of the Trinity panel connects to this signal. It uses an
anonymous connection (it doesn't require that the signal is being emitted
by KLauncher) that is non-volatile:
by TDELauncher) that is non-volatile:
\code
connectDCOPSignal(0, 0, "clientDied(pid_t)", "clientDied(pid_t)", false);

@ -39,7 +39,7 @@ namespace KMediaPlayer
*
* There are two servicetypes for Player: KMediaPlayer/Player and
* KMediaPlayer/Engine. KMediaPlayer/Player provides a widget (accessable
* through view as well as XML GUI KActions. KMediaPlayer/Engine omits
* through view as well as XML GUI TDEActions. KMediaPlayer/Engine omits
* the user interface facets, for those who wish to provide their own
* interface.
*/

@ -33,11 +33,11 @@
#include <tqfileinfo.h>
ScriptLoader::ScriptLoader(KMainWindow *parent) : TQObject (parent)
ScriptLoader::ScriptLoader(TDEMainWindow *parent) : TQObject (parent)
{
m_parent = parent;
m_scripts.clear();
m_theAction = new KSelectAction ( i18n("KDE Scripts"),
m_theAction = new TDESelectAction ( i18n("KDE Scripts"),
0,
this,
TQT_SLOT(runAction()),
@ -51,7 +51,7 @@ ScriptLoader::~ScriptLoader()
m_scripts.clear();
}
KSelectAction * ScriptLoader::getScripts()
TDESelectAction * ScriptLoader::getScripts()
{
// Get the available scripts for this application.
TQStringList pluginList = "";

@ -33,12 +33,12 @@ class ScriptLoader : virtual public QObject
/**
* Default Constructor
*/
ScriptLoader(KMainWindow *parent=0);
ScriptLoader(TDEMainWindow *parent=0);
~ScriptLoader();
/** Return the a KSelectAction with all of the scripts
* @returns KSelectAction containing access to all of the scripts
/** Return the a TDESelectAction with all of the scripts
* @returns TDESelectAction containing access to all of the scripts
*/
KSelectAction *getScripts();
TDESelectAction *getScripts();
public slots:
/** Run the current action.
*/
@ -52,8 +52,8 @@ class ScriptLoader : virtual public QObject
virtual void done(int errorCode);
private:
TQPtrList<KScriptInterface> m_scripts;
KSelectAction *m_theAction;
TDESelectAction *m_theAction;
int m_currentSelection;
KMainWindow *m_parent;
TDEMainWindow *m_parent;
};
#endif

@ -3,7 +3,7 @@
class Win
: public KMainWindow
: public TDEMainWindow
{
Q_OBJECT
KParts::Part* p;

@ -36,7 +36,7 @@ using namespace std;
KabAPI::KabAPI(TQWidget* parent, const char* name)
: KDialogBase(parent, name),
book(0),
listbox(new KListBox(this)),
listbox(new TDEListBox(this)),
selection(-1)
{
TQ_CHECK_PTR(listbox);

@ -22,7 +22,7 @@
class TQPushButton;
class TQFrame;
class KListBox;
class TDEListBox;
/**
* The class KabAPI provides a public interface to access the
@ -189,7 +189,7 @@ protected:
/**
* This displays the overview over the addresses in the dialog.
*/
KListBox* listbox;
TDEListBox* listbox;
/**
* The index of the selected entry. This value is only valid after the
* KabAPI dialog has been executed and accepted by the user.

@ -66,7 +66,7 @@ AddresseeDialog::AddresseeDialog( TQWidget *parent, bool multiple ) :
TQBoxLayout *listLayout = new TQVBoxLayout;
topLayout->addLayout( listLayout );
mAddresseeList = new KListView( topWidget );
mAddresseeList = new TDEListView( topWidget );
mAddresseeList->addColumn( i18n("Name") );
mAddresseeList->addColumn( i18n("Email") );
mAddresseeList->setAllColumnsShowFocus( true );
@ -96,7 +96,7 @@ AddresseeDialog::AddresseeDialog( TQWidget *parent, bool multiple ) :
topWidget );
selectedLayout->addWidget( selectedGroup );
mSelectedList = new KListView( selectedGroup );
mSelectedList = new TDEListView( selectedGroup );
mSelectedList->addColumn( i18n("Name") );
mSelectedList->addColumn( i18n("Email") );
mSelectedList->setAllColumnsShowFocus( true );

@ -143,10 +143,10 @@ class KABC_EXPORT AddresseeDialog : public KDialogBase
bool mMultiple;
KListView *mAddresseeList;
TDEListView *mAddresseeList;
KLineEdit *mAddresseeEdit;
KListView *mSelectedList;
TDEListView *mSelectedList;
AddressBook *mAddressBook;

@ -156,12 +156,12 @@ void AddressLineEdit::keyPressEvent(TQKeyEvent *e)
{
bool accept = false;
if (KStdAccel::shortcut(KStdAccel::SubstringCompletion).contains(KKey(e)))
if (TDEStdAccel::shortcut(TDEStdAccel::SubstringCompletion).contains(KKey(e)))
{
doCompletion(true);
accept = true;
}
else if (KStdAccel::shortcut(KStdAccel::TextCompletion).contains(KKey(e)))
else if (TDEStdAccel::shortcut(TDEStdAccel::TextCompletion).contains(KKey(e)))
{
int len = text().length();

@ -293,7 +293,7 @@ AttributesDialog::AttributesDialog( const TQMap<TQString, TQString> &attributes,
}
}
KAcceleratorManager::manage( this );
TDEAcceleratorManager::manage( this );
}
AttributesDialog::~AttributesDialog()

@ -45,7 +45,7 @@ ResourceSelectDialog::ResourceSelectDialog( AddressBook *ab, TQWidget *parent, c
TQGroupBox *groupBox = new TQGroupBox( 2, Qt::Horizontal, this );
groupBox->setTitle( i18n( "Resources" ) );
mResourceId = new KListBox( groupBox );
mResourceId = new TDEListBox( groupBox );
mainLayout->addWidget( groupBox );

@ -26,7 +26,7 @@
#include <kdialog.h>
#include <kdemacros.h>
class KListBox;
class TDEListBox;
namespace KABC {
@ -48,7 +48,7 @@ class KABC_EXPORT_DEPRECATED ResourceSelectDialog : KDialog
static Resource *getResource( AddressBook *ab, TQWidget *parent = 0 );
private:
KListBox *mResourceId;
TDEListBox *mResourceId;
TQMap<int, Resource*> mResourceMap;
};

@ -77,13 +77,13 @@ class KATEPARTINTERFACES_EXPORT ConfigPage : public KTextEditor::ConfigPage
void slotChanged();
};
class KATEPARTINTERFACES_EXPORT ActionMenu : public KActionMenu
class KATEPARTINTERFACES_EXPORT ActionMenu : public TDEActionMenu
{
Q_OBJECT
public:
ActionMenu ( const TQString& text, TQObject* parent = 0, const char* name = 0 )
: KActionMenu(text, parent, name) { ; };
: TDEActionMenu(text, parent, name) { ; };
virtual ~ActionMenu () { ; };
public:

@ -159,7 +159,7 @@ KateAutoIndent::~KateAutoIndent ()
//BEGIN KateViewIndentAction
KateViewIndentationAction::KateViewIndentationAction(KateDocument *_doc, const TQString& text, TQObject* parent, const char* name)
: KActionMenu (text, parent, name), doc(_doc)
: TDEActionMenu (text, parent, name), doc(_doc)
{
connect(popupMenu(),TQT_SIGNAL(aboutToShow()),this,TQT_SLOT(slotAboutToShow()));
}

@ -190,9 +190,9 @@ class KateAutoIndent : public TQObject
/**
* This action provides a list of available indenters and gets plugged
* into the KateView's KActionCollection.
* into the KateView's TDEActionCollection.
*/
class KateViewIndentationAction : public KActionMenu
class KateViewIndentationAction : public TDEActionMenu
{
Q_OBJECT

@ -71,34 +71,34 @@ KateBookmarks::~KateBookmarks()
{
}
void KateBookmarks::createActions( KActionCollection* ac )
void KateBookmarks::createActions( TDEActionCollection* ac )
{
m_bookmarkToggle = new KToggleAction(
m_bookmarkToggle = new TDEToggleAction(
i18n("Set &Bookmark"), "bookmark", CTRL+Key_B,
this, TQT_SLOT(toggleBookmark()),
ac, "bookmarks_toggle" );
m_bookmarkToggle->setWhatsThis(i18n("If a line has no bookmark then add one, otherwise remove it."));
m_bookmarkToggle->setCheckedState( i18n("Clear &Bookmark") );
m_bookmarkClear = new KAction(
m_bookmarkClear = new TDEAction(
i18n("Clear &All Bookmarks"), 0,
this, TQT_SLOT(clearBookmarks()),
ac, "bookmarks_clear");
m_bookmarkClear->setWhatsThis(i18n("Remove all bookmarks of the current document."));
m_goNext = new KAction(
m_goNext = new TDEAction(
i18n("Next Bookmark"), "next", ALT + Key_PageDown,
this, TQT_SLOT(goNext()),
ac, "bookmarks_next");
m_goNext->setWhatsThis(i18n("Go to the next bookmark."));
m_goPrevious = new KAction(
m_goPrevious = new TDEAction(
i18n("Previous Bookmark"), "previous", ALT + Key_PageUp,
this, TQT_SLOT(goPrevious()),
ac, "bookmarks_previous");
m_goPrevious->setWhatsThis(i18n("Go to the previous bookmark."));
m_bookmarksMenu = (new KActionMenu(i18n("&Bookmarks"), ac, "bookmarks"))->popupMenu();
m_bookmarksMenu = (new TDEActionMenu(i18n("&Bookmarks"), ac, "bookmarks"))->popupMenu();
//connect the aboutToShow() and aboutToHide() signals with
//the bookmarkMenuAboutToShow() and bookmarkMenuAboutToHide() slots

@ -29,9 +29,9 @@ namespace KTextEditor { class Mark; }
namespace Kate { class View; }
class KAction;
class KToggleAction;
class KActionCollection;
class TDEAction;
class TDEToggleAction;
class TDEActionCollection;
class TQPopupMenu;
class TQMenuData;
@ -44,7 +44,7 @@ class KateBookmarks : public TQObject
KateBookmarks( KateView* parent, Sorting sort=Position );
virtual ~KateBookmarks();
void createActions( KActionCollection* );
void createActions( TDEActionCollection* );
KateBookmarks::Sorting sorting() { return m_sorting; };
void setSorting( Sorting s ) { m_sorting = s; };
@ -69,10 +69,10 @@ class KateBookmarks : public TQObject
private:
KateView* m_view;
KToggleAction* m_bookmarkToggle;
KAction* m_bookmarkClear;
KAction* m_goNext;
KAction* m_goPrevious;
TDEToggleAction* m_bookmarkToggle;
TDEAction* m_bookmarkClear;
TDEAction* m_goNext;
TDEAction* m_goPrevious;
Sorting m_sorting;
TQPopupMenu* m_bookmarksMenu;

@ -1095,7 +1095,7 @@ void KatePartPluginListItem::stateChange(bool b)
//BEGIN PluginListView
KatePartPluginListView::KatePartPluginListView(TQWidget *parent, const char *name)
: KListView(parent, name)
: TDEListView(parent, name)
{
}

@ -52,13 +52,13 @@ namespace TDEIO
class TransferJob;
}
class KAccel;
class TDEAccel;
class KColorButton;
class KComboBox;
class KIntNumInput;
class KKeyButton;
class KKeyChooser;
class KMainWindow;
class TDEMainWindow;
class KPushButton;
class KRegExpDialog;
class KIntNumInput;
@ -235,7 +235,7 @@ class KateEditKeyConfiguration: public KateConfigPage
bool m_ready;
class KateDocument *m_doc;
KKeyChooser* m_keyChooser;
class KActionCollection *m_ac;
class TDEActionCollection *m_ac;
};
class KateSaveConfigTab : public KateConfigPage
@ -263,7 +263,7 @@ class KateSaveConfigTab : public KateConfigPage
class KatePartPluginListItem;
class KatePartPluginListView : public KListView
class KatePartPluginListView : public TDEListView
{
Q_OBJECT

@ -888,7 +888,7 @@ void KatePrintHeaderFooter::setHFFont()
{
TQFont fnt( lFontPreview->font() );
// display a font dialog
if ( KFontDialog::getFont( fnt, false, this ) == KFontDialog::Accepted )
if ( TDEFontDialog::getFont( fnt, false, this ) == TDEFontDialog::Accepted )
{
// change strFont
strFont = fnt.toString();

@ -541,8 +541,8 @@ KateSchemaConfigFontTab::KateSchemaConfigFontTab( TQWidget *parent, const char *
// sizemanagment
TQGridLayout *grid = new TQGridLayout( this, 1, 1 );
m_fontchooser = new KFontChooser ( this, 0L, false, TQStringList(), false );
m_fontchooser->enableColumn(KFontChooser::StyleList, false);
m_fontchooser = new TDEFontChooser ( this, 0L, false, TQStringList(), false );
m_fontchooser->enableColumn(TDEFontChooser::StyleList, false);
grid->addWidget( m_fontchooser, 0, 0);
connect (this, TQT_SIGNAL( changed()), parent->parentWidget(), TQT_SLOT (slotChanged()));
@ -1078,7 +1078,7 @@ void KateStyleListView::showPopupMenu( KateStyleListItem *i, const TQPoint &glob
{
if ( !dynamic_cast<KateStyleListItem*>(i) ) return;
KPopupMenu m( this );
TDEPopupMenu m( this );
KateAttribute *is = i->style();
int id;
// the title is used, because the menu obscures the context name when

@ -90,13 +90,13 @@ class KateSchemaManager
};
class KateViewSchemaAction : public KActionMenu
class KateViewSchemaAction : public TDEActionMenu
{
Q_OBJECT
public:
KateViewSchemaAction(const TQString& text, TQObject* parent = 0, const char* name = 0)
: KActionMenu(text, parent, name) { init(); };
: TDEActionMenu(text, parent, name) { init(); };
~KateViewSchemaAction(){;};
@ -226,7 +226,7 @@ class KateSchemaConfigFontTab : public TQWidget
void changed(); // connected to parentWidget()->parentWidget() TQT_SLOT(slotChanged)
private:
class KFontChooser *m_fontchooser;
class TDEFontChooser *m_fontchooser;
FontMap m_fonts;
int m_schema;

@ -66,7 +66,7 @@ KateSearch::~KateSearch()
delete m_arbitraryHLList;
}
void KateSearch::createActions( KActionCollection* ac )
void KateSearch::createActions( TDEActionCollection* ac )
{
KStdAction::find( this, TQT_SLOT(find()), ac )->setWhatsThis(
i18n("Look up the first occurrence of a piece of text or regular expression."));

@ -37,7 +37,7 @@ class KateView;
class KateDocument;
class KateSuperRangeList;
class KActionCollection;
class TDEActionCollection;
class KateSearch : public TQObject
{
@ -87,7 +87,7 @@ class KateSearch : public TQObject
KateSearch( KateView* );
~KateSearch();
void createActions( KActionCollection* );
void createActions( TDEActionCollection* );
public slots:
void find();

@ -51,13 +51,13 @@ KateSpell::~KateSpell()
}
}
void KateSpell::createActions( KActionCollection* ac )
void KateSpell::createActions( TDEActionCollection* ac )
{
KStdAction::spelling( this, TQT_SLOT(spellcheck()), ac );
KAction *a = new KAction( i18n("Spelling (from cursor)..."), "spellcheck", 0, this, TQT_SLOT(spellcheckFromCursor()), ac, "tools_spelling_from_cursor" );
TDEAction *a = new TDEAction( i18n("Spelling (from cursor)..."), "spellcheck", 0, this, TQT_SLOT(spellcheckFromCursor()), ac, "tools_spelling_from_cursor" );
a->setWhatsThis(i18n("Check the document's spelling from the cursor and forward"));
m_spellcheckSelection = new KAction( i18n("Spellcheck Selection..."), "spellcheck", 0, this, TQT_SLOT(spellcheckSelection()), ac, "tools_spelling_selection" );
m_spellcheckSelection = new TDEAction( i18n("Spellcheck Selection..."), "spellcheck", 0, this, TQT_SLOT(spellcheckSelection()), ac, "tools_spelling_selection" );
m_spellcheckSelection->setWhatsThis(i18n("Check spelling of the selected text"));
}

@ -27,7 +27,7 @@
class KateView;
class KAction;
class TDEAction;
class KSpell;
class KateSpell : public TQObject
@ -38,7 +38,7 @@ class KateSpell : public TQObject
KateSpell( KateView* );
~KateSpell();
void createActions( KActionCollection* );
void createActions( TDEActionCollection* );
void updateActions ();
@ -69,7 +69,7 @@ class KateSpell : public TQObject
private:
KateView *m_view;
KAction *m_spellcheckSelection;
TDEAction *m_spellcheckSelection;
KSpell *m_tdespell;

@ -207,8 +207,8 @@ void KateView::setupConnections()
void KateView::setupActions()
{
KActionCollection *ac = this->actionCollection ();
KAction *a;
TDEActionCollection *ac = this->actionCollection ();
TDEAction *a;
m_toggleWriteLock = 0;
@ -221,7 +221,7 @@ void KateView::setupActions()
m_copy = a=KStdAction::copy(TQT_TQOBJECT(this), TQT_SLOT(copy()), ac);
a->setWhatsThis(i18n( "Use this command to copy the currently selected text to the system clipboard."));
m_copyHTML = a = new KAction(i18n("Copy as &HTML"), "editcopy", 0, TQT_TQOBJECT(this), TQT_SLOT(copyHTML()), ac, "edit_copy_html");
m_copyHTML = a = new TDEAction(i18n("Copy as &HTML"), "editcopy", 0, TQT_TQOBJECT(this), TQT_SLOT(copyHTML()), ac, "edit_copy_html");
a->setWhatsThis(i18n( "Use this command to copy the currently selected text as HTML to the system clipboard."));
if (!m_doc->readOnly())
@ -235,56 +235,56 @@ void KateView::setupActions()
a=m_editRedo = KStdAction::redo(m_doc, TQT_SLOT(redo()), ac);
a->setWhatsThis(i18n("Revert the most recent undo operation"));
(new KAction(i18n("&Word Wrap Document"), "", 0, TQT_TQOBJECT(this), TQT_SLOT(applyWordWrap()), ac, "tools_apply_wordwrap"))->setWhatsThis(
(new TDEAction(i18n("&Word Wrap Document"), "", 0, TQT_TQOBJECT(this), TQT_SLOT(applyWordWrap()), ac, "tools_apply_wordwrap"))->setWhatsThis(
i18n("Use this command to wrap all lines of the current document which are longer than the width of the"
" current view, to fit into this view.<br><br> This is a static word wrap, meaning it is not updated"
" when the view is resized."));
// setup Tools menu
a=new KAction(i18n("&Indent"), "indent", Qt::CTRL+Qt::Key_I, TQT_TQOBJECT(this), TQT_SLOT(indent()), ac, "tools_indent");
a=new TDEAction(i18n("&Indent"), "indent", Qt::CTRL+Qt::Key_I, TQT_TQOBJECT(this), TQT_SLOT(indent()), ac, "tools_indent");
a->setWhatsThis(i18n("Use this to indent a selected block of text.<br><br>"
"You can configure whether tabs should be honored and used or replaced with spaces, in the configuration dialog."));
a=new KAction(i18n("&Unindent"), "unindent", Qt::CTRL+Qt::SHIFT+Qt::Key_I, TQT_TQOBJECT(this), TQT_SLOT(unIndent()), ac, "tools_unindent");
a=new TDEAction(i18n("&Unindent"), "unindent", Qt::CTRL+Qt::SHIFT+Qt::Key_I, TQT_TQOBJECT(this), TQT_SLOT(unIndent()), ac, "tools_unindent");
a->setWhatsThis(i18n("Use this to unindent a selected block of text."));
a=new KAction(i18n("&Clean Indentation"), 0, TQT_TQOBJECT(this), TQT_SLOT(cleanIndent()), ac, "tools_cleanIndent");
a=new TDEAction(i18n("&Clean Indentation"), 0, TQT_TQOBJECT(this), TQT_SLOT(cleanIndent()), ac, "tools_cleanIndent");
a->setWhatsThis(i18n("Use this to clean the indentation of a selected block of text (only tabs/only spaces)<br><br>"
"You can configure whether tabs should be honored and used or replaced with spaces, in the configuration dialog."));
a=new KAction(i18n("&Align"), 0, TQT_TQOBJECT(this), TQT_SLOT(align()), ac, "tools_align");
a=new TDEAction(i18n("&Align"), 0, TQT_TQOBJECT(this), TQT_SLOT(align()), ac, "tools_align");
a->setWhatsThis(i18n("Use this to align the current line or block of text to its proper indent level."));
a=new KAction(i18n("C&omment"), CTRL+Qt::Key_D, TQT_TQOBJECT(this), TQT_SLOT(comment()),
a=new TDEAction(i18n("C&omment"), CTRL+Qt::Key_D, TQT_TQOBJECT(this), TQT_SLOT(comment()),
ac, "tools_comment");
a->setWhatsThis(i18n("This command comments out the current line or a selected block of text.<BR><BR>"
"The characters for single/multiple line comments are defined within the language's highlighting."));
a=new KAction(i18n("Unco&mment"), CTRL+SHIFT+Qt::Key_D, TQT_TQOBJECT(this), TQT_SLOT(uncomment()),
a=new TDEAction(i18n("Unco&mment"), CTRL+SHIFT+Qt::Key_D, TQT_TQOBJECT(this), TQT_SLOT(uncomment()),
ac, "tools_uncomment");
a->setWhatsThis(i18n("This command removes comments from the current line or a selected block of text.<BR><BR>"
"The characters for single/multiple line comments are defined within the language's highlighting."));
a = m_toggleWriteLock = new KToggleAction(
a = m_toggleWriteLock = new TDEToggleAction(
i18n("&Read Only Mode"), 0, 0,
TQT_TQOBJECT(this), TQT_SLOT( toggleWriteLock() ),
ac, "tools_toggle_write_lock" );
a->setWhatsThis( i18n("Lock/unlock the document for writing") );
a = new KAction( i18n("Uppercase"), CTRL + Qt::Key_U, TQT_TQOBJECT(this),
a = new TDEAction( i18n("Uppercase"), CTRL + Qt::Key_U, TQT_TQOBJECT(this),
TQT_SLOT(uppercase()), ac, "tools_uppercase" );
a->setWhatsThis( i18n("Convert the selection to uppercase, or the character to the "
"right of the cursor if no text is selected.") );
a = new KAction( i18n("Lowercase"), CTRL + SHIFT + Qt::Key_U, TQT_TQOBJECT(this),
a = new TDEAction( i18n("Lowercase"), CTRL + SHIFT + Qt::Key_U, TQT_TQOBJECT(this),
TQT_SLOT(lowercase()), ac, "tools_lowercase" );
a->setWhatsThis( i18n("Convert the selection to lowercase, or the character to the "
"right of the cursor if no text is selected.") );
a = new KAction( i18n("Capitalize"), CTRL + ALT + Qt::Key_U, TQT_TQOBJECT(this),
a = new TDEAction( i18n("Capitalize"), CTRL + ALT + Qt::Key_U, TQT_TQOBJECT(this),
TQT_SLOT(capitalize()), ac, "tools_capitalize" );
a->setWhatsThis( i18n("Capitalize the selection, or the word under the "
"cursor if no text is selected.") );
a = new KAction( i18n("Join Lines"), CTRL + Qt::Key_J, TQT_TQOBJECT(this),
a = new TDEAction( i18n("Join Lines"), CTRL + Qt::Key_J, TQT_TQOBJECT(this),
TQT_SLOT( joinLines() ), ac, "tools_join_lines" );
}
else
@ -298,7 +298,7 @@ void KateView::setupActions()
a=KStdAction::print( m_doc, TQT_SLOT(print()), ac );
a->setWhatsThis(i18n("Print the current document."));
a=new KAction(i18n("Reloa&d"), "reload", KStdAccel::reload(), TQT_TQOBJECT(this), TQT_SLOT(reloadFile()), ac, "file_reload");
a=new TDEAction(i18n("Reloa&d"), "reload", TDEStdAccel::reload(), TQT_TQOBJECT(this), TQT_SLOT(reloadFile()), ac, "file_reload");
a->setWhatsThis(i18n("Reload the current document from disk."));
a=KStdAction::saveAs(TQT_TQOBJECT(this), TQT_SLOT(saveAs()), ac);
@ -307,7 +307,7 @@ void KateView::setupActions()
a=KStdAction::gotoLine(TQT_TQOBJECT(this), TQT_SLOT(gotoLine()), ac);
a->setWhatsThis(i18n("This command opens a dialog and lets you choose a line that you want the cursor to move to."));
a=new KAction(i18n("&Configure Editor..."), 0, m_doc, TQT_SLOT(configDialog()),ac, "set_confdlg");
a=new TDEAction(i18n("&Configure Editor..."), 0, m_doc, TQT_SLOT(configDialog()),ac, "set_confdlg");
a->setWhatsThis(i18n("Configure various aspects of this editor."));
KateViewHighlightAction *menu = new KateViewHighlightAction (i18n("&Highlighting"), ac, "set_highlight");
@ -324,7 +324,7 @@ void KateView::setupActions()
new KateViewIndentationAction (m_doc, i18n("&Indentation"),ac,"tools_indentation");
// html export
a = new KAction(i18n("E&xport as HTML..."), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(exportAsHTML()), ac, "file_export_html");
a = new TDEAction(i18n("E&xport as HTML..."), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(exportAsHTML()), ac, "file_export_html");
a->setWhatsThis(i18n("This command allows you to export the current document"
" with all highlighting information into a HTML document."));
@ -334,32 +334,32 @@ void KateView::setupActions()
m_deSelect = a=KStdAction::deselect(TQT_TQOBJECT(this), TQT_SLOT(clearSelection()), ac);
a->setWhatsThis(i18n("If you have selected something within the current document, this will no longer be selected."));
a=new KAction(i18n("Enlarge Font"), "viewmag+", 0, TQT_TQOBJECT(m_viewInternal), TQT_SLOT(slotIncFontSizes()), ac, "incFontSizes");
a=new TDEAction(i18n("Enlarge Font"), "viewmag+", 0, TQT_TQOBJECT(m_viewInternal), TQT_SLOT(slotIncFontSizes()), ac, "incFontSizes");
a->setWhatsThis(i18n("This increases the display font size."));
a=new KAction(i18n("Shrink Font"), "viewmag-", 0, TQT_TQOBJECT(m_viewInternal), TQT_SLOT(slotDecFontSizes()), ac, "decFontSizes");
a=new TDEAction(i18n("Shrink Font"), "viewmag-", 0, TQT_TQOBJECT(m_viewInternal), TQT_SLOT(slotDecFontSizes()), ac, "decFontSizes");
a->setWhatsThis(i18n("This decreases the display font size."));
a= m_toggleBlockSelection = new KToggleAction(
a= m_toggleBlockSelection = new TDEToggleAction(
i18n("Bl&ock Selection Mode"), CTRL + SHIFT + Key_B,
TQT_TQOBJECT(this), TQT_SLOT(toggleBlockSelectionMode()),
ac, "set_verticalSelect");
a->setWhatsThis(i18n("This command allows switching between the normal (line based) selection mode and the block selection mode."));
a= m_toggleInsert = new KToggleAction(
a= m_toggleInsert = new TDEToggleAction(
i18n("Overwr&ite Mode"), Key_Insert,
TQT_TQOBJECT(this), TQT_SLOT(toggleInsert()),
ac, "set_insert" );
a->setWhatsThis(i18n("Choose whether you want the text you type to be inserted or to overwrite existing text."));
KToggleAction *toggleAction;
a= m_toggleDynWrap = toggleAction = new KToggleAction(
TDEToggleAction *toggleAction;
a= m_toggleDynWrap = toggleAction = new TDEToggleAction(
i18n("&Dynamic Word Wrap"), Key_F10,
TQT_TQOBJECT(this), TQT_SLOT(toggleDynWordWrap()),
ac, "view_dynamic_word_wrap" );
a->setWhatsThis(i18n("If this option is checked, the text lines will be wrapped at the view border on the screen."));
a= m_setDynWrapIndicators = new KSelectAction(i18n("Dynamic Word Wrap Indicators"), 0, ac, "dynamic_word_wrap_indicators");
a= m_setDynWrapIndicators = new TDESelectAction(i18n("Dynamic Word Wrap Indicators"), 0, ac, "dynamic_word_wrap_indicators");
a->setWhatsThis(i18n("Choose when the Dynamic Word Wrap Indicators should be displayed"));
connect(m_setDynWrapIndicators, TQT_SIGNAL(activated(int)), TQT_TQOBJECT(this), TQT_SLOT(setDynWrapIndicators(int)));
@ -369,14 +369,14 @@ void KateView::setupActions()
list2.append(i18n("&Always On"));
m_setDynWrapIndicators->setItems(list2);
a= toggleAction=m_toggleFoldingMarkers = new KToggleAction(
a= toggleAction=m_toggleFoldingMarkers = new TDEToggleAction(
i18n("Show Folding &Markers"), Key_F9,
TQT_TQOBJECT(this), TQT_SLOT(toggleFoldingMarkers()),
ac, "view_folding_markers" );
a->setWhatsThis(i18n("You can choose if the codefolding marks should be shown, if codefolding is possible."));
toggleAction->setCheckedState(i18n("Hide Folding &Markers"));
a= m_toggleIconBar = toggleAction = new KToggleAction(
a= m_toggleIconBar = toggleAction = new TDEToggleAction(
i18n("Show &Icon Border"), Key_F6,
TQT_TQOBJECT(this), TQT_SLOT(toggleIconBorder()),
ac, "view_border");
@ -384,21 +384,21 @@ void KateView::setupActions()
a->setWhatsThis(i18n("Show/hide the icon border.<BR><BR> The icon border shows bookmark symbols, for instance."));
toggleAction->setCheckedState(i18n("Hide &Icon Border"));
a= toggleAction=m_toggleLineNumbers = new KToggleAction(
a= toggleAction=m_toggleLineNumbers = new TDEToggleAction(
i18n("Show &Line Numbers"), Key_F11,
TQT_TQOBJECT(this), TQT_SLOT(toggleLineNumbersOn()),
ac, "view_line_numbers" );
a->setWhatsThis(i18n("Show/hide the line numbers on the left hand side of the view."));
toggleAction->setCheckedState(i18n("Hide &Line Numbers"));
a= m_toggleScrollBarMarks = toggleAction = new KToggleAction(
a= m_toggleScrollBarMarks = toggleAction = new TDEToggleAction(
i18n("Show Scroll&bar Marks"), 0,
TQT_TQOBJECT(this), TQT_SLOT(toggleScrollBarMarks()),
ac, "view_scrollbar_marks");
a->setWhatsThis(i18n("Show/hide the marks on the vertical scrollbar.<BR><BR>The marks, for instance, show bookmarks."));
toggleAction->setCheckedState(i18n("Hide Scroll&bar Marks"));
a = toggleAction = m_toggleWWMarker = new KToggleAction(
a = toggleAction = m_toggleWWMarker = new TDEToggleAction(
i18n("Show Static &Word Wrap Marker"), 0,
TQT_TQOBJECT(this), TQT_SLOT( toggleWWMarker() ),
ac, "view_word_wrap_marker" );
@ -407,13 +407,13 @@ void KateView::setupActions()
"wrap column as defined in the editing properties" ));
toggleAction->setCheckedState(i18n("Hide Static &Word Wrap Marker"));
a= m_switchCmdLine = new KAction(
a= m_switchCmdLine = new TDEAction(
i18n("Switch to Command Line"), Key_F7,
TQT_TQOBJECT(this), TQT_SLOT(switchToCmdLine()),
ac, "switch_to_cmd_line" );
a->setWhatsThis(i18n("Show/hide the command line on the bottom of the view."));
a=m_setEndOfLine = new KSelectAction(i18n("&End of Line"), 0, ac, "set_eol");
a=m_setEndOfLine = new TDESelectAction(i18n("&End of Line"), 0, ac, "set_eol");
a->setWhatsThis(i18n("Choose which line endings should be used, when you save the document"));
TQStringList list;
list.append("&UNIX");
@ -437,137 +437,137 @@ void KateView::setupActions()
void KateView::setupEditActions()
{
m_editActions = new KActionCollection( m_viewInternal, TQT_TQOBJECT(this), "edit_actions" );
KActionCollection* ac = m_editActions;
m_editActions = new TDEActionCollection( m_viewInternal, TQT_TQOBJECT(this), "edit_actions" );
TDEActionCollection* ac = m_editActions;
new KAction(
new TDEAction(
i18n("Move Word Left"), CTRL + Key_Left,
TQT_TQOBJECT(this),TQT_SLOT(wordLeft()),
ac, "word_left" );
new KAction(
new TDEAction(
i18n("Select Character Left"), SHIFT + Key_Left,
TQT_TQOBJECT(this),TQT_SLOT(shiftCursorLeft()),
ac, "select_char_left" );
new KAction(
new TDEAction(
i18n("Select Word Left"), SHIFT + CTRL + Key_Left,
TQT_TQOBJECT(this), TQT_SLOT(shiftWordLeft()),
ac, "select_word_left" );
new KAction(
new TDEAction(
i18n("Move Word Right"), CTRL + Key_Right,
TQT_TQOBJECT(this), TQT_SLOT(wordRight()),
ac, "word_right" );
new KAction(
new TDEAction(
i18n("Select Character Right"), SHIFT + Key_Right,
TQT_TQOBJECT(this), TQT_SLOT(shiftCursorRight()),
ac, "select_char_right" );
new KAction(
new TDEAction(
i18n("Select Word Right"), SHIFT + CTRL + Key_Right,
TQT_TQOBJECT(this),TQT_SLOT(shiftWordRight()),
ac, "select_word_right" );
new KAction(
new TDEAction(
i18n("Move to Beginning of Line"), Key_Home,
TQT_TQOBJECT(this), TQT_SLOT(home()),
ac, "beginning_of_line" );
new KAction(
i18n("Move to Beginning of Document"), KStdAccel::home(),
new TDEAction(
i18n("Move to Beginning of Document"), TDEStdAccel::home(),
TQT_TQOBJECT(this), TQT_SLOT(top()),
ac, "beginning_of_document" );
new KAction(
new TDEAction(
i18n("Select to Beginning of Line"), SHIFT + Key_Home,
TQT_TQOBJECT(this), TQT_SLOT(shiftHome()),
ac, "select_beginning_of_line" );
new KAction(
new TDEAction(
i18n("Select to Beginning of Document"), SHIFT + CTRL + Key_Home,
TQT_TQOBJECT(this), TQT_SLOT(shiftTop()),
ac, "select_beginning_of_document" );
new KAction(
new TDEAction(
i18n("Move to End of Line"), Key_End,
TQT_TQOBJECT(this), TQT_SLOT(end()),
ac, "end_of_line" );
new KAction(
i18n("Move to End of Document"), KStdAccel::end(),
new TDEAction(
i18n("Move to End of Document"), TDEStdAccel::end(),
TQT_TQOBJECT(this), TQT_SLOT(bottom()),
ac, "end_of_document" );
new KAction(
new TDEAction(
i18n("Select to End of Line"), SHIFT + Key_End,
TQT_TQOBJECT(this), TQT_SLOT(shiftEnd()),
ac, "select_end_of_line" );
new KAction(
new TDEAction(
i18n("Select to End of Document"), SHIFT + CTRL + Key_End,
TQT_TQOBJECT(this), TQT_SLOT(shiftBottom()),
ac, "select_end_of_document" );
new KAction(
new TDEAction(
i18n("Select to Previous Line"), SHIFT + Key_Up,
TQT_TQOBJECT(this), TQT_SLOT(shiftUp()),
ac, "select_line_up" );
new KAction(
new TDEAction(
i18n("Scroll Line Up"),"", CTRL + Key_Up,
TQT_TQOBJECT(this), TQT_SLOT(scrollUp()),
ac, "scroll_line_up" );
new KAction(i18n("Move to Next Line"), Key_Down, TQT_TQOBJECT(this), TQT_SLOT(down()),
new TDEAction(i18n("Move to Next Line"), Key_Down, TQT_TQOBJECT(this), TQT_SLOT(down()),
ac, "move_line_down");
new KAction(i18n("Move to Previous Line"), Key_Up, TQT_TQOBJECT(this), TQT_SLOT(up()),
new TDEAction(i18n("Move to Previous Line"), Key_Up, TQT_TQOBJECT(this), TQT_SLOT(up()),
ac, "move_line_up");
new KAction(i18n("Move Character Right"), Key_Right, TQT_TQOBJECT(this),
new TDEAction(i18n("Move Character Right"), Key_Right, TQT_TQOBJECT(this),
TQT_SLOT(cursorRight()), ac, "move_cursor_right");
new KAction(i18n("Move Character Left"), Key_Left, TQT_TQOBJECT(this), TQT_SLOT(cursorLeft()),
new TDEAction(i18n("Move Character Left"), Key_Left, TQT_TQOBJECT(this), TQT_SLOT(cursorLeft()),
ac, "move_cusor_left");
new KAction(
new TDEAction(
i18n("Select to Next Line"), SHIFT + Key_Down,
TQT_TQOBJECT(this), TQT_SLOT(shiftDown()),
ac, "select_line_down" );
new KAction(
new TDEAction(
i18n("Scroll Line Down"), CTRL + Key_Down,
TQT_TQOBJECT(this), TQT_SLOT(scrollDown()),
ac, "scroll_line_down" );
new KAction(
i18n("Scroll Page Up"), KStdAccel::prior(),
new TDEAction(
i18n("Scroll Page Up"), TDEStdAccel::prior(),
TQT_TQOBJECT(this), TQT_SLOT(pageUp()),
ac, "scroll_page_up" );
new KAction(
new TDEAction(
i18n("Select Page Up"), SHIFT + Key_PageUp,
TQT_TQOBJECT(this), TQT_SLOT(shiftPageUp()),
ac, "select_page_up" );
new KAction(
new TDEAction(
i18n("Move to Top of View"), CTRL + Key_PageUp,
TQT_TQOBJECT(this), TQT_SLOT(topOfView()),
ac, "move_top_of_view" );
new KAction(
new TDEAction(
i18n("Select to Top of View"), CTRL + SHIFT + Key_PageUp,
TQT_TQOBJECT(this), TQT_SLOT(shiftTopOfView()),
ac, "select_top_of_view" );
new KAction(
i18n("Scroll Page Down"), KStdAccel::next(),
new TDEAction(
i18n("Scroll Page Down"), TDEStdAccel::next(),
TQT_TQOBJECT(this), TQT_SLOT(pageDown()),
ac, "scroll_page_down" );
new KAction(
new TDEAction(
i18n("Select Page Down"), SHIFT + Key_PageDown,
TQT_TQOBJECT(this), TQT_SLOT(shiftPageDown()),
ac, "select_page_down" );
new KAction(
new TDEAction(
i18n("Move to Bottom of View"), CTRL + Key_PageDown,
TQT_TQOBJECT(this), TQT_SLOT(bottomOfView()),
ac, "move_bottom_of_view" );
new KAction(
new TDEAction(
i18n("Select to Bottom of View"), CTRL + SHIFT + Key_PageDown,
TQT_TQOBJECT(this), TQT_SLOT(shiftBottomOfView()),
ac, "select_bottom_of_view" );
new KAction(
new TDEAction(
i18n("Move to Matching Bracket"), CTRL + Key_6,
TQT_TQOBJECT(this), TQT_SLOT(toMatchingBracket()),
ac, "to_matching_bracket" );
new KAction(
new TDEAction(
i18n("Select to Matching Bracket"), SHIFT + CTRL + Key_6,
TQT_TQOBJECT(this), TQT_SLOT(shiftToMatchingBracket()),
ac, "select_matching_bracket" );
@ -575,34 +575,34 @@ void KateView::setupEditActions()
// anders: shortcuts doing any changes should not be created in browserextension
if ( !m_doc->readOnly() )
{
new KAction(
new TDEAction(
i18n("Transpose Characters"), CTRL + Key_T,
TQT_TQOBJECT(this), TQT_SLOT(transpose()),
ac, "transpose_char" );
new KAction(
new TDEAction(
i18n("Delete Line"), CTRL + Key_K,
TQT_TQOBJECT(this), TQT_SLOT(killLine()),
ac, "delete_line" );
new KAction(
i18n("Delete Word Left"), KStdAccel::deleteWordBack(),
new TDEAction(
i18n("Delete Word Left"), TDEStdAccel::deleteWordBack(),
TQT_TQOBJECT(this), TQT_SLOT(deleteWordLeft()),
ac, "delete_word_left" );
new KAction(
i18n("Delete Word Right"), KStdAccel::deleteWordForward(),
new TDEAction(
i18n("Delete Word Right"), TDEStdAccel::deleteWordForward(),
TQT_TQOBJECT(this), TQT_SLOT(deleteWordRight()),
ac, "delete_word_right" );
new KAction(i18n("Delete Next Character"), Key_Delete,
new TDEAction(i18n("Delete Next Character"), Key_Delete,
TQT_TQOBJECT(this), TQT_SLOT(keyDelete()),
ac, "delete_next_character");
KAction *a = new KAction(i18n("Backspace"), Key_Backspace,
TDEAction *a = new TDEAction(i18n("Backspace"), Key_Backspace,
TQT_TQOBJECT(this), TQT_SLOT(backspace()),
ac, "backspace");
KShortcut cut = a->shortcut();
TDEShortcut cut = a->shortcut();
cut.append( KKey( SHIFT + Key_Backspace ) );
a->setShortcut( cut );
}
@ -624,18 +624,18 @@ void KateView::setupEditActions()
void KateView::setupCodeFolding()
{
KActionCollection *ac=this->actionCollection();
new KAction( i18n("Collapse Toplevel"), CTRL+SHIFT+Key_Minus,
TDEActionCollection *ac=this->actionCollection();
new TDEAction( i18n("Collapse Toplevel"), CTRL+SHIFT+Key_Minus,
m_doc->foldingTree(),TQT_SLOT(collapseToplevelNodes()),ac,"folding_toplevel");
new KAction( i18n("Expand Toplevel"), CTRL+SHIFT+Key_Plus,
new TDEAction( i18n("Expand Toplevel"), CTRL+SHIFT+Key_Plus,
TQT_TQOBJECT(this),TQT_SLOT(slotExpandToplevel()),ac,"folding_expandtoplevel");
new KAction( i18n("Collapse One Local Level"), CTRL+Key_Minus,
new TDEAction( i18n("Collapse One Local Level"), CTRL+Key_Minus,
TQT_TQOBJECT(this),TQT_SLOT(slotCollapseLocal()),ac,"folding_collapselocal");
new KAction( i18n("Expand One Local Level"), CTRL+Key_Plus,
new TDEAction( i18n("Expand One Local Level"), CTRL+Key_Plus,
TQT_TQOBJECT(this),TQT_SLOT(slotExpandLocal()),ac,"folding_expandlocal");
#ifdef DEBUGACCELS
KAccel* debugAccels = new KAccel(this,TQT_TQOBJECT(this));
TDEAccel* debugAccels = new TDEAccel(this,TQT_TQOBJECT(this));
debugAccels->insert("KATE_DUMP_REGION_TREE",i18n("Show the code folding region tree"),"","Ctrl+Shift+Alt+D",m_doc,TQT_SLOT(dumpRegionTree()));
debugAccels->insert("KATE_TEMPLATE_TEST",i18n("Basic template code test"),"","Ctrl+Shift+Alt+T",m_doc,TQT_SLOT(testTemplateCode()));
debugAccels->setEnabled(true);
@ -760,7 +760,7 @@ void KateView::slotReadWriteChanged ()
<< "edit_undo" << "edit_redo" << "tools_spelling_from_cursor"
<< "tools_spelling_selection";
KAction *a = 0;
TDEAction *a = 0;
for (uint z = 0; z < l.size(); z++)
if ((a = actionCollection()->action( l[z].ascii() )))
a->setEnabled (m_doc->isReadWrite());
@ -1256,7 +1256,7 @@ void KateView::updateFoldingConfig ()
l << "folding_toplevel" << "folding_expandtoplevel"
<< "folding_collapselocal" << "folding_expandlocal";
KAction *a = 0;
TDEAction *a = 0;
for (uint z = 0; z < l.size(); z++)
if ((a = actionCollection()->action( l[z].ascii() )))
a->setEnabled (m_doc->highlight() && m_doc->highlight()->allowsFolding());

@ -44,10 +44,10 @@ class KateViewSchemaAction;
class KateRenderer;
class KateSpell;
class KToggleAction;
class KAction;
class KRecentFilesAction;
class KSelectAction;
class TDEToggleAction;
class TDEAction;
class TDERecentFilesAction;
class TDESelectAction;
class TQGridLayout;
@ -429,7 +429,7 @@ class KateView : public Kate::View,
// Is it really necessary to have 3 methods for this?! :)
KateDocument* doc() const { return m_doc; }
KActionCollection* editActionCollection() const { return m_editActions; }
TDEActionCollection* editActionCollection() const { return m_editActions; }
public slots:
void slotNewUndo();
@ -472,31 +472,31 @@ class KateView : public Kate::View,
void setupCodeFolding();
void setupCodeCompletion();
KActionCollection* m_editActions;
KAction* m_editUndo;
KAction* m_editRedo;
KRecentFilesAction* m_fileRecent;
KToggleAction* m_toggleFoldingMarkers;
KToggleAction* m_toggleIconBar;
KToggleAction* m_toggleLineNumbers;
KToggleAction* m_toggleScrollBarMarks;
KToggleAction* m_toggleDynWrap;
KSelectAction* m_setDynWrapIndicators;
KToggleAction* m_toggleWWMarker;
KAction* m_switchCmdLine;
KSelectAction* m_setEndOfLine;
KAction *m_cut;
KAction *m_copy;
KAction *m_copyHTML;
KAction *m_paste;
KAction *m_selectAll;
KAction *m_deSelect;
KToggleAction *m_toggleBlockSelection;
KToggleAction *m_toggleInsert;
KToggleAction *m_toggleWriteLock;
TDEActionCollection* m_editActions;
TDEAction* m_editUndo;
TDEAction* m_editRedo;
TDERecentFilesAction* m_fileRecent;
TDEToggleAction* m_toggleFoldingMarkers;
TDEToggleAction* m_toggleIconBar;
TDEToggleAction* m_toggleLineNumbers;
TDEToggleAction* m_toggleScrollBarMarks;
TDEToggleAction* m_toggleDynWrap;
TDESelectAction* m_setDynWrapIndicators;
TDEToggleAction* m_toggleWWMarker;
TDEAction* m_switchCmdLine;
TDESelectAction* m_setEndOfLine;
TDEAction *m_cut;
TDEAction *m_copy;
TDEAction *m_copyHTML;
TDEAction *m_paste;
TDEAction *m_selectAll;
TDEAction *m_deSelect;
TDEToggleAction *m_toggleBlockSelection;
TDEToggleAction *m_toggleInsert;
TDEToggleAction *m_toggleWriteLock;
KateDocument* m_doc;
KateViewInternal* m_viewInternal;

@ -1168,7 +1168,7 @@ void KateIconBorder::showMarkMenu( uint line, const TQPoint& pos )
//END KateIconBorder
KateViewEncodingAction::KateViewEncodingAction(KateDocument *_doc, KateView *_view, const TQString& text, TQObject* parent, const char* name)
: KActionMenu (text, parent, name), doc(_doc), view (_view)
: TDEActionMenu (text, parent, name), doc(_doc), view (_view)
{
connect(popupMenu(),TQT_SIGNAL(aboutToShow()),this,TQT_SLOT(slotAboutToShow()));
}

@ -182,7 +182,7 @@ class KateIconBorder : public TQWidget
mutable TQColor m_oldBackgroundColor;
};
class KateViewEncodingAction : public KActionMenu
class KateViewEncodingAction : public TDEActionMenu
{
Q_OBJECT

@ -511,7 +511,7 @@ int main(int argc, char *argv[])
// create widgets
KateFactory *fac = KateFactory::self();
KMainWindow *toplevel = new KMainWindow();
TDEMainWindow *toplevel = new TDEMainWindow();
KateDocument *part = new KateDocument(/*bSingleViewMode*/true,
/*bBrowserView*/false,
/*bReadOnly*/false,

@ -253,7 +253,7 @@ void ABGlobal::writeConfig()
class AutoBookmarkEntItem : public QListViewItem
{
public:
AutoBookmarkEntItem( KListView *lv, AutoBookmarkEnt *e )
AutoBookmarkEntItem( TDEListView *lv, AutoBookmarkEnt *e )
: TQListViewItem( lv ),
ent( e )
{
@ -383,7 +383,7 @@ AutoBookmarkerConfigPage::AutoBookmarkerConfigPage( TQWidget *parent, const char
TQLabel *l = new TQLabel( i18n("&Patterns"), this );
lo->addWidget( l );
lvPatterns = new KListView( this );
lvPatterns = new TDEListView( this );
lvPatterns->addColumn( i18n("Pattern") );
lvPatterns->addColumn( i18n("Mime Types") );
lvPatterns->addColumn( i18n("File Masks") );

@ -111,7 +111,7 @@ class AutoBookmarkerConfigPage : public KTextEditor::ConfigPage
void slotEdit();
private:
class KListView *lvPatterns;
class TDEListView *lvPatterns;
class TQPushButton *btnNew, *btnDel, *btnEdit;
ABEntityList *m_ents;
};

@ -76,7 +76,7 @@ InsertFilePluginView::InsertFilePluginView( KTextEditor::View *view, const char
view->insertChildClient( this );
setInstance( KGenericFactory<InsertFilePlugin>::instance() );
_job = 0;
(void) new KAction( i18n("Insert File..."), 0, this, TQT_SLOT(slotInsertFile()), actionCollection(), "tools_insert_file" );
(void) new TDEAction( i18n("Insert File..."), 0, this, TQT_SLOT(slotInsertFile()), actionCollection(), "tools_insert_file" );
setXMLFile( "tdetexteditor_insertfileui.rc" );
}

@ -64,11 +64,11 @@ ISearchPluginView::ISearchPluginView( KTextEditor::View *view )
setInstance( KGenericFactory<ISearchPlugin>::instance() );
m_searchForwardAction = new KAction(
m_searchForwardAction = new TDEAction(
i18n("Search Incrementally"), CTRL+ALT+Key_F,
this, TQT_SLOT(slotSearchForwardAction()),
actionCollection(), "edit_isearch" );
m_searchBackwardAction = new KAction(
m_searchBackwardAction = new TDEAction(
i18n("Search Incrementally Backwards"), CTRL+ALT+SHIFT+Key_F,
this, TQT_SLOT(slotSearchBackwardAction()),
actionCollection(), "edit_isearch_reverse" );
@ -97,13 +97,13 @@ ISearchPluginView::ISearchPluginView( KTextEditor::View *view )
m_comboAction->setAutoSized( true );
m_comboAction->setShortcutConfigurable( false );
KActionMenu* optionMenu = new KActionMenu(
TDEActionMenu* optionMenu = new TDEActionMenu(
i18n("Search Options"), "configure",
actionCollection(), "isearch_options" );
optionMenu->setDelayed( false );
KToggleAction* action = new KToggleAction(
i18n("Case Sensitive"), KShortcut(),
TDEToggleAction* action = new TDEToggleAction(
i18n("Case Sensitive"), TDEShortcut(),
actionCollection(), "isearch_case_sensitive" );
action->setShortcutConfigurable( false );
connect( action, TQT_SIGNAL(toggled(bool)),
@ -111,8 +111,8 @@ ISearchPluginView::ISearchPluginView( KTextEditor::View *view )
action->setChecked( m_caseSensitive );
optionMenu->insert( action );
action = new KToggleAction(
i18n("From Beginning"), KShortcut(),
action = new TDEToggleAction(
i18n("From Beginning"), TDEShortcut(),
actionCollection(), "isearch_from_beginning" );
action->setShortcutConfigurable( false );
connect( action, TQT_SIGNAL(toggled(bool)),
@ -120,8 +120,8 @@ ISearchPluginView::ISearchPluginView( KTextEditor::View *view )
action->setChecked( m_fromBeginning );
optionMenu->insert( action );
action = new KToggleAction(
i18n("Regular Expression"), KShortcut(),
action = new TDEToggleAction(
i18n("Regular Expression"), TDEShortcut(),
actionCollection(), "isearch_reg_exp" );
action->setShortcutConfigurable( false );
connect( action, TQT_SIGNAL(toggled(bool)),
@ -129,10 +129,10 @@ ISearchPluginView::ISearchPluginView( KTextEditor::View *view )
action->setChecked( m_regExp );
optionMenu->insert( action );
// optionMenu->insert( new KActionSeparator() );
// optionMenu->insert( new TDEActionSeparator() );
//
// action = new KToggleAction(
// i18n("Auto-Wrap Search"), KShortcut(),
// action = new TDEToggleAction(
// i18n("Auto-Wrap Search"), TDEShortcut(),
// actionCollection(), "isearch_auto_wrap" );
// connect( action, TQT_SIGNAL(toggled(bool)),
// this, TQT_SLOT(setAutoWrap(bool)) );

@ -92,8 +92,8 @@ private:
KTextEditor::SearchInterface* m_searchIF;
KTextEditor::ViewCursorInterface* m_cursorIF;
KTextEditor::SelectionInterface* m_selectIF;
KAction* m_searchForwardAction;
KAction* m_searchBackwardAction;
TDEAction* m_searchForwardAction;
TDEAction* m_searchBackwardAction;
KWidgetAction* m_comboAction;
TQGuardedPtr<TQLabel> m_label;
TQGuardedPtr<KHistoryCombo> m_combo;

@ -75,7 +75,7 @@ KDataToolPluginView::KDataToolPluginView( KTextEditor::View *view )
view->insertChildClient (this);
setInstance( KGenericFactory<KDataToolPlugin>::instance() );
m_menu = new KActionMenu(i18n("Data Tools"), actionCollection(), "popup_dataTool");
m_menu = new TDEActionMenu(i18n("Data Tools"), actionCollection(), "popup_dataTool");
connect(m_menu->popupMenu(), TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(aboutToShow()));
setXMLFile("tdetexteditor_kdatatoolui.rc");
@ -96,7 +96,7 @@ void KDataToolPluginView::aboutToShow()
m_wordUnderCursor = TQString::null;
// unplug old actions, if any:
KAction *ac;
TDEAction *ac;
for ( ac = m_actionList.first(); ac; ac = m_actionList.next() ) {
m_menu->remove(ac);
}
@ -150,7 +150,7 @@ void KDataToolPluginView::aboutToShow()
m_singleWord = true;
m_singleWord_line = line;
} else {
m_notAvailable = new KAction(i18n("(not available)"), TQString::null, 0, this,
m_notAvailable = new TDEAction(i18n("(not available)"), TQString::null, 0, this,
TQT_SLOT(slotNotAvailable()), actionCollection(),"dt_n_av");
m_menu->insert(m_notAvailable);
return;
@ -172,7 +172,7 @@ void KDataToolPluginView::aboutToShow()
}
if( m_actionList.isEmpty() ) {
m_notAvailable = new KAction(i18n("(not available)"), TQString::null, 0, this,
m_notAvailable = new TDEAction(i18n("(not available)"), TQString::null, 0, this,
TQT_SLOT(slotNotAvailable()), actionCollection(),"dt_n_av");
m_menu->insert(m_notAvailable);
}

@ -26,7 +26,7 @@
#include <kxmlguiclient.h>
#include <tqguardedptr.h>
class KActionMenu;
class TDEActionMenu;
class KDataToolInfo;
namespace KTextEditor
@ -62,9 +62,9 @@ private:
bool m_singleWord;
int m_singleWord_line, m_singleWord_start, m_singleWord_end;
TQString m_wordUnderCursor;
TQPtrList<KAction> m_actionList;
TQGuardedPtr<KActionMenu> m_menu;
KAction *m_notAvailable;
TQPtrList<TDEAction> m_actionList;
TQGuardedPtr<TDEActionMenu> m_menu;
TDEAction *m_notAvailable;
protected slots:
void aboutToShow();
void slotToolActivated( const KDataToolInfo &datatoolinfo, const TQString &string );

@ -130,7 +130,7 @@ struct DocWordCompletionPluginViewPrivate
TQString last; // last word we were trying to match
TQString lastIns; // latest applied completion
TQRegExp re; // hrm
KToggleAction *autopopup; // for accessing state
TDEToggleAction *autopopup; // for accessing state
uint treshold; // the required length of a word before popping up the completion list automatically
int directionalPos; // be able to insert "" at the correct time
};
@ -145,15 +145,15 @@ DocWordCompletionPluginView::DocWordCompletionPluginView( uint treshold, bool au
view->insertChildClient( this );
setInstance( KGenericFactory<DocWordCompletionPlugin>::instance() );
(void) new KAction( i18n("Reuse Word Above"), CTRL+Key_8, this,
(void) new TDEAction( i18n("Reuse Word Above"), CTRL+Key_8, this,
TQT_SLOT(completeBackwards()), actionCollection(), "doccomplete_bw" );
(void) new KAction( i18n("Reuse Word Below"), CTRL+Key_9, this,
(void) new TDEAction( i18n("Reuse Word Below"), CTRL+Key_9, this,
TQT_SLOT(completeForwards()), actionCollection(), "doccomplete_fw" );
(void) new KAction( i18n("Pop Up Completion List"), 0, this,
(void) new TDEAction( i18n("Pop Up Completion List"), 0, this,
TQT_SLOT(popupCompletionList()), actionCollection(), "doccomplete_pu" );
(void) new KAction( i18n("Shell Completion"), 0, this,
(void) new TDEAction( i18n("Shell Completion"), 0, this,
TQT_SLOT(shellComplete()), actionCollection(), "doccomplete_sh" );
d->autopopup = new KToggleAction( i18n("Automatic Completion Popup"), 0, this,
d->autopopup = new TDEToggleAction( i18n("Automatic Completion Popup"), 0, this,
TQT_SLOT(toggleAutoPopup()), actionCollection(), "enable_autopopup" );
d->autopopup->setChecked( autopopup );

@ -468,7 +468,7 @@ void Kded::runDelayedCheck()
void Kded::recreate(bool initial)
{
m_recreateBusy = true;
// Using KLauncher here is difficult since we might not have a
// Using TDELauncher here is difficult since we might not have a
// database
if (!initial)

@ -55,19 +55,19 @@ Group=Graphics (KDE)
ToolTip=Fullfeatured edit box with buttons (KDE)
Group=Views (KDE)
[KFontCombo]
[TDEFontCombo]
ToolTip=Font Combo Box (KDE)
WhatsThis=A TQCombo Box showing the installed system fonts (with preview)
Group=Input (KDE)
[KFontChooser]
[TDEFontChooser]
IncludeFile=kfontdialog.h
IconSet=kfontcombo.png
ToolTip=Font Chooser (KDE)
WhatsThis=A font type, size and style selection widget complete with preview
Group=Input (KDE)
[KFontRequester]
[TDEFontRequester]
IncludeFile=kfontrequester.h
ToolTip=Font Requester (KDE)
WhatsThis=A compact font selection and preview widget
@ -94,12 +94,12 @@ ToolTip=LED Widget (KDE)
WhatsThis=A widget showing a light emitter diode
Group=Display (KDE)
[KListBox]
[TDEListBox]
ToolTip=Extended List Box (KDE)
WhatsThis=An improved version of the TQListBox that follows KDE settings
Group=Views (KDE)
[KListView]
[TDEListView]
ToolTip=Extended List View (KDE)
WhatsThis=An improved version of the TQListView that allows certain KDE extensions
Group=Views (KDE)
@ -108,12 +108,12 @@ Group=Views (KDE)
ToolTip=Line Edit (KDE)
Group=Input (KDE)
[KListViewSearchLine]
[TDEListViewSearchLine]
ToolTip=ListView Search Line (KDE)
Group=Input (KDE)
ConstructorArgs=(parent, 0, name)
[KListViewSearchLineWidget]
[TDEListViewSearchLineWidget]
ToolTip=ListView Search Line Widget (KDE)
IncludeFile=klistviewsearchline.h
Group=Input (KDE)
@ -243,7 +243,7 @@ ToolTip=A widget that provides a image preview of a URL
Group=Display (KDE)
ConstructorArgs=(parent)
[KActionSelector]
[TDEActionSelector]
IncludeFile=kactionselector.h
ToolTip=A widget for selecting and arranging actions/objects
Group=Views (KDE)

@ -55,19 +55,19 @@ Group=Graphics (KDE)
ToolTip=Fullfeatured edit box with buttons (KDE)
Group=Views (KDE)
[KFontCombo]
[TDEFontCombo]
ToolTip=Font Combo Box (KDE)
WhatsThis=A QCombo Box showing the installed system fonts (with preview)
Group=Input (KDE)
[KFontChooser]
[TDEFontChooser]
IncludeFile=kfontdialog.h
IconSet=kfontcombo.png
ToolTip=Font Chooser (KDE)
WhatsThis=A font type, size and style selection widget complete with preview
Group=Input (KDE)
[KFontRequester]
[TDEFontRequester]
IncludeFile=kfontrequester.h
ToolTip=Font Requester (KDE)
WhatsThis=A compact font selection and preview widget
@ -94,12 +94,12 @@ ToolTip=LED Widget (KDE)
WhatsThis=A widget showing a light emitter diode
Group=Display (KDE)
[KListBox]
[TDEListBox]
ToolTip=Extended List Box (KDE)
WhatsThis=An improved version of the QListBox that follows KDE settings
Group=Views (KDE)
[KListView]
[TDEListView]
ToolTip=Extended List View (KDE)
WhatsThis=An improved version of the QListView that allows certain KDE extensions
Group=Views (KDE)
@ -232,7 +232,7 @@ ToolTip=A widget that provides a image preview of a URL
Group=Display (KDE)
ConstructorArgs=(parent)
[KActionSelector]
[TDEActionSelector]
IncludeFile=kactionselector.h
ToolTip=A widget for selecting and arranging actions/objects
Group=Views (KDE)

@ -1,4 +1,4 @@
"KLauncher" supports the following DCOP functions:
"TDELauncher" supports the following DCOP functions:
/**
* Starts a program.

@ -1074,9 +1074,9 @@ static void launcher_died()
return;
}
// KLauncher died... restart
// TDELauncher died... restart
#ifndef NDEBUG
fprintf(stderr, "[tdeinit] KLauncher died unexpectedly.\n");
fprintf(stderr, "[tdeinit] TDELauncher died unexpectedly.\n");
#endif
// Make sure it's really dead.
if (d.launcher_pid)
@ -1092,7 +1092,7 @@ static void launcher_died()
pid_t pid = launch( 1, "tdelauncher", 0 );
#ifndef NDEBUG
fprintf(stderr, "[tdeinit] Relaunching KLauncher, pid = %ld result = %d\n", (long) pid, d.result);
fprintf(stderr, "[tdeinit] Relaunching TDELauncher, pid = %ld result = %d\n", (long) pid, d.result);
#endif
}
@ -1819,7 +1819,7 @@ int main(int argc, char **argv, char **envp)
else
pid = launch( 1, "tdelauncher", 0 );
#ifndef NDEBUG
fprintf(stderr, "[tdeinit] Launched KLauncher, pid = %ld result = %d\n", (long) pid, d.result);
fprintf(stderr, "[tdeinit] Launched TDELauncher, pid = %ld result = %d\n", (long) pid, d.result);
#endif
handle_requests(pid); // Wait for tdelauncher to be ready
}

@ -63,7 +63,7 @@
using namespace TDEIO;
template class TQPtrList<KLaunchRequest>;
template class TQPtrList<TDELaunchRequest>;
template class TQPtrList<IdleSlave>;
IdleSlave::IdleSlave(TDESocket *socket)
@ -162,7 +162,7 @@ IdleSlave::age(time_t now)
return (int) difftime(now, mBirthDate);
}
KLauncher::KLauncher(int _tdeinitSocket, bool new_startup)
TDELauncher::TDELauncher(int _tdeinitSocket, bool new_startup)
// : TDEApplication( false, false ), // No Styles, No GUI
: TDEApplication( false, true ), // TQClipboard tries to construct a QWidget so a GUI is technically needed, even though it is not used
DCOPObject("tdelauncher"),
@ -186,7 +186,7 @@ KLauncher::KLauncher(int _tdeinitSocket, bool new_startup)
if (domainname.status() != 0)
{
// Sever error!
tqDebug("KLauncher: Fatal error, can't create tempfile!");
tqDebug("TDELauncher: Fatal error, can't create tempfile!");
::exit(1);
}
mPoolSocketName = domainname.name();
@ -224,12 +224,12 @@ KLauncher::KLauncher(int _tdeinitSocket, bool new_startup)
write(tdeinitSocket, &request_header, sizeof(request_header));
}
KLauncher::~KLauncher()
TDELauncher::~TDELauncher()
{
close();
}
void KLauncher::close()
void TDELauncher::close()
{
if (!mPoolSocketName.isEmpty())
{
@ -244,15 +244,15 @@ void KLauncher::close()
}
void
KLauncher::destruct(int exit_code)
TDELauncher::destruct(int exit_code)
{
if (kapp) ((KLauncher*)kapp)->close();
if (kapp) ((TDELauncher*)kapp)->close();
// We don't delete kapp here, that's intentional.
::exit(exit_code);
}
bool
KLauncher::process(const TQCString &fun, const TQByteArray &data,
TDELauncher::process(const TQCString &fun, const TQByteArray &data,
TQCString &replyType, TQByteArray &replyData)
{
if ((fun == "exec_blind(TQCString,TQValueList<TQCString>)")
@ -267,7 +267,7 @@ KLauncher::process(const TQCString &fun, const TQByteArray &data,
stream >> name >> arg_list;
if( fun == "exec_blind(TQCString,TQValueList<TQCString>,TQValueList<TQCString>,TQCString)" )
stream >> envs >> startup_id;
kdDebug(7016) << "KLauncher: Got exec_blind('" << name << "', ...)" << endl;
kdDebug(7016) << "TDELauncher: Got exec_blind('" << name << "', ...)" << endl;
exec_blind( name, arg_list, envs, startup_id);
return true;
}
@ -315,29 +315,29 @@ KLauncher::process(const TQCString &fun, const TQByteArray &data,
bool finished;
if (strncmp(fun, "start_service_by_name(", 22) == 0)
{
kdDebug(7016) << "KLauncher: Got start_service_by_name('" << serviceName << "', ...)" << endl;
kdDebug(7016) << "TDELauncher: Got start_service_by_name('" << serviceName << "', ...)" << endl;
finished = start_service_by_name(serviceName, urls, envs, startup_id, bNoWait);
}
else if (strncmp(fun, "start_service_by_desktop_path(", 30) == 0)
{
kdDebug(7016) << "KLauncher: Got start_service_by_desktop_path('" << serviceName << "', ...)" << endl;
kdDebug(7016) << "TDELauncher: Got start_service_by_desktop_path('" << serviceName << "', ...)" << endl;
finished = start_service_by_desktop_path(serviceName, urls, envs, startup_id, bNoWait);
}
else if (strncmp(fun, "start_service_by_desktop_name(", 30) == 0)
{
kdDebug(7016) << "KLauncher: Got start_service_by_desktop_name('" << serviceName << "', ...)" << endl;
kdDebug(7016) << "TDELauncher: Got start_service_by_desktop_name('" << serviceName << "', ...)" << endl;
finished = start_service_by_desktop_name(serviceName, urls, envs, startup_id, bNoWait );
}
else if ((fun == "tdeinit_exec(TQString,TQStringList)")
|| (fun == "tdeinit_exec(TQString,TQStringList,TQValueList<TQCString>)")
|| (fun == "tdeinit_exec(TQString,TQStringList,TQValueList<TQCString>,TQCString)"))
{
kdDebug(7016) << "KLauncher: Got tdeinit_exec('" << serviceName << "', ...)" << endl;
kdDebug(7016) << "TDELauncher: Got tdeinit_exec('" << serviceName << "', ...)" << endl;
finished = tdeinit_exec(serviceName, urls, envs, startup_id, false);
}
else
{
kdDebug(7016) << "KLauncher: Got tdeinit_exec_wait('" << serviceName << "', ...)" << endl;
kdDebug(7016) << "TDELauncher: Got tdeinit_exec_wait('" << serviceName << "', ...)" << endl;
finished = tdeinit_exec(serviceName, urls, envs, startup_id, true);
}
if (!finished)
@ -397,7 +397,7 @@ KLauncher::process(const TQCString &fun, const TQByteArray &data,
else if (fun == "reparseConfiguration()")
{
TDEGlobal::config()->reparseConfiguration();
kdDebug(7016) << "KLauncher::process : reparseConfiguration" << endl;
kdDebug(7016) << "TDELauncher::process : reparseConfiguration" << endl;
KProtocolManager::reparseConfiguration();
IdleSlave *slave;
for(slave = mSlaveList.first(); slave; slave = mSlaveList.next())
@ -409,7 +409,7 @@ KLauncher::process(const TQCString &fun, const TQByteArray &data,
{
::signal( SIGHUP, SIG_IGN);
::signal( SIGTERM, SIG_IGN);
kdDebug() << "KLauncher::process ---> terminateKDE" << endl;
kdDebug() << "TDELauncher::process ---> terminateKDE" << endl;
tdelauncher_header request_header;
request_header.cmd = LAUNCHER_TERMINATE_KDE;
request_header.arg_length = 0;
@ -418,14 +418,14 @@ KLauncher::process(const TQCString &fun, const TQByteArray &data,
}
else if (fun == "autoStart()")
{
kdDebug() << "KLauncher::process ---> autoStart" << endl;
kdDebug() << "TDELauncher::process ---> autoStart" << endl;
autoStart(1);
replyType = "void";
return true;
}
else if (fun == "autoStart(int)")
{
kdDebug() << "KLauncher::process ---> autoStart(int)" << endl;
kdDebug() << "TDELauncher::process ---> autoStart(int)" << endl;
TQDataStream stream(data, IO_ReadOnly);
int phase;
stream >> phase;
@ -443,15 +443,15 @@ KLauncher::process(const TQCString &fun, const TQByteArray &data,
}
QCStringList
KLauncher::interfaces()
TDELauncher::interfaces()
{
QCStringList ifaces = DCOPObject::interfaces();
ifaces += "KLauncher";
ifaces += "TDELauncher";
return ifaces;
}
QCStringList
KLauncher::functions()
TDELauncher::functions()
{
QCStringList funcs = DCOPObject::functions();
funcs << "void exec_blind(TQCString,TQValueList<TQCString>)";
@ -480,7 +480,7 @@ KLauncher::functions()
return funcs;
}
void KLauncher::setLaunchEnv(const TQCString &name, const TQCString &_value)
void TDELauncher::setLaunchEnv(const TQCString &name, const TQCString &_value)
{
TQCString value(_value);
if (value.isNull())
@ -522,7 +522,7 @@ read_socket(int sock, char *buffer, int len)
void
KLauncher::slotKDEInitData(int)
TDELauncher::slotKDEInitData(int)
{
tdelauncher_header request_header;
TQByteArray requestData;
@ -572,25 +572,25 @@ KLauncher::slotKDEInitData(int)
{
case KService::DCOP_None:
{
lastRequest->status = KLaunchRequest::Running;
lastRequest->status = TDELaunchRequest::Running;
break;
}
case KService::DCOP_Unique:
{
lastRequest->status = KLaunchRequest::Launching;
lastRequest->status = TDELaunchRequest::Launching;
break;
}
case KService::DCOP_Wait:
{
lastRequest->status = KLaunchRequest::Launching;
lastRequest->status = TDELaunchRequest::Launching;
break;
}
case KService::DCOP_Multi:
{
lastRequest->status = KLaunchRequest::Launching;
lastRequest->status = TDELaunchRequest::Launching;
break;
}
}
@ -599,7 +599,7 @@ KLauncher::slotKDEInitData(int)
}
if (lastRequest && (request_header.cmd == LAUNCHER_ERROR))
{
lastRequest->status = KLaunchRequest::Error;
lastRequest->status = TDELaunchRequest::Error;
if (!requestData.isEmpty())
lastRequest->errorMsg = TQString::fromUtf8((char *) requestData.data());
lastRequest = 0;
@ -611,20 +611,20 @@ KLauncher::slotKDEInitData(int)
}
void
KLauncher::processDied(pid_t pid, long /* exitStatus */)
TDELauncher::processDied(pid_t pid, long /* exitStatus */)
{
KLaunchRequest *request = requestList.first();
TDELaunchRequest *request = requestList.first();
for(; request; request = requestList.next())
{
if (request->pid == pid)
{
if (request->dcop_service_type == KService::DCOP_Wait)
request->status = KLaunchRequest::Done;
request->status = TDELaunchRequest::Done;
else if ((request->dcop_service_type == KService::DCOP_Unique) &&
(dcopClient()->isApplicationRegistered(request->dcop_name)))
request->status = KLaunchRequest::Running;
request->status = TDELaunchRequest::Running;
else
request->status = KLaunchRequest::Error;
request->status = TDELaunchRequest::Error;
requestDone(request);
return;
}
@ -632,17 +632,17 @@ KLauncher::processDied(pid_t pid, long /* exitStatus */)
}
void
KLauncher::slotAppRegistered(const TQCString &appId)
TDELauncher::slotAppRegistered(const TQCString &appId)
{
const char *cAppId = appId.data();
if (!cAppId) return;
KLaunchRequest *request = requestList.first();
KLaunchRequest *nextRequest;
TDELaunchRequest *request = requestList.first();
TDELaunchRequest *nextRequest;
for(; request; request = nextRequest)
{
nextRequest = requestList.next();
if (request->status != KLaunchRequest::Launching)
if (request->status != TDELaunchRequest::Launching)
continue;
// For unique services check the requested service name first
@ -650,7 +650,7 @@ KLauncher::slotAppRegistered(const TQCString &appId)
((appId == request->dcop_name) ||
dcopClient()->isApplicationRegistered(request->dcop_name)))
{
request->status = KLaunchRequest::Running;
request->status = TDELaunchRequest::Running;
requestDone(request);
continue;
}
@ -663,7 +663,7 @@ KLauncher::slotAppRegistered(const TQCString &appId)
((cAppId[l] == '\0') || (cAppId[l] == '-')))
{
request->dcop_name = appId;
request->status = KLaunchRequest::Running;
request->status = TDELaunchRequest::Running;
requestDone(request);
continue;
}
@ -671,7 +671,7 @@ KLauncher::slotAppRegistered(const TQCString &appId)
}
void
KLauncher::autoStart(int phase)
TDELauncher::autoStart(int phase)
{
if( mAutoStart.phase() >= phase )
return;
@ -690,7 +690,7 @@ KLauncher::autoStart(int phase)
}
void
KLauncher::slotAutoStart()
TDELauncher::slotAutoStart()
{
KService::Ptr s;
do
@ -727,10 +727,10 @@ KLauncher::slotAutoStart()
}
void
KLauncher::requestDone(KLaunchRequest *request)
TDELauncher::requestDone(TDELaunchRequest *request)
{
if ((request->status == KLaunchRequest::Running) ||
(request->status == KLaunchRequest::Done))
if ((request->status == TDELaunchRequest::Running) ||
(request->status == TDELaunchRequest::Done))
{
DCOPresult.result = 0;
DCOPresult.dcopName = request->dcop_name;
@ -788,7 +788,7 @@ KLauncher::requestDone(KLaunchRequest *request)
}
void
KLauncher::requestStart(KLaunchRequest *request)
TDELauncher::requestStart(TDELaunchRequest *request)
{
requestList.append( request );
// Send request to tdeinit.
@ -879,17 +879,17 @@ KLauncher::requestStart(KLaunchRequest *request)
}
void
KLauncher::exec_blind( const TQCString &name, const TQValueList<TQCString> &arg_list,
TDELauncher::exec_blind( const TQCString &name, const TQValueList<TQCString> &arg_list,
const TQValueList<TQCString> &envs, const TQCString& startup_id )
{
KLaunchRequest *request = new KLaunchRequest;
TDELaunchRequest *request = new TDELaunchRequest;
request->autoStart = false;
request->name = name;
request->arg_list = arg_list;
request->dcop_name = 0;
request->dcop_service_type = KService::DCOP_None;
request->pid = 0;
request->status = KLaunchRequest::Launching;
request->status = TDELaunchRequest::Launching;
request->transaction = 0; // No confirmation is send
request->envs = envs;
// Find service, if any - strip path if needed
@ -907,7 +907,7 @@ KLauncher::exec_blind( const TQCString &name, const TQValueList<TQCString> &arg_
bool
KLauncher::start_service_by_name(const TQString &serviceName, const TQStringList &urls,
TDELauncher::start_service_by_name(const TQString &serviceName, const TQStringList &urls,
const TQValueList<TQCString> &envs, const TQCString& startup_id, bool blind)
{
KService::Ptr service = 0;
@ -924,7 +924,7 @@ KLauncher::start_service_by_name(const TQString &serviceName, const TQStringList
}
bool
KLauncher::start_service_by_desktop_path(const TQString &serviceName, const TQStringList &urls,
TDELauncher::start_service_by_desktop_path(const TQString &serviceName, const TQStringList &urls,
const TQValueList<TQCString> &envs, const TQCString& startup_id, bool blind)
{
KService::Ptr service = 0;
@ -949,7 +949,7 @@ KLauncher::start_service_by_desktop_path(const TQString &serviceName, const TQSt
}
bool
KLauncher::start_service_by_desktop_name(const TQString &serviceName, const TQStringList &urls,
TDELauncher::start_service_by_desktop_name(const TQString &serviceName, const TQStringList &urls,
const TQValueList<TQCString> &envs, const TQCString& startup_id, bool blind)
{
KService::Ptr service = 0;
@ -966,7 +966,7 @@ KLauncher::start_service_by_desktop_name(const TQString &serviceName, const TQSt
}
bool
KLauncher::start_service(KService::Ptr service, const TQStringList &_urls,
TDELauncher::start_service(KService::Ptr service, const TQStringList &_urls,
const TQValueList<TQCString> &envs, const TQCString& startup_id, bool blind, bool autoStart)
{
TQStringList urls = _urls;
@ -977,7 +977,7 @@ KLauncher::start_service(KService::Ptr service, const TQStringList &_urls,
cancel_service_startup_info( NULL, startup_id, envs ); // cancel it if any
return false;
}
KLaunchRequest *request = new KLaunchRequest;
TDELaunchRequest *request = new TDELaunchRequest;
request->autoStart = autoStart;
if ((urls.count() > 1) && !service->allowMultipleFiles())
@ -1047,7 +1047,7 @@ KLauncher::start_service(KService::Ptr service, const TQStringList &_urls,
}
void
KLauncher::send_service_startup_info( KLaunchRequest *request, KService::Ptr service, const TQCString& startup_id,
TDELauncher::send_service_startup_info( TDELaunchRequest *request, KService::Ptr service, const TQCString& startup_id,
const TQValueList<TQCString> &envs )
{
#if defined Q_WS_X11 && ! defined K_WS_QTONLY
@ -1102,7 +1102,7 @@ KLauncher::send_service_startup_info( KLaunchRequest *request, KService::Ptr ser
}
void
KLauncher::cancel_service_startup_info( KLaunchRequest* request, const TQCString& startup_id,
TDELauncher::cancel_service_startup_info( TDELaunchRequest* request, const TQCString& startup_id,
const TQValueList<TQCString> &envs )
{
#if defined Q_WS_X11 && ! defined K_WS_QTONLY
@ -1136,10 +1136,10 @@ KLauncher::cancel_service_startup_info( KLaunchRequest* request, const TQCString
}
bool
KLauncher::tdeinit_exec(const TQString &app, const TQStringList &args,
TDELauncher::tdeinit_exec(const TQString &app, const TQStringList &args,
const TQValueList<TQCString> &envs, TQCString startup_id, bool wait)
{
KLaunchRequest *request = new KLaunchRequest;
TDELaunchRequest *request = new TDELaunchRequest;
request->autoStart = false;
for(TQStringList::ConstIterator it = args.begin();
@ -1178,7 +1178,7 @@ KLauncher::tdeinit_exec(const TQString &app, const TQStringList &args,
}
void
KLauncher::queueRequest(KLaunchRequest *request)
TDELauncher::queueRequest(TDELaunchRequest *request)
{
requestQueue.append( request );
if (!bProcessingQueue)
@ -1189,14 +1189,14 @@ KLauncher::queueRequest(KLaunchRequest *request)
}
void
KLauncher::slotDequeue()
TDELauncher::slotDequeue()
{
do {
KLaunchRequest *request = requestQueue.take(0);
TDELaunchRequest *request = requestQueue.take(0);
// process request
request->status = KLaunchRequest::Launching;
request->status = TDELaunchRequest::Launching;
requestStart(request);
if (request->status != KLaunchRequest::Launching)
if (request->status != TDELaunchRequest::Launching)
{
// Request handled.
requestDone( request );
@ -1207,7 +1207,7 @@ KLauncher::slotDequeue()
}
void
KLauncher::createArgs( KLaunchRequest *request, const KService::Ptr service ,
TDELauncher::createArgs( TDELaunchRequest *request, const KService::Ptr service ,
const TQStringList &urls)
{
TQStringList params = KRun::processDesktopExec(*service, urls, false);
@ -1223,7 +1223,7 @@ KLauncher::createArgs( KLaunchRequest *request, const KService::Ptr service ,
///// IO-Slave functions
pid_t
KLauncher::requestHoldSlave(const KURL &url, const TQString &app_socket)
TDELauncher::requestHoldSlave(const KURL &url, const TQString &app_socket)
{
IdleSlave *slave;
for(slave = mSlaveList.first(); slave; slave = mSlaveList.next())
@ -1242,7 +1242,7 @@ KLauncher::requestHoldSlave(const KURL &url, const TQString &app_socket)
pid_t
KLauncher::requestSlave(const TQString &protocol,
TDELauncher::requestSlave(const TQString &protocol,
const TQString &host,
const TQString &app_socket,
TQString &error)
@ -1292,7 +1292,7 @@ KLauncher::requestSlave(const TQString &protocol,
arg_list.append(arg2);
arg_list.append(arg3);
// kdDebug(7016) << "KLauncher: launching new slave " << _name << " with protocol=" << protocol << endl;
// kdDebug(7016) << "TDELauncher: launching new slave " << _name << " with protocol=" << protocol << endl;
if (mSlaveDebug == arg1)
{
tdelauncher_header request_header;
@ -1311,7 +1311,7 @@ KLauncher::requestSlave(const TQString &protocol,
arg_list.prepend("--tool=memcheck");
}
KLaunchRequest *request = new KLaunchRequest;
TDELaunchRequest *request = new TDELaunchRequest;
request->autoStart = false;
request->name = name;
request->arg_list = arg_list;
@ -1321,7 +1321,7 @@ KLauncher::requestSlave(const TQString &protocol,
#ifdef Q_WS_X11
request->startup_id = "0";
#endif
request->status = KLaunchRequest::Launching;
request->status = TDELaunchRequest::Launching;
request->transaction = 0; // No confirmation is send
requestStart(request);
pid_t pid = request->pid;
@ -1338,7 +1338,7 @@ KLauncher::requestSlave(const TQString &protocol,
}
void
KLauncher::waitForSlave(pid_t pid)
TDELauncher::waitForSlave(pid_t pid)
{
IdleSlave *slave;
for(slave = mSlaveList.first(); slave; slave = mSlaveList.next())
@ -1353,7 +1353,7 @@ KLauncher::waitForSlave(pid_t pid)
}
void
KLauncher::acceptSlave(TDESocket *slaveSocket)
TDELauncher::acceptSlave(TDESocket *slaveSocket)
{
IdleSlave *slave = new IdleSlave(slaveSocket);
// Send it a SLAVE_STATUS command.
@ -1368,7 +1368,7 @@ KLauncher::acceptSlave(TDESocket *slaveSocket)
}
void
KLauncher::slotSlaveStatus(IdleSlave *slave)
TDELauncher::slotSlaveStatus(IdleSlave *slave)
{
SlaveWaitRequest *waitRequest = mSlaveWaitRequest.first();
while(waitRequest)
@ -1390,7 +1390,7 @@ KLauncher::slotSlaveStatus(IdleSlave *slave)
}
void
KLauncher::slotSlaveGone()
TDELauncher::slotSlaveGone()
{
IdleSlave *slave = (IdleSlave *) sender();
mSlaveList.removeRef(slave);
@ -1401,7 +1401,7 @@ KLauncher::slotSlaveGone()
}
void
KLauncher::idleTimeout()
TDELauncher::idleTimeout()
{
bool keepOneFileSlave=true;
time_t now = time(0);

@ -76,7 +76,7 @@ public:
DCOPClientTransaction *transaction;
};
class KLaunchRequest
class TDELaunchRequest
{
public:
TQCString name;
@ -105,14 +105,14 @@ struct serviceResult
pid_t pid;
};
class KLauncher : public TDEApplication, public DCOPObject
class TDELauncher : public TDEApplication, public DCOPObject
{
Q_OBJECT
public:
KLauncher(int _tdeinitSocket, bool new_startup);
TDELauncher(int _tdeinitSocket, bool new_startup);
~KLauncher();
~TDELauncher();
void close();
static void destruct(int exit_code); // exit!
@ -126,8 +126,8 @@ public:
protected:
void processDied(pid_t pid, long exitStatus);
void requestStart(KLaunchRequest *request);
void requestDone(KLaunchRequest *request);
void requestStart(TDELaunchRequest *request);
void requestDone(TDELaunchRequest *request);
void setLaunchEnv(const TQCString &name, const TQCString &value);
void exec_blind(const TQCString &name, const TQValueList<TQCString> &arg_list,
@ -148,7 +148,7 @@ protected:
void autoStart(int phase);
void createArgs( KLaunchRequest *request, const KService::Ptr service,
void createArgs( TDELaunchRequest *request, const KService::Ptr service,
const TQStringList &url);
pid_t requestHoldSlave(const KURL &url, const TQString &app_socket);
@ -156,11 +156,11 @@ protected:
const TQString &app_socket, TQString &error);
void queueRequest(KLaunchRequest *);
void queueRequest(TDELaunchRequest *);
void send_service_startup_info( KLaunchRequest *request, KService::Ptr service, const TQCString& startup_id,
void send_service_startup_info( TDELaunchRequest *request, KService::Ptr service, const TQCString& startup_id,
const TQValueList<TQCString> &envs );
void cancel_service_startup_info( KLaunchRequest *request, const TQCString& startup_id,
void cancel_service_startup_info( TDELaunchRequest *request, const TQCString& startup_id,
const TQValueList<TQCString> &envs );
public slots:
@ -174,12 +174,12 @@ public slots:
void idleTimeout();
protected:
TQPtrList<KLaunchRequest> requestList; // Requests being handled
TQPtrList<KLaunchRequest> requestQueue; // Requests waiting to being handled
TQPtrList<TDELaunchRequest> requestList; // Requests being handled
TQPtrList<TDELaunchRequest> requestQueue; // Requests waiting to being handled
int tdeinitSocket;
TQSocketNotifier *tdeinitNotifier;
serviceResult DCOPresult;
KLaunchRequest *lastRequest;
TDELaunchRequest *lastRequest;
TQPtrList<SlaveWaitRequest> mSlaveWaitRequest;
TQString mPoolSocketName;
TDEServerSocket *mPoolSocket;

@ -41,7 +41,7 @@ static void sig_handler(int sig_num)
signal( SIGHUP, SIG_IGN);
signal( SIGTERM, SIG_IGN);
fprintf(stderr, "[tdelauncher] Exiting on signal %d\n", sig_num);
KLauncher::destruct(255);
TDELauncher::destruct(255);
}
static KCmdLineOptions options[] =
@ -62,10 +62,10 @@ extern "C" KDE_EXPORT int kdemain( int argc, char**argv )
TQCString cname = TDEApplication::launcher();
char *name = cname.data();
TDECmdLineArgs::init(argc, argv, name, "KLauncher", "A service launcher.",
TDECmdLineArgs::init(argc, argv, name, "TDELauncher", "A service launcher.",
"v1.0");
KLauncher::addCmdLineOptions();
TDELauncher::addCmdLineOptions();
TDECmdLineArgs::addCmdLineOptions( options );
// WABA: Make sure not to enable session management.
@ -101,7 +101,7 @@ extern "C" KDE_EXPORT int kdemain( int argc, char**argv )
// Try again...
}
KLauncher *launcher = new KLauncher(LAUNCHER_FD, args->isSet("new-startup"));
TDELauncher *launcher = new TDELauncher(LAUNCHER_FD, args->isSet("new-startup"));
launcher->dcopClient()->setDefaultObject( name );
launcher->dcopClient()->setDaemonMode( true );

@ -50,18 +50,18 @@ struct DownloadDialog::Private
{
TQString m_providerlist;
TQWidget *m_page;
KListView *m_lvtmp_r, *m_lvtmp_d, *m_lvtmp_l;
TDEListView *m_lvtmp_r, *m_lvtmp_d, *m_lvtmp_l;
TQPtrList<Entry> m_installlist;
TQMap<TDEIO::Job*, Provider*> m_variantjobs;
TQMap<TDEIO::Job*, TQStringList> m_variants;
TQMap<Provider*, Provider*> m_newproviders;
};
class NumSortListViewItem : public KListViewItem
class NumSortListViewItem : public TDEListViewItem
{
public:
NumSortListViewItem( TQListView * parent, TQString label1, TQString label2 = TQString::null, TQString label3 = TQString::null, TQString label4 = TQString::null, TQString label5 = TQString::null, TQString label6 = TQString::null, TQString label7 = TQString::null, TQString label8 = TQString::null ) :
KListViewItem( parent, label1, label2, label3, label4, label5, label6, label7, label8 )
TDEListViewItem( parent, label1, label2, label3, label4, label5, label6, label7, label8 )
{
}
@ -72,15 +72,15 @@ class NumSortListViewItem : public KListViewItem
s.sprintf("%08d", text(col).toInt());
return s;
}
return KListViewItem::key( col, asc );
return TDEListViewItem::key( col, asc );
}
};
class DateSortListViewItem : public KListViewItem
class DateSortListViewItem : public TDEListViewItem
{
public:
DateSortListViewItem( TQListView * parent, TQString label1, TQString label2 = TQString::null, TQString label3 = TQString::null, TQString label4 = TQString::null, TQString label5 = TQString::null, TQString label6 = TQString::null, TQString label7 = TQString::null, TQString label8 = TQString::null ) :
KListViewItem( parent, label1, label2, label3, label4, label5, label6, label7, label8 )
TDEListViewItem( parent, label1, label2, label3, label4, label5, label6, label7, label8 )
{
}
@ -92,7 +92,7 @@ class DateSortListViewItem : public KListViewItem
s.sprintf("%08d", date.year() * 366 + date.dayOfYear());
return s;
}
return KListViewItem::key( col, asc );
return TDEListViewItem::key( col, asc );
}
};
@ -157,7 +157,7 @@ DownloadDialog::~DownloadDialog()
{
for (TQMap<TQWidget *, TQValueList<TQPushButton *>* >::const_iterator it = m_buttons.constBegin(); it != m_buttons.constEnd(); ++it)
delete it.data();
for (TQMap<TQWidget *, TQValueList<KListView *>* >::const_iterator it = m_map.constBegin(); it != m_map.constEnd(); ++it)
for (TQMap<TQWidget *, TQValueList<TDEListView *>* >::const_iterator it = m_map.constBegin(); it != m_map.constEnd(); ++it)
delete it.data();
delete d;
}
@ -174,11 +174,11 @@ void DownloadDialog::load(TQString providerList)
void DownloadDialog::clear()
{
TQMap<TQWidget*, TQValueList<KListView*>* >::Iterator it;
TQMap<TQWidget*, TQValueList<KListView*>* >::Iterator end(m_map.end());
TQMap<TQWidget*, TQValueList<TDEListView*>* >::Iterator it;
TQMap<TQWidget*, TQValueList<TDEListView*>* >::Iterator end(m_map.end());
for(it = m_map.begin(); it != end; ++it)
{
TQValueList<KListView*> *v = it.data();
TQValueList<TDEListView*> *v = it.data();
kdDebug() << "clear listviews in " << v << endl;
if(v)
{
@ -266,19 +266,19 @@ void DownloadDialog::addProvider(Provider *p)
TQHBoxLayout *box = new TQHBoxLayout(frame);
box->add(ctl);
d->m_lvtmp_r = new KListView(w_r);
d->m_lvtmp_r = new TDEListView(w_r);
d->m_lvtmp_r->addColumn(i18n("Name"));
d->m_lvtmp_r->addColumn(i18n("Version"));
d->m_lvtmp_r->addColumn(i18n("Rating"));
d->m_lvtmp_r->setSorting(2, false);
d->m_lvtmp_d = new KListView(w_d);
d->m_lvtmp_d = new TDEListView(w_d);
d->m_lvtmp_d->addColumn(i18n("Name"));
d->m_lvtmp_d->addColumn(i18n("Version"));
d->m_lvtmp_d->addColumn(i18n("Downloads"));
d->m_lvtmp_d->setSorting(2, false);
d->m_lvtmp_l = new KListView(w_l);
d->m_lvtmp_l = new TDEListView(w_l);
d->m_lvtmp_l->addColumn(i18n("Name"));
d->m_lvtmp_l->addColumn(i18n("Version"));
d->m_lvtmp_l->addColumn(i18n("Release Date"));
@ -315,7 +315,7 @@ void DownloadDialog::addProvider(Provider *p)
TQVBoxLayout *box4 = new TQVBoxLayout(w_l);
box4->add(d->m_lvtmp_l);
TQValueList<KListView*> *v = new TQValueList<KListView*>;
TQValueList<TDEListView*> *v = new TQValueList<TDEListView*>;
*v << d->m_lvtmp_r << d->m_lvtmp_d << d->m_lvtmp_l;
m_map[frame] = v;
m_rts[frame] = rt;
@ -423,19 +423,19 @@ void DownloadDialog::addEntry(Entry *entry, const TQStringList& variants)
if(variants.contains("score"))
{
KListViewItem *tmp_r = new NumSortListViewItem(lv_r,
TDEListViewItem *tmp_r = new NumSortListViewItem(lv_r,
entry->name(lang), entry->version(), TQString("%1").arg(entry->rating()));
tmp_r->setPixmap(0, pix);
}
if(variants.contains("downloads"))
{
KListViewItem *tmp_d = new NumSortListViewItem(lv_d,
TDEListViewItem *tmp_d = new NumSortListViewItem(lv_d,
entry->name(lang), entry->version(), TQString("%1").arg(entry->downloads()));
tmp_d->setPixmap(0, pix);
}
if(variants.contains("latest"))
{
KListViewItem *tmp_l = new DateSortListViewItem(lv_l,
TDEListViewItem *tmp_l = new DateSortListViewItem(lv_l,
entry->name(lang), entry->version(), TDEGlobal::locale()->formatDate(entry->releaseDate()));
tmp_l->setPixmap(0, pix);
}

@ -28,7 +28,7 @@ namespace TDEIO
class Job;
}
class KListView;
class TDEListView;
class TQTextBrowser;
class TQFrame;
class KNewStuffGeneric;
@ -232,7 +232,7 @@ class KDE_EXPORT DownloadDialog : public KDialogBase
ProviderLoader *m_loader;
TQString m_entryname;
KListView *lv_r, *lv_d, *lv_l;
TDEListView *lv_r, *lv_d, *lv_l;
TQTextBrowser *m_rt;
TQFrame *m_frame;
TQListViewItem *m_entryitem;
@ -240,7 +240,7 @@ class KDE_EXPORT DownloadDialog : public KDialogBase
Entry *m_entry;
KNewStuffGeneric *m_s;
int m_curtab;
TQMap<TQWidget*, TQValueList<KListView*>* > m_map;
TQMap<TQWidget*, TQValueList<TDEListView*>* > m_map;
TQMap<TQWidget*, Provider*> m_providers;
TQMap<TQWidget*, TQTextBrowser*> m_rts;
TQMap<TQWidget*, TQValueList<TQPushButton*>* > m_buttons;

@ -30,12 +30,12 @@
using namespace KNS;
KAction* KNS::standardAction(const TQString& what,
TDEAction* KNS::standardAction(const TQString& what,
const TQObject *recvr,
const char *slot, KActionCollection* parent,
const char *slot, TDEActionCollection* parent,
const char *name)
{
return new KAction(i18n("Download New %1").arg(what), "knewstuff",
return new TDEAction(i18n("Download New %1").arg(what), "knewstuff",
0, recvr, slot, parent, name);
}

@ -26,17 +26,17 @@
class TQObject;
class TQWidget;
class KAction;
class KActionCollection;
class TDEAction;
class TDEActionCollection;
namespace KNS {
class Engine;
class Entry;
KDE_EXPORT KAction* standardAction(const TQString& what,
KDE_EXPORT TDEAction* standardAction(const TQString& what,
const TQObject *recvr,
const char *slot,
KActionCollection* parent,
TDEActionCollection* parent,
const char *name = 0);
}

@ -34,11 +34,11 @@
using namespace KNS;
class ProviderItem : public KListViewItem
class ProviderItem : public TDEListViewItem
{
public:
ProviderItem( KListView *parent, Provider *provider ) :
KListViewItem( parent ), mProvider( provider )
ProviderItem( TDEListView *parent, Provider *provider ) :
TDEListViewItem( parent ), mProvider( provider )
{
setText( 0, provider->name() );
}
@ -61,7 +61,7 @@ ProviderDialog::ProviderDialog( Engine *engine, TQWidget *parent ) :
TQLabel *description = new TQLabel( i18n("Please select one of the providers listed below:"), topPage );
topLayout->addWidget( description );
mListView = new KListView( topPage );
mListView = new TDEListView( topPage );
mListView->addColumn( i18n("Name") );
topLayout->addWidget( mListView );
}

@ -22,7 +22,7 @@
#include <kdialogbase.h>
class KListView;
class TDEListView;
namespace KNS {
@ -68,7 +68,7 @@ class ProviderDialog : public KDialogBase
private:
Engine *mEngine;
KListView *mListView;
TDEListView *mListView;
};
}

@ -2979,7 +2979,7 @@ void KLegacyStyle::drawTab(TQPainter *p, const TQTabBar *tabbar, TQTab *tab, boo
void KLegacyStyle::drawKBarHandle(TQPainter *p, int x, int y, int w, int h,
const TQColorGroup &g, KToolBarPos type, TQBrush *fill)
const TQColorGroup &g, TDEToolBarPos type, TQBrush *fill)
{
GtkObject *gobj = priv->gtkDict.find(TQToolBar::staticMetaObject());

@ -60,7 +60,7 @@ public:
// toolbar stuffs
virtual void drawKBarHandle(TQPainter *p, int x, int y, int w, int h,
const TQColorGroup &g, KToolBarPos type, TQBrush *fill = 0);
const TQColorGroup &g, TDEToolBarPos type, TQBrush *fill = 0);
virtual void drawKickerHandle(TQPainter *p, int x, int y, int w, int h,
const TQColorGroup &g, TQBrush *fill = 0);
virtual void drawKickerAppletHandle(TQPainter *p, int x, int y, int w, int h,

@ -569,7 +569,7 @@ void KThemeStyle::polish( const TQStyleControlElementData &ceData, ControlElemen
{
w->setBackgroundMode( TQWidget::NoBackground );
}
else if ( w->inherits( "KToolBarSeparator" ) || w->inherits( "QToolBarSeparator" ) )
else if ( w->inherits( "TDEToolBarSeparator" ) || w->inherits( "QToolBarSeparator" ) )
{
w->setBackgroundMode( TQWidget::PaletteBackground );
}
@ -652,7 +652,7 @@ void KThemeStyle::unPolish( const TQStyleControlElementData &ceData, ControlElem
w->setBackgroundMode( TQWidget::PaletteButton );
//For toolbar internal separators, return to button, too (can't use tqqt_cast here since don't have access to the class)
else if ( w->inherits( "KToolBarSeparator" ) || w->inherits( "QToolBarSeparator" ) )
else if ( w->inherits( "TDEToolBarSeparator" ) || w->inherits( "QToolBarSeparator" ) )
w->setBackgroundMode( TQWidget::PaletteButton );
//For scrollbars, we don't do much, since the widget queries the style on the switch

@ -965,7 +965,7 @@ WebStyle::drawSlider
}
void
WebStyle::drawKToolBar
WebStyle::drawTDEToolBar
(
TQPainter * p,
int x,
@ -973,7 +973,7 @@ WebStyle::drawKToolBar
int w,
int h,
const TQColorGroup & g,
KToolBarPos /* pos */,
TDEToolBarPos /* pos */,
TQBrush * /* fill */
)
{
@ -993,7 +993,7 @@ WebStyle::drawKBarHandle
int w,
int h,
const TQColorGroup & g,
KToolBarPos /* pos */,
TDEToolBarPos /* pos */,
TQBrush * /* fill */
)
{
@ -1025,7 +1025,7 @@ WebStyle::drawKMenuBar
}
void
WebStyle::drawKToolBarButton
WebStyle::drawTDEToolBarButton
(
TQPainter * p,
int x,
@ -1037,7 +1037,7 @@ WebStyle::drawKToolBarButton
bool raised,
bool enabled,
bool popup,
KToolButtonType type,
TDEToolButtonType type,
const TQString & btext,
const TQPixmap * pixmap,
TQFont * font,

@ -210,7 +210,7 @@ class WebStyle : public KStyle
bool tickBelow
);
void drawKToolBar
void drawTDEToolBar
(
TQPainter *,
int x,
@ -218,7 +218,7 @@ class WebStyle : public KStyle
int w,
int h,
const TQColorGroup &,
KToolBarPos,
TDEToolBarPos,
TQBrush * fill = 0
);
@ -230,7 +230,7 @@ class WebStyle : public KStyle
int w,
int h,
const TQColorGroup &,
KToolBarPos,
TDEToolBarPos,
TQBrush * fill = 0
);
@ -246,7 +246,7 @@ class WebStyle : public KStyle
TQBrush * fill = 0
);
void drawKToolBarButton
void drawTDEToolBarButton
(
TQPainter * p,
int x,
@ -258,7 +258,7 @@ class WebStyle : public KStyle
bool raised = true,
bool enabled = true,
bool popup = false,
KToolButtonType = Icon,
TDEToolButtonType = Icon,
const TQString & btext = TQString::null,
const TQPixmap * = 0,
TQFont * = 0,

@ -52,14 +52,14 @@
K_EXPORT_COMPONENT_FACTORY( libtdecertpart, KParts::GenericFactory<KCertPart> )
KX509Item::KX509Item(KListViewItem *parent, KSSLCertificate *x) :
KListViewItem(parent, 0L)
KX509Item::KX509Item(TDEListViewItem *parent, KSSLCertificate *x) :
TDEListViewItem(parent, 0L)
{
setup(x);
}
KX509Item::KX509Item(KListView *parent, KSSLCertificate *x) :
KListViewItem(parent)
KX509Item::KX509Item(TDEListView *parent, KSSLCertificate *x) :
TDEListViewItem(parent)
{
setup(x);
}
@ -98,8 +98,8 @@ KX509Item::~KX509Item()
}
KPKCS12Item::KPKCS12Item(KListViewItem *parent, KSSLPKCS12 *x) :
KListViewItem(parent, 0L)
KPKCS12Item::KPKCS12Item(TDEListViewItem *parent, KSSLPKCS12 *x) :
TDEListViewItem(parent, 0L)
{
cert = x;
if (x) {
@ -155,13 +155,13 @@ setWidget(_frame);
_baseGrid = new TQGridLayout(_frame, 15, 9, KDialog::marginHint(),
KDialog::spacingHint());
_sideList = new KListView(_frame);
_sideList = new TDEListView(_frame);
_sideList->setRootIsDecorated(true);
_sideList->addColumn(i18n("Certificates"));
_parentCA = new KListViewItem(_sideList, i18n("Signers"));
_parentCA = new TDEListViewItem(_sideList, i18n("Signers"));
_parentCA->setExpandable(true);
_sideList->setOpen(_parentCA, true);
_parentP12 = new KListViewItem(_sideList, i18n("Client"));
_parentP12 = new TDEListViewItem(_sideList, i18n("Client"));
_parentP12->setExpandable(true);
_sideList->setOpen(_parentP12, true);

@ -44,10 +44,10 @@ class TDEAboutData;
class TQGridLayout;
class KX509Item : public KListViewItem {
class KX509Item : public TDEListViewItem {
public:
KX509Item(KListViewItem *parent, KSSLCertificate *x);
KX509Item(KListView *parent, KSSLCertificate *x);
KX509Item(TDEListViewItem *parent, KSSLCertificate *x);
KX509Item(TDEListView *parent, KSSLCertificate *x);
void setup(KSSLCertificate *x);
~KX509Item();
virtual int rtti() const { return 1; }
@ -56,9 +56,9 @@ class KX509Item : public KListViewItem {
};
class KPKCS12Item : public KListViewItem {
class KPKCS12Item : public TDEListViewItem {
public:
KPKCS12Item(KListViewItem *parent, KSSLPKCS12 *x);
KPKCS12Item(TDEListViewItem *parent, KSSLPKCS12 *x);
~KPKCS12Item();
KSSLPKCS12 *cert;
TQString _prettyName;
@ -94,8 +94,8 @@ protected:
void displayPKCS12Cert(KSSLCertificate *c);
void displayCACert(KSSLCertificate *c);
KListView *_sideList;
KListViewItem *_parentCA, *_parentP12;
TDEListView *_sideList;
TDEListViewItem *_parentCA, *_parentP12;
TQFrame *_pkcsFrame, *_blankFrame, *_x509Frame, *_frame;
// for the PKCS12 widget

@ -16,16 +16,16 @@ DnD stuff, TDESocket and TDEServerSocket classes, KPixmap
Alexander Sanda <alex@darkstar.ping.at>
Read and write numerical config entries, KPanner, KTabControl,
KPopupMenu, KMessageBox, KEdit widgets.
TDEPopupMenu, KMessageBox, KEdit widgets.
Martin Jones <mjones@powerup.com.au>
Bugfixes in KPixmap and KURL, KColorDialog, KSelector
Bugfixes in KPixmap and KURL, KColorDialog, TDESelector
Keith Brown <kbrown@pdq.net>
KTreeList class
Bernd Johannes Wuebben <wuebben@math.cornell.edu>
KFontDialog classes
TDEFontDialog classes
Tim D. Gilman <tdgilman@best.com>
KDatePicker, KDateTable class

@ -72,7 +72,7 @@ information and then waiting for a sufficient long period, e.. 5 minutes,
before actually removing the image data.
I can also imagine a scenario where the index information is only used very
temporarily, e.g. during the creation of a KMainWindow (mmap the file in the
temporarily, e.g. during the creation of a TDEMainWindow (mmap the file in the
constructor, unmap it from the next event loop) that way icons can be removed
from the index and after e.g. a timeout of 5 minutes one can be relatively
sure that the index will no longer be used.

@ -331,7 +331,7 @@ Applications may use additional actions that they defined themselves.
You can get a list of the actions used by a certain applications by using the
following dcop command:
dcop <dcopid> qt objects | grep KActionCollection/ | cut -d '/' -f 3
dcop <dcopid> qt objects | grep TDEActionCollection/ | cut -d '/' -f 3
or with
@ -660,7 +660,7 @@ KDE3 Kiosk Application API
Three new methods have been added to TDEApplication:
- bool authorize(QString action); // Generic actions
- bool authorizeKAction(QString action); // For KActions exclusively
- bool authorizeTDEAction(QString action); // For TDEActions exclusively
- bool authorizeURLAction(QString, referringURL, destinationURL) // URL Handling
Automatic Logout

@ -45,15 +45,15 @@
// TODO: Put in kaccelbase.cpp
//---------------------------------------------------------------------
// KAccelEventHandler
// TDEAccelEventHandler
//---------------------------------------------------------------------
//
// In KAccelEventHandler::x11Event we do our own X11 keyboard event handling
// In TDEAccelEventHandler::x11Event we do our own X11 keyboard event handling
// This allows us to map the Win key to Qt::MetaButton, Qt does not know about
// the Win key.
//
// KAccelEventHandler::x11Event will generate an AccelOverride event. The
// AccelOverride event is abused a bit to ensure that KAccelPrivate::eventFilter
// TDEAccelEventHandler::x11Event will generate an AccelOverride event. The
// AccelOverride event is abused a bit to ensure that TDEAccelPrivate::eventFilter
// (as an event filter on the toplevel widget) will get the key event first
// (in the form of AccelOverride) before any of the intermediate widgets are
// able to process it.
@ -63,10 +63,10 @@
// skipped and the KeyPress is followed immediately.
// If the Accel event is accepted, no KeyPress event will follow.
//
// KAccelEventHandler::x11Event converts a X11 keyboard event into an AccelOverride
// TDEAccelEventHandler::x11Event converts a X11 keyboard event into an AccelOverride
// event, there are now two possibilities:
//
// 1) If KAccel intercepts the AccelOverride we are done and can consider the X11
// 1) If TDEAccel intercepts the AccelOverride we are done and can consider the X11
// keyboard event as handled.
// 2) If another widget accepts the AccelOverride, it will expect to get a normal
// Qt generated KeyPress event afterwards. So we let Qt handle the X11 keyboard event
@ -80,34 +80,34 @@
bool kde_g_bKillAccelOverride = false;
class KAccelEventHandler : public TQWidget
class TDEAccelEventHandler : public TQWidget
{
public:
static KAccelEventHandler* self()
static TDEAccelEventHandler* self()
{
if( !g_pSelf )
g_pSelf = new KAccelEventHandler;
g_pSelf = new TDEAccelEventHandler;
return g_pSelf;
}
static void accelActivated( bool b ) { g_bAccelActivated = b; }
private:
KAccelEventHandler();
TDEAccelEventHandler();
# ifdef Q_WS_X11
bool x11Event( XEvent* pEvent );
# endif
static KAccelEventHandler* g_pSelf;
static TDEAccelEventHandler* g_pSelf;
static bool g_bAccelActivated;
};
KAccelEventHandler* KAccelEventHandler::g_pSelf = 0;
bool KAccelEventHandler::g_bAccelActivated = false;
TDEAccelEventHandler* TDEAccelEventHandler::g_pSelf = 0;
bool TDEAccelEventHandler::g_bAccelActivated = false;
KAccelEventHandler::KAccelEventHandler()
: TQWidget( 0, "KAccelEventHandler" )
TDEAccelEventHandler::TDEAccelEventHandler()
: TQWidget( 0, "TDEAccelEventHandler" )
{
# ifdef Q_WS_X11
if ( kapp )
@ -118,7 +118,7 @@ KAccelEventHandler::KAccelEventHandler()
#ifdef Q_WS_X11
bool tqt_try_modal( TQWidget *, XEvent * );
bool KAccelEventHandler::x11Event( XEvent* pEvent )
bool TDEAccelEventHandler::x11Event( XEvent* pEvent )
{
if( TQWidget::keyboardGrabber() || !kapp->focusWidget() )
return false;
@ -146,7 +146,7 @@ bool KAccelEventHandler::x11Event( XEvent* pEvent )
g_bAccelActivated = false;
kapp->sendEvent( kapp->focusWidget(), &ke );
// If the Override event was accepted from a non-KAccel widget,
// If the Override event was accepted from a non-TDEAccel widget,
// then kill the next AccelOverride in TDEApplication::notify.
if( ke.isAccepted() && !g_bAccelActivated )
kde_g_bKillAccelOverride = true;
@ -160,35 +160,35 @@ bool KAccelEventHandler::x11Event( XEvent* pEvent )
#endif // Q_WS_X11
//---------------------------------------------------------------------
// KAccelPrivate
// TDEAccelPrivate
//---------------------------------------------------------------------
KAccelPrivate::KAccelPrivate( KAccel* pParent, TQWidget* pWatch )
: KAccelBase( KAccelBase::QT_KEYS )
TDEAccelPrivate::TDEAccelPrivate( TDEAccel* pParent, TQWidget* pWatch )
: TDEAccelBase( TDEAccelBase::QT_KEYS )
{
//kdDebug(125) << "KAccelPrivate::KAccelPrivate( pParent = " << pParent << " ): this = " << this << endl;
//kdDebug(125) << "TDEAccelPrivate::TDEAccelPrivate( pParent = " << pParent << " ): this = " << this << endl;
m_pAccel = pParent;
m_pWatch = pWatch;
m_bAutoUpdate = true;
connect( (TQAccel*)m_pAccel, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotKeyPressed(int)) );
#ifdef Q_WS_X11 //only makes sense if KAccelEventHandler is working
#ifdef Q_WS_X11 //only makes sense if TDEAccelEventHandler is working
if( m_pWatch )
m_pWatch->installEventFilter( this );
#endif
KAccelEventHandler::self();
TDEAccelEventHandler::self();
}
void KAccelPrivate::setEnabled( bool bEnabled )
void TDEAccelPrivate::setEnabled( bool bEnabled )
{
m_bEnabled = bEnabled;
((TQAccel*)m_pAccel)->setEnabled( bEnabled );
}
bool KAccelPrivate::setEnabled( const TQString& sAction, bool bEnable )
bool TDEAccelPrivate::setEnabled( const TQString& sAction, bool bEnable )
{
kdDebug(125) << "KAccelPrivate::setEnabled( \"" << sAction << "\", " << bEnable << " ): this = " << this << endl;
KAccelAction* pAction = actionPtr( sAction );
kdDebug(125) << "TDEAccelPrivate::setEnabled( \"" << sAction << "\", " << bEnable << " ): this = " << this << endl;
TDEAccelAction* pAction = actionPtr( sAction );
if( !pAction )
return false;
if( pAction->isEnabled() == bEnable )
@ -196,7 +196,7 @@ bool KAccelPrivate::setEnabled( const TQString& sAction, bool bEnable )
pAction->setEnabled( bEnable );
TQMap<int, KAccelAction*>::const_iterator it = m_mapIDToAction.begin();
TQMap<int, TDEAccelAction*>::const_iterator it = m_mapIDToAction.begin();
for( ; it != m_mapIDToAction.end(); ++it ) {
if( *it == pAction )
((TQAccel*)m_pAccel)->setItemEnabled( it.key(), bEnable );
@ -204,32 +204,32 @@ bool KAccelPrivate::setEnabled( const TQString& sAction, bool bEnable )
return true;
}
bool KAccelPrivate::removeAction( const TQString& sAction )
bool TDEAccelPrivate::removeAction( const TQString& sAction )
{
// FIXME: getID() doesn't contains any useful
// information! Use mapIDToAction. --ellis, 2/May/2002
// Or maybe KAccelBase::remove() takes care of TQAccel indirectly...
KAccelAction* pAction = actions().actionPtr( sAction );
// Or maybe TDEAccelBase::remove() takes care of TQAccel indirectly...
TDEAccelAction* pAction = actions().actionPtr( sAction );
if( pAction ) {
int nID = pAction->getID();
//bool b = actions().removeAction( sAction );
bool b = KAccelBase::remove( sAction );
bool b = TDEAccelBase::remove( sAction );
((TQAccel*)m_pAccel)->removeItem( nID );
return b;
} else
return false;
}
bool KAccelPrivate::emitSignal( KAccelBase::Signal signal )
bool TDEAccelPrivate::emitSignal( TDEAccelBase::Signal signal )
{
if( signal == KAccelBase::KEYCODE_CHANGED ) {
if( signal == TDEAccelBase::KEYCODE_CHANGED ) {
m_pAccel->emitKeycodeChanged();
return true;
}
return false;
}
bool KAccelPrivate::connectKey( KAccelAction& action, const KKeyServer::Key& key )
bool TDEAccelPrivate::connectKey( TDEAccelAction& action, const KKeyServer::Key& key )
{
uint keyQt = key.keyCodeQt();
int nID = ((TQAccel*)m_pAccel)->insertItem( keyQt );
@ -246,23 +246,23 @@ bool KAccelPrivate::connectKey( KAccelAction& action, const KKeyServer::Key& key
((TQAccel*)m_pAccel)->setItemEnabled( nID, false );
}
kdDebug(125) << "KAccelPrivate::connectKey( \"" << action.name() << "\", " << key.key().toStringInternal() << " = 0x" << TQString::number(keyQt,16) << " ): id = " << nID << " m_pObjSlot = " << action.objSlotPtr() << endl;
kdDebug(125) << "TDEAccelPrivate::connectKey( \"" << action.name() << "\", " << key.key().toStringInternal() << " = 0x" << TQString::number(keyQt,16) << " ): id = " << nID << " m_pObjSlot = " << action.objSlotPtr() << endl;
//kdDebug(125) << "m_pAccel = " << m_pAccel << endl;
return nID != 0;
}
bool KAccelPrivate::connectKey( const KKeyServer::Key& key )
bool TDEAccelPrivate::connectKey( const KKeyServer::Key& key )
{
uint keyQt = key.keyCodeQt();
int nID = ((TQAccel*)m_pAccel)->insertItem( keyQt );
m_mapIDToKey[nID] = keyQt;
kdDebug(125) << "KAccelPrivate::connectKey( " << key.key().toStringInternal() << " = 0x" << TQString::number(keyQt,16) << " ): id = " << nID << endl;
kdDebug(125) << "TDEAccelPrivate::connectKey( " << key.key().toStringInternal() << " = 0x" << TQString::number(keyQt,16) << " ): id = " << nID << endl;
return nID != 0;
}
bool KAccelPrivate::disconnectKey( KAccelAction& action, const KKeyServer::Key& key )
bool TDEAccelPrivate::disconnectKey( TDEAccelAction& action, const KKeyServer::Key& key )
{
int keyQt = key.keyCodeQt();
TQMap<int, int>::iterator it = m_mapIDToKey.begin();
@ -270,7 +270,7 @@ bool KAccelPrivate::disconnectKey( KAccelAction& action, const KKeyServer::Key&
//kdDebug(125) << "m_mapIDToKey[" << it.key() << "] = " << TQString::number(*it,16) << " == " << TQString::number(keyQt,16) << endl;
if( *it == keyQt ) {
int nID = it.key();
kdDebug(125) << "KAccelPrivate::disconnectKey( \"" << action.name() << "\", 0x" << TQString::number(keyQt,16) << " ) : id = " << nID << " m_pObjSlot = " << action.objSlotPtr() << endl;
kdDebug(125) << "TDEAccelPrivate::disconnectKey( \"" << action.name() << "\", 0x" << TQString::number(keyQt,16) << " ) : id = " << nID << " m_pObjSlot = " << action.objSlotPtr() << endl;
((TQAccel*)m_pAccel)->removeItem( nID );
m_mapIDToAction.remove( nID );
m_mapIDToKey.remove( it );
@ -282,10 +282,10 @@ bool KAccelPrivate::disconnectKey( KAccelAction& action, const KKeyServer::Key&
return false;
}
bool KAccelPrivate::disconnectKey( const KKeyServer::Key& key )
bool TDEAccelPrivate::disconnectKey( const KKeyServer::Key& key )
{
int keyQt = key.keyCodeQt();
kdDebug(125) << "KAccelPrivate::disconnectKey( 0x" << TQString::number(keyQt,16) << " )" << endl;
kdDebug(125) << "TDEAccelPrivate::disconnectKey( 0x" << TQString::number(keyQt,16) << " )" << endl;
TQMap<int, int>::iterator it = m_mapIDToKey.begin();
for( ; it != m_mapIDToKey.end(); ++it ) {
if( *it == keyQt ) {
@ -299,9 +299,9 @@ bool KAccelPrivate::disconnectKey( const KKeyServer::Key& key )
return false;
}
void KAccelPrivate::slotKeyPressed( int id )
void TDEAccelPrivate::slotKeyPressed( int id )
{
kdDebug(125) << "KAccelPrivate::slotKeyPressed( " << id << " )" << endl;
kdDebug(125) << "TDEAccelPrivate::slotKeyPressed( " << id << " )" << endl;
if( m_mapIDToKey.contains( id ) ) {
KKey key = m_mapIDToKey[id];
@ -326,14 +326,14 @@ void KAccelPrivate::slotKeyPressed( int id )
}
}
void KAccelPrivate::slotShowMenu()
void TDEAccelPrivate::slotShowMenu()
{
}
void KAccelPrivate::slotMenuActivated( int iAction )
void TDEAccelPrivate::slotMenuActivated( int iAction )
{
kdDebug(125) << "KAccelPrivate::slotMenuActivated( " << iAction << " )" << endl;
KAccelAction* pAction = actions().actionPtr( iAction );
kdDebug(125) << "TDEAccelPrivate::slotMenuActivated( " << iAction << " )" << endl;
TDEAccelAction* pAction = actions().actionPtr( iAction );
#ifdef Q_WS_WIN /** @todo TEMP: new implementation (commit #424926) didn't work */
if( pAction ) {
connect( this, TQT_SIGNAL(menuItemActivated()), pAction->objSlotPtr(), pAction->methodSlotPtr() );
@ -345,12 +345,12 @@ void KAccelPrivate::slotMenuActivated( int iAction )
#endif
}
bool KAccelPrivate::eventFilter( TQObject* /*pWatched*/, TQEvent* pEvent )
bool TDEAccelPrivate::eventFilter( TQObject* /*pWatched*/, TQEvent* pEvent )
{
if( pEvent->type() == TQEvent::AccelOverride && m_bEnabled ) {
TQKeyEvent* pKeyEvent = (TQKeyEvent*) pEvent;
KKey key( pKeyEvent );
kdDebug(125) << "KAccelPrivate::eventFilter( AccelOverride ): this = " << this << ", key = " << key.toStringInternal() << endl;
kdDebug(125) << "TDEAccelPrivate::eventFilter( AccelOverride ): this = " << this << ", key = " << key.toStringInternal() << endl;
int keyCodeQt = key.keyCodeQt();
TQMap<int, int>::iterator it = m_mapIDToKey.begin();
for( ; it != m_mapIDToKey.end(); ++it ) {
@ -359,11 +359,11 @@ bool KAccelPrivate::eventFilter( TQObject* /*pWatched*/, TQEvent* pEvent )
kdDebug(125) << "shortcut found!" << endl;
if( m_mapIDToAction.contains( nID ) ) {
// TODO: reduce duplication between here and slotMenuActivated
KAccelAction* pAction = m_mapIDToAction[nID];
TDEAccelAction* pAction = m_mapIDToAction[nID];
if( !pAction->isEnabled() )
continue;
#ifdef Q_WS_WIN /** @todo TEMP: new implementation (commit #424926) didn't work */
TQGuardedPtr<KAccelPrivate> me = this;
TQGuardedPtr<TDEAccelPrivate> me = this;
connect( this, TQT_SIGNAL(menuItemActivated()), pAction->objSlotPtr(), pAction->methodSlotPtr() );
emit menuItemActivated();
if (me) {
@ -376,7 +376,7 @@ bool KAccelPrivate::eventFilter( TQObject* /*pWatched*/, TQEvent* pEvent )
slotKeyPressed( nID );
pKeyEvent->accept();
KAccelEventHandler::accelActivated( true );
TDEAccelEventHandler::accelActivated( true );
return true;
}
}
@ -385,17 +385,17 @@ bool KAccelPrivate::eventFilter( TQObject* /*pWatched*/, TQEvent* pEvent )
}
#ifndef Q_WS_WIN /** @todo TEMP: new implementation (commit #424926) didn't work */
void KAccelPrivate::emitActivatedSignal( KAccelAction* pAction )
void TDEAccelPrivate::emitActivatedSignal( TDEAccelAction* pAction )
{
if( pAction ) {
TQGuardedPtr<KAccelPrivate> me = this;
TQRegExp reg( "([ ]*KAccelAction.*)" );
TQGuardedPtr<TDEAccelPrivate> me = this;
TQRegExp reg( "([ ]*TDEAccelAction.*)" );
if( reg.search( pAction->methodSlotPtr()) >= 0 ) {
connect( this, TQT_SIGNAL(menuItemActivated(KAccelAction*)),
connect( this, TQT_SIGNAL(menuItemActivated(TDEAccelAction*)),
pAction->objSlotPtr(), pAction->methodSlotPtr() );
emit menuItemActivated( pAction );
if (me)
disconnect( me, TQT_SIGNAL(menuItemActivated(KAccelAction*)),
disconnect( me, TQT_SIGNAL(menuItemActivated(TDEAccelAction*)),
pAction->objSlotPtr(), pAction->methodSlotPtr() );
} else {
connect( this, TQT_SIGNAL(menuItemActivated()),
@ -411,39 +411,39 @@ void KAccelPrivate::emitActivatedSignal( KAccelAction* pAction )
#endif
//---------------------------------------------------------------------
// KAccel
// TDEAccel
//---------------------------------------------------------------------
KAccel::KAccel( TQWidget* pParent, const char* psName )
: TQAccel( pParent, (psName) ? psName : "KAccel-TQAccel" )
TDEAccel::TDEAccel( TQWidget* pParent, const char* psName )
: TQAccel( pParent, (psName) ? psName : "TDEAccel-TQAccel" )
{
kdDebug(125) << "KAccel( pParent = " << pParent << ", psName = " << psName << " ): this = " << this << endl;
d = new KAccelPrivate( this, pParent );
kdDebug(125) << "TDEAccel( pParent = " << pParent << ", psName = " << psName << " ): this = " << this << endl;
d = new TDEAccelPrivate( this, pParent );
}
KAccel::KAccel( TQWidget* watch, TQObject* pParent, const char* psName )
: TQAccel( watch, pParent, (psName) ? psName : "KAccel-TQAccel" )
TDEAccel::TDEAccel( TQWidget* watch, TQObject* pParent, const char* psName )
: TQAccel( watch, pParent, (psName) ? psName : "TDEAccel-TQAccel" )
{
kdDebug(125) << "KAccel( watch = " << watch << ", pParent = " << pParent << ", psName = " << psName << " ): this = " << this << endl;
kdDebug(125) << "TDEAccel( watch = " << watch << ", pParent = " << pParent << ", psName = " << psName << " ): this = " << this << endl;
if( !watch )
kdDebug(125) << kdBacktrace() << endl;
d = new KAccelPrivate( this, watch );
d = new TDEAccelPrivate( this, watch );
}
KAccel::~KAccel()
TDEAccel::~TDEAccel()
{
kdDebug(125) << "~KAccel(): this = " << this << endl;
kdDebug(125) << "~TDEAccel(): this = " << this << endl;
delete d;
}
KAccelActions& KAccel::actions() { return d->actions(); }
const KAccelActions& KAccel::actions() const { return d->actions(); }
bool KAccel::isEnabled() { return d->isEnabled(); }
void KAccel::setEnabled( bool bEnabled ) { d->setEnabled( bEnabled ); }
bool KAccel::setAutoUpdate( bool bAuto ) { return d->setAutoUpdate( bAuto ); }
TDEAccelActions& TDEAccel::actions() { return d->actions(); }
const TDEAccelActions& TDEAccel::actions() const { return d->actions(); }
bool TDEAccel::isEnabled() { return d->isEnabled(); }
void TDEAccel::setEnabled( bool bEnabled ) { d->setEnabled( bEnabled ); }
bool TDEAccel::setAutoUpdate( bool bAuto ) { return d->setAutoUpdate( bAuto ); }
KAccelAction* KAccel::insert( const TQString& sAction, const TQString& sLabel, const TQString& sWhatsThis,
const KShortcut& cutDef,
TDEAccelAction* TDEAccel::insert( const TQString& sAction, const TQString& sLabel, const TQString& sWhatsThis,
const TDEShortcut& cutDef,
const TQObject* pObjSlot, const char* psMethodSlot,
bool bConfigurable, bool bEnabled )
{
@ -453,8 +453,8 @@ KAccelAction* KAccel::insert( const TQString& sAction, const TQString& sLabel, c
bConfigurable, bEnabled );
}
KAccelAction* KAccel::insert( const TQString& sAction, const TQString& sLabel, const TQString& sWhatsThis,
const KShortcut& cutDef3, const KShortcut& cutDef4,
TDEAccelAction* TDEAccel::insert( const TQString& sAction, const TQString& sLabel, const TQString& sWhatsThis,
const TDEShortcut& cutDef3, const TDEShortcut& cutDef4,
const TQObject* pObjSlot, const char* psMethodSlot,
bool bConfigurable, bool bEnabled )
{
@ -464,7 +464,7 @@ KAccelAction* KAccel::insert( const TQString& sAction, const TQString& sLabel, c
bConfigurable, bEnabled );
}
KAccelAction* KAccel::insert( const char* psAction, const KShortcut& cutDef,
TDEAccelAction* TDEAccel::insert( const char* psAction, const TDEShortcut& cutDef,
const TQObject* pObjSlot, const char* psMethodSlot,
bool bConfigurable, bool bEnabled )
{
@ -474,45 +474,45 @@ KAccelAction* KAccel::insert( const char* psAction, const KShortcut& cutDef,
bConfigurable, bEnabled );
}
KAccelAction* KAccel::insert( KStdAccel::StdAccel id,
TDEAccelAction* TDEAccel::insert( TDEStdAccel::StdAccel id,
const TQObject* pObjSlot, const char* psMethodSlot,
bool bConfigurable, bool bEnabled )
{
TQString sAction = KStdAccel::name( id );
TQString sAction = TDEStdAccel::name( id );
if( sAction.isEmpty() )
return 0;
KAccelAction* pAction = d->insert( sAction, KStdAccel::label( id ), KStdAccel::whatsThis( id ),
KStdAccel::shortcutDefault3( id ), KStdAccel::shortcutDefault4( id ),
TDEAccelAction* pAction = d->insert( sAction, TDEStdAccel::label( id ), TDEStdAccel::whatsThis( id ),
TDEStdAccel::shortcutDefault3( id ), TDEStdAccel::shortcutDefault4( id ),
pObjSlot, psMethodSlot,
bConfigurable, bEnabled );
if( pAction )
pAction->setShortcut( KStdAccel::shortcut( id ) );
pAction->setShortcut( TDEStdAccel::shortcut( id ) );
return pAction;
}
bool KAccel::remove( const TQString& sAction )
bool TDEAccel::remove( const TQString& sAction )
{ return d->removeAction( sAction ); }
bool KAccel::updateConnections()
bool TDEAccel::updateConnections()
{ return d->updateConnections(); }
const KShortcut& KAccel::shortcut( const TQString& sAction ) const
const TDEShortcut& TDEAccel::shortcut( const TQString& sAction ) const
{
const KAccelAction* pAction = actions().actionPtr( sAction );
return (pAction) ? pAction->shortcut() : KShortcut::null();
const TDEAccelAction* pAction = actions().actionPtr( sAction );
return (pAction) ? pAction->shortcut() : TDEShortcut::null();
}
bool KAccel::setSlot( const TQString& sAction, const TQObject* pObjSlot, const char* psMethodSlot )
bool TDEAccel::setSlot( const TQString& sAction, const TQObject* pObjSlot, const char* psMethodSlot )
{ return d->setActionSlot( sAction, pObjSlot, psMethodSlot ); }
bool KAccel::setEnabled( const TQString& sAction, bool bEnable )
bool TDEAccel::setEnabled( const TQString& sAction, bool bEnable )
{ return d->setEnabled( sAction, bEnable ); }
bool KAccel::setShortcut( const TQString& sAction, const KShortcut& cut )
bool TDEAccel::setShortcut( const TQString& sAction, const TDEShortcut& cut )
{
kdDebug(125) << "KAccel::setShortcut( \"" << sAction << "\", " << cut.toStringInternal() << " )" << endl;
KAccelAction* pAction = actions().actionPtr( sAction );
kdDebug(125) << "TDEAccel::setShortcut( \"" << sAction << "\", " << cut.toStringInternal() << " )" << endl;
TDEAccelAction* pAction = actions().actionPtr( sAction );
if( pAction ) {
if( pAction->shortcut() != cut )
return d->setShortcut( sAction, cut );
@ -521,24 +521,24 @@ bool KAccel::setShortcut( const TQString& sAction, const KShortcut& cut )
return false;
}
const TQString& KAccel::configGroup() const
const TQString& TDEAccel::configGroup() const
{ return d->configGroup(); }
// for tdegames/ksirtet
void KAccel::setConfigGroup( const TQString& s )
void TDEAccel::setConfigGroup( const TQString& s )
{ d->setConfigGroup( s ); }
bool KAccel::readSettings( TDEConfigBase* pConfig )
bool TDEAccel::readSettings( TDEConfigBase* pConfig )
{
d->readSettings( pConfig );
return true;
}
bool KAccel::writeSettings( TDEConfigBase* pConfig ) const
bool TDEAccel::writeSettings( TDEConfigBase* pConfig ) const
{ d->writeSettings( pConfig ); return true; }
void KAccel::emitKeycodeChanged()
void TDEAccel::emitKeycodeChanged()
{
kdDebug(125) << "KAccel::emitKeycodeChanged()" << endl;
kdDebug(125) << "TDEAccel::emitKeycodeChanged()" << endl;
emit keycodeChanged();
}
@ -547,11 +547,11 @@ void KAccel::emitKeycodeChanged()
// Obsolete methods -- for backward compatibility
//------------------------------------------------------------
bool KAccel::insertItem( const TQString& sLabel, const TQString& sAction,
bool TDEAccel::insertItem( const TQString& sLabel, const TQString& sAction,
const char* cutsDef,
int /*nIDMenu*/, TQPopupMenu *, bool bConfigurable )
{
KShortcut cut( cutsDef );
TDEShortcut cut( cutsDef );
bool b = d->insert( sAction, sLabel, TQString::null,
cut, cut,
0, 0,
@ -559,13 +559,13 @@ bool KAccel::insertItem( const TQString& sLabel, const TQString& sAction,
return b;
}
bool KAccel::insertItem( const TQString& sLabel, const TQString& sAction,
bool TDEAccel::insertItem( const TQString& sLabel, const TQString& sAction,
int key,
int /*nIDMenu*/, TQPopupMenu*, bool bConfigurable )
{
KShortcut cut;
TDEShortcut cut;
cut.init( TQKeySequence(key) );
KAccelAction* pAction = d->insert( sAction, sLabel, TQString::null,
TDEAccelAction* pAction = d->insert( sAction, sLabel, TQString::null,
cut, cut,
0, 0,
bConfigurable );
@ -573,20 +573,20 @@ bool KAccel::insertItem( const TQString& sLabel, const TQString& sAction,
}
// Used in tdeutils/kjots
bool KAccel::insertStdItem( KStdAccel::StdAccel id, const TQString& sLabel )
bool TDEAccel::insertStdItem( TDEStdAccel::StdAccel id, const TQString& sLabel )
{
KAccelAction* pAction = d->insert( KStdAccel::name( id ), sLabel, TQString::null,
KStdAccel::shortcutDefault3( id ), KStdAccel::shortcutDefault4( id ),
TDEAccelAction* pAction = d->insert( TDEStdAccel::name( id ), sLabel, TQString::null,
TDEStdAccel::shortcutDefault3( id ), TDEStdAccel::shortcutDefault4( id ),
0, 0 );
if( pAction )
pAction->setShortcut( KStdAccel::shortcut( id ) );
pAction->setShortcut( TDEStdAccel::shortcut( id ) );
return true;
}
bool KAccel::connectItem( const TQString& sAction, const TQObject* pObjSlot, const char* psMethodSlot, bool bActivate )
bool TDEAccel::connectItem( const TQString& sAction, const TQObject* pObjSlot, const char* psMethodSlot, bool bActivate )
{
kdDebug(125) << "KAccel::connectItem( " << sAction << ", " << pObjSlot << ", " << psMethodSlot << " )" << endl;
kdDebug(125) << "TDEAccel::connectItem( " << sAction << ", " << pObjSlot << ", " << psMethodSlot << " )" << endl;
if( bActivate == false )
d->setActionEnabled( sAction, false );
bool b = setSlot( sAction, pObjSlot, psMethodSlot );
@ -595,15 +595,15 @@ bool KAccel::connectItem( const TQString& sAction, const TQObject* pObjSlot, con
return b;
}
bool KAccel::removeItem( const TQString& sAction )
bool TDEAccel::removeItem( const TQString& sAction )
{ return d->removeAction( sAction ); }
bool KAccel::setItemEnabled( const TQString& sAction, bool bEnable )
bool TDEAccel::setItemEnabled( const TQString& sAction, bool bEnable )
{ return setEnabled( sAction, bEnable ); }
void KAccel::changeMenuAccel( TQPopupMenu *menu, int id, const TQString& action )
void TDEAccel::changeMenuAccel( TQPopupMenu *menu, int id, const TQString& action )
{
KAccelAction* pAction = actions().actionPtr( action );
TDEAccelAction* pAction = actions().actionPtr( action );
TQString s = menu->text( id );
if( !pAction || s.isEmpty() )
return;
@ -628,27 +628,27 @@ void KAccel::changeMenuAccel( TQPopupMenu *menu, int id, const TQString& action
menu->changeItem( s, id );
}
void KAccel::changeMenuAccel( TQPopupMenu *menu, int id, KStdAccel::StdAccel accel )
void TDEAccel::changeMenuAccel( TQPopupMenu *menu, int id, TDEStdAccel::StdAccel accel )
{
changeMenuAccel( menu, id, KStdAccel::name( accel ) );
changeMenuAccel( menu, id, TDEStdAccel::name( accel ) );
}
int KAccel::stringToKey( const TQString& sKey )
int TDEAccel::stringToKey( const TQString& sKey )
{
return KKey( sKey ).keyCodeQt();
}
int KAccel::currentKey( const TQString& sAction ) const
int TDEAccel::currentKey( const TQString& sAction ) const
{
KAccelAction* pAction = d->actionPtr( sAction );
TDEAccelAction* pAction = d->actionPtr( sAction );
if( pAction )
return pAction->shortcut().keyCodeQt();
return 0;
}
TQString KAccel::findKey( int key ) const
TQString TDEAccel::findKey( int key ) const
{
KAccelAction* pAction = d->actionPtr( KKey(key) );
TDEAccelAction* pAction = d->actionPtr( KKey(key) );
if( pAction )
return pAction->name();
else
@ -656,7 +656,7 @@ TQString KAccel::findKey( int key ) const
}
#endif // !KDE_NO_COMPAT
void KAccel::virtual_hook( int, void* )
void TDEAccel::virtual_hook( int, void* )
{ /*BASE::virtual_hook( id, data );*/ }
#include "kaccel.moc"

@ -27,11 +27,11 @@
class TQPopupMenu; // for obsolete insertItem() methods below
class TQWidget;
class KAccelAction;
class KAccelActions;
class TDEAccelAction;
class TDEAccelActions;
class TDEConfigBase;
class KAccelPrivate;
class TDEAccelPrivate;
/**
* Handle shortcuts.
*
@ -39,17 +39,17 @@ class KAccelPrivate;
* through application configuration files or through the
* KKeyChooser GUI.
*
* A KAccel contains a list of accelerator actions.
* A TDEAccel contains a list of accelerator actions.
*
* For example, CTRL+Key_P could be a shortcut for printing a document. The key
* codes are listed in tqnamespace.h. "Print" could be the action name for printing.
* The action name identifies the shortcut in configuration files and the
* KKeyChooser GUI.
*
* A KAccel object handles key events sent to its parent widget and to all
* children of this parent widget. The most recently created KAccel object
* has precedence over any KAccel objects created before it.
* When a shortcut pressed, KAccel calls the slot to which it has been
* A TDEAccel object handles key events sent to its parent widget and to all
* children of this parent widget. The most recently created TDEAccel object
* has precedence over any TDEAccel objects created before it.
* When a shortcut pressed, TDEAccel calls the slot to which it has been
* connected. If you want to set global accelerators, independent of the window
* which has the focus, use TDEGlobalAccel.
*
@ -69,14 +69,14 @@ class KAccelPrivate;
* The translated first argument for insertItem() is used only
* in the configuration dialog.
*\code
* KAccel* pAccel = new KAccel( this );
* TDEAccel* pAccel = new TDEAccel( this );
*
* // Insert an action "Scroll Up" which is associated with the "Up" key:
* pAccel->insert( "Scroll Up", i18n("Scroll up"),
* i18n("Scroll up the current document by one line."),
* Qt::Key_Up, this, TQT_SLOT(slotScrollUp()) );
* // Insert an standard acclerator action.
* pAccel->insert( KStdAccel::Print, this, TQT_SLOT(slotPrint()) );
* pAccel->insert( TDEStdAccel::Print, this, TQT_SLOT(slotPrint()) );
*
* // Update the shortcuts by read any user-defined settings from the
* // application's config file.
@ -85,56 +85,56 @@ class KAccelPrivate;
*
* @short Configurable shortcut support for widgets.
* @see TDEGlobalAccel
* @see KAccelShortcutList
* @see TDEAccelShortcutList
* @see KKeyChooser
* @see KKeyDialog
*/
class TDECORE_EXPORT KAccel : public TQAccel
class TDECORE_EXPORT TDEAccel : public TQAccel
{
Q_OBJECT
public:
/**
* Creates a new KAccel that watches @p pParent, which is also
* Creates a new TDEAccel that watches @p pParent, which is also
* the QObject's parent.
*
* @param pParent the parent and widget to watch for key strokes
* @param psName the name of the QObject
*/
KAccel( TQWidget* pParent, const char* psName = 0 );
TDEAccel( TQWidget* pParent, const char* psName = 0 );
/**
* Creates a new KAccel that watches @p watch.
* Creates a new TDEAccel that watches @p watch.
*
* @param watch the widget to watch for key strokes
* @param parent the parent of the QObject
* @param psName the name of the QObject
*/
KAccel( TQWidget* watch, TQObject* parent, const char* psName = 0 );
virtual ~KAccel();
TDEAccel( TQWidget* watch, TQObject* parent, const char* psName = 0 );
virtual ~TDEAccel();
/**
* @internal
* Returns the KAccel's @p KAccelActions, a list of @p KAccelAction.
* @return the KAccelActions of the KAccel
* Returns the TDEAccel's @p TDEAccelActions, a list of @p TDEAccelAction.
* @return the TDEAccelActions of the TDEAccel
*/
KAccelActions& actions();
TDEAccelActions& actions();
/**
* @internal
* Returns the KAccel's @p KAccelActions, a list of @p KAccelAction.
* @return the KAccelActions of the KAccel
* Returns the TDEAccel's @p TDEAccelActions, a list of @p TDEAccelAction.
* @return the TDEAccelActions of the TDEAccel
*/
const KAccelActions& actions() const;
const TDEAccelActions& actions() const;
/**
* Checks whether the KAccel is active.
* Checks whether the TDEAccel is active.
* @return true if the TQAccel is enabled
*/
bool isEnabled();
/**
* Enables or disables the KAccel.
* Enables or disables the TDEAccel.
* @param bEnabled true to enable, false to disable
*/
void setEnabled( bool bEnabled );
@ -172,16 +172,16 @@ class TDECORE_EXPORT KAccel : public TQAccel
* @param bConfigurable Allow the user to change this shortcut if set to 'true'.
* @param bEnabled The action will be activated by the shortcut if set to 'true'.
*/
KAccelAction* insert( const TQString& sAction, const TQString& sLabel, const TQString& sWhatsThis,
const KShortcut& cutDef,
TDEAccelAction* insert( const TQString& sAction, const TQString& sLabel, const TQString& sWhatsThis,
const TDEShortcut& cutDef,
const TQObject* pObjSlot, const char* psMethodSlot,
bool bConfigurable = true, bool bEnabled = true );
/**
* Same as first insert(), but with separate shortcuts defined for
* 3- and 4- modifier defaults.
*/
KAccelAction* insert( const TQString& sAction, const TQString& sLabel, const TQString& sWhatsThis,
const KShortcut& cutDef3, const KShortcut& cutDef4,
TDEAccelAction* insert( const TQString& sAction, const TQString& sLabel, const TQString& sWhatsThis,
const TDEShortcut& cutDef3, const TDEShortcut& cutDef4,
const TQObject* pObjSlot, const char* psMethodSlot,
bool bConfigurable = true, bool bEnabled = true );
/**
@ -201,16 +201,16 @@ class TDECORE_EXPORT KAccel : public TQAccel
* @param bConfigurable Allow the user to change this shortcut if set to 'true'.
* @param bEnabled The action will be activated by the shortcut if set to 'true'.
*/
KAccelAction* insert( const char* psAction, const KShortcut& cutDef,
TDEAccelAction* insert( const char* psAction, const TDEShortcut& cutDef,
const TQObject* pObjSlot, const char* psMethodSlot,
bool bConfigurable = true, bool bEnabled = true );
/**
* Similar to the first insert() method, but with the action
* name, short description, help text, and default shortcuts all
* set according to one of the standard accelerators.
* @see KStdAccel.
* @see TDEStdAccel.
*/
KAccelAction* insert( KStdAccel::StdAccel id,
TDEAccelAction* insert( TDEStdAccel::StdAccel id,
const TQObject* pObjSlot, const char* psMethodSlot,
bool bConfigurable = true, bool bEnabled = true );
@ -237,7 +237,7 @@ class TDECORE_EXPORT KAccel : public TQAccel
* @param sAction the name of the action
* @return the action's shortcut, or a null shortcut if not found
*/
const KShortcut& shortcut( const TQString& sAction ) const;
const TDEShortcut& shortcut( const TQString& sAction ) const;
/**
* Set the shortcut to be associated with the action named by @p sAction.
@ -245,7 +245,7 @@ class TDECORE_EXPORT KAccel : public TQAccel
* @param shortcut the shortcut to set
* @return true if successful, false otherwise
*/
bool setShortcut( const TQString& sAction, const KShortcut &shortcut );
bool setShortcut( const TQString& sAction, const TDEShortcut &shortcut );
/**
* Set the slot to be called when the shortcut of the action named
@ -329,7 +329,7 @@ class TDECORE_EXPORT KAccel : public TQAccel
/**
* @deprecated use insert
*/
bool insertStdItem( KStdAccel::StdAccel id, const TQString& descr = TQString::null ) KDE_DEPRECATED;
bool insertStdItem( TDEStdAccel::StdAccel id, const TQString& descr = TQString::null ) KDE_DEPRECATED;
/**
* @deprecated use insert
*/
@ -338,7 +338,7 @@ class TDECORE_EXPORT KAccel : public TQAccel
* @deprecated use insert( accel, pObjSlot, psMethodSlot );
*
*/
KDE_DEPRECATED bool connectItem( KStdAccel::StdAccel accel, const TQObject* pObjSlot, const char* psMethodSlot )
KDE_DEPRECATED bool connectItem( TDEStdAccel::StdAccel accel, const TQObject* pObjSlot, const char* psMethodSlot )
{ return insert( accel, pObjSlot, psMethodSlot ); }
/**
* @deprecated use remove
@ -355,7 +355,7 @@ class TDECORE_EXPORT KAccel : public TQAccel
/**
* @deprecated see KDE3PORTING.html
*/
void changeMenuAccel( TQPopupMenu *menu, int id, KStdAccel::StdAccel accel ) KDE_DEPRECATED;
void changeMenuAccel( TQPopupMenu *menu, int id, TDEStdAccel::StdAccel accel ) KDE_DEPRECATED;
/**
* @deprecated
*/
@ -383,8 +383,8 @@ class TDECORE_EXPORT KAccel : public TQAccel
/** \internal */
virtual void virtual_hook( int id, void* data );
private:
class KAccelPrivate* d;
friend class KAccelPrivate;
class TDEAccelPrivate* d;
friend class TDEAccelPrivate;
};
#endif // _KACCEL_H

@ -21,7 +21,7 @@
*/
#include "kaccelaction.h"
#include "kaccelbase.h" // for KAccelBase::slotRemoveAction() & emitSignal()
#include "kaccelbase.h" // for TDEAccelBase::slotRemoveAction() & emitSignal()
#include <tqkeycode.h>
@ -34,19 +34,19 @@
#include <kshortcutlist.h>
//---------------------------------------------------------------------
// KAccelAction
// TDEAccelAction
//---------------------------------------------------------------------
class KAccelActionPrivate
class TDEAccelActionPrivate
{
public:
uint m_nConnections;
};
KAccelAction::KAccelAction()
TDEAccelAction::TDEAccelAction()
{
//kdDebug(125) << "KAccelAction(): this = " << this << endl;
d = new KAccelActionPrivate;
//kdDebug(125) << "TDEAccelAction(): this = " << this << endl;
d = new TDEAccelActionPrivate;
m_pObjSlot = 0;
m_psMethodSlot = 0;
m_bConfigurable = true;
@ -55,33 +55,33 @@ KAccelAction::KAccelAction()
d->m_nConnections = 0;
}
KAccelAction::KAccelAction( const KAccelAction& action )
TDEAccelAction::TDEAccelAction( const TDEAccelAction& action )
{
//kdDebug(125) << "KAccelAction( copy from \"" << action.m_sName << "\" ): this = " << this << endl;
d = new KAccelActionPrivate;
//kdDebug(125) << "TDEAccelAction( copy from \"" << action.m_sName << "\" ): this = " << this << endl;
d = new TDEAccelActionPrivate;
*this = action;
}
KAccelAction::KAccelAction( const TQString& sName, const TQString& sLabel, const TQString& sWhatsThis,
const KShortcut& cutDef3, const KShortcut& cutDef4,
TDEAccelAction::TDEAccelAction( const TQString& sName, const TQString& sLabel, const TQString& sWhatsThis,
const TDEShortcut& cutDef3, const TDEShortcut& cutDef4,
const TQObject* pObjSlot, const char* psMethodSlot,
bool bConfigurable, bool bEnabled )
{
//kdDebug(125) << "KAccelAction( \"" << sName << "\" ): this = " << this << endl;
d = new KAccelActionPrivate;
//kdDebug(125) << "TDEAccelAction( \"" << sName << "\" ): this = " << this << endl;
d = new TDEAccelActionPrivate;
init( sName, sLabel, sWhatsThis,
cutDef3, cutDef4,
pObjSlot, psMethodSlot,
bConfigurable, bEnabled );
}
KAccelAction::~KAccelAction()
TDEAccelAction::~TDEAccelAction()
{
//kdDebug(125) << "\t\t\tKAccelAction::~KAccelAction( \"" << m_sName << "\" ): this = " << this << endl;
//kdDebug(125) << "\t\t\tTDEAccelAction::~TDEAccelAction( \"" << m_sName << "\" ): this = " << this << endl;
delete d;
}
void KAccelAction::clear()
void TDEAccelAction::clear()
{
m_cut.clear();
m_pObjSlot = 0;
@ -92,8 +92,8 @@ void KAccelAction::clear()
d->m_nConnections = 0;
}
bool KAccelAction::init( const TQString& sName, const TQString& sLabel, const TQString& sWhatsThis,
const KShortcut& rgCutDefaults3, const KShortcut& rgCutDefaults4,
bool TDEAccelAction::init( const TQString& sName, const TQString& sLabel, const TQString& sWhatsThis,
const TDEShortcut& rgCutDefaults3, const TDEShortcut& rgCutDefaults4,
const TQObject* pObjSlot, const char* psMethodSlot,
bool bConfigurable, bool bEnabled )
{
@ -110,11 +110,11 @@ bool KAccelAction::init( const TQString& sName, const TQString& sLabel, const TQ
m_cut = shortcutDefault();
d->m_nConnections = 0;
if( !m_bEnabled )
kdDebug(125) << "KAccelAction::init( \"" << sName << "\" ): created with enabled = false" << endl;
kdDebug(125) << "TDEAccelAction::init( \"" << sName << "\" ): created with enabled = false" << endl;
return true;
}
KAccelAction& KAccelAction::operator =( const KAccelAction& action )
TDEAccelAction& TDEAccelAction::operator =( const TDEAccelAction& action )
{
m_sName = action.m_sName;
m_sLabel = action.m_sLabel;
@ -132,37 +132,37 @@ KAccelAction& KAccelAction::operator =( const KAccelAction& action )
return *this;
}
void KAccelAction::setName( const TQString& s )
void TDEAccelAction::setName( const TQString& s )
{ m_sName = s; }
void KAccelAction::setLabel( const TQString& s )
void TDEAccelAction::setLabel( const TQString& s )
{ m_sLabel = s; }
void KAccelAction::setWhatsThis( const TQString& s )
void TDEAccelAction::setWhatsThis( const TQString& s )
{ m_sWhatsThis = s; }
bool KAccelAction::setShortcut( const KShortcut& cut )
bool TDEAccelAction::setShortcut( const TDEShortcut& cut )
{
m_cut = cut;
return true;
}
void KAccelAction::setSlot( const TQObject* pObjSlot, const char* psMethodSlot )
void TDEAccelAction::setSlot( const TQObject* pObjSlot, const char* psMethodSlot )
{
m_pObjSlot = pObjSlot;
m_psMethodSlot = psMethodSlot;
}
void KAccelAction::setConfigurable( bool b )
void TDEAccelAction::setConfigurable( bool b )
{ m_bConfigurable = b; }
void KAccelAction::setEnabled( bool b )
void TDEAccelAction::setEnabled( bool b )
{ m_bEnabled = b; }
TQString KAccelAction::toString() const
TQString TDEAccelAction::toString() const
{ return m_cut.toString(); }
TQString KAccelAction::toStringInternal() const
TQString TDEAccelAction::toStringInternal() const
{ return m_cut.toStringInternal( &shortcutDefault() ); }
bool KAccelAction::setKeySequence( uint i, const KKeySequence& seq )
bool TDEAccelAction::setKeySequence( uint i, const KKeySequence& seq )
{
if( i < m_cut.count() ) {
m_cut.setSeq( i, seq );
@ -172,12 +172,12 @@ bool KAccelAction::setKeySequence( uint i, const KKeySequence& seq )
return false;
}
void KAccelAction::clearShortcut()
void TDEAccelAction::clearShortcut()
{
m_cut.clear();
}
bool KAccelAction::contains( const KKeySequence& seq )
bool TDEAccelAction::contains( const KKeySequence& seq )
{
return m_cut.contains( seq );
for( uint i = 0; i < m_cut.count(); i++ ) {
@ -187,90 +187,90 @@ bool KAccelAction::contains( const KKeySequence& seq )
return false;
}
const KShortcut& KAccelAction::shortcutDefault() const
const TDEShortcut& TDEAccelAction::shortcutDefault() const
{ return (useFourModifierKeys()) ? m_cutDefault4 : m_cutDefault3; }
bool KAccelAction::isConnected() const
bool TDEAccelAction::isConnected() const
{ return d->m_nConnections; }
void KAccelAction::incConnections()
void TDEAccelAction::incConnections()
{ d->m_nConnections++; }
void KAccelAction::decConnections()
void TDEAccelAction::decConnections()
{ if( d->m_nConnections > 0 ) d->m_nConnections--; }
// Indicate whether to default to the 3- or 4- modifier keyboard schemes
int KAccelAction::g_bUseFourModifierKeys = -1;
int TDEAccelAction::g_bUseFourModifierKeys = -1;
bool KAccelAction::useFourModifierKeys()
bool TDEAccelAction::useFourModifierKeys()
{
if( KAccelAction::g_bUseFourModifierKeys == -1 ) {
if( TDEAccelAction::g_bUseFourModifierKeys == -1 ) {
// Read in whether to use 4 modifier keys
TDEConfigGroupSaver cgs( TDEGlobal::config(), "Keyboard" );
bool b = TDEGlobal::config()->readBoolEntry( "Use Four Modifier Keys", false );
KAccelAction::g_bUseFourModifierKeys = b && KKeyNative::keyboardHasWinKey();
TDEAccelAction::g_bUseFourModifierKeys = b && KKeyNative::keyboardHasWinKey();
}
return KAccelAction::g_bUseFourModifierKeys == 1;
return TDEAccelAction::g_bUseFourModifierKeys == 1;
}
void KAccelAction::useFourModifierKeys( bool b )
void TDEAccelAction::useFourModifierKeys( bool b )
{
if( KAccelAction::g_bUseFourModifierKeys != (int)b ) {
KAccelAction::g_bUseFourModifierKeys = b && KKeyNative::keyboardHasWinKey();
if( TDEAccelAction::g_bUseFourModifierKeys != (int)b ) {
TDEAccelAction::g_bUseFourModifierKeys = b && KKeyNative::keyboardHasWinKey();
// If we're 'turning off' the meta key or, if we're turning it on,
// the keyboard must actually have a meta key.
if( b && !KKeyNative::keyboardHasWinKey() )
kdDebug(125) << "Tried to use four modifier keys on a keyboard layout without a Meta key.\n";
}
TDEConfigGroupSaver cgs( TDEGlobal::config(), "Keyboard" );
TDEGlobal::config()->writeEntry( "Use Four Modifier Keys", KAccelAction::g_bUseFourModifierKeys, true, true);
TDEGlobal::config()->writeEntry( "Use Four Modifier Keys", TDEAccelAction::g_bUseFourModifierKeys, true, true);
kdDebug(125) << "bUseFourModifierKeys = " << KAccelAction::g_bUseFourModifierKeys << endl;
kdDebug(125) << "bUseFourModifierKeys = " << TDEAccelAction::g_bUseFourModifierKeys << endl;
}
//---------------------------------------------------------------------
// KAccelActions
// TDEAccelActions
//---------------------------------------------------------------------
class KAccelActionsPrivate
class TDEAccelActionsPrivate
{
public:
};
KAccelActions::KAccelActions()
TDEAccelActions::TDEAccelActions()
{
kdDebug(125) << "KAccelActions(): this = " << this << endl;
kdDebug(125) << "TDEAccelActions(): this = " << this << endl;
initPrivate( 0 );
}
KAccelActions::KAccelActions( const KAccelActions& actions )
TDEAccelActions::TDEAccelActions( const TDEAccelActions& actions )
{
kdDebug(125) << "KAccelActions( actions = " << &actions << " ): this = " << this << endl;
kdDebug(125) << "TDEAccelActions( actions = " << &actions << " ): this = " << this << endl;
initPrivate( 0 );
init( actions );
}
KAccelActions::KAccelActions( KAccelBase* pKAccelBase )
TDEAccelActions::TDEAccelActions( TDEAccelBase* pTDEAccelBase )
{
kdDebug(125) << "KAccelActions( KAccelBase = " << pKAccelBase << " ): this = " << this << endl;
initPrivate( pKAccelBase );
kdDebug(125) << "TDEAccelActions( TDEAccelBase = " << pTDEAccelBase << " ): this = " << this << endl;
initPrivate( pTDEAccelBase );
}
KAccelActions::~KAccelActions()
TDEAccelActions::~TDEAccelActions()
{
//kdDebug(125) << "KAccelActions::~KAccelActions(): this = " << this << endl;
//kdDebug(125) << "TDEAccelActions::~TDEAccelActions(): this = " << this << endl;
clear();
//delete d;
}
void KAccelActions::initPrivate( KAccelBase* pKAccelBase )
void TDEAccelActions::initPrivate( TDEAccelBase* pTDEAccelBase )
{
m_pKAccelBase = pKAccelBase;
m_pTDEAccelBase = pTDEAccelBase;
m_nSizeAllocated = m_nSize = 0;
m_prgActions = 0;
//d = new KAccelActionsPrivate;
//d = new TDEAccelActionsPrivate;
}
void KAccelActions::clear()
void TDEAccelActions::clear()
{
kdDebug(125) << "\tKAccelActions::clear()" << endl;
kdDebug(125) << "\tTDEAccelActions::clear()" << endl;
for( uint i = 0; i < m_nSize; i++ )
delete m_prgActions[i];
delete[] m_prgActions;
@ -279,14 +279,14 @@ void KAccelActions::clear()
m_prgActions = 0;
}
bool KAccelActions::init( const KAccelActions& actions )
bool TDEAccelActions::init( const TDEAccelActions& actions )
{
clear();
resize( actions.count() );
for( uint i = 0; i < m_nSize; i++ ) {
KAccelAction* pAction = actions.m_prgActions[i];
TDEAccelAction* pAction = actions.m_prgActions[i];
if( pAction )
m_prgActions[i] = new KAccelAction( *pAction );
m_prgActions[i] = new TDEAccelAction( *pAction );
else
m_prgActions[i] = 0;
}
@ -294,22 +294,22 @@ bool KAccelActions::init( const KAccelActions& actions )
return true;
}
bool KAccelActions::init( TDEConfigBase& config, const TQString& sGroup )
bool TDEAccelActions::init( TDEConfigBase& config, const TQString& sGroup )
{
kdDebug(125) << "KAccelActions::init( " << sGroup << " )" << endl;
kdDebug(125) << "TDEAccelActions::init( " << sGroup << " )" << endl;
TQMap<TQString, TQString> mapEntry = config.entryMap( sGroup );
resize( mapEntry.count() );
TQMap<TQString, TQString>::Iterator it( mapEntry.begin() );
for( uint i = 0; it != mapEntry.end(); ++it, i++ ) {
TQString sShortcuts = *it;
KShortcut cuts;
TDEShortcut cuts;
kdDebug(125) << it.key() << " = " << sShortcuts << endl;
if( !sShortcuts.isEmpty() && sShortcuts != "none" )
cuts.init( sShortcuts );
m_prgActions[i] = new KAccelAction( it.key(), it.key(), it.key(),
m_prgActions[i] = new TDEAccelAction( it.key(), it.key(), it.key(),
cuts, cuts,
0, 0, // pObjSlot, psMethodSlot,
true, false ); // bConfigurable, bEnabled
@ -318,11 +318,11 @@ bool KAccelActions::init( TDEConfigBase& config, const TQString& sGroup )
return true;
}
void KAccelActions::resize( uint nSize )
void TDEAccelActions::resize( uint nSize )
{
if( nSize > m_nSizeAllocated ) {
uint nSizeAllocated = ((nSize/10) + 1) * 10;
KAccelAction** prgActions = new KAccelAction* [nSizeAllocated];
TDEAccelAction** prgActions = new TDEAccelAction* [nSizeAllocated];
// Copy pointers over to new array
for( uint i = 0; i < m_nSizeAllocated; i++ )
@ -340,21 +340,21 @@ void KAccelActions::resize( uint nSize )
m_nSize = nSize;
}
void KAccelActions::insertPtr( KAccelAction* pAction )
void TDEAccelActions::insertPtr( TDEAccelAction* pAction )
{
resize( m_nSize + 1 );
m_prgActions[m_nSize-1] = pAction;
}
void KAccelActions::updateShortcuts( KAccelActions& actions2 )
void TDEAccelActions::updateShortcuts( TDEAccelActions& actions2 )
{
kdDebug(125) << "KAccelActions::updateShortcuts()" << endl;
kdDebug(125) << "TDEAccelActions::updateShortcuts()" << endl;
bool bChanged = false;
for( uint i = 0; i < m_nSize; i++ ) {
KAccelAction* pAction = m_prgActions[i];
TDEAccelAction* pAction = m_prgActions[i];
if( pAction && pAction->m_bConfigurable ) {
KAccelAction* pAction2 = actions2.actionPtr( pAction->m_sName );
TDEAccelAction* pAction2 = actions2.actionPtr( pAction->m_sName );
if( pAction2 ) {
TQString sOld = pAction->m_cut.toStringInternal();
pAction->m_cut = pAction2->m_cut;
@ -371,68 +371,68 @@ void KAccelActions::updateShortcuts( KAccelActions& actions2 )
emitKeycodeChanged();
}
int KAccelActions::actionIndex( const TQString& sAction ) const
int TDEAccelActions::actionIndex( const TQString& sAction ) const
{
for( uint i = 0; i < m_nSize; i++ ) {
if( m_prgActions[i] == 0 )
kdWarning(125) << "KAccelActions::actionPtr( " << sAction << " ): encountered null pointer at m_prgActions[" << i << "]" << endl;
kdWarning(125) << "TDEAccelActions::actionPtr( " << sAction << " ): encountered null pointer at m_prgActions[" << i << "]" << endl;
else if( m_prgActions[i]->m_sName == sAction )
return (int) i;
}
return -1;
}
KAccelAction* KAccelActions::actionPtr( uint i )
TDEAccelAction* TDEAccelActions::actionPtr( uint i )
{
return m_prgActions[i];
}
const KAccelAction* KAccelActions::actionPtr( uint i ) const
const TDEAccelAction* TDEAccelActions::actionPtr( uint i ) const
{
return m_prgActions[i];
}
KAccelAction* KAccelActions::actionPtr( const TQString& sAction )
TDEAccelAction* TDEAccelActions::actionPtr( const TQString& sAction )
{
int i = actionIndex( sAction );
return (i >= 0) ? m_prgActions[i] : 0;
}
const KAccelAction* KAccelActions::actionPtr( const TQString& sAction ) const
const TDEAccelAction* TDEAccelActions::actionPtr( const TQString& sAction ) const
{
int i = actionIndex( sAction );
return (i >= 0) ? m_prgActions[i] : 0;
}
KAccelAction* KAccelActions::actionPtr( KKeySequence cut )
TDEAccelAction* TDEAccelActions::actionPtr( KKeySequence cut )
{
for( uint i = 0; i < m_nSize; i++ ) {
if( m_prgActions[i] == 0 )
kdWarning(125) << "KAccelActions::actionPtr( " << cut.toStringInternal() << " ): encountered null pointer at m_prgActions[" << i << "]" << endl;
kdWarning(125) << "TDEAccelActions::actionPtr( " << cut.toStringInternal() << " ): encountered null pointer at m_prgActions[" << i << "]" << endl;
else if( m_prgActions[i]->contains( cut ) )
return m_prgActions[i];
}
return 0;
}
KAccelAction& KAccelActions::operator []( uint i )
TDEAccelAction& TDEAccelActions::operator []( uint i )
{
return *actionPtr( i );
}
const KAccelAction& KAccelActions::operator []( uint i ) const
const TDEAccelAction& TDEAccelActions::operator []( uint i ) const
{
return *actionPtr( i );
}
KAccelAction* KAccelActions::insert( const TQString& sName, const TQString& sLabel )
TDEAccelAction* TDEAccelActions::insert( const TQString& sName, const TQString& sLabel )
{
if( actionPtr( sName ) ) {
kdWarning(125) << "KAccelActions::insertLabel( " << sName << ", " << sLabel << " ): action with same name already present." << endl;
kdWarning(125) << "TDEAccelActions::insertLabel( " << sName << ", " << sLabel << " ): action with same name already present." << endl;
return 0;
}
KAccelAction* pAction = new KAccelAction;
TDEAccelAction* pAction = new TDEAccelAction;
pAction->m_sName = sName;
pAction->m_sLabel = sLabel;
pAction->m_bConfigurable = false;
@ -442,38 +442,38 @@ KAccelAction* KAccelActions::insert( const TQString& sName, const TQString& sLab
return pAction;
}
KAccelAction* KAccelActions::insert( const TQString& sAction, const TQString& sLabel, const TQString& sWhatsThis,
const KShortcut& rgCutDefaults3, const KShortcut& rgCutDefaults4,
TDEAccelAction* TDEAccelActions::insert( const TQString& sAction, const TQString& sLabel, const TQString& sWhatsThis,
const TDEShortcut& rgCutDefaults3, const TDEShortcut& rgCutDefaults4,
const TQObject* pObjSlot, const char* psMethodSlot,
bool bConfigurable, bool bEnabled )
{
//kdDebug(125) << "KAccelActions::insert()2 begin" << endl;
//kdDebug(125) << "TDEAccelActions::insert()2 begin" << endl;
if( actionPtr( sAction ) ) {
kdWarning(125) << "KAccelActions::insert( " << sAction << " ): action with same name already present." << endl;
kdWarning(125) << "TDEAccelActions::insert( " << sAction << " ): action with same name already present." << endl;
return 0;
}
KAccelAction* pAction = new KAccelAction(
TDEAccelAction* pAction = new TDEAccelAction(
sAction, sLabel, sWhatsThis,
rgCutDefaults3, rgCutDefaults4,
pObjSlot, psMethodSlot,
bConfigurable, bEnabled );
insertPtr( pAction );
//kdDebug(125) << "KAccelActions::insert()2 end" << endl;
//kdDebug(125) << "TDEAccelActions::insert()2 end" << endl;
return pAction;
}
bool KAccelActions::remove( const TQString& sAction )
bool TDEAccelActions::remove( const TQString& sAction )
{
kdDebug(125) << "KAccelActions::remove( \"" << sAction << "\" ): this = " << this << " m_pKAccelBase = " << m_pKAccelBase << endl;
kdDebug(125) << "TDEAccelActions::remove( \"" << sAction << "\" ): this = " << this << " m_pTDEAccelBase = " << m_pTDEAccelBase << endl;
int iAction = actionIndex( sAction );
if( iAction < 0 )
return false;
if( m_pKAccelBase )
m_pKAccelBase->slotRemoveAction( m_prgActions[iAction] );
if( m_pTDEAccelBase )
m_pTDEAccelBase->slotRemoveAction( m_prgActions[iAction] );
delete m_prgActions[iAction];
for( uint i = iAction; i < m_nSize - 1; i++ )
@ -483,39 +483,39 @@ bool KAccelActions::remove( const TQString& sAction )
return true;
}
bool KAccelActions::readActions( const TQString& sConfigGroup, TDEConfigBase* pConfig )
bool TDEAccelActions::readActions( const TQString& sConfigGroup, TDEConfigBase* pConfig )
{
KAccelShortcutList accelList(*this, false);
TDEAccelShortcutList accelList(*this, false);
return accelList.readSettings( sConfigGroup, pConfig );
}
/*
1) KAccelAction = "Something"
1) TDEAccelAction = "Something"
1) KKeySequence = "Meta+X,Asterisk"
1) KAccelSequence = "Meta+X"
1) TDEAccelSequence = "Meta+X"
1) KKeySequence = Meta+X
2) KAccelSequence = "Asterisk"
2) TDEAccelSequence = "Asterisk"
1) KKeySequence = Shift+8 (English layout)
2) KKeySequence = Keypad_Asterisk
2) KKeySequence = "Alt+F2"
1) KAccelSequence = "Alt+F2"
1) TDEAccelSequence = "Alt+F2"
1) KKeySequence = Alt+F2
-> "Something=Meta+X,Asterisk;Alt+F2"
*/
bool KAccelActions::writeActions( const TQString &sGroup, TDEConfigBase* pConfig,
bool TDEAccelActions::writeActions( const TQString &sGroup, TDEConfigBase* pConfig,
bool bWriteAll, bool bGlobal ) const
{
kdDebug(125) << "KAccelActions::writeActions( " << sGroup << ", " << pConfig << ", " << bWriteAll << ", " << bGlobal << " )" << endl;
kdDebug(125) << "TDEAccelActions::writeActions( " << sGroup << ", " << pConfig << ", " << bWriteAll << ", " << bGlobal << " )" << endl;
if( !pConfig )
pConfig = TDEGlobal::config();
TDEConfigGroupSaver cs( pConfig, sGroup );
for( uint i = 0; i < m_nSize; i++ ) {
if( m_prgActions[i] == 0 ) {
kdWarning(125) << "KAccelActions::writeActions(): encountered null pointer at m_prgActions[" << i << "]" << endl;
kdWarning(125) << "TDEAccelActions::writeActions(): encountered null pointer at m_prgActions[" << i << "]" << endl;
continue;
}
const KAccelAction& action = *m_prgActions[i];
const TDEAccelAction& action = *m_prgActions[i];
TQString s;
bool bConfigHasAction = !pConfig->readEntry( action.m_sName ).isEmpty();
@ -555,11 +555,11 @@ bool KAccelActions::writeActions( const TQString &sGroup, TDEConfigBase* pConfig
return true;
}
void KAccelActions::emitKeycodeChanged()
void TDEAccelActions::emitKeycodeChanged()
{
if( m_pKAccelBase )
m_pKAccelBase->emitSignal( KAccelBase::KEYCODE_CHANGED );
if( m_pTDEAccelBase )
m_pTDEAccelBase->emitSignal( TDEAccelBase::KEYCODE_CHANGED );
}
uint KAccelActions::count() const
uint TDEAccelActions::count() const
{ return m_nSize; }

@ -27,7 +27,7 @@
#include <kshortcut.h>
class KAccelBase;
class TDEAccelBase;
class TQObject;
class TDEConfig;
@ -35,27 +35,27 @@ class TDEConfigBase;
/**
* @internal
* A KAccelAction prepresents an action that can be executed using
* an accelerator key. Each KAccelAction has a name, a label, a
* "What's this" string and a KShortcut. The user can configure and
* A TDEAccelAction prepresents an action that can be executed using
* an accelerator key. Each TDEAccelAction has a name, a label, a
* "What's this" string and a TDEShortcut. The user can configure and
* enable/disable them using KKeyDialog.
*
* \code
* 1) KAccelAction = "Run Command"
* 1) TDEAccelAction = "Run Command"
* Default3 = "Alt+F2"
* Default4 = "Meta+Enter;Alt+F2"
* 1) KShortcut = "Meta+Enter"
* 1) TDEShortcut = "Meta+Enter"
* 1) KKeySequence = "Meta+Enter"
* 1) KKey = "Meta+Enter"
* 1) Meta+Enter
* 2) Meta+Keypad_Enter
* 2) KShortcut = "Alt+F2"
* 2) TDEShortcut = "Alt+F2"
* 1) KKeySequence = "Alt+F2"
* 1) Alt+F2
* 2) KAccelAction = "Something"
* 2) TDEAccelAction = "Something"
* Default3 = ""
* Default4 = ""
* 1) KShortcut = "Meta+X,Asterisk"
* 1) TDEShortcut = "Meta+X,Asterisk"
* 1) KKeySequence = "Meta+X,Asterisk"
* 1) KKey = "Meta+X"
* 1) Meta+X
@ -64,27 +64,27 @@ class TDEConfigBase;
* 2) Keypad_Asterisk
* \endcode
* @short An accelerator action
* @see KAccel
* @see TDEAccel
* @see TDEGlobalAccel
* @see KKeyChooser
* @see KKeyDialog
*/
class TDECORE_EXPORT KAccelAction
class TDECORE_EXPORT TDEAccelAction
{
public:
/**
* Creates an empty KAccelAction.
* Creates an empty TDEAccelAction.
* @see clear()
*/
KAccelAction();
TDEAccelAction();
/**
* Copy constructor.
*/
KAccelAction( const KAccelAction& );
TDEAccelAction( const TDEAccelAction& );
/**
* Creates a new KAccelAction.
* Creates a new TDEAccelAction.
* @param sName the name of the accelerator
* @param sLabel the label of the accelerator (i18n!)
* @param sWhatsThis the What's This text (18n!)
@ -97,11 +97,11 @@ class TDECORE_EXPORT KAccelAction
* @param bConfigurable if true the user can configure the shortcut
* @param bEnabled true if the accelerator should be enabled
*/
KAccelAction( const TQString& sName, const TQString& sLabel, const TQString& sWhatsThis,
const KShortcut& cutDef3, const KShortcut& cutDef4,
TDEAccelAction( const TQString& sName, const TQString& sLabel, const TQString& sWhatsThis,
const TDEShortcut& cutDef3, const TDEShortcut& cutDef4,
const TQObject* pObjSlot, const char* psMethodSlot,
bool bConfigurable, bool bEnabled );
~KAccelAction();
~TDEAccelAction();
/**
* Clears the accelerator.
@ -109,7 +109,7 @@ class TDECORE_EXPORT KAccelAction
void clear();
/**
* Re-initialized the KAccelAction.
* Re-initialized the TDEAccelAction.
* @param sName the name of the accelerator
* @param sLabel the label of the accelerator (i18n!)
* @param sWhatsThis the What's This text (18n!)
@ -124,14 +124,14 @@ class TDECORE_EXPORT KAccelAction
* @return true if successful, false otherwise
*/
bool init( const TQString& sName, const TQString& sLabel, const TQString& sWhatsThis,
const KShortcut& cutDef3, const KShortcut& cutDef4,
const TDEShortcut& cutDef3, const TDEShortcut& cutDef4,
const TQObject* pObjSlot, const char* psMethodSlot,
bool bConfigurable, bool bEnabled );
/**
* Copies this KAccelAction.
* Copies this TDEAccelAction.
*/
KAccelAction& operator=( const KAccelAction& );
TDEAccelAction& operator=( const TDEAccelAction& );
/**
* Returns the name of the accelerator action.
@ -156,10 +156,10 @@ class TDECORE_EXPORT KAccelAction
/**
* The shortcut that is actually used (may be used configured).
* @return the shortcut of the KAccelAction, can be null if not set
* @return the shortcut of the TDEAccelAction, can be null if not set
* @see shortcutDefault()
*/
const KShortcut& shortcut() const { return m_cut; }
const TDEShortcut& shortcut() const { return m_cut; }
/**
* The default shortcut for this system.
@ -168,7 +168,7 @@ class TDECORE_EXPORT KAccelAction
* @see shortcutDefault3()
* @see shortcutDefault4()
*/
const KShortcut& shortcutDefault() const;
const TDEShortcut& shortcutDefault() const;
/**
* The default shortcut for 3 modifier systems.
@ -178,7 +178,7 @@ class TDECORE_EXPORT KAccelAction
* @see shortcutDefault4()
* @see useFourModifierKeys()
*/
const KShortcut& shortcutDefault3() const { return m_cutDefault3; }
const TDEShortcut& shortcutDefault3() const { return m_cutDefault3; }
/**
* The default shortcut for 4 modifier systems.
@ -188,7 +188,7 @@ class TDECORE_EXPORT KAccelAction
* @see shortcutDefault3()
* @see useFourModifierKeys()
*/
const KShortcut& shortcutDefault4() const { return m_cutDefault4; }
const TDEShortcut& shortcutDefault4() const { return m_cutDefault4; }
/**
* Returns the receiver of signals.
@ -237,7 +237,7 @@ class TDECORE_EXPORT KAccelAction
* @param rgCuts the shortcut to set
* @return true if successful, false otherwise
*/
bool setShortcut( const KShortcut& rgCuts );
bool setShortcut( const TDEShortcut& rgCuts );
/**
* Sets the slot of the accelerator action.
@ -284,14 +284,14 @@ class TDECORE_EXPORT KAccelAction
* @param i the position of the sequence
* @param keySeq the new new sequence
* @return true if successful, false otherwise
* @see KShortcut::setSeq()
* @see TDEShortcut::setSeq()
*/
bool setKeySequence( uint i, const KKeySequence &keySeq );
/**
* Clears the action's shortcut. It will not contain any sequences after
* calling this method.
* @see KShortcut::clear()
* @see TDEShortcut::clear()
*/
void clearShortcut();
@ -299,14 +299,14 @@ class TDECORE_EXPORT KAccelAction
* Checks whether the action's shortcut contains the given key sequence.
* @param keySeq the key sequence to check
* @return true if the shortcut contains the given sequence
* @see KShortcut::contains()
* @see TDEShortcut::contains()
*/
bool contains( const KKeySequence &keySeq );
/**
* Returns the string representation of the action's shortcut.
* @return the string representation of the action's shortcut.
* @see KShortcut::toString()
* @see TDEShortcut::toString()
*/
TQString toString() const;
@ -332,8 +332,8 @@ class TDECORE_EXPORT KAccelAction
TQString m_sName /**< Name of accel. @sa setName() */,
m_sLabel /**< Label of accel. User-visible. */,
m_sWhatsThis /**< WhatsThis help for accel. User-visible. */;
KShortcut m_cut /**< Shortcut actually assigned. */;
KShortcut m_cutDefault3 /**< Default shortcut in 3-modifier layout */,
TDEShortcut m_cut /**< Shortcut actually assigned. */;
TDEShortcut m_cutDefault3 /**< Default shortcut in 3-modifier layout */,
m_cutDefault4 /**< Default shortcur in 4-modifier layout */;
const TQObject* m_pObjSlot /**< Object we will send signals to. */;
const char* m_psMethodSlot /**< Slot we send signals to, in m_pObjSlot */;
@ -349,36 +349,36 @@ class TDECORE_EXPORT KAccelAction
private:
static int g_bUseFourModifierKeys;
class KAccelActionPrivate* d;
class TDEAccelActionPrivate* d;
friend class KAccelActions;
friend class KAccelBase;
friend class TDEAccelActions;
friend class TDEAccelBase;
};
//---------------------------------------------------------------------
// KAccelActions
// TDEAccelActions
//---------------------------------------------------------------------
/**
* @internal
* This class represents a collection of KAccelAction objects.
* This class represents a collection of TDEAccelAction objects.
*
* @short A collection of accelerator actions
* @see KAccelAction
* @see TDEAccelAction
*/
class TDECORE_EXPORT KAccelActions
class TDECORE_EXPORT TDEAccelActions
{
public:
/**
* Creates a new, empty KAccelActions object.
* Creates a new, empty TDEAccelActions object.
*/
KAccelActions();
TDEAccelActions();
/**
* Copy constructor (deep copy).
*/
KAccelActions( const KAccelActions& );
virtual ~KAccelActions();
TDEAccelActions( const TDEAccelActions& );
virtual ~TDEAccelActions();
/**
* Removes all items from this collection.
@ -391,7 +391,7 @@ class TDECORE_EXPORT KAccelActions
* @param actions the actions to copy
* @return true if successful, false otherwise
*/
bool init( const KAccelActions &actions );
bool init( const TDEAccelActions &actions );
/**
* Loads the actions from the given configuration file.
@ -408,7 +408,7 @@ class TDECORE_EXPORT KAccelActions
* @param shortcuts the collection that contains the new
* shortcuts
*/
void updateShortcuts( KAccelActions &shortcuts );
void updateShortcuts( TDEAccelActions &shortcuts );
/**
* Retrieves the index of the action with the given name.
@ -421,63 +421,63 @@ class TDECORE_EXPORT KAccelActions
* Returns the action with the given @p index.
* @param index the index of an action. You must not
* use an index that is too high.
* @return the KAccelAction with the given index
* @return the TDEAccelAction with the given index
* @see count()
*/
KAccelAction* actionPtr( uint index );
TDEAccelAction* actionPtr( uint index );
/**
* Returns the action with the given @p index.
* @param index the index of an action. You must not
* use an index that is too high.
* @return the KAccelAction with the given index
* @return the TDEAccelAction with the given index
* @see count()
*/
const KAccelAction* actionPtr( uint index ) const;
const TDEAccelAction* actionPtr( uint index ) const;
/**
* Returns the action with the given name.
* @param sAction the name of the action to search
* @return the KAccelAction with the given name, or 0
* @return the TDEAccelAction with the given name, or 0
* if not found
*/
KAccelAction* actionPtr( const TQString& sAction );
TDEAccelAction* actionPtr( const TQString& sAction );
/**
* Returns the action with the given name.
* @param sAction the name of the action to search
* @return the KAccelAction with the given name, or 0
* @return the TDEAccelAction with the given name, or 0
* if not found
*/
const KAccelAction* actionPtr( const TQString& sAction ) const;
const TDEAccelAction* actionPtr( const TQString& sAction ) const;
/**
* Returns the action with the given key sequence.
* @param cut the sequence to search for
* @return the KAccelAction with the given sequence, or 0
* @return the TDEAccelAction with the given sequence, or 0
* if not found
*/
KAccelAction* actionPtr( KKeySequence cut );
TDEAccelAction* actionPtr( KKeySequence cut );
/**
* Returns the action with the given @p index.
* @param index the index of an action. You must not
* use an index that is too high.
* @return the KAccelAction with the given index
* @return the TDEAccelAction with the given index
* @see actionPtr()
* @see count()
*/
KAccelAction& operator []( uint index );
TDEAccelAction& operator []( uint index );
/**
* Returns the action with the given @p index.
* @param index the index of an action. You must not
* use an index that is too high.
* @return the KAccelAction with the given index
* @return the TDEAccelAction with the given index
* @see actionPtr()
* @see count()
*/
const KAccelAction& operator []( uint index ) const;
const TDEAccelAction& operator []( uint index ) const;
/**
* Inserts an action into the collection.
@ -494,8 +494,8 @@ class TDECORE_EXPORT KAccelActions
* @param bEnabled if true the accelerator should be enabled
* @return the new action
*/
KAccelAction* insert( const TQString& sAction, const TQString& sLabel, const TQString& sWhatsThis,
const KShortcut& rgCutDefaults3, const KShortcut& rgCutDefaults4,
TDEAccelAction* insert( const TQString& sAction, const TQString& sLabel, const TQString& sWhatsThis,
const TDEShortcut& rgCutDefaults3, const TDEShortcut& rgCutDefaults4,
const TQObject* pObjSlot = 0, const char* psMethodSlot = 0,
bool bConfigurable = true, bool bEnabled = true );
@ -505,7 +505,7 @@ class TDECORE_EXPORT KAccelActions
* @param sLabel the label of the accelerator (i18n!)
* @return the new action
*/
KAccelAction* insert( const TQString& sName, const TQString& sLabel );
TDEAccelAction* insert( const TQString& sName, const TQString& sLabel );
/**
* Removes the given action.
@ -548,9 +548,9 @@ class TDECORE_EXPORT KAccelActions
protected:
/** Base object that proxies signals from us. */
KAccelBase* m_pKAccelBase;
TDEAccelBase* m_pTDEAccelBase;
/** Array of actions we're hanging on to. */
KAccelAction** m_prgActions;
TDEAccelAction** m_prgActions;
uint m_nSizeAllocated /**< Allocated size of the array. */,
m_nSize /**< Amount in use. */ ;
@ -561,16 +561,16 @@ class TDECORE_EXPORT KAccelActions
*/
void resize( uint new_size );
/** Add a action to this collection. @todo Document ownership. */
void insertPtr( KAccelAction* );
void insertPtr( TDEAccelAction* );
private:
class KAccelActionsPrivate* d;
class TDEAccelActionsPrivate* d;
KAccelActions( KAccelBase* );
void initPrivate( KAccelBase* );
KAccelActions& operator =( KAccelActions& );
TDEAccelActions( TDEAccelBase* );
void initPrivate( TDEAccelBase* );
TDEAccelActions& operator =( TDEAccelActions& );
friend class KAccelBase;
friend class TDEAccelBase;
};
#endif // _KACCELACTION_H

@ -36,17 +36,17 @@
#include "kshortcutmenu.h"
//---------------------------------------------------------------------
// class KAccelBase::ActionInfo
// class TDEAccelBase::ActionInfo
//---------------------------------------------------------------------
//---------------------------------------------------------------------
// class KAccelBase
// class TDEAccelBase
//---------------------------------------------------------------------
KAccelBase::KAccelBase( int fInitCode )
TDEAccelBase::TDEAccelBase( int fInitCode )
: m_rgActions( this )
{
kdDebug(125) << "KAccelBase(): this = " << this << endl;
kdDebug(125) << "TDEAccelBase(): this = " << this << endl;
m_bNativeKeys = fInitCode & NATIVE_KEYS;
m_bEnabled = true;
m_sConfigGroup = "Shortcuts";
@ -55,27 +55,27 @@ KAccelBase::KAccelBase( int fInitCode )
mtemp_pActionRemoving = 0;
}
KAccelBase::~KAccelBase()
TDEAccelBase::~TDEAccelBase()
{
kdDebug(125) << "~KAccelBase(): this = " << this << endl;
kdDebug(125) << "~TDEAccelBase(): this = " << this << endl;
}
uint KAccelBase::actionCount() const { return m_rgActions.count(); }
KAccelActions& KAccelBase::actions() { return m_rgActions; }
bool KAccelBase::isEnabled() const { return m_bEnabled; }
uint TDEAccelBase::actionCount() const { return m_rgActions.count(); }
TDEAccelActions& TDEAccelBase::actions() { return m_rgActions; }
bool TDEAccelBase::isEnabled() const { return m_bEnabled; }
// see TDEGlobalAccel::blockShortcuts() stuff - it's to temporarily block
// all global shortcuts, so that the key grabs are released, but from the app's
// point of view the TDEGlobalAccel is still enabled, so TDEGlobalAccel needs
// to disable key grabbing even if enabled
bool KAccelBase::isEnabledInternal() const { return isEnabled(); }
bool TDEAccelBase::isEnabledInternal() const { return isEnabled(); }
KAccelAction* KAccelBase::actionPtr( const TQString& sAction )
TDEAccelAction* TDEAccelBase::actionPtr( const TQString& sAction )
{ return m_rgActions.actionPtr( sAction ); }
const KAccelAction* KAccelBase::actionPtr( const TQString& sAction ) const
const TDEAccelAction* TDEAccelBase::actionPtr( const TQString& sAction ) const
{ return m_rgActions.actionPtr( sAction ); }
KAccelAction* KAccelBase::actionPtr( const KKeyServer::Key& key )
TDEAccelAction* TDEAccelBase::actionPtr( const KKeyServer::Key& key )
{
if( !m_mapKeyToAction.contains( key ) )
return 0;
@ -83,25 +83,25 @@ KAccelAction* KAccelBase::actionPtr( const KKeyServer::Key& key )
return m_mapKeyToAction[key].pAction;
}
KAccelAction* KAccelBase::actionPtr( const KKey& key )
TDEAccelAction* TDEAccelBase::actionPtr( const KKey& key )
{
KKeyServer::Key k2;
k2.init( key, !m_bNativeKeys );
return actionPtr( k2 );
}
void KAccelBase::setConfigGroup( const TQString& sConfigGroup )
void TDEAccelBase::setConfigGroup( const TQString& sConfigGroup )
{ m_sConfigGroup = sConfigGroup; }
void KAccelBase::setConfigGlobal( bool global )
void TDEAccelBase::setConfigGlobal( bool global )
{ m_bConfigIsGlobal = global; }
bool KAccelBase::setActionEnabled( const TQString& sAction, bool bEnable )
bool TDEAccelBase::setActionEnabled( const TQString& sAction, bool bEnable )
{
KAccelAction* pAction = actionPtr( sAction );
TDEAccelAction* pAction = actionPtr( sAction );
if( pAction ) {
if( pAction->m_bEnabled != bEnable ) {
kdDebug(125) << "KAccelBase::setActionEnabled( " << sAction << ", " << bEnable << " )" << endl;
kdDebug(125) << "TDEAccelBase::setActionEnabled( " << sAction << ", " << bEnable << " )" << endl;
pAction->m_bEnabled = bEnable;
if( m_bAutoUpdate ) {
// FIXME: the action may already have it's connections inserted!
@ -116,9 +116,9 @@ bool KAccelBase::setActionEnabled( const TQString& sAction, bool bEnable )
return false;
}
bool KAccelBase::setAutoUpdate( bool bAuto )
bool TDEAccelBase::setAutoUpdate( bool bAuto )
{
kdDebug(125) << "KAccelBase::setAutoUpdate( " << bAuto << " ): m_bAutoUpdate on entrance = " << m_bAutoUpdate << endl;
kdDebug(125) << "TDEAccelBase::setAutoUpdate( " << bAuto << " ): m_bAutoUpdate on entrance = " << m_bAutoUpdate << endl;
bool b = m_bAutoUpdate;
if( !m_bAutoUpdate && bAuto )
updateConnections();
@ -126,13 +126,13 @@ bool KAccelBase::setAutoUpdate( bool bAuto )
return b;
}
KAccelAction* KAccelBase::insert( const TQString& sAction, const TQString& sDesc, const TQString& sHelp,
const KShortcut& rgCutDefaults3, const KShortcut& rgCutDefaults4,
TDEAccelAction* TDEAccelBase::insert( const TQString& sAction, const TQString& sDesc, const TQString& sHelp,
const TDEShortcut& rgCutDefaults3, const TDEShortcut& rgCutDefaults4,
const TQObject* pObjSlot, const char* psMethodSlot,
bool bConfigurable, bool bEnabled )
{
//kdDebug(125) << "KAccelBase::insert() begin" << endl;
KAccelAction* pAction = m_rgActions.insert(
//kdDebug(125) << "TDEAccelBase::insert() begin" << endl;
TDEAccelAction* pAction = m_rgActions.insert(
sAction, sDesc, sHelp,
rgCutDefaults3, rgCutDefaults4,
pObjSlot, psMethodSlot,
@ -141,27 +141,27 @@ KAccelAction* KAccelBase::insert( const TQString& sAction, const TQString& sDesc
if( pAction && m_bAutoUpdate )
insertConnection( pAction );
//kdDebug(125) << "KAccelBase::insert() end" << endl;
//kdDebug(125) << "TDEAccelBase::insert() end" << endl;
return pAction;
}
KAccelAction* KAccelBase::insert( const TQString& sName, const TQString& sDesc )
TDEAccelAction* TDEAccelBase::insert( const TQString& sName, const TQString& sDesc )
{ return m_rgActions.insert( sName, sDesc ); }
bool KAccelBase::remove( const TQString& sAction )
bool TDEAccelBase::remove( const TQString& sAction )
{
return m_rgActions.remove( sAction );
}
void KAccelBase::slotRemoveAction( KAccelAction* pAction )
void TDEAccelBase::slotRemoveAction( TDEAccelAction* pAction )
{
removeConnection( pAction );
}
bool KAccelBase::setActionSlot( const TQString& sAction, const TQObject* pObjSlot, const char* psMethodSlot )
bool TDEAccelBase::setActionSlot( const TQString& sAction, const TQObject* pObjSlot, const char* psMethodSlot )
{
kdDebug(125) << "KAccelBase::setActionSlot( " << sAction << ", " << pObjSlot << ", " << psMethodSlot << " )\n";
KAccelAction* pAction = m_rgActions.actionPtr( sAction );
kdDebug(125) << "TDEAccelBase::setActionSlot( " << sAction << ", " << pObjSlot << ", " << psMethodSlot << " )\n";
TDEAccelAction* pAction = m_rgActions.actionPtr( sAction );
if( pAction ) {
// If there was a previous connection, remove it.
if( m_bAutoUpdate && pAction->isConnected() ) {
@ -182,24 +182,24 @@ bool KAccelBase::setActionSlot( const TQString& sAction, const TQObject* pObjSlo
}
/*
KAccelBase
TDEAccelBase
Run Command=Meta+Enter;Alt+F2
KAccelAction = "Run Command"
1) KAccelKeySeries = "Meta+Enter"
TDEAccelAction = "Run Command"
1) TDEAccelKeySeries = "Meta+Enter"
1a) Meta+Enter
1b) Meta+Keypad_Enter
2) KAccelKeySeries = "Alt+F2"
2) TDEAccelKeySeries = "Alt+F2"
1a) Alt+F2
Konqueror=Meta+I,I
KAccelAction = "Konqueror"
1) KAccelKeySeries = "Meta+I,I"
TDEAccelAction = "Konqueror"
1) TDEAccelKeySeries = "Meta+I,I"
1a) Meta+I
2a) I
Something=Meta+Asterisk,X
KAccelAction = "Something"
1) KAccelKeySeries = "Meta+Asterisk,X"
TDEAccelAction = "Something"
1) TDEAccelKeySeries = "Meta+Asterisk,X"
1a) Meta+Shift+8
1b) Meta+Keypad_8
2a) X
@ -215,25 +215,25 @@ connect new key sequences
/*
{
For {
for( KAccelAction::iterator itAction = m_rgActions.begin(); itAction != m_rgActions.end(); ++itAction ) {
KAccelAction& action = *itAction;
for( KAccelSeries::iterator itSeries = action.m_rgSeries.begin(); itSeries != action.m_rgSeries.end(); ++itSeries ) {
KAccelSeries& series = *itSeries;
for( TDEAccelAction::iterator itAction = m_rgActions.begin(); itAction != m_rgActions.end(); ++itAction ) {
TDEAccelAction& action = *itAction;
for( TDEAccelSeries::iterator itSeries = action.m_rgSeries.begin(); itSeries != action.m_rgSeries.end(); ++itSeries ) {
TDEAccelSeries& series = *itSeries;
if(
}
}
}
Sort by: iVariation, iSequence, iSeries, iAction
1) KAccelAction = "Run Command"
1) KAccelKeySeries = "Meta+Enter"
1) TDEAccelAction = "Run Command"
1) TDEAccelKeySeries = "Meta+Enter"
1a) Meta+Enter
1b) Meta+Keypad_Enter
2) KAccelKeySeries = "Alt+F2"
2) TDEAccelKeySeries = "Alt+F2"
1a) Alt+F2
2) KAccelAction = "Enter Calculation"
1) KAccelKeySeries = "Meta+Keypad_Enter"
2) TDEAccelAction = "Enter Calculation"
1) TDEAccelKeySeries = "Meta+Keypad_Enter"
1a) Meta+Keypad_Enter
List =
@ -246,7 +246,7 @@ connect new key sequences
*/
#ifdef Q_WS_X11
struct KAccelBase::X
struct TDEAccelBase::X
{
uint iAction, iSeq, iVari;
KKeyServer::Key key;
@ -312,10 +312,10 @@ struct KAccelBase::X
Ctrl+KP_Add => #2
*/
bool KAccelBase::updateConnections()
bool TDEAccelBase::updateConnections()
{
#ifdef Q_WS_X11
kdDebug(125) << "KAccelBase::updateConnections() this = " << this << endl;
kdDebug(125) << "TDEAccelBase::updateConnections() this = " << this << endl;
// Retrieve the list of keys to be connected, sorted by priority.
// (key, variation, seq)
TQValueVector<X> rgKeys;
@ -356,7 +356,7 @@ bool KAccelBase::updateConnections()
if( bNonUnique ) {
// Remove connection to single action if there is one
if( m_mapKeyToAction.contains( key ) ) {
KAccelAction* pAction = m_mapKeyToAction[key].pAction;
TDEAccelAction* pAction = m_mapKeyToAction[key].pAction;
if( pAction ) {
m_mapKeyToAction.remove( key );
disconnectKey( *pAction, key );
@ -376,7 +376,7 @@ bool KAccelBase::updateConnections()
// Disconnect keys which no longer have bindings:
for( KKeyToActionMap::iterator it = m_mapKeyToAction.begin(); it != m_mapKeyToAction.end(); ++it ) {
const KKeyServer::Key& key = it.key();
KAccelAction* pAction = (*it).pAction;
TDEAccelAction* pAction = (*it).pAction;
// If this key is longer used or it points to a different action now,
if( !mapKeyToAction.contains( key ) || mapKeyToAction[key].pAction != pAction ) {
if( pAction ) {
@ -392,7 +392,7 @@ bool KAccelBase::updateConnections()
// new action map, but which are _not_ present in the old one.
for( KKeyToActionMap::iterator it = mapKeyToAction.begin(); it != mapKeyToAction.end(); ++it ) {
const KKeyServer::Key& key = it.key();
KAccelAction* pAction = (*it).pAction;
TDEAccelAction* pAction = (*it).pAction;
if( !m_mapKeyToAction.contains( key ) || m_mapKeyToAction[key].pAction != pAction ) {
// TODO: Decide what to do if connect fails.
// Probably should remove this item from map.
@ -419,16 +419,16 @@ bool KAccelBase::updateConnections()
#ifdef Q_WS_X11
// Construct a list of keys to be connected, sorted highest priority first.
void KAccelBase::createKeyList( TQValueVector<struct X>& rgKeys )
void TDEAccelBase::createKeyList( TQValueVector<struct X>& rgKeys )
{
//kdDebug(125) << "KAccelBase::createKeyList()" << endl;
//kdDebug(125) << "TDEAccelBase::createKeyList()" << endl;
if( !isEnabledInternal())
return;
// create the list
// For each action
for( uint iAction = 0; iAction < m_rgActions.count(); iAction++ ) {
KAccelAction* pAction = m_rgActions.actionPtr( iAction );
TDEAccelAction* pAction = m_rgActions.actionPtr( iAction );
if( pAction && pAction->m_pObjSlot && pAction->m_psMethodSlot && pAction != mtemp_pActionRemoving ) {
// For each key sequence associated with action
for( uint iSeq = 0; iSeq < pAction->shortcut().count(); iSeq++ ) {
@ -453,12 +453,12 @@ void KAccelBase::createKeyList( TQValueVector<struct X>& rgKeys )
}
#endif //Q_WS_X11
bool KAccelBase::insertConnection( KAccelAction* pAction )
bool TDEAccelBase::insertConnection( TDEAccelAction* pAction )
{
if( !pAction->m_pObjSlot || !pAction->m_psMethodSlot )
return true;
kdDebug(125) << "KAccelBase::insertConnection( " << pAction << "=\"" << pAction->m_sName << "\"; shortcut = " << pAction->shortcut().toStringInternal() << " ) this = " << this << endl;
kdDebug(125) << "TDEAccelBase::insertConnection( " << pAction << "=\"" << pAction->m_sName << "\"; shortcut = " << pAction->shortcut().toStringInternal() << " ) this = " << this << endl;
// For each sequence associated with the given action:
for( uint iSeq = 0; iSeq < pAction->shortcut().count(); iSeq++ ) {
@ -502,7 +502,7 @@ bool KAccelBase::insertConnection( KAccelAction* pAction )
}
//kdDebug(125) << "\tActions = " << m_rgActions.size() << endl;
//for( KAccelActions::const_iterator it = m_rgActions.begin(); it != m_rgActions.end(); ++it ) {
//for( TDEAccelActions::const_iterator it = m_rgActions.begin(); it != m_rgActions.end(); ++it ) {
// kdDebug(125) << "\t" << &(*it) << " '" << (*it).m_sName << "'" << endl;
//}
@ -516,9 +516,9 @@ bool KAccelBase::insertConnection( KAccelAction* pAction )
return true;
}
bool KAccelBase::removeConnection( KAccelAction* pAction )
bool TDEAccelBase::removeConnection( TDEAccelAction* pAction )
{
kdDebug(125) << "KAccelBase::removeConnection( " << pAction << " = \"" << pAction->m_sName << "\"; shortcut = " << pAction->m_cut.toStringInternal() << " ): this = " << this << endl;
kdDebug(125) << "TDEAccelBase::removeConnection( " << pAction << " = \"" << pAction->m_sName << "\"; shortcut = " << pAction->m_cut.toStringInternal() << " ): this = " << this << endl;
//for( KKeyToActionMap::iterator it = m_mapKeyToAction.begin(); it != m_mapKeyToAction.end(); ++it )
// kdDebug(125) << "\tKey: " << it.key().toString() << " => '" << (*it)->m_sName << "'" << " " << *it << endl;
@ -548,9 +548,9 @@ bool KAccelBase::removeConnection( KAccelAction* pAction )
return true;
}
bool KAccelBase::setShortcut( const TQString& sAction, const KShortcut& cut )
bool TDEAccelBase::setShortcut( const TQString& sAction, const TDEShortcut& cut )
{
KAccelAction* pAction = actionPtr( sAction );
TDEAccelAction* pAction = actionPtr( sAction );
if( pAction ) {
if( m_bAutoUpdate )
removeConnection( pAction );
@ -564,26 +564,26 @@ bool KAccelBase::setShortcut( const TQString& sAction, const KShortcut& cut )
return false;
}
void KAccelBase::readSettings( TDEConfigBase* pConfig )
void TDEAccelBase::readSettings( TDEConfigBase* pConfig )
{
m_rgActions.readActions( m_sConfigGroup, pConfig );
if( m_bAutoUpdate )
updateConnections();
}
void KAccelBase::writeSettings( TDEConfigBase* pConfig ) const
void TDEAccelBase::writeSettings( TDEConfigBase* pConfig ) const
{
m_rgActions.writeActions( m_sConfigGroup, pConfig, m_bConfigIsGlobal, m_bConfigIsGlobal );
}
TQPopupMenu* KAccelBase::createPopupMenu( TQWidget* pParent, const KKeySequence& seq )
TQPopupMenu* TDEAccelBase::createPopupMenu( TQWidget* pParent, const KKeySequence& seq )
{
KShortcutMenu* pMenu = new KShortcutMenu( pParent, &actions(), seq );
TDEShortcutMenu* pMenu = new TDEShortcutMenu( pParent, &actions(), seq );
bool bActionInserted = false;
bool bInsertSeparator = false;
for( uint i = 0; i < actionCount(); i++ ) {
const KAccelAction* pAction = actions().actionPtr( i );
const TDEAccelAction* pAction = actions().actionPtr( i );
if( !pAction->isEnabled() )
continue;

@ -42,7 +42,7 @@ class TQWidget;
* key bindings through application configuration files or through the
* KKeyChooser GUI.
*
* A KAccel contains a list of accelerator items. Each accelerator item
* A TDEAccel contains a list of accelerator items. Each accelerator item
* consists of an action name and a keyboard code combined with modifiers
* (Shift, Ctrl and Alt.)
*
@ -55,7 +55,7 @@ class TQWidget;
* connected. Accelerator items can be connected so that a key will activate
* two different slots.
*
* A KAccel object handles key events sent to its parent widget and to all
* A TDEAccel object handles key events sent to its parent widget and to all
* children of this parent widget.
*
* Key binding reconfiguration during run time can be prevented by specifying
@ -74,33 +74,33 @@ class TQWidget;
* The translated first argument for insertItem() is used only
* in the configuration dialog.
*\code
* KAccel *a = new KAccel( myWindow );
* TDEAccel *a = new TDEAccel( myWindow );
* // Insert an action "Scroll Up" which is associated with the "Up" key:
* a->insertItem( i18n("Scroll Up"), "Scroll Up", "Up" );
* // Insert an action "Scroll Down" which is not associated with any key:
* a->insertItem( i18n("Scroll Down"), "Scroll Down", 0);
* a->connectItem( "Scroll up", myWindow, TQT_SLOT( scrollUp() ) );
* // a->insertStdItem( KStdAccel::Print ); //not necessary, since it
* // a->insertStdItem( TDEStdAccel::Print ); //not necessary, since it
* // is done automatially with the
* // connect below!
* a->connectItem(KStdAccel::Print, myWindow, TQT_SLOT( printDoc() ) );
* a->connectItem(TDEStdAccel::Print, myWindow, TQT_SLOT( printDoc() ) );
*
* a->readSettings();
*\endcode
*
* If a shortcut has a menu entry as well, you could insert them like
* this. The example is again the KStdAccel::Print from above.
* this. The example is again the TDEStdAccel::Print from above.
*
* \code
* int id;
* id = popup->insertItem("&Print",this, TQT_SLOT(printDoc()));
* a->changeMenuAccel(popup, id, KStdAccel::Print );
* a->changeMenuAccel(popup, id, TDEStdAccel::Print );
* \endcode
*
* If you want a somewhat "exotic" name for your standard print action, like
* id = popup->insertItem(i18n("Print &Document"),this, TQT_SLOT(printDoc()));
* it might be a good idea to insert the standard action before as
* a->insertStdItem( KStdAccel::Print, i18n("Print Document") )
* a->insertStdItem( TDEStdAccel::Print, i18n("Print Document") )
* as well, so that the user can easily find the corresponding function.
*
* This technique works for other actions as well. Your "scroll up" function
@ -118,10 +118,10 @@ class TQWidget;
* @short Configurable key binding support.
*/
class TDECORE_EXPORT KAccelBase
class TDECORE_EXPORT TDEAccelBase
{
public:
/** Initialization mode of the KAccelBase, used in constructor. */
/** Initialization mode of the TDEAccelBase, used in constructor. */
enum Init { QT_KEYS = 0x00, NATIVE_KEYS = 0x01 };
/** Enum for kinds of signals which may be emitted. */
@ -130,32 +130,32 @@ class TDECORE_EXPORT KAccelBase
/** Constructor. @p fInitCode should be a bitwise OR of
* values from the Init enum.
*/
KAccelBase( int fInitCode );
virtual ~KAccelBase();
TDEAccelBase( int fInitCode );
virtual ~TDEAccelBase();
/** Returns number of actions in this handler. */
uint actionCount() const;
/** Returns a list of all the actions in this handler. */
KAccelActions& actions();
TDEAccelActions& actions();
/** Returns whether this accelerator handler is enabled or not. */
bool isEnabled() const;
/** Returns a pointer to the KAccelAction named @p sAction. */
KAccelAction* actionPtr( const TQString& sAction );
/** Returns a pointer to the TDEAccelAction named @p sAction. */
TDEAccelAction* actionPtr( const TQString& sAction );
/** Const version of the above. */
const KAccelAction* actionPtr( const TQString& sAction ) const;
/** Returns a pointer to the KAccelAction associated with
const TDEAccelAction* actionPtr( const TQString& sAction ) const;
/** Returns a pointer to the TDEAccelAction associated with
* the key @p key. This function takes into account the
* key mapping defined in the constructor.
*
* May return 0 if no (or more than one)
* action is associated with the key.
*/
KAccelAction* actionPtr( const KKey& key );
TDEAccelAction* actionPtr( const KKey& key );
/** Basically the same as above, except a KKeyServer::Key
* already has a key mapping defined (either NATIVE_KEYS or not).
*/
KAccelAction* actionPtr( const KKeyServer::Key& key );
TDEAccelAction* actionPtr( const KKeyServer::Key& key );
/** Returns the name of the configuration group these
* accelerators are stored in. The default is "Shortcuts".
@ -181,10 +181,10 @@ class TDECORE_EXPORT KAccelBase
// Procedures for manipulating Actions.
//void clearActions();
KAccelAction* insert( const TQString& sName, const TQString& sDesc );
KAccelAction* insert(
TDEAccelAction* insert( const TQString& sName, const TQString& sDesc );
TDEAccelAction* insert(
const TQString& sAction, const TQString& sDesc, const TQString& sHelp,
const KShortcut& rgCutDefaults3, const KShortcut& rgCutDefaults4,
const TDEShortcut& rgCutDefaults3, const TDEShortcut& rgCutDefaults4,
const TQObject* pObjSlot, const char* psMethodSlot,
bool bConfigurable = true, bool bEnabled = true );
bool remove( const TQString& sAction );
@ -192,7 +192,7 @@ class TDECORE_EXPORT KAccelBase
bool updateConnections();
bool setShortcut( const TQString& sAction, const KShortcut& cut );
bool setShortcut( const TQString& sAction, const TDEShortcut& cut );
// Modify individual Action sub-items
bool setActionEnabled( const TQString& sAction, bool bEnable );
@ -218,7 +218,7 @@ class TDECORE_EXPORT KAccelBase
// Protected methods
protected:
void slotRemoveAction( KAccelAction* );
void slotRemoveAction( TDEAccelAction* );
struct X;
@ -226,8 +226,8 @@ class TDECORE_EXPORT KAccelBase
* @param rgKeys constructed list of keys
*/
void createKeyList( TQValueVector<struct X>& rgKeys );
bool insertConnection( KAccelAction* );
bool removeConnection( KAccelAction* );
bool insertConnection( TDEAccelAction* );
bool removeConnection( TDEAccelAction* );
/** Emits a signal.
* @param signal signal to be emitted
@ -237,14 +237,14 @@ class TDECORE_EXPORT KAccelBase
* @param action action to be executed when key is pressed
* @param key key which causes the action to be executed
*/
virtual bool connectKey( KAccelAction& action, const KKeyServer::Key& key ) = 0;
virtual bool connectKey( TDEAccelAction& action, const KKeyServer::Key& key ) = 0;
/** Defines a key which activates the accelerator
* @param key key which causes the action to be executed
*/
virtual bool connectKey( const KKeyServer::Key& key) = 0;
/** Removes the key from accelerator so it no longer executes the action
*/
virtual bool disconnectKey( KAccelAction&, const KKeyServer::Key& ) = 0;
virtual bool disconnectKey( TDEAccelAction&, const KKeyServer::Key& ) = 0;
/** Removes the key from accelerator
*/
virtual bool disconnectKey( const KKeyServer::Key& ) = 0;
@ -253,30 +253,30 @@ class TDECORE_EXPORT KAccelBase
virtual bool isEnabledInternal() const;
struct ActionInfo
{
KAccelAction* pAction;
TDEAccelAction* pAction;
uint iSeq, iVariation;
//ActionInfo* pInfoNext; // nil if only one action uses this key.
ActionInfo() { pAction = 0; iSeq = 0xffff; iVariation = 0xffff; }
ActionInfo( KAccelAction* _pAction, uint _iSeq, uint _iVariation )
ActionInfo( TDEAccelAction* _pAction, uint _iSeq, uint _iVariation )
{ pAction = _pAction; iSeq = _iSeq; iVariation = _iVariation; }
};
typedef TQMap<KKeyServer::Key, ActionInfo> KKeyToActionMap;
KAccelActions m_rgActions;
TDEAccelActions m_rgActions;
KKeyToActionMap m_mapKeyToAction;
TQValueList<KAccelAction*> m_rgActionsNonUnique;
TQValueList<TDEAccelAction*> m_rgActionsNonUnique;
bool m_bNativeKeys; // Use native key codes instead of Qt codes
bool m_bEnabled;
bool m_bConfigIsGlobal;
TQString m_sConfigGroup;
bool m_bAutoUpdate;
KAccelAction* mtemp_pActionRemoving;
TDEAccelAction* mtemp_pActionRemoving;
private:
KAccelBase& operator =( const KAccelBase& );
TDEAccelBase& operator =( const TDEAccelBase& );
friend class KAccelActions;
friend class TDEAccelActions;
};
#endif // _KACCELBASE_H

@ -63,7 +63,7 @@
/*********************************************************************
class KAcceleratorManagerPrivate - internal helper class
class TDEAcceleratorManagerPrivate - internal helper class
This class does all the work to find accelerators for a hierarchy of
widgets.
@ -71,7 +71,7 @@
*********************************************************************/
class KAcceleratorManagerPrivate
class TDEAcceleratorManagerPrivate
{
public:
@ -79,7 +79,7 @@ public:
static bool programmers_mode;
static bool standardName(const TQString &str);
static bool checkChange(const KAccelString &as) {
static bool checkChange(const TDEAccelString &as) {
TQString t2 = as.accelerated();
TQString t1 = as.originalText();
if (t1 != t2)
@ -125,7 +125,7 @@ private:
void addChild(Item *item);
TQWidget *m_widget;
KAccelString m_content;
TDEAccelString m_content;
ItemList *m_children;
int m_index;
@ -133,28 +133,28 @@ private:
};
bool KAcceleratorManagerPrivate::programmers_mode = false;
TQString KAcceleratorManagerPrivate::changed_string;
TQString KAcceleratorManagerPrivate::added_string;
TQString KAcceleratorManagerPrivate::removed_string;
bool TDEAcceleratorManagerPrivate::programmers_mode = false;
TQString TDEAcceleratorManagerPrivate::changed_string;
TQString TDEAcceleratorManagerPrivate::added_string;
TQString TDEAcceleratorManagerPrivate::removed_string;
static TQStringList *kaccmp_sns = 0;
static KStaticDeleter<TQStringList> kaccmp_sns_d;
TQMap<TQWidget*, int> KAcceleratorManagerPrivate::ignored_widgets;
TQMap<TQWidget*, int> TDEAcceleratorManagerPrivate::ignored_widgets;
bool KAcceleratorManagerPrivate::standardName(const TQString &str)
bool TDEAcceleratorManagerPrivate::standardName(const TQString &str)
{
if (!kaccmp_sns)
kaccmp_sns_d.setObject(kaccmp_sns, new TQStringList(KStdAction::internal_stdNames()));
return kaccmp_sns->contains(str);
}
KAcceleratorManagerPrivate::Item::~Item()
TDEAcceleratorManagerPrivate::Item::~Item()
{
delete m_children;
}
void KAcceleratorManagerPrivate::Item::addChild(Item *item)
void TDEAcceleratorManagerPrivate::Item::addChild(Item *item)
{
if (!m_children) {
m_children = new ItemList;
@ -164,7 +164,7 @@ void KAcceleratorManagerPrivate::Item::addChild(Item *item)
m_children->append(item);
}
void KAcceleratorManagerPrivate::manage(TQWidget *widget)
void TDEAcceleratorManagerPrivate::manage(TQWidget *widget)
{
if (!widget)
{
@ -175,7 +175,7 @@ void KAcceleratorManagerPrivate::manage(TQWidget *widget)
if (dynamic_cast<TQPopupMenu*>(widget))
{
// create a popup accel manager that can deal with dynamic menus
KPopupAccelManager::manage(static_cast<TQPopupMenu*>(widget));
TDEPopupAccelManager::manage(static_cast<TQPopupMenu*>(widget));
return;
}
@ -189,13 +189,13 @@ void KAcceleratorManagerPrivate::manage(TQWidget *widget)
}
void KAcceleratorManagerPrivate::calculateAccelerators(Item *item, TQString &used)
void TDEAcceleratorManagerPrivate::calculateAccelerators(Item *item, TQString &used)
{
if (!item->m_children)
return;
// collect the contents
KAccelStringList contents;
TDEAccelStringList contents;
for (Item *it = item->m_children->first(); it != 0;
it = item->m_children->next())
{
@ -203,7 +203,7 @@ void KAcceleratorManagerPrivate::calculateAccelerators(Item *item, TQString &use
}
// find the right accelerators
KAccelManagerAlgorithm::findAccelerators(contents, used);
TDEAccelManagerAlgorithm::findAccelerators(contents, used);
// write them back into the widgets
int cnt = -1;
@ -261,7 +261,7 @@ void KAcceleratorManagerPrivate::calculateAccelerators(Item *item, TQString &use
}
void KAcceleratorManagerPrivate::traverseChildren(TQWidget *widget, Item *item)
void TDEAcceleratorManagerPrivate::traverseChildren(TQWidget *widget, Item *item)
{
TQObjectList *childList = widget->queryList(TQWIDGET_OBJECT_NAME_STRING, 0, false, false);
for ( TQObject *it = childList->first(); it; it = childList->next() )
@ -271,7 +271,7 @@ void KAcceleratorManagerPrivate::traverseChildren(TQWidget *widget, Item *item)
if ( !w->isVisibleTo( widget ) || ( w->isTopLevel() && dynamic_cast<TQPopupMenu*>(w) == NULL ) )
continue;
if ( KAcceleratorManagerPrivate::ignored_widgets.find( w ) != KAcceleratorManagerPrivate::ignored_widgets.end() )
if ( TDEAcceleratorManagerPrivate::ignored_widgets.find( w ) != TDEAcceleratorManagerPrivate::ignored_widgets.end() )
continue;
manageWidget(w, item);
@ -279,7 +279,7 @@ void KAcceleratorManagerPrivate::traverseChildren(TQWidget *widget, Item *item)
delete childList;
}
void KAcceleratorManagerPrivate::manageWidget(TQWidget *w, Item *item)
void TDEAcceleratorManagerPrivate::manageWidget(TQWidget *w, Item *item)
{
// first treat the special cases
@ -301,7 +301,7 @@ void KAcceleratorManagerPrivate::manageWidget(TQWidget *w, Item *item)
if (popupMenu)
{
// create a popup accel manager that can deal with dynamic menus
KPopupAccelManager::manage(popupMenu);
TDEPopupAccelManager::manage(popupMenu);
return;
}
@ -368,26 +368,26 @@ void KAcceleratorManagerPrivate::manageWidget(TQWidget *w, Item *item)
i->m_widget = w;
// put some more weight on the usual action elements
int weight = KAccelManagerAlgorithm::DEFAULT_WEIGHT;
int weight = TDEAccelManagerAlgorithm::DEFAULT_WEIGHT;
if (dynamic_cast<TQPushButton*>(w) || dynamic_cast<TQCheckBox*>(w) || dynamic_cast<TQRadioButton*>(w) || dynamic_cast<TQLabel*>(w))
weight = KAccelManagerAlgorithm::ACTION_ELEMENT_WEIGHT;
weight = TDEAccelManagerAlgorithm::ACTION_ELEMENT_WEIGHT;
// don't put weight on group boxes, as usually the contents are more important
if (dynamic_cast<TQGroupBox*>(w))
weight = KAccelManagerAlgorithm::GROUP_BOX_WEIGHT;
weight = TDEAccelManagerAlgorithm::GROUP_BOX_WEIGHT;
// put a lot of extra weight on the KDialogBaseButton's
if (w->inherits("KDialogBaseButton"))
weight += KAccelManagerAlgorithm::DIALOG_BUTTON_EXTRA_WEIGHT;
weight += TDEAccelManagerAlgorithm::DIALOG_BUTTON_EXTRA_WEIGHT;
i->m_content = KAccelString(content, weight);
i->m_content = TDEAccelString(content, weight);
item->addChild(i);
}
}
traverseChildren(w, item);
}
void KAcceleratorManagerPrivate::manageTabBar(TQTabBar *bar, Item *item)
void TDEAcceleratorManagerPrivate::manageTabBar(TQTabBar *bar, Item *item)
{
for (int i=0; i<bar->count(); i++)
{
@ -399,11 +399,11 @@ void KAcceleratorManagerPrivate::manageTabBar(TQTabBar *bar, Item *item)
item->addChild(it);
it->m_widget = bar;
it->m_index = i;
it->m_content = KAccelString(content);
it->m_content = TDEAccelString(content);
}
}
void KAcceleratorManagerPrivate::manageMenuBar(TQMenuBar *mbar, Item *item)
void TDEAcceleratorManagerPrivate::manageMenuBar(TQMenuBar *mbar, Item *item)
{
TQMenuItem *mitem;
TQString s;
@ -424,9 +424,9 @@ void KAcceleratorManagerPrivate::manageMenuBar(TQMenuBar *mbar, Item *item)
Item *it = new Item;
item->addChild(it);
it->m_content =
KAccelString(s,
TDEAccelString(s,
// menu titles are important, so raise the weight
KAccelManagerAlgorithm::MENU_TITLE_WEIGHT);
TDEAccelManagerAlgorithm::MENU_TITLE_WEIGHT);
it->m_widget = mbar;
it->m_index = i;
@ -434,49 +434,49 @@ void KAcceleratorManagerPrivate::manageMenuBar(TQMenuBar *mbar, Item *item)
// have a look at the popup as well, if present
if (mitem->popup())
KPopupAccelManager::manage(mitem->popup());
TDEPopupAccelManager::manage(mitem->popup());
}
}
/*********************************************************************
class KAcceleratorManager - main entry point
class TDEAcceleratorManager - main entry point
This class is just here to provide a clean public API...
*********************************************************************/
void KAcceleratorManager::manage(TQWidget *widget)
void TDEAcceleratorManager::manage(TQWidget *widget)
{
KAcceleratorManager::manage(widget, false);
TDEAcceleratorManager::manage(widget, false);
}
void KAcceleratorManager::manage(TQWidget *widget, bool programmers_mode)
void TDEAcceleratorManager::manage(TQWidget *widget, bool programmers_mode)
{
kdDebug(131) << "KAcceleratorManager::manage\n";
KAcceleratorManagerPrivate::changed_string = TQString::null;
KAcceleratorManagerPrivate::added_string = TQString::null;
KAcceleratorManagerPrivate::removed_string = TQString::null;
KAcceleratorManagerPrivate::programmers_mode = programmers_mode;
KAcceleratorManagerPrivate::manage(widget);
kdDebug(131) << "TDEAcceleratorManager::manage\n";
TDEAcceleratorManagerPrivate::changed_string = TQString::null;
TDEAcceleratorManagerPrivate::added_string = TQString::null;
TDEAcceleratorManagerPrivate::removed_string = TQString::null;
TDEAcceleratorManagerPrivate::programmers_mode = programmers_mode;
TDEAcceleratorManagerPrivate::manage(widget);
}
void KAcceleratorManager::last_manage(TQString &added, TQString &changed, TQString &removed)
void TDEAcceleratorManager::last_manage(TQString &added, TQString &changed, TQString &removed)
{
added = KAcceleratorManagerPrivate::added_string;
changed = KAcceleratorManagerPrivate::changed_string;
removed = KAcceleratorManagerPrivate::removed_string;
added = TDEAcceleratorManagerPrivate::added_string;
changed = TDEAcceleratorManagerPrivate::changed_string;
removed = TDEAcceleratorManagerPrivate::removed_string;
}
/*********************************************************************
class KAccelString - a string with weighted characters
class TDEAccelString - a string with weighted characters
*********************************************************************/
KAccelString::KAccelString(const TQString &input, int initialWeight)
TDEAccelString::TDEAccelString(const TQString &input, int initialWeight)
: m_pureText(input), m_weight()
{
m_orig_accel = m_pureText.find("(!)&");
@ -495,7 +495,7 @@ KAccelString::KAccelString(const TQString &input, int initialWeight)
m_orig_accel = m_accel = stripAccelerator(m_pureText);
if (initialWeight == -1)
initialWeight = KAccelManagerAlgorithm::DEFAULT_WEIGHT;
initialWeight = TDEAccelManagerAlgorithm::DEFAULT_WEIGHT;
calculateWeights(initialWeight);
@ -503,13 +503,13 @@ KAccelString::KAccelString(const TQString &input, int initialWeight)
}
TQString KAccelString::accelerated() const
TQString TDEAccelString::accelerated() const
{
TQString result = m_origText;
if (result.isEmpty())
return result;
if (KAcceleratorManagerPrivate::programmers_mode)
if (TDEAcceleratorManagerPrivate::programmers_mode)
{
if (m_accel != m_orig_accel) {
int oa = m_orig_accel;
@ -532,7 +532,7 @@ TQString KAccelString::accelerated() const
}
TQChar KAccelString::accelerator() const
TQChar TDEAccelString::accelerator() const
{
if ((m_accel < 0) || (m_accel > (int)m_pureText.length()))
return TQChar();
@ -541,7 +541,7 @@ TQChar KAccelString::accelerator() const
}
void KAccelString::calculateWeights(int initialWeight)
void TDEAccelString::calculateWeights(int initialWeight)
{
m_weight.resize(m_pureText.length());
@ -556,12 +556,12 @@ void KAccelString::calculateWeights(int initialWeight)
// add special weight to first character
if (pos == 0)
weight += KAccelManagerAlgorithm::FIRST_CHARACTER_EXTRA_WEIGHT;
weight += TDEAccelManagerAlgorithm::FIRST_CHARACTER_EXTRA_WEIGHT;
// add weight to word beginnings
if (start_character)
{
weight += KAccelManagerAlgorithm::WORD_BEGINNING_EXTRA_WEIGHT;
weight += TDEAccelManagerAlgorithm::WORD_BEGINNING_EXTRA_WEIGHT;
start_character = false;
}
@ -571,10 +571,10 @@ void KAccelString::calculateWeights(int initialWeight)
// try to preserve the wanted accelarators
if ((int)pos == accel()) {
weight += KAccelManagerAlgorithm::WANTED_ACCEL_EXTRA_WEIGHT;
// kdDebug(131) << "wanted " << m_pureText << " " << KAcceleratorManagerPrivate::standardName(m_origText) << endl;
if (KAcceleratorManagerPrivate::standardName(m_origText)) {
weight += KAccelManagerAlgorithm::STANDARD_ACCEL;
weight += TDEAccelManagerAlgorithm::WANTED_ACCEL_EXTRA_WEIGHT;
// kdDebug(131) << "wanted " << m_pureText << " " << TDEAcceleratorManagerPrivate::standardName(m_origText) << endl;
if (TDEAcceleratorManagerPrivate::standardName(m_origText)) {
weight += TDEAccelManagerAlgorithm::STANDARD_ACCEL;
}
}
@ -592,7 +592,7 @@ void KAccelString::calculateWeights(int initialWeight)
}
int KAccelString::stripAccelerator(TQString &text)
int TDEAccelString::stripAccelerator(TQString &text)
{
// Note: this code is derived from TQAccel::shortcutKey
int p = 0;
@ -621,7 +621,7 @@ int KAccelString::stripAccelerator(TQString &text)
}
int KAccelString::maxWeight(int &index, const TQString &used)
int TDEAccelString::maxWeight(int &index, const TQString &used)
{
int max = 0;
index = -1;
@ -638,7 +638,7 @@ int KAccelString::maxWeight(int &index, const TQString &used)
}
void KAccelString::dump()
void TDEAccelString::dump()
{
TQString s;
for (uint i=0; i<m_weight.count(); ++i)
@ -680,13 +680,13 @@ void KAccelString::dump()
*********************************************************************/
void KAccelManagerAlgorithm::findAccelerators(KAccelStringList &result, TQString &used)
void TDEAccelManagerAlgorithm::findAccelerators(TDEAccelStringList &result, TQString &used)
{
kdDebug(131) << "findAccelerators\n";
KAccelStringList accel_strings = result;
TDEAccelStringList accel_strings = result;
// initally remove all accelerators
for (KAccelStringList::Iterator it = result.begin(); it != result.end(); ++it) {
for (TDEAccelStringList::Iterator it = result.begin(); it != result.end(); ++it) {
(*it).setAccel(-1);
}
@ -720,18 +720,18 @@ void KAccelManagerAlgorithm::findAccelerators(KAccelStringList &result, TQString
}
// make sure we don't visit this one again
accel_strings[index] = KAccelString();
accel_strings[index] = TDEAccelString();
}
}
/*********************************************************************
class KPopupAccelManager - managing TQPopupMenu widgets dynamically
class TDEPopupAccelManager - managing TQPopupMenu widgets dynamically
*********************************************************************/
KPopupAccelManager::KPopupAccelManager(TQPopupMenu *popup)
TDEPopupAccelManager::TDEPopupAccelManager(TQPopupMenu *popup)
: TQObject(popup), m_popup(popup), m_count(-1)
{
aboutToShow(); // do one check and then connect to show
@ -739,7 +739,7 @@ KPopupAccelManager::KPopupAccelManager(TQPopupMenu *popup)
}
void KPopupAccelManager::aboutToShow()
void TDEPopupAccelManager::aboutToShow()
{
// Note: we try to be smart and avoid recalculating the accelerators
// whenever possible. Unfortunately, there is no way to know if an
@ -754,7 +754,7 @@ void KPopupAccelManager::aboutToShow()
}
else
{
KAccelStringList entries;
TDEAccelStringList entries;
findMenuEntries(entries);
if (entries != m_entries)
{
@ -765,18 +765,18 @@ void KPopupAccelManager::aboutToShow()
}
void KPopupAccelManager::calculateAccelerators()
void TDEPopupAccelManager::calculateAccelerators()
{
// find the new accelerators
TQString used;
KAccelManagerAlgorithm::findAccelerators(m_entries, used);
TDEAccelManagerAlgorithm::findAccelerators(m_entries, used);
// change the menu entries
setMenuEntries(m_entries);
}
void KPopupAccelManager::findMenuEntries(KAccelStringList &list)
void TDEPopupAccelManager::findMenuEntries(TDEAccelStringList &list)
{
TQMenuItem *mitem;
TQString s;
@ -797,16 +797,16 @@ void KPopupAccelManager::findMenuEntries(KAccelStringList &list)
if (s.contains('\t'))
weight = 0;
list.append(KAccelString(s, weight));
list.append(TDEAccelString(s, weight));
// have a look at the popup as well, if present
if (mitem->popup())
KPopupAccelManager::manage(mitem->popup());
TDEPopupAccelManager::manage(mitem->popup());
}
}
void KPopupAccelManager::setMenuEntries(const KAccelStringList &list)
void TDEPopupAccelManager::setMenuEntries(const TDEAccelStringList &list)
{
TQMenuItem *mitem;
@ -817,18 +817,18 @@ void KPopupAccelManager::setMenuEntries(const KAccelStringList &list)
if (mitem->isSeparator())
continue;
if (KAcceleratorManagerPrivate::checkChange(list[cnt]))
if (TDEAcceleratorManagerPrivate::checkChange(list[cnt]))
mitem->setText(list[cnt].accelerated());
cnt++;
}
}
void KPopupAccelManager::manage(TQPopupMenu *popup)
void TDEPopupAccelManager::manage(TQPopupMenu *popup)
{
// don't add more than one manager to a popup
if (popup->child(0, "KPopupAccelManager", false) == 0 )
new KPopupAccelManager(popup);
if (popup->child(0, "TDEPopupAccelManager", false) == 0 )
new TDEPopupAccelManager(popup);
}
void QWidgetStackAccelManager::manage( TQWidgetStack *stack )
@ -847,7 +847,7 @@ QWidgetStackAccelManager::QWidgetStackAccelManager(TQWidgetStack *stack)
bool QWidgetStackAccelManager::eventFilter ( TQObject * watched, TQEvent * e )
{
if ( e->type() == TQEvent::Show && tqApp->activeWindow() ) {
KAcceleratorManager::manage( TQT_TQWIDGET(tqApp->activeWindow()) );
TDEAcceleratorManager::manage( TQT_TQWIDGET(tqApp->activeWindow()) );
watched->removeEventFilter( this );
}
return false;
@ -864,9 +864,9 @@ void QWidgetStackAccelManager::aboutToShow(TQWidget *child)
child->installEventFilter( this );
}
void KAcceleratorManager::setNoAccel( TQWidget *widget )
void TDEAcceleratorManager::setNoAccel( TQWidget *widget )
{
KAcceleratorManagerPrivate::ignored_widgets[widget] = 1;
TDEAcceleratorManagerPrivate::ignored_widgets[widget] = 1;
}
#include "kaccelmanager_private.moc"

@ -37,7 +37,7 @@ class TQString;
* @since 3.1
*/
class TDECORE_EXPORT KAcceleratorManager
class TDECORE_EXPORT TDEAcceleratorManager
{
public:
@ -69,7 +69,7 @@ public:
*
* TODO KDE4: merge with the above
* @param widget The toplevel widget you want to manage.
* @param programmers_mode if true, KAcceleratorManager adds (&) for removed
* @param programmers_mode if true, TDEAcceleratorManager adds (&) for removed
* accels and & before added accels
*/
static void manage(TQWidget *widget, bool programmers_mode);

@ -39,12 +39,12 @@ class TQWidgetStack;
* @author Matthias Hoelzer-Kluepfel <mhk@kde.org>
*/
class KAccelString
class TDEAccelString
{
public:
KAccelString() : m_pureText(), m_accel(-1) {}
KAccelString(const TQString &input, int initalWeight=-1);
TDEAccelString() : m_pureText(), m_accel(-1) {}
TDEAccelString(const TQString &input, int initalWeight=-1);
void calculateWeights(int initialWeight);
@ -61,7 +61,7 @@ public:
int maxWeight(int &index, const TQString &used);
bool operator == (const KAccelString &c) const { return m_pureText == c.m_pureText && m_accel == c.m_accel && m_orig_accel == c.m_orig_accel; }
bool operator == (const TDEAccelString &c) const { return m_pureText == c.m_pureText && m_accel == c.m_accel && m_orig_accel == c.m_orig_accel; }
private:
@ -77,7 +77,7 @@ private:
};
typedef TQValueList<KAccelString> KAccelStringList;
typedef TQValueList<TDEAccelString> TDEAccelStringList;
/**
@ -87,7 +87,7 @@ typedef TQValueList<KAccelString> KAccelStringList;
* @author Matthias Hoelzer-Kluepfel <mhk@kde.org>
*/
class KAccelManagerAlgorithm
class TDEAccelManagerAlgorithm
{
public:
@ -114,7 +114,7 @@ public:
};
/// Method to call to find the best distribution of accelerators.
static void findAccelerators(KAccelStringList &result, TQString &used);
static void findAccelerators(TDEAccelStringList &result, TQString &used);
};
@ -131,7 +131,7 @@ class TQPopupMenu;
* @author Matthias Hoelzer-Kluepfel <mhk@kde.org>