From e985f7e545f4739493965aad69bbecb136dc9346 Mon Sep 17 00:00:00 2001 From: tpearson Date: Thu, 16 Jun 2011 19:02:47 +0000 Subject: TQt4 port kdewebdev This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdewebdev@1237029 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kommander/examples/current/a1.kmdr | 16 ++++++++-------- kommander/examples/current/b1.kmdr | 12 ++++++------ kommander/examples/current/editor-poc.kmdr | 22 +++++++++++----------- kommander/examples/current/keyvaluecombo.kmdr | 12 ++++++------ kommander/examples/current/kpartmwframe.kmdr | 8 ++++---- kommander/examples/current/kpartpart.kmdr | 18 +++++++++--------- kommander/examples/current/passvariables.kmdr | 24 ++++++++++++------------ kommander/examples/current/tableselect.kmdr | 10 +++++----- 8 files changed, 61 insertions(+), 61 deletions(-) (limited to 'kommander/examples/current') diff --git a/kommander/examples/current/a1.kmdr b/kommander/examples/current/a1.kmdr index e8b99ac3..7399bc73 100755 --- a/kommander/examples/current/a1.kmdr +++ b/kommander/examples/current/a1.kmdr @@ -49,7 +49,7 @@ debug("pid="+pid) StatusBar8 - + Layout37 @@ -121,7 +121,7 @@ debug("pid="+pid) and again - + Layout83 @@ -145,7 +145,7 @@ debug("pid="+pid) Expanding - + 40 0 @@ -176,7 +176,7 @@ StatusBar8.setText("Returned: "+b) Expanding - + 46 0 @@ -185,7 +185,7 @@ StatusBar8.setText("Returned: "+b) - + Layout84 @@ -209,7 +209,7 @@ StatusBar8.setText("Returned: "+b) Expanding - + 80 0 @@ -243,7 +243,7 @@ StatusBar8.setText("Returned: "+b) Expanding - + 60 0 @@ -254,5 +254,5 @@ StatusBar8.setText("Returned: "+b) - + diff --git a/kommander/examples/current/b1.kmdr b/kommander/examples/current/b1.kmdr index 09725243..bc02ab80 100755 --- a/kommander/examples/current/b1.kmdr +++ b/kommander/examples/current/b1.kmdr @@ -26,7 +26,7 @@ else StatusBar9.insertItem("ARG1="+_ARG1, 1) StatusBar9.insertItem("ARG2="+_ARG2, 2) endif -//message_info(parentPid) +//message_info(tqparentPid) @@ -82,7 +82,7 @@ endif Expanding - + 111 0 @@ -104,7 +104,7 @@ endif Expanding - + 50 0 @@ -120,8 +120,8 @@ endif - //message_info("parentPid = "+parentPid+"\npid = "+pid) -dcop("kmdr-executor-"+parentPid, "KommanderIf", "setText(QString,QString)", "StatusBar8", "Hello") + //message_info("tqparentPid = "+tqparentPid+"\npid = "+pid) +dcop("kmdr-executor-"+tqparentPid, "KommanderIf", "setText(QString,QString)", "StatusBar8", "Hello") @@ -131,5 +131,5 @@ dcop("kmdr-executor-"+parentPid, "KommanderIf", "setText(QString,QString)", "Sta - + diff --git a/kommander/examples/current/editor-poc.kmdr b/kommander/examples/current/editor-poc.kmdr index d9b14fd1..6a084397 100755 --- a/kommander/examples/current/editor-poc.kmdr +++ b/kommander/examples/current/editor-poc.kmdr @@ -1,6 +1,6 @@ KEdemo - + KEdemo @@ -73,7 +73,7 @@ _file["dirty"] = true - @Input.text("Kommander Edit", "Text to find", "") + @Input.text("Kommander Edit", "Text to tqfind", "") @@ -179,16 +179,16 @@ while chrs < maxc do //debug("link test = "+str_mid(a, ch, 2)+" pos="+ch) if str_mid(a, ch, 2) == "<a" then inlink = true - lb = str_toint(str_find(a, "\"", ch)+1) - le = str_toint(str_find(a, "\"", lb)) + lb = str_toint(str_tqfind(a, "\"", ch)+1) + le = str_toint(str_tqfind(a, "\"", lb)) linkscript = str_mid(a, lb, le-lb) //debug("link data - "+lb+" "+le+" "+linkscript) elseif str_mid(a, ch, 3) == "<p>" then lc = lc + 1 cc = 0 endif - ck1 = str_toint(str_find(a, ">", ch))+1 - ck2 = str_find(a, "<", ck1) + ck1 = str_toint(str_tqfind(a, ">", ch))+1 + ck2 = str_tqfind(a, "<", ck1) if ck1 == -1 || ck2 == -1 then break endif @@ -303,9 +303,9 @@ debug("Clicked at: "+Self.Item(0)+" "+Self.Item(1)) <stringlist> <string></string> <string>@Array.setValue(help, "Proof of concept", "&lt;center&gt;&lt;h2&gt;Kommander MainWindow frames!&lt;/h2&gt;&lt;/center&gt;&lt;p&gt;As Kommander took on functionality an attempt was made to make a MainWindow Kommander widget. Sadly it was a huge time loss for two developers who both gave up after days of trying. The problem was with the editor. However you can use a Qt Designer generated UI file renamed to a *.kmdr file. Into this frame you can place your widgets and make a working application where nearly everything works.&lt;/p&gt;") -@Array.setValue(help, "Known limitations", "&lt;center&gt;&lt;h2&gt;Known limitations&lt;/h2&gt;&lt;/center&gt;&lt;p&gt;As of this writing what is known not to work on the Kommander side is the settings read and write. There is no Initialize or Destroy section as there is no Kommander Text, however there are signals for this on the window, so the functionality is intact. On the MainWindow side it is not possible to talk to any Actions as these are QActions from Designer and KActions are not derived from QActions in KDE 3x. This means a DCOP call to list actions or set states will not work. It is also not possible to talk to the Statusbar. Also submenus on the menubar and dropdown actions on the Toolbar will not work. Given that this is an unsupported use of Kommander it everything that does work makes it suitable for probably most small application uses.. &lt;/p&gt;") +@Array.setValue(help, "Known limitations", "&lt;center&gt;&lt;h2&gt;Known limitations&lt;/h2&gt;&lt;/center&gt;&lt;p&gt;As of this writing what is known not to work on the Kommander side is the settings read and write. There is no Initialize or Destroy section as there is no Kommander Text, however there are Q_SIGNALS for this on the window, so the functionality is intact. On the MainWindow side it is not possible to talk to any Actions as these are QActions from Designer and KActions are not derived from QActions in KDE 3x. This means a DCOP call to list actions or set states will not work. It is also not possible to talk to the Statusbar. Also submenus on the menubar and dropdown actions on the Toolbar will not work. Given that this is an unsupported use of Kommander it everything that does work makes it suitable for probably most small application uses.. &lt;/p&gt;") @Array.setValue(help, "Rolling your own", "&lt;center&gt;&lt;h2&gt;Rolling your own&lt;/h2&gt;&lt;/center&gt;&lt;p&gt;It is our intention to have a template in the 1.3 release of a MainWindow, but if you have Qt Designer for Qt 3x you can easily start a window design, save it, rename to *.kmdr and open in Kommander. Remember not to add widgets in Designer as Kommander will not recognize them.&lt;/p&gt;") -@Array.setValue(help, "Using Actions", "&lt;center&gt;&lt;h2&gt;Using Actions&lt;/h2&gt;&lt;/center&gt;&lt;p&gt;If you want to get the goodies, menus, toolbars and accelerator keys, you need to use actions. Kommander has an Action editor on the window menu under Views. There you can add actions and there is a shortcut to connecting them with signals and slots. To get everything working select an Action and look in the properties menu for settings like name, text and icon. For menus and toolbars try right clicking on them for context menus. Now from the Action View drag an Action to the menu or toolbar. See the visual feedback? Just connect your Action to a script and you have three different ways to call it.&lt;/p&gt; +@Array.setValue(help, "Using Actions", "&lt;center&gt;&lt;h2&gt;Using Actions&lt;/h2&gt;&lt;/center&gt;&lt;p&gt;If you want to get the goodies, menus, toolbars and accelerator keys, you need to use actions. Kommander has an Action editor on the window menu under Views. There you can add actions and there is a shortcut to connecting them with Q_SIGNALS and Q_SLOTS. To get everything working select an Action and look in the properties menu for settings like name, text and icon. For menus and toolbars try right clicking on them for context menus. Now from the Action View drag an Action to the menu or toolbar. See the visual feedback? Just connect your Action to a script and you have three different ways to call it.&lt;/p&gt; ") @Array.setValue(help, "Link examples", "&lt;center&gt;&lt;h2&gt;Link examples&lt;/h2&gt;&lt;/center&gt;&lt;p&gt;This demo shows examples of linking. Links will show in the TextEdit widget, but they don't do anything. In the TextBrowser they open web pages and email links, but of course you can't edit in the TextBrowser. If you don't mind writing some script you can set up your own link handling, which I've done here. Note that it will follow links anywhere in the editor. If the link is a widget name it assumes it to be a script and calls it. If not it looks to see if it is a web link and calls that&lt;/p&gt;&lt;p&gt;It would be easy to extend this script to accept link parameters and process emails. You could also make a reference to other text objects, tab widget tabs, pretty much anything you can think of.&lt;/p&gt;") @Array.setValue(help, "How this help works", "&lt;center&gt;&lt;h2&gt;How this help works&lt;/h2&gt;&lt;/center&gt;&lt;p&gt;Do you wonder where this help came from? It is possible to use KDE help if you write DocBook, make it and install it. This quick help is fast and can contain &lt;i&gt;rich text&lt;/i&gt;. To look at the dialog copy the text in the hidden TextEdit (set to text mode so as not to muck things up with rich text interperting XML) and paste it to a text editor like KWrite. Save it as a Kommander file and open it in the Kommander Editor.&lt;/p&gt;") @@ -331,7 +331,7 @@ debug("Clicked at: "+Self.Item(0)+" "+Self.Item(1)) <property name="spacing"> <number>6</number> </property> - <widget class="QSplitter" row="0" column="0" rowspan="2" colspan="2"> + <widget class=TQSPLITTER_OBJECT_NAME_STRING row="0" column="0" rowspan="2" colspan="2"> <property name="name"> <cstring>Splitter5</cstring> </property> @@ -428,7 +428,7 @@ debug("Clicked at: "+Self.Item(0)+" "+Self.Item(1)) <slot>execute()</slot> </connection> </connections> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> @@ -1064,5 +1064,5 @@ TextEdit5.setColor(color) setChecked(bool) - + diff --git a/kommander/examples/current/keyvaluecombo.kmdr b/kommander/examples/current/keyvaluecombo.kmdr index 9815c333..b4a35126 100644 --- a/kommander/examples/current/keyvaluecombo.kmdr +++ b/kommander/examples/current/keyvaluecombo.kmdr @@ -63,7 +63,7 @@ PopupMenu1.insertMenuItem("Help About", "PopupMenu1", 10) 6 - + Layout27 @@ -100,7 +100,7 @@ PopupMenu1.insertMenuItem("Help About", "PopupMenu1", 10) - + Layout30 @@ -122,7 +122,7 @@ PopupMenu1.insertMenuItem("Help About", "PopupMenu1", 10) Right click for menu - + Layout24 @@ -164,7 +164,7 @@ PopupMenu1.insertMenuItem("Help About", "PopupMenu1", 10) - + Layout23 @@ -227,7 +227,7 @@ PopupMenu1.insertMenuItem("Help About", "PopupMenu1", 10) - + Layout31 @@ -384,5 +384,5 @@ endif ComboBox10 ListBox1 - + diff --git a/kommander/examples/current/kpartmwframe.kmdr b/kommander/examples/current/kpartmwframe.kmdr index 134f28af..6e334aa6 100755 --- a/kommander/examples/current/kpartmwframe.kmdr +++ b/kommander/examples/current/kpartmwframe.kmdr @@ -1,6 +1,6 @@ KKPdemo - + KKPdemo @@ -58,7 +58,7 @@ - + Layout5 @@ -95,7 +95,7 @@ _loadup = 2 #!kommander if widgetExists("ScriptObject13") then - TextBrowser1.setText("This text was written by a script on the parent frame window. It could have been a dialog, but we chose to illustrate with a MainWindow for this demo.") + TextBrowser1.setText("This text was written by a script on the tqparent frame window. It could have been a dialog, but we chose to illustrate with a MainWindow for this demo.") ScriptObject13.execute else message_error("You do not have the KPart child dialog loaded") @@ -614,5 +614,5 @@ endif execute() - + diff --git a/kommander/examples/current/kpartpart.kmdr b/kommander/examples/current/kpartpart.kmdr index 928ecdc6..0763fada 100755 --- a/kommander/examples/current/kpartpart.kmdr +++ b/kommander/examples/current/kpartpart.kmdr @@ -42,16 +42,16 @@ You can click the test button to insert text -If you are loaded in the parent frame you can click the rocket icon on the toolbar or use the function menu to select "Talk to KPart". +If you are loaded in the tqparent frame you can click the rocket icon on the toolbar or use the function menu to select "Talk to KPart". -Any Kommander program can be run as a KPart. You need the KPart plugin to load KParts. Note that running Kommander programs as KParts is not without risks. For one thing you loose DCOP in the parent and the old parser ceases to work. Additionally since all widgets are accecssible from the parent and duplicate widget name can cause a Kommander lock up. +Any Kommander program can be run as a KPart. You need the KPart plugin to load KParts. Note that running Kommander programs as KParts is not without risks. For one thing you loose DCOP in the tqparent and the old parser ceases to work. Additionally since all widgets are accecssible from the tqparent and duplicate widget name can cause a Kommander lock up. -Because of all this and the fact that the Actions on the unsupported MainWindow are incompatible it is impossible for the child to talk with the parent. On this dialog we use a timer on the parent polling the child for requests every 100 ms. It's a crude hack but it does yield acceptable behavior. +Because of all this and the fact that the Actions on the unsupported MainWindow are incompatible it is impossible for the child to talk with the tqparent. On this dialog we use a timer on the tqparent polling the child for requests every 100 ms. It's a crude hack but it does yield acceptable behavior. This demo is intended to run both kpartwmframe.kmdr and kpartpart.kmdr. - + Layout70 @@ -75,7 +75,7 @@ This demo is intended to run both kpartwmframe.kmdr and kpartpart.kmdr. Expanding - + 75 0 @@ -97,7 +97,7 @@ endif if _LOADED == true then kpmessage.setText("You have mail") else - message_info("this only works when loaded as a KPart in it's parent window") + message_info("this only works when loaded as a KPart in it's tqparent window") endif @@ -122,7 +122,7 @@ endif - message_info("We just got a message from our parent frame!", "Parent called Child") + message_info("We just got a message from our tqparent frame!", "Parent called Child") @@ -156,7 +156,7 @@ endif Expanding - + 40 0 @@ -167,5 +167,5 @@ endif - + diff --git a/kommander/examples/current/passvariables.kmdr b/kommander/examples/current/passvariables.kmdr index 2d3b9e03..95270a83 100644 --- a/kommander/examples/current/passvariables.kmdr +++ b/kommander/examples/current/passvariables.kmdr @@ -90,7 +90,7 @@ LineEdit6.setText(ret) Set - + AlignVCenter|AlignRight @@ -101,7 +101,7 @@ LineEdit6.setText(ret) Pass back - + AlignVCenter|AlignRight @@ -124,7 +124,7 @@ LineEdit6.setText(ret) // test for PHP pt = exec("php --version") -if str_contains(pt, "Zend") then +if str_tqcontains(pt, "Zend") then php = ScriptObjectPHP.execute(LineEdit7.text,LineEdit1.text,LineEdit2.text) LineEdit4.setText(php) else @@ -140,7 +140,7 @@ endif Pass back - + AlignVCenter|AlignRight @@ -151,7 +151,7 @@ endif Set with @ - + AlignVCenter|AlignRight @@ -162,7 +162,7 @@ endif Return - + AlignVCenter|AlignRight @@ -178,7 +178,7 @@ endif Return - + AlignVCenter|AlignRight @@ -272,14 +272,14 @@ echo round(@Self.Item(1)/@Self.Item(2),5) Expanding - + 108 0 - + Layout1 @@ -303,7 +303,7 @@ echo round(@Self.Item(1)/@Self.Item(2),5) Expanding - + 71 0 @@ -368,7 +368,7 @@ echo round(@Self.Item(1)/@Self.Item(2),5) Expanding - + 71 0 @@ -412,5 +412,5 @@ echo round(@Self.Item(1)/@Self.Item(2),5) popup(int,int) - + diff --git a/kommander/examples/current/tableselect.kmdr b/kommander/examples/current/tableselect.kmdr index 09dd6cd8..a8617103 100755 --- a/kommander/examples/current/tableselect.kmdr +++ b/kommander/examples/current/tableselect.kmdr @@ -51,7 +51,7 @@ AboutDialog9.setBugAddress("eric@kdewebdev.org") 6 - + Layout2 @@ -99,7 +99,7 @@ AboutDialog9.setBugAddress("eric@kdewebdev.org") - + Layout1 @@ -348,7 +348,7 @@ TextBrowser1.setText(result) 0 - + 24 24 @@ -407,7 +407,7 @@ end 0 - + 24 24 @@ -498,5 +498,5 @@ end popup(int,int) - + -- cgit v1.2.1