diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-02-01 15:12:07 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-02-01 15:12:07 -0600 |
commit | 3ed7c09d22a5f310a97516f5bab6068e5688a813 (patch) | |
tree | 23ba07d28f7fad17824db1fc40e9cf1ad4942480 /kjsembed | |
parent | 3a8473ba2620b85b165b5a2fa1a6b153f5945800 (diff) | |
download | tdebindings-3ed7c09d22a5f310a97516f5bab6068e5688a813.tar.gz tdebindings-3ed7c09d22a5f310a97516f5bab6068e5688a813.zip |
Rename a number of classes to enhance compatibility with KDE4
Diffstat (limited to 'kjsembed')
39 files changed, 139 insertions, 139 deletions
diff --git a/kjsembed/bindwizard/binding_wizard.ui b/kjsembed/bindwizard/binding_wizard.ui index 9861a3d7..c20455b8 100644 --- a/kjsembed/bindwizard/binding_wizard.ui +++ b/kjsembed/bindwizard/binding_wizard.ui @@ -344,7 +344,7 @@ files of the C++ classes you want to make available to Javascript are located.</ <string>Select &All</string> </property> </widget> - <widget class="KListView" row="1" column="0" rowspan="1" colspan="2"> + <widget class="TDEListView" row="1" column="0" rowspan="1" colspan="2"> <column> <property name="text"> <string>Scriptable</string> @@ -446,7 +446,7 @@ files of the C++ classes you want to make available to Javascript are located.</ <string>The following binding files have been created:</string> </property> </widget> - <widget class="KListView"> + <widget class="TDEListView"> <column> <property name="text"> <string>File Name</string> diff --git a/kjsembed/builtins/stdaction_imp.cpp b/kjsembed/builtins/stdaction_imp.cpp index aa1c43ed..ce471158 100644 --- a/kjsembed/builtins/stdaction_imp.cpp +++ b/kjsembed/builtins/stdaction_imp.cpp @@ -81,13 +81,13 @@ KJS::Value StdActionImp::call( KJS::ExecState *exec, KJS::Object &/*self*/, cons const char *slc = sl.isNull() ? "" : sl.ascii(); TQObject *parentobj = extractTQObject( exec, args, 2 ); - KActionCollection *parent = parentobj ? dynamic_cast<KActionCollection *>( parentobj ) : 0; + TDEActionCollection *parent = parentobj ? dynamic_cast<TDEActionCollection *>( parentobj ) : 0; KStdAction::StdAction actid = static_cast<KStdAction::StdAction>(id); const char *arg3 = (args.size() == 4) ? args[3].toString(exec).ascii() : KStdAction::name( actid ); // Create the object - KAction *act = KStdAction::create( actid, arg3, recv, slc, parent ); + TDEAction *act = KStdAction::create( actid, arg3, recv, slc, parent ); return jsfact->createProxy( exec, act ); } diff --git a/kjsembed/customobject_imp.cpp b/kjsembed/customobject_imp.cpp index 652f3f5b..6d06d774 100644 --- a/kjsembed/customobject_imp.cpp +++ b/kjsembed/customobject_imp.cpp @@ -114,7 +114,7 @@ void CustomObjectImp::addBindings( KJS::ExecState *exec, KJS::Object &object ) } } - KActionCollection *collection = dynamic_cast<KActionCollection*>( qobj ); + TDEActionCollection *collection = dynamic_cast<TDEActionCollection*>( qobj ); if( collection ) proxy->setOwner(JSProxy::Native); #endif // QT_ONLY @@ -163,7 +163,7 @@ void CustomObjectImp::addBindings( KJS::ExecState *exec, KJS::Object &object ) } #ifndef QT_ONLY - KMainWindow *mw = dynamic_cast<KMainWindow *>( widget ); + TDEMainWindow *mw = dynamic_cast<TDEMainWindow *>( widget ); if ( mw ) { obj = new CustomObjectImp( exec, MainWindowSetCentralWidget, proxy ); object.put( exec, "setCentralWidget", KJS::Object(obj) ); @@ -646,9 +646,9 @@ void CustomObjectImp::listViewInsertItem( KJS::ExecState *exec, KJS::Object &, c #ifndef QT_ONLY - KListView *klv = dynamic_cast<KListView *>( proxy->object() ); + TDEListView *klv = dynamic_cast<TDEListView *>( proxy->object() ); if ( klv ) { - KListViewItem *lvm = new KListViewItem(klv); + TDEListViewItem *lvm = new TDEListViewItem(klv); for( int idx = 0; idx < args.size(); ++idx){ TQVariant arg = convertToVariant(exec, args[idx]); @@ -731,7 +731,7 @@ void CustomObjectImp::mainWinSetCentralWidget( KJS::ExecState *exec, TQWidget *cw = cwproxy ? cwproxy->widget() : 0; if ( !cw ) return; - KMainWindow *mw = dynamic_cast<KMainWindow *>( proxy->object() ); + TDEMainWindow *mw = dynamic_cast<TDEMainWindow *>( proxy->object() ); if ( !mw ) return; @@ -752,7 +752,7 @@ void CustomObjectImp::mainWinSetStandardToolBarMenuEnabled( KJS::ExecState *exec if ( args.size() != 1 ) return; - KMainWindow *mw = dynamic_cast<KMainWindow *>( proxy->object() ); + TDEMainWindow *mw = dynamic_cast<TDEMainWindow *>( proxy->object() ); if ( !mw ) return; @@ -769,9 +769,9 @@ void CustomObjectImp::mainWinCreateGUI( KJS::ExecState *exec, KJS::Object &, con { #ifndef QT_ONLY kdDebug(80001) << "mainWinCreateGUI() called" << endl; - KMainWindow *mw = dynamic_cast<KMainWindow *>( proxy->object() ); + TDEMainWindow *mw = dynamic_cast<TDEMainWindow *>( proxy->object() ); if ( !mw ) { - kdWarning() << "mainWinCreateGUI() called on non-KMainWindow" << endl; + kdWarning() << "mainWinCreateGUI() called on non-TDEMainWindow" << endl; return; } @@ -787,9 +787,9 @@ KJS::Value CustomObjectImp::mainWinMenuBar( KJS::ExecState *exec, KJS::Object &, { #ifndef QT_ONLY kdDebug(80001) << "mainWinMenuBar() called" << endl; - KMainWindow *mw = dynamic_cast<KMainWindow *>( proxy->object() ); + TDEMainWindow *mw = dynamic_cast<TDEMainWindow *>( proxy->object() ); if ( !mw ) { - kdWarning() << "mainWinMenuBar() called on non-KMainWindow" << endl; + kdWarning() << "mainWinMenuBar() called on non-TDEMainWindow" << endl; return KJS::Value(); } @@ -806,9 +806,9 @@ KJS::Value CustomObjectImp::mainWinStatusBar( KJS::ExecState *exec, KJS::Object { #ifndef QT_ONLY kdDebug(80001) << "mainWinStatusBar() called" << endl; - KMainWindow *mw = dynamic_cast<KMainWindow *>( proxy->object() ); + TDEMainWindow *mw = dynamic_cast<TDEMainWindow *>( proxy->object() ); if ( !mw ) { - kdWarning() << "mainWinStatusBar() called on non-KMainWindow" << endl; + kdWarning() << "mainWinStatusBar() called on non-TDEMainWindow" << endl; return KJS::Value(); } @@ -830,7 +830,7 @@ KJS::Value CustomObjectImp::xmlguiClientActionCollection( KJS::ExecState *exec, return KJS::Value(); } - KActionCollection *ac = gc->actionCollection(); + TDEActionCollection *ac = gc->actionCollection(); if (!ac) { kdDebug(80001) << "XMLGUIClient action collection is null" << endl; return KJS::Null(); @@ -1141,7 +1141,7 @@ KJS::Value CustomObjectImp::ksystemtrayContextMenu( KJS::ExecState *exec, KJS::O return KJS::Boolean(false); } kdDebug() << "Valid system tray?" << endl; - KPopupMenu *pop = st->contextMenu(); + TDEPopupMenu *pop = st->contextMenu(); return proxy->part()->factory()->createProxy( exec, pop, proxy ); #endif // QT_ONLY return KJS::Null(); @@ -1154,7 +1154,7 @@ KJS::Value CustomObjectImp::ksystemtrayActionCollection( KJS::ExecState *exec, K if ( !st ) return KJS::Value(); - KActionCollection *ac = st->actionCollection(); + TDEActionCollection *ac = st->actionCollection(); return proxy->part()->factory()->createProxy( exec, ac, proxy ); #endif // QT_ONLY return KJS::Null(); diff --git a/kjsembed/docs/ChangeLog b/kjsembed/docs/ChangeLog index 3169a625..c95e6d0c 100644 --- a/kjsembed/docs/ChangeLog +++ b/kjsembed/docs/ChangeLog @@ -50,7 +50,7 @@ 2004-12-10 Friday 13:10 geiseri - Make sure the KActionCollection is native, it seems that + Make sure the TDEActionCollection is native, it seems that it has no parent so the GC will happily collect it. 2004-12-10 Friday 13:09 geiseri @@ -1447,9 +1447,9 @@ It's not nice, for each proxy implementation one TQGuardedPtr. :( I hope Qt's next generation smart pointer will be more lightweight. Why a qguardedptr? If you do the following in kjscmd it would crash without guardedptr - var k=new KMainWindow(); + var k=new TDEMainWindow(); k.show(); - var k1=new KMainWindow(); + var k1=new TDEMainWindow(); k1.show8); ---> close k1 with the mouse k1.hide(); or k1.show(); @@ -2410,7 +2410,7 @@ 2003-11-16 Sunday 02:23 geiseri - yay we can now populate a KListView from an SQL query... maby we need to put in a better demo app ;) + yay we can now populate a TDEListView from an SQL query... maby we need to put in a better demo app ;) 2003-11-16 Sunday 02:04 geiseri @@ -2892,7 +2892,7 @@ - Added a new example that creates a complete KDE mainwindow with all the standard menus and toolbar using the KStdAction bindings and XMLGUI. This - example also shows how you can wire a KAction to a JS function using the + example also shows how you can wire a TDEAction to a JS function using the slot support by adding proper support for the file open action. 2003-09-18 Thursday 18:36 mueller @@ -3038,7 +3038,7 @@ globalX() globalY() - - Fixed some of the KMainWindow method bindings which were totally + - Fixed some of the TDEMainWindow method bindings which were totally broken. These bugs explain why a number of things I was trying to write never worked. @@ -3107,7 +3107,7 @@ - Added support for creating TQScrollView and TQCanvasView widgets. - - Added support for KMainWindow::createGUI(). + - Added support for TDEMainWindow::createGUI(). 2003-08-27 Wednesday 18:37 rich @@ -3215,7 +3215,7 @@ drawRoundRect(). - - Added a new example that illustrates support for KListView. + - Added a new example that illustrates support for TDEListView. - JSValueProxy instances that contain a TQVariant can now be converted back to TQVariant. @@ -3442,9 +3442,9 @@ 2003-08-12 Tuesday 16:24 rich - - Factory can now create KMainWindow. + - Factory can now create TDEMainWindow. - - Added binding methods to KMainWindow. + - Added binding methods to TDEMainWindow. - setCentralWidget() - actionCollection() @@ -3619,9 +3619,9 @@ added are: TQListBox::addItem() - KListView::addColumn() + TDEListView::addColumn() TQListView::addColumn() - KListView::insertItem() + TDEListView::insertItem() TQListView::insertItem() - Started writing a new example that provides a documentation browser @@ -3985,7 +3985,7 @@ - Renamed JSObjectProxy::jscript() to interpreter() (for consistency). - - KJSCmd can now create a KMainWindow (dunno how useful this is + - KJSCmd can now create a TDEMainWindow (dunno how useful this is without the other additions I'm planning though). 2003-01-31 Friday 22:19 rich @@ -4094,8 +4094,8 @@ KActiveLabel, KCharSelect, KColorButton, KColorCombo, KComboBox, TDECModule, KDateWidget, KDatePicker, KDialog, - KDualColorButton, KEditListBox, KFontCombo, KGradientSelector, - KHistoryCombo, KHSSelector, KLed, KListBox, KListView, + KDualColorButton, KEditListBox, TDEFontCombo, KGradientSelector, + KHistoryCombo, KHSSelector, KLed, TDEListBox, TDEListView, KLineEdit, KPasswordEdit, KProgress, KPushButton, KRestrictedLine, KIconButton, KIntSpinBox, KRuler, KSqueezedTextLabel, KTextBrowser, KTextEdit, @@ -4187,15 +4187,15 @@ - Extended factory class to create the following types: - Any TQWidget sub-class - - KAction - - KToggleAction + - TDEAction + - TDEToggleAction - Added a command line tool for invoking js scripts - Improved JSObjectProxy Massively - Create child widgets from a script - - Create KActions and KToggleActions from a script + - Create TDEActions and TDEToggleActions from a script - Call slots from scripts - Added support for additional property types diff --git a/kjsembed/docs/build-docs.sh b/kjsembed/docs/build-docs.sh index 3384b0a6..2198a82b 100755 --- a/kjsembed/docs/build-docs.sh +++ b/kjsembed/docs/build-docs.sh @@ -57,8 +57,8 @@ OBJECTS="" OBJECTS="$OBJECTS KActiveLabel KCharSelect KColorButton KColorCombo" OBJECTS="$OBJECTS KComboBox TDECModule KDateWidget KDatePicker KDialog" -OBJECTS="$OBJECTS KDualColorButton KEditListBox KFontCombo KGradientSelector" -OBJECTS="$OBJECTS KHistoryCombo KHSSelector KLed KListBox KListView" +OBJECTS="$OBJECTS KDualColorButton KEditListBox TDEFontCombo KGradientSelector" +OBJECTS="$OBJECTS KHistoryCombo KHSSelector KLed TDEListBox TDEListView" OBJECTS="$OBJECTS KLineEdit KPasswordEdit KProgress KPushButton" OBJECTS="$OBJECTS KRestrictedLine KIconButton KIntSpinBox KRuler" OBJECTS="$OBJECTS KSqueezedTextLabel KTextBrowser KTextEdit" @@ -75,7 +75,7 @@ done OBJECTS="$OBJECTS TQSplitter" OBJECTS="$OBJECTS TQObject TQTimer" -OBJECTS="$OBJECTS KMainWindow KAction KToggleAction" +OBJECTS="$OBJECTS TDEMainWindow TDEAction TDEToggleAction" for OBJ in $OBJECTS ; do diff --git a/kjsembed/docs/examples/README b/kjsembed/docs/examples/README index 2156b57d..e72bd0bd 100644 --- a/kjsembed/docs/examples/README +++ b/kjsembed/docs/examples/README @@ -45,10 +45,10 @@ connect-cpp Connects a signal to slot. connect Connects signals of various types to JS methods. imageviewer Illustrates the use of TQPixmap values. netaccess Illustrates the bindings to TDEIO::NetAccess. -listview Creates a simple KListView. +listview Creates a simple TDEListView. frame Shows off TQFrame support and the use of enums. timer Creates a flashing LED using TQTimer. -Actions A simple KAction demo. +Actions A simple TDEAction demo. Built-In Messages Demonstrates the built-in message dialogs. Image Tweak Tweaking images. Image Fun More fun with images diff --git a/kjsembed/docs/examples/actions/simple-actions.js b/kjsembed/docs/examples/actions/simple-actions.js index 121c9d15..63fcd83d 100644 --- a/kjsembed/docs/examples/actions/simple-actions.js +++ b/kjsembed/docs/examples/actions/simple-actions.js @@ -1,6 +1,6 @@ #!/usr/bin/env kjscmd -var mw = new KMainWindow(); +var mw = new TDEMainWindow(); var view = new KTextEdit(mw); mw.setCentralWidget( view ); diff --git a/kjsembed/docs/examples/buttonmaker/ButtonMakerUI.ui b/kjsembed/docs/examples/buttonmaker/ButtonMakerUI.ui index 60339d6a..f11b08ee 100644 --- a/kjsembed/docs/examples/buttonmaker/ButtonMakerUI.ui +++ b/kjsembed/docs/examples/buttonmaker/ButtonMakerUI.ui @@ -384,7 +384,7 @@ <cstring>font</cstring> </property> </widget> - <widget class="KFontRequester"> + <widget class="TDEFontRequester"> <property name="name"> <cstring>Font</cstring> </property> diff --git a/kjsembed/docs/examples/buttonmaker/buttonmaker.js b/kjsembed/docs/examples/buttonmaker/buttonmaker.js index 8cb82ba3..995fb95e 100755 --- a/kjsembed/docs/examples/buttonmaker/buttonmaker.js +++ b/kjsembed/docs/examples/buttonmaker/buttonmaker.js @@ -3,7 +3,7 @@ StdDirs.addResourceType("buttonmaker", StdDirs.kde_default("data") + "/buttonmaker"); var imgfx = new ImageFX(); -var win = new KMainWindow(this); +var win = new TDEMainWindow(this); try { //var view = Factory.loadui(StdDirs.findResource("buttonmaker", "ButtonMakerUI.ui"), this, win); diff --git a/kjsembed/docs/examples/dcop/rss.js b/kjsembed/docs/examples/dcop/rss.js index 7ec9f2eb..f42e7915 100755 --- a/kjsembed/docs/examples/dcop/rss.js +++ b/kjsembed/docs/examples/dcop/rss.js @@ -6,7 +6,7 @@ function newArticles( articles ) var box = new TQVBox(main); var count = articles.call("count()"); var label = new TQLabel(box); - var list = new KListBox(box); + var list = new TDEListBox(box); label.text = count + " articles for " + articles.call("title()"); diff --git a/kjsembed/docs/examples/docviewer/docviewer.js b/kjsembed/docs/examples/docviewer/docviewer.js index bf80121a..46184444 100644 --- a/kjsembed/docs/examples/docviewer/docviewer.js +++ b/kjsembed/docs/examples/docviewer/docviewer.js @@ -29,7 +29,7 @@ function setup_sidebar( builtins, special, qt, kde, all ) // // Create the UI -var mw = new KMainWindow(this); +var mw = new TDEMainWindow(this); var ac = mw.actionCollection(); var split = new TQSplitter( mw ); @@ -138,7 +138,7 @@ view.setup = function() } // Setup the sidebar -builtinside = new KListView( side, 'builtinside' ); +builtinside = new TDEListView( side, 'builtinside' ); builtinside.addColumn( 'Class' ); builtinside.resizeMode = 2; // LastColumn @@ -148,7 +148,7 @@ builtinside.changed = function() view.set_class( item.text(0) ); } -specialside = new KListView( side, 'specialsidebar' ); +specialside = new TDEListView( side, 'specialsidebar' ); specialside.addColumn( 'Class' ); specialside.resizeMode = 2; // LastColumn @@ -158,7 +158,7 @@ specialside.changed = function() view.set_class( item.text(0) ); } -qtside = new KListView( side, 'qtsidebar' ); +qtside = new TDEListView( side, 'qtsidebar' ); qtside.addColumn( 'Class' ); qtside.resizeMode = 2; // LastColumn @@ -168,7 +168,7 @@ qtside.changed = function() view.set_class( item.text(0) ); } -kdeside = new KListView( side, 'kdesidebar' ); +kdeside = new TDEListView( side, 'kdesidebar' ); kdeside.addColumn( 'Class' ); kdeside.resizeMode = 2; // LastColumn @@ -178,7 +178,7 @@ kdeside.changed = function() view.set_class( item.text(0) ); } -allside = new KListView( side, 'allsidebar' ); +allside = new TDEListView( side, 'allsidebar' ); allside.addColumn( 'Class' ); allside.resizeMode = 2; // LastColumn diff --git a/kjsembed/docs/examples/docviewer/docviewer.ui b/kjsembed/docs/examples/docviewer/docviewer.ui index 3ccf0d02..f27e3559 100644 --- a/kjsembed/docs/examples/docviewer/docviewer.ui +++ b/kjsembed/docs/examples/docviewer/docviewer.ui @@ -46,7 +46,7 @@ <string>Object types:</string> </property> </widget> - <widget class="KListBox" row="2" column="0" rowspan="1" colspan="2"> + <widget class="TDEListBox" row="2" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>toc_view</cstring> </property> diff --git a/kjsembed/docs/examples/envelopemaker/EnvelopeMakerUI.ui b/kjsembed/docs/examples/envelopemaker/EnvelopeMakerUI.ui index c9830b55..5a63fc94 100644 --- a/kjsembed/docs/examples/envelopemaker/EnvelopeMakerUI.ui +++ b/kjsembed/docs/examples/envelopemaker/EnvelopeMakerUI.ui @@ -487,7 +487,7 @@ </widget> </vbox> </widget> - <widget class="KFontRequester"> + <widget class="TDEFontRequester"> <property name="name"> <cstring>font</cstring> </property> diff --git a/kjsembed/docs/examples/envelopemaker/env.js b/kjsembed/docs/examples/envelopemaker/env.js index 8e71a6ca..91e30216 100755 --- a/kjsembed/docs/examples/envelopemaker/env.js +++ b/kjsembed/docs/examples/envelopemaker/env.js @@ -2,7 +2,7 @@ StdDirs.addResourceType("envelopemaker", StdDirs.kde_default("data") + "/envelopemaker"); -var win = new KMainWindow(this); +var win = new TDEMainWindow(this); var view = Factory.loadui(StdDirs.findResource("envelopemaker", "EnvelopeMakerUI.ui"), this, win); //var view = Factory.loadui("EnvelopeMakerUI.ui", this, win); var Print = view.child('print'); diff --git a/kjsembed/docs/examples/html2text/html2text_plugin.xml b/kjsembed/docs/examples/html2text/html2text_plugin.xml index 634b88cd..9cae1f9a 100644 --- a/kjsembed/docs/examples/html2text/html2text_plugin.xml +++ b/kjsembed/docs/examples/html2text/html2text_plugin.xml @@ -7,7 +7,7 @@ </header> <action> <name>html_to_text</name> - <type>KAction</type> + <type>TDEAction</type> <icons>text</icons> <label><text>Convert HTML To Text</text></label> <statustext>Converts the selected text from HTML to text.</statustext> @@ -15,7 +15,7 @@ </action> <action> <name>text_to_html</name> - <type>KAction</type> + <type>TDEAction</type> <icons>html</icons> <label><text>Quote For HTML</text></label> <statustext>Quotes the selected text for inclusion in an HTML document.</statustext> diff --git a/kjsembed/docs/examples/html2text/test.htm b/kjsembed/docs/examples/html2text/test.htm index 1639b375..129032e1 100644 --- a/kjsembed/docs/examples/html2text/test.htm +++ b/kjsembed/docs/examples/html2text/test.htm @@ -49,7 +49,7 @@ pre { <li>Console dialog that can be used to execute Javascript interactively.</li> <li>Command line tool for running scripts (this can even operate without an X server if you don't need to display a GUI).</li> - <li>Define new KActions using XML.</li> + <li>Define new TDEActions using XML.</li> <li>Scripts can access the properties and slots of TQObjects as if they were normal Javascript properties and methods.</li> <li>Scripts can load dialogs and widgets created with Qt Designer.</li> @@ -180,7 +180,7 @@ function text2html( text ) } </pre> <p>The details...</p> -<pre>&lt;!DOCTYPE actionset&gt;<br>&lt;actionset&gt;<br>&lt;header&gt;<br> &lt;name&gt;html2text_actions&lt;/name&gt;<br> &lt;label&gt;HTML To Text Actions&lt;/label&gt;<br> &lt;script type=&quot;js&quot; src=&quot;html2text_plugin.js&quot;&gt;&lt;/script&gt;<br>&lt;/header&gt;<br>&lt;action&gt;<br> &lt;name&gt;html_to_text&lt;/name&gt;<br> &lt;type&gt;KAction&lt;/type&gt;<br> &lt;icons&gt;text&lt;/icons&gt;<br> &lt;label&gt;&lt;text&gt;Convert HTML To Text&lt;/text&gt;&lt;/label&gt;<br> &lt;statustext&gt;Converts the selected text from HTML to text.&lt;/statustext&gt;<br> &lt;script type=&quot;js&quot;&gt;kpart.selectedText = html2text( kpart.selectedText )&lt;/script&gt;<br>&lt;/action&gt;<br>&lt;action&gt;<br> &lt;name&gt;text_to_html&lt;/name&gt;<br> &lt;type&gt;KAction&lt;/type&gt;<br> &lt;icons&gt;html&lt;/icons&gt;<br> &lt;label&gt;&lt;text&gt;Quote For HTML&lt;/text&gt;&lt;/label&gt;<br> &lt;statustext&gt;Quotes the selected text for inclusion in an HTML document.&lt;/statustext&gt;<br> &lt;script type=&quot;js&quot;&gt;kpart.selectedText = text2html( kpart.selectedText )&lt;/script&gt;<br>&lt;/action&gt;<br>&lt;/actionset&gt;<br></pre> +<pre>&lt;!DOCTYPE actionset&gt;<br>&lt;actionset&gt;<br>&lt;header&gt;<br> &lt;name&gt;html2text_actions&lt;/name&gt;<br> &lt;label&gt;HTML To Text Actions&lt;/label&gt;<br> &lt;script type=&quot;js&quot; src=&quot;html2text_plugin.js&quot;&gt;&lt;/script&gt;<br>&lt;/header&gt;<br>&lt;action&gt;<br> &lt;name&gt;html_to_text&lt;/name&gt;<br> &lt;type&gt;TDEAction&lt;/type&gt;<br> &lt;icons&gt;text&lt;/icons&gt;<br> &lt;label&gt;&lt;text&gt;Convert HTML To Text&lt;/text&gt;&lt;/label&gt;<br> &lt;statustext&gt;Converts the selected text from HTML to text.&lt;/statustext&gt;<br> &lt;script type=&quot;js&quot;&gt;kpart.selectedText = html2text( kpart.selectedText )&lt;/script&gt;<br>&lt;/action&gt;<br>&lt;action&gt;<br> &lt;name&gt;text_to_html&lt;/name&gt;<br> &lt;type&gt;TDEAction&lt;/type&gt;<br> &lt;icons&gt;html&lt;/icons&gt;<br> &lt;label&gt;&lt;text&gt;Quote For HTML&lt;/text&gt;&lt;/label&gt;<br> &lt;statustext&gt;Quotes the selected text for inclusion in an HTML document.&lt;/statustext&gt;<br> &lt;script type=&quot;js&quot;&gt;kpart.selectedText = text2html( kpart.selectedText )&lt;/script&gt;<br>&lt;/action&gt;<br>&lt;/actionset&gt;<br></pre> <p><br> The xmlgui:</p> <pre> diff --git a/kjsembed/docs/examples/imagetweak/imagetweak.js b/kjsembed/docs/examples/imagetweak/imagetweak.js index ea1d0944..65238874 100755 --- a/kjsembed/docs/examples/imagetweak/imagetweak.js +++ b/kjsembed/docs/examples/imagetweak/imagetweak.js @@ -7,7 +7,7 @@ if ( application.args.length == 0 ) { // // Setup main window // -var mw = new KMainWindow(); +var mw = new TDEMainWindow(); var view = new TQScrollView( mw, 'view' ); mw.setCentralWidget( view ); diff --git a/kjsembed/docs/examples/imunge/effectbrowser.ui b/kjsembed/docs/examples/imunge/effectbrowser.ui index d088d18e..10eb2d79 100644 --- a/kjsembed/docs/examples/imunge/effectbrowser.ui +++ b/kjsembed/docs/examples/imunge/effectbrowser.ui @@ -85,7 +85,7 @@ <set>AlignVCenter</set> </property> </widget> - <widget class="KListView" row="2" column="0" rowspan="2" colspan="1"> + <widget class="TDEListView" row="2" column="0" rowspan="2" colspan="1"> <column> <property name="text"> <string>Effect Name</string> diff --git a/kjsembed/docs/examples/imunge/imunge.js b/kjsembed/docs/examples/imunge/imunge.js index 137cb272..96924670 100755 --- a/kjsembed/docs/examples/imunge/imunge.js +++ b/kjsembed/docs/examples/imunge/imunge.js @@ -3,7 +3,7 @@ // // Setup main window // -mw = new KMainWindow(); +mw = new TDEMainWindow(); ac = mw.actionCollection(); mb = mw.menuBar(); sb = mw.statusBar(); @@ -162,12 +162,12 @@ mw.setup_actions = function() saveas_action = StdAction.saveAs( null, '', ac ); saveas_action.connect( saveas_action, 'activated()', this, 'saveFileAs' ); - savecopyas_action = new KAction( ac, 'save_copy_as_action' ); + savecopyas_action = new TDEAction( ac, 'save_copy_as_action' ); savecopyas_action.text = 'Save Copy As...'; savecopyas_action.icon = 'filesaveas'; savecopyas_action.connect( savecopyas_action, 'activated()', this, 'saveCopyAs' ); - fileproperties_action = new KAction( ac, 'file_properties_action' ); + fileproperties_action = new TDEAction( ac, 'file_properties_action' ); fileproperties_action.text = 'Properties...'; fileproperties_action.connect( fileproperties_action, 'activated()', this, 'fileProperties' ); @@ -186,7 +186,7 @@ mw.setup_actions = function() // StdAction.redisplay( null, '', ac ); // Effects - browseeffects_action = new KAction( ac, 'browseeffects_action' ); + browseeffects_action = new TDEAction( ac, 'browseeffects_action' ); browseeffects_action.text = 'Browse Effects...'; browseeffects_action.shortcut = 'Ctrl+E'; browseeffects_action.connect( browseeffects_action, 'activated()', this, 'browse_effects' ); @@ -196,12 +196,12 @@ mw.setup_actions = function() this.create_image_operations( mw, ac ); // Tools - ksnapshot_action = new KAction( ac, 'ksnapshot_action' ); + ksnapshot_action = new TDEAction( ac, 'ksnapshot_action' ); ksnapshot_action.text = 'KSnapshot'; ksnapshot_action.icon = 'ksnapshot'; ksnapshot_action.connect( ksnapshot_action, 'activated()', this, 'run_ksnapshot' ); - scriptconsole_action = new KToggleAction( ac, 'scriptconsole_action' ); + scriptconsole_action = new TDEToggleAction( ac, 'scriptconsole_action' ); scriptconsole_action.text = 'Script Console'; scriptconsole_action.icon = 'konsole'; scriptconsole_action.connect( scriptconsole_action, 'toggled(bool)', part.view(), 'setShown(bool)' ); diff --git a/kjsembed/docs/examples/imunge/imunge_actions.js b/kjsembed/docs/examples/imunge/imunge_actions.js index e07d01d4..abc967d0 100755 --- a/kjsembed/docs/examples/imunge/imunge_actions.js +++ b/kjsembed/docs/examples/imunge/imunge_actions.js @@ -38,7 +38,7 @@ mw.create_all_effects = function( mw, ac ) // // Water color // - var action = new KAction( ac, 'watercolor_action' ); + var action = new TDEAction( ac, 'watercolor_action' ); action.text = '&Water Color'; action.icon = 'imageeffect'; @@ -61,7 +61,7 @@ mw.create_all_effects = function( mw, ac ) // // To Gray // - action = new KAction( ac, 'togray_action' ); + action = new TDEAction( ac, 'togray_action' ); action.text = '&Grayscale'; action.icon = 'imageeffect'; @@ -77,7 +77,7 @@ mw.create_all_effects = function( mw, ac ) // // Charcoal // - action = new KAction( ac, 'charcoal_action' ); + action = new TDEAction( ac, 'charcoal_action' ); action.text = '&Charcoal'; action.icon = 'imageeffect'; @@ -93,7 +93,7 @@ mw.create_all_effects = function( mw, ac ) // // Implode // - var action = new KAction( ac, 'implode_action' ); + var action = new TDEAction( ac, 'implode_action' ); action.text = '&Implode'; action.icon = 'imageeffect'; @@ -109,7 +109,7 @@ mw.create_all_effects = function( mw, ac ) // // Emboss // - action = new KAction( ac, 'emboss_action' ); + action = new TDEAction( ac, 'emboss_action' ); action.text = '&Emboss'; action.icon = 'imageeffect'; @@ -125,7 +125,7 @@ mw.create_all_effects = function( mw, ac ) // // Normalize // - action = new KAction( ac, 'normalize_action' ); + action = new TDEAction( ac, 'normalize_action' ); action.text = '&Normalize'; action.icon = 'imageeffect'; @@ -141,7 +141,7 @@ mw.create_all_effects = function( mw, ac ) // // Equalize // - action = new KAction( ac, 'equalize_action' ); + action = new TDEAction( ac, 'equalize_action' ); action.text = 'Equa&lize'; action.icon = 'imageeffect'; @@ -157,7 +157,7 @@ mw.create_all_effects = function( mw, ac ) // // Despeckle // - action = new KAction( ac, 'despeckle_action' ); + action = new TDEAction( ac, 'despeckle_action' ); action.text = '&Despeckle'; action.icon = 'imageeffect'; @@ -178,7 +178,7 @@ mw.create_image_operations = function( mw, ac ) // // Crop // - action = new KAction( ac, 'crop_action' ); + action = new TDEAction( ac, 'crop_action' ); action.text = 'Crop...'; action.icon = 'crop'; @@ -243,7 +243,7 @@ mw.create_image_operations = function( mw, ac ) // // Resize // - action = new KAction( ac, 'resize_action' ); + action = new TDEAction( ac, 'resize_action' ); action.text = 'Resize...'; action.icon = 'transform'; @@ -263,7 +263,7 @@ mw.create_image_operations = function( mw, ac ) // // Rotate right // - action = new KAction( ac, 'rotate_right_action' ); + action = new TDEAction( ac, 'rotate_right_action' ); action.text = 'Rotate &Right'; action.icon = 'rotate_cw'; @@ -278,7 +278,7 @@ mw.create_image_operations = function( mw, ac ) // // Rotate left // - action = new KAction( ac, 'rotate_left_action' ); + action = new TDEAction( ac, 'rotate_left_action' ); action.text = 'Rotate &Left'; action.icon = 'rotate'; @@ -293,7 +293,7 @@ mw.create_image_operations = function( mw, ac ) // // Mirror Vertical // - action = new KAction( ac, 'mirror_vertical_action' ); + action = new TDEAction( ac, 'mirror_vertical_action' ); action.text = 'Mirror &Vertical'; mw.apply_mirror_vertical = function() @@ -307,7 +307,7 @@ mw.create_image_operations = function( mw, ac ) // // Mirror Horizontal // - action = new KAction( ac, 'mirror_horizontal_action' ); + action = new TDEAction( ac, 'mirror_horizontal_action' ); action.text = 'Mirror &Horizontal'; mw.apply_mirror_horizontal = function() diff --git a/kjsembed/docs/examples/index.html b/kjsembed/docs/examples/index.html index 706f3fb2..03750beb 100644 --- a/kjsembed/docs/examples/index.html +++ b/kjsembed/docs/examples/index.html @@ -85,13 +85,13 @@ from a JS data structure, the other from the widget tree of a ui file.</td></tr> <tr><td><a href="netaccess">netaccess</a></td> <td>Illustrates the bindings to TDEIO::NetAccess.</td></tr> <tr><td><a href="listview">listview</a></td> -<td>Creates a simple KListView.</td></tr> +<td>Creates a simple TDEListView.</td></tr> <tr><td><a href="frame">frame</a></td> <td>Shows off TQFrame support and the use of enums.</td></tr> <tr><td><a href="timer">timer</a></td> <td>Creates a flashing LED using TQTimer.</td></tr> <tr><td><a href="actions">Actions</a></td> -<td>A simple KAction demo.</td></tr> +<td>A simple TDEAction demo.</td></tr> <tr><td><a href="builtins">Built-In Messages</a></td> <td>Demonstrates the built-in message dialogs.</td></tr> <tr><td><a href="imagetweak">Image Tweak</a></td> diff --git a/kjsembed/docs/examples/invaders/invaders.js b/kjsembed/docs/examples/invaders/invaders.js index bca6dce4..3d70d1b2 100755 --- a/kjsembed/docs/examples/invaders/invaders.js +++ b/kjsembed/docs/examples/invaders/invaders.js @@ -17,7 +17,7 @@ var rsmiss = ""; var timer = new TQTimer(this); timer.connect(timer, "timeout()", this, "doTurn"); -var win = new KMainWindow(this); +var win = new TDEMainWindow(this); var box = new TQVBox(win); var view = new TQLabel(box); //view.setMouseTracking(true); diff --git a/kjsembed/docs/examples/listview/listview.js b/kjsembed/docs/examples/listview/listview.js index 04197005..9d1e07df 100644 --- a/kjsembed/docs/examples/listview/listview.js +++ b/kjsembed/docs/examples/listview/listview.js @@ -1,11 +1,11 @@ #!/usr/bin/env kjscmd // Create main view -var mw = new KMainWindow(); +var mw = new TDEMainWindow(); var box = new TQVBox( mw ); mw.setCentralWidget(box); -var lv = new KListView( box ); +var lv = new TDEListView( box ); lv.addColumn('Pix'); lv.addColumn('One'); diff --git a/kjsembed/docs/examples/readonlypart/readonlypart.js b/kjsembed/docs/examples/readonlypart/readonlypart.js index af1ec59c..de06edd2 100755 --- a/kjsembed/docs/examples/readonlypart/readonlypart.js +++ b/kjsembed/docs/examples/readonlypart/readonlypart.js @@ -8,7 +8,7 @@ if ( application.args.length ) url = application.args[0]; // Create the UI -var mw = new KMainWindow(); +var mw = new TDEMainWindow(); var box = new TQHBox( mw ); mw.setCentralWidget(box); diff --git a/kjsembed/docs/examples/readwritepart/readwritepart.js b/kjsembed/docs/examples/readwritepart/readwritepart.js index d9663f8d..25e68cfc 100755 --- a/kjsembed/docs/examples/readwritepart/readwritepart.js +++ b/kjsembed/docs/examples/readwritepart/readwritepart.js @@ -8,7 +8,7 @@ if ( application.args.length ) url = application.args[0]; // Create the UI -var mw = new KMainWindow(); +var mw = new TDEMainWindow(); var box = new TQHBox( mw ); mw.setCentralWidget(box); diff --git a/kjsembed/docs/examples/sql/sql.js b/kjsembed/docs/examples/sql/sql.js index 118510d4..bdd4f1d5 100755 --- a/kjsembed/docs/examples/sql/sql.js +++ b/kjsembed/docs/examples/sql/sql.js @@ -1,7 +1,7 @@ #!/usr/bin/env kjscmd var db = new SqlDatabase(); -var mw = new KMainWindow(); +var mw = new TDEMainWindow(); var box = new TQVBox( mw ); mw.setCentralWidget(box); @@ -18,7 +18,7 @@ if ( db.addDatabase("TQMYSQL3", "test" )) println("Host Name:" + db.hostName); println("Port:" + db.port); println("Driver Name:" + db.driverName); - var list = new KListView(box); + var list = new TDEListView(box); list.addColumn('One'); list.addColumn('Two'); list.addColumn('Three'); diff --git a/kjsembed/docs/examples/xmlgui/xmlgui.js b/kjsembed/docs/examples/xmlgui/xmlgui.js index a951a2ed..9fc85f48 100755 --- a/kjsembed/docs/examples/xmlgui/xmlgui.js +++ b/kjsembed/docs/examples/xmlgui/xmlgui.js @@ -3,7 +3,7 @@ // // Setup main window // -var mw = new KMainWindow(); +var mw = new TDEMainWindow(); var view = new TQTextEdit( mw, 'view' ); view.text = '<h1>Hello World</h1>' diff --git a/kjsembed/docs/features.html b/kjsembed/docs/features.html index 64b47d75..b67982e7 100644 --- a/kjsembed/docs/features.html +++ b/kjsembed/docs/features.html @@ -25,7 +25,7 @@ This document is a high-level summary of the feature set of KJSEmbed. <h2>KDE Integration</h2> <ul> <li>Create KParts from scripts (including TDEHTMLPart). -<li>Create KAction classes. +<li>Create TDEAction classes. <li>Support for KDE's XMLGUI framework. <li>Create any KDE widget supported by the KDE designer plugin (and a few extras). diff --git a/kjsembed/docs/kjsembed-qsa.html b/kjsembed/docs/kjsembed-qsa.html index a9787600..5d637440 100644 --- a/kjsembed/docs/kjsembed-qsa.html +++ b/kjsembed/docs/kjsembed-qsa.html @@ -20,7 +20,7 @@ differences between the two libraries. but kjsembed can load designers ui files anyway and it would be easy to add.</li> - <li>KJSEmbed has facilities for working with KActions and can even + <li>KJSEmbed has facilities for working with TDEActions and can even load them from XML files.</li> <li>KJSEmbed makes it easier to operate with Qt types than TQSA. Take diff --git a/kjsembed/docs/tutorial/kjsembed.html b/kjsembed/docs/tutorial/kjsembed.html index c9ae359e..58aa869e 100644 --- a/kjsembed/docs/tutorial/kjsembed.html +++ b/kjsembed/docs/tutorial/kjsembed.html @@ -49,7 +49,7 @@ pre { <li>Console dialog that can be used to execute Javascript interactively.</li> <li>Command line tool for running scripts (this can even operate without an X server if you don't need to display a GUI).</li> - <li>Define new KActions using XML.</li> + <li>Define new TDEActions using XML.</li> <li>Scripts can connect signals to slots.</li> <li>Scripts can access the properties and slots of TQObjects as if they were normal Javascript properties and methods.</li> @@ -184,7 +184,7 @@ function text2html( text ) } </pre> <p>The details...</p> -<pre><!DOCTYPE actionset><br><actionset><br><header><br> <name>html2text_actions</name><br> <label>HTML To Text Actions</label><br> <script type="js" src="html2text_plugin.js"></script><br></header><br><action><br> <name>html_to_text</name><br> <type>KAction</type><br> <icons>text</icons><br> <label><text>Convert HTML To Text</text></label><br> <statustext>Converts the selected text from HTML to text.</statustext><br> <script type="js">kpart.selectedText = html2text( kpart.selectedText )</script><br></action><br><action><br> <name>text_to_html</name><br> <type>KAction</type><br> <icons>html</icons><br> <label><text>Quote For HTML</text></label><br> <statustext>Quotes the selected text for inclusion in an HTML document.</statustext><br> <script type="js">kpart.selectedText = text2html( kpart.selectedText )</script><br></action><br></actionset><br></pre> +<pre><!DOCTYPE actionset><br><actionset><br><header><br> <name>html2text_actions</name><br> <label>HTML To Text Actions</label><br> <script type="js" src="html2text_plugin.js"></script><br></header><br><action><br> <name>html_to_text</name><br> <type>TDEAction</type><br> <icons>text</icons><br> <label><text>Convert HTML To Text</text></label><br> <statustext>Converts the selected text from HTML to text.</statustext><br> <script type="js">kpart.selectedText = html2text( kpart.selectedText )</script><br></action><br><action><br> <name>text_to_html</name><br> <type>TDEAction</type><br> <icons>html</icons><br> <label><text>Quote For HTML</text></label><br> <statustext>Quotes the selected text for inclusion in an HTML document.</statustext><br> <script type="js">kpart.selectedText = text2html( kpart.selectedText )</script><br></action><br></actionset><br></pre> <p><br> The xmlgui:</p> <pre> diff --git a/kjsembed/jsconsolewidget.cpp b/kjsembed/jsconsolewidget.cpp index 839bf9a8..c95f346e 100644 --- a/kjsembed/jsconsolewidget.cpp +++ b/kjsembed/jsconsolewidget.cpp @@ -69,7 +69,7 @@ void JSConsoleWidget::createView() setIcon( px ); KWin::setIcons( winId(), pxl, px ); - ttl = new KPopupTitle( this, "title" ); + ttl = new TDEPopupTitle( this, "title" ); ttl->setText( i18n("JavaScript Console") ); ttl->setIcon( px ); diff --git a/kjsembed/jsconsolewidget.h b/kjsembed/jsconsolewidget.h index b1beef1c..71a79a3c 100644 --- a/kjsembed/jsconsolewidget.h +++ b/kjsembed/jsconsolewidget.h @@ -29,7 +29,7 @@ class TQPushButton; class TQHBox; class KLineEdit; -class KPopupTitle; +class TDEPopupTitle; class TDEProcess; class KShellProcess; class KTextEdit; @@ -75,7 +75,7 @@ public slots: KTextEdit *messages() const { return log; } /** Returns the title widget. */ - KPopupTitle *title() const { return ttl; } + TDEPopupTitle *title() const { return ttl; } /** * Returns the TQHBox used to layout the entry part of the console. This @@ -139,7 +139,7 @@ private: TQHBox *cmdBox; KLineEdit *cmd; TQPushButton *go; - KPopupTitle *ttl; + TDEPopupTitle *ttl; class JSConsoleWidgetPrivate *d; }; diff --git a/kjsembed/jsfactory.cpp b/kjsembed/jsfactory.cpp index 51e66f2f..c2606430 100644 --- a/kjsembed/jsfactory.cpp +++ b/kjsembed/jsfactory.cpp @@ -458,10 +458,10 @@ namespace KJSEmbed { #ifndef QT_ONLY // TQObjects defined by KDE - else if ( cname == "KAction" ) - return new KAction( parent, name ); - else if ( cname == "KToggleAction" ) - return new KToggleAction( parent, name ); + else if ( cname == "TDEAction" ) + return new TDEAction( parent, name ); + else if ( cname == "TDEToggleAction" ) + return new TDEToggleAction( parent, name ); #endif // QT_ONLY TQWidget *w = dynamic_cast<TQWidget *>( parent ); @@ -635,8 +635,8 @@ namespace KJSEmbed { return new TQSplashScreen( pix ); } #ifndef QT_ONLY - else if ( cname == "KMainWindow" ) - return new KMainWindow( pw, name ); + else if ( cname == "TDEMainWindow" ) + return new TDEMainWindow( pw, name ); else if ( cname == "KParts_MainWindow" ) return new KParts::MainWindow( pw, name ); else if ( cname == "KSystemTray" ) @@ -877,8 +877,8 @@ namespace KJSEmbed { "TQObject", "TQTimer", "TQSplashScreen", "TQProgressDialog", "TQLayout", "TQBoxLayout", "TQHBoxLayout", "TQVBoxLayout", #ifndef QT_ONLY - "KMainWindow", "KXMLGUIClient", "KSystemTray", - "KAction", "KToggleAction", + "TDEMainWindow", "KXMLGUIClient", "KSystemTray", + "TDEAction", "TDEToggleAction", "KParts_MainWindow", #endif // QT_ONLY 0 diff --git a/kjsembed/plugin/jsconsoleplugin.cpp b/kjsembed/plugin/jsconsoleplugin.cpp index c1e4026c..aa5e4f73 100644 --- a/kjsembed/plugin/jsconsoleplugin.cpp +++ b/kjsembed/plugin/jsconsoleplugin.cpp @@ -45,12 +45,12 @@ JSConsolePlugin::JSConsolePlugin( TQObject *parent, const char *name, const TQSt { js = 0; - KActionMenu *menu; - menu = new KActionMenu( i18n("&JavaScript"), "jsconsole", + TDEActionMenu *menu; + menu = new TDEActionMenu( i18n("&JavaScript"), "jsconsole", actionCollection(), "jsconsole" ); menu->setDelayed( false ); - menu->insert( new KAction( i18n("&Console"), 0, + menu->insert( new TDEAction( i18n("&Console"), 0, this, TQT_SLOT( showConsole() ), actionCollection(), "jsconsole_show") ); } diff --git a/kjsembed/tests/test_qframe.js b/kjsembed/tests/test_qframe.js index cf888b23..e0a85f6a 100644 --- a/kjsembed/tests/test_qframe.js +++ b/kjsembed/tests/test_qframe.js @@ -1,5 +1,5 @@ #!/usr/bin/env kjscmd -var mw = new KMainWindow(this); +var mw = new TDEMainWindow(this); var hbox = new TQHBox( mw ); var f1 = new TQLabel( hbox ); diff --git a/kjsembed/tests/test_tdeparts_args.js b/kjsembed/tests/test_tdeparts_args.js index a719590a..0b9478db 100644 --- a/kjsembed/tests/test_tdeparts_args.js +++ b/kjsembed/tests/test_tdeparts_args.js @@ -1,6 +1,6 @@ #!/usr/bin/env kjscmd -var mw = new KMainWindow(); +var mw = new TDEMainWindow(); var box = new TQVBox( mw ); mw.setCentralWidget( box ); diff --git a/kjsembed/tools/create_bindings.sh b/kjsembed/tools/create_bindings.sh index 045fcf14..51ba061c 100755 --- a/kjsembed/tools/create_bindings.sh +++ b/kjsembed/tools/create_bindings.sh @@ -12,7 +12,7 @@ doxygen bind_class TQComboBox qcombobox bind_class Qt qnamespace -bind_class KPopupTitle kpopupmenu +bind_class TDEPopupTitle kpopupmenu #bind_class TQDir qdir #bind_class TQListViewItem qlistview diff --git a/kjsembed/xmlactionclient.cpp b/kjsembed/xmlactionclient.cpp index 390d5fd2..982061b8 100644 --- a/kjsembed/xmlactionclient.cpp +++ b/kjsembed/xmlactionclient.cpp @@ -117,7 +117,7 @@ bool XMLActionClient::bind( const TQString &name, const XMLActionScript &s ) return true; } -bool XMLActionClient::bind( KAction *act, const XMLActionScript &s ) +bool XMLActionClient::bind( TDEAction *act, const XMLActionScript &s ) { if ( !act ) return false; @@ -251,14 +251,14 @@ bool XMLActionHandler::endElement( const TQString &, const TQString &, const TQS void XMLActionHandler::defineAction() { if ( ad.name.isEmpty() ) { - kdWarning() << "Attempt to create a KAction without setting a name" << endl; + kdWarning() << "Attempt to create a TDEAction without setting a name" << endl; return; } if ( ad.text.isEmpty() ) ad.text = ad.name; - KAction *act = createAction( actclient->actionCollection() ); + TDEAction *act = createAction( actclient->actionCollection() ); if ( act && ad.script.isValid() ) actclient->bind( act, ad.script ); @@ -266,7 +266,7 @@ void XMLActionHandler::defineAction() cdata = TQString::null; } -KAction *XMLActionHandler::createAction( KActionCollection *parent ) +TDEAction *XMLActionHandler::createAction( TDEActionCollection *parent ) { // kdDebug(80001) << "Creating Action, type is " << type << endl; // kdDebug(80001) << "text=" << text << ", icons=" << icons << endl; @@ -277,16 +277,16 @@ KAction *XMLActionHandler::createAction( KActionCollection *parent ) return 0; } - KAction *act=0; + TDEAction *act=0; - if ( ad.type.isEmpty() || (ad.type == "KAction") ) { - act = new KAction( ad.text, ad.icons, ad.keys, 0, 0, parent, ad.name.latin1() ); + if ( ad.type.isEmpty() || (ad.type == "TDEAction") ) { + act = new TDEAction( ad.text, ad.icons, ad.keys, 0, 0, parent, ad.name.latin1() ); } - else if ( ad.type == "KToggleAction" ) { - act = new KToggleAction( ad.text, ad.icons, ad.keys, 0, 0, parent, ad.name.latin1() ); + else if ( ad.type == "TDEToggleAction" ) { + act = new TDEToggleAction( ad.text, ad.icons, ad.keys, 0, 0, parent, ad.name.latin1() ); } - else if ( ad.type == "KRadioAction" ) { - KRadioAction *ra = new KRadioAction( ad.text, ad.icons, ad.keys, 0, 0, parent, ad.name.latin1() ); + else if ( ad.type == "TDERadioAction" ) { + TDERadioAction *ra = new TDERadioAction( ad.text, ad.icons, ad.keys, 0, 0, parent, ad.name.latin1() ); if ( ad.exclusive ) ra->setExclusiveGroup( ad.group ); @@ -298,17 +298,17 @@ KAction *XMLActionHandler::createAction( KActionCollection *parent ) act = KStdAction::create( (KStdAction::StdAction)i, 0, 0, parent ); } } - else if ( ad.type == "KListAction" ) { - KListAction *la = new KListAction( ad.text, ad.icons, ad.keys, 0, 0, parent, ad.name.latin1() ); + else if ( ad.type == "TDEListAction" ) { + TDEListAction *la = new TDEListAction( ad.text, ad.icons, ad.keys, 0, 0, parent, ad.name.latin1() ); la->setItems( ad.items ); ad.items.clear(); act = la; } - else if ( ad.type == "KActionMenu" ) { - KActionMenu *am = new KActionMenu( ad.text, ad.icons, parent, ad.name.latin1() ); + else if ( ad.type == "TDEActionMenu" ) { + TDEActionMenu *am = new TDEActionMenu( ad.text, ad.icons, parent, ad.name.latin1() ); for ( TQStringList::Iterator it = ad.items.begin() ; it != ad.items.end() ; ++it ) { - KAction *a = parent->action( (*it).latin1() ); + TDEAction *a = parent->action( (*it).latin1() ); if ( a ) am->insert( a ); } diff --git a/kjsembed/xmlactionclient.h b/kjsembed/xmlactionclient.h index 0dcabfe2..6b3d1b94 100644 --- a/kjsembed/xmlactionclient.h +++ b/kjsembed/xmlactionclient.h @@ -26,8 +26,8 @@ #include <tqxml.h> #include <tqmap.h> -class KActionCollection; -class KAction; +class TDEActionCollection; +class TDEAction; namespace KJSEmbed { @@ -78,11 +78,11 @@ public: */ virtual ~XMLActionClient(); - /** Returns the KActionCollection that the actions will be added to. */ - KActionCollection *actionCollection() const { return ac; } + /** Returns the TDEActionCollection that the actions will be added to. */ + TDEActionCollection *actionCollection() const { return ac; } - /** Sets the KActionCollection that the actions will be added to. */ - void setActionCollection( KActionCollection *acts ) { ac = acts; } + /** Sets the TDEActionCollection that the actions will be added to. */ + void setActionCollection( TDEActionCollection *acts ) { ac = acts; } /** Returns the runner for this XMLActionClient. */ XMLActionRunner *runner() const { return actrun; } @@ -109,7 +109,7 @@ public: virtual bool bind( const TQString &name, const XMLActionScript &script ); /** Binds an action to a script. */ - virtual bool bind( KAction *act, const XMLActionScript &script ); + virtual bool bind( TDEAction *act, const XMLActionScript &script ); protected slots: /** @@ -119,7 +119,7 @@ protected slots: void action_activated(); private: - KActionCollection *ac; + TDEActionCollection *ac; XMLActionRunner *actrun; TQMap<TQString, XMLActionScript> scripts; class XMLActionClientPrivate *d; @@ -187,8 +187,8 @@ public: XMLActionClient *client() const { return actclient; } - /** Creates a KAction based on the values read from the XML. */ - virtual KAction *createAction( KActionCollection *parent ); + /** Creates a TDEAction based on the values read from the XML. */ + virtual TDEAction *createAction( TDEActionCollection *parent ); private: /** |