&nbsp; In appletscripting.h there is a method called showConfigurationInterface():<br><br>&nbsp; /**<br>&nbsp;&nbsp;&nbsp;&nbsp; * Show a configuration dialog.<br>&nbsp;&nbsp;&nbsp;&nbsp; */<br>&nbsp;&nbsp;&nbsp; virtual void showConfigurationInterface();<br><br>Note that the comment describes it as a &#39;dialog&#39;, and so the first question is why isn&#39;t it named &#39;showConfigurationDialog()&#39; - interface seems pretty meaningless to me. Similarly the C++ equivalent is called createConfigureInterface() and would be better named createConfigurationDialog() in my opinion.<br>
<br>An example of using a config dialog from the analog clock:<br><br>void Clock::createConfigurationInterface(KConfigDialog *parent)<br>{<br>&nbsp;&nbsp;&nbsp; //TODO: Make the size settable<br>&nbsp;&nbsp;&nbsp; QWidget *widget = new QWidget();<br>&nbsp;&nbsp;&nbsp; ui.setupUi(widget);<br>
&nbsp;&nbsp;&nbsp; parent-&gt;setButtons( KDialog::Ok | KDialog::Cancel | KDialog::Apply );<br>&nbsp;&nbsp;&nbsp; connect(parent, SIGNAL(applyClicked()), this, SLOT(configAccepted()));<br>&nbsp;&nbsp;&nbsp; connect(parent, SIGNAL(okClicked()), this, SLOT(configAccepted()));<br>
&nbsp;&nbsp;&nbsp; parent-&gt;addPage(widget, parent-&gt;windowTitle(), icon());<br><br>&nbsp;&nbsp;&nbsp; ui.timeZones-&gt;setSelected(m_timezone, true);<br>&nbsp;&nbsp;&nbsp; ...<br>}<br><br>It is passed a KConfigDialog, whereas the scripting equivalent isn&#39;t. So we could abstract out quite a bit of that for a scripting api:<br>
<br>KConfigDialog *parent = new KConfigDialog;<br>parent-&gt;setButtons( KDialog::Ok | KDialog::Cancel | KDialog::Apply );<br>connect(parent, SIGNAL(applyClicked()), this, SLOT(configurationAccepted()));<br>connect(parent, SIGNAL(okClicked()), this, SLOT(configurationAccepted()));<br>
<br>Where &#39;this&#39; is the scripting applet code - maybe the slot should be called &#39;configurationAccepted()&#39;, and my second question is why doesn&#39;t the scripting api have a method that is called when the user presses ok or apply buttons?<br>
<br>So after the above preamable we can call showConfigurationIterface(), and it does its stuff and creates a widget with the dialog. And then what? The method is a void, and I think it should return the created widget instead.<br>
<br>Then the scripting api code can put the widget in the KConfigDialog:<br><br>parent-&gt;addPage(widget, parent-&gt;windowTitle(), icon());<br><br>When the slot configurationAccepted() is invoked the scripting api would then call back into the scripting code, which would get the config details from the dialog.<br>
<br>-- Richard<br><br>
<br><br><br>