123456789101112131415161718192021222324252627282930 |
- <window id="sampleParameters">
- <layout type="vertical">
- <layout type="horizontal">
- <label>Annotation:</label>
- <line id="template">Sample %1</line>
- </layout>
- <textarea id="instructions" />
- <button name="Reset Sample Number" type="push" id="reset" />
- <button name="Okay" type="push" id="ok" />
- </layout>
- <program>
- <![CDATA[
- print("Program loaded");
- var window = this;
- var instructions = findChildObject(this, 'instructions');
- instructions.plainText = "%1 will be replaced with a sample number.";
- instructions.readOnly = true;
- var reset = findChildObject(this, 'reset');
- reset.clicked.connect(function() {
- window.button.resetCount();
- });
- var okay = findChildObject(this, 'ok');
- var template = findChildObject(this, 'template');
- okay.clicked.connect(function() {
- window.button.setAnnotation(template.text);
- window.close();
- });
- ]]>
- </program>
- <window>
|