diff options
Diffstat (limited to 'kommander/examples/current/editor-poc.kmdr')
-rwxr-xr-x | kommander/examples/current/editor-poc.kmdr | 22 |
1 files changed, 11 insertions, 11 deletions
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 @@ <!DOCTYPE UI><UI version="3.0" stdsetdef="1"> <class>KEdemo</class> -<widget class="QMainWindow"> +<widget class=TQMAINWINDOW_OBJECT_NAME_STRING> <property name="name"> <cstring>KEdemo</cstring> </property> @@ -73,7 +73,7 @@ _file["dirty"] = true</string> </property> <property name="associations" stdset="0"> <stringlist> - <string>@Input.text("Kommander Edit", "Text to find", "")</string> + <string>@Input.text("Kommander Edit", "Text to tqfind", "")</string> </stringlist> </property> </widget> @@ -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;") [email protected](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;") [email protected](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;") [email protected](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; [email protected](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> </string> </property> @@ -1064,5 +1064,5 @@ TextEdit5.setColor(color)</string> <slot>setChecked(bool)</slot> </connection> </connections> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> |