Warning, /utilities/kate/addons/snippets/editsnippet.ui is written in an unsupported language. File is not indexed.

0001 <?xml version="1.0" encoding="UTF-8"?>
0002 <ui version="4.0">
0003  <class>EditSnippetBase</class>
0004  <widget class="QWidget" name="EditSnippetBase">
0005   <property name="geometry">
0006    <rect>
0007     <x>0</x>
0008     <y>0</y>
0009     <width>500</width>
0010     <height>525</height>
0011    </rect>
0012   </property>
0013   <property name="minimumSize">
0014    <size>
0015     <width>500</width>
0016     <height>0</height>
0017    </size>
0018   </property>
0019   <layout class="QVBoxLayout" name="verticalLayout">
0020    <item>
0021     <widget class="KMessageWidget" name="messageWidget" native="true">
0022      <property name="visible">
0023       <bool>true</bool>
0024      </property>
0025      <property name="closeButtonVisible" stdset="0">
0026       <bool>false</bool>
0027      </property>
0028     </widget>
0029    </item>
0030    <item>
0031     <layout class="QHBoxLayout" name="horizontalLayout">
0032      <item>
0033       <widget class="QLabel" name="snippetName">
0034        <property name="text">
0035         <string>Name:</string>
0036        </property>
0037       </widget>
0038      </item>
0039      <item>
0040       <widget class="QLineEdit" name="snippetNameEdit">
0041        <property name="placeholderText">
0042         <string>will be shown in the completion list</string>
0043        </property>
0044       </widget>
0045      </item>
0046      <item>
0047       <widget class="KKeySequenceWidget" name="snippetShortcut"/>
0048      </item>
0049     </layout>
0050    </item>
0051    <item>
0052     <widget class="QSplitter" name="splitter">
0053      <property name="orientation">
0054       <enum>Qt::Vertical</enum>
0055      </property>
0056      <widget class="QTabWidget" name="editorTabs">
0057       <property name="currentIndex">
0058        <number>0</number>
0059       </property>
0060       <widget class="QWidget" name="snippetTab">
0061        <attribute name="title">
0062         <string>&amp;Snippet</string>
0063        </attribute>
0064        <layout class="QVBoxLayout" name="verticalLayout_2">
0065         <item>
0066          <widget class="QLabel" name="snippetLabel">
0067           <property name="text">
0068            <string>The text your snippet will insert into the document. &lt;a href=&quot;A snippet can contain editable fields. They can be cycled by pressing Tab. The following expressions can be used in the template text to create fields: &lt;br&gt;&lt;tt&gt;${field_name}&lt;/tt&gt; creates a simple, editable field. All subsequent occurrences of the same field_name create fields which mirror the contents of the first during editing.&lt;br&gt;&lt;tt&gt;${field_name=default}&lt;/tt&gt; can be used to specify a default value for the field. &lt;tt&gt;default&lt;/tt&gt; can be any JavaScript expression.&lt;br&gt;Use &lt;tt&gt;${field_name=text}&lt;/tt&gt; to specify a fixed string as default value.&lt;br&gt;&lt;tt&gt;${func(other_field1, other_field2, ...)}&lt;/tt&gt; can be used to create a field which evaluates a JavaScript function on each edit and contains its contents. See the Scripts tab for more information.&lt;br&gt;&lt;tt&gt;${cursor}&lt;/tt&gt; can be used to mark the end position of the cursor after everything else was filled in.&quot;&gt;More...&lt;/a&gt;</string>
0069           </property>
0070           <property name="textFormat">
0071            <enum>Qt::RichText</enum>
0072           </property>
0073           <property name="wordWrap">
0074            <bool>true</bool>
0075           </property>
0076          </widget>
0077         </item>
0078        </layout>
0079       </widget>
0080       <widget class="QWidget" name="scriptTab">
0081        <attribute name="title">
0082         <string>S&amp;cripts</string>
0083        </attribute>
0084        <layout class="QVBoxLayout" name="verticalLayout_4">
0085         <item>
0086          <widget class="QLabel" name="scriptLabel">
0087           <property name="text">
0088            <string>Write down JavaScript helper functions to use in your snippets here. &lt;a href=&quot;All JavaScript functions should return the contents you want to place in a template field as a string.&lt;br&gt;Functions are called in a scope which contains the contents of all editable template fields as local variables. For example in a snippet containing &lt;tt&gt;${field}&lt;/tt&gt;, a variable called &lt;tt&gt;field&lt;/tt&gt; will be present which contains the up-to-date contents of the template field. Those variables can either be used in the function statically or passed as arguments, by using the &lt;tt&gt;${func(field)}&lt;/tt&gt; or &lt;tt&gt;${field2=func(field)}&lt;/tt&gt; syntax in the snippet string.&lt;br&gt;You can use the kate scripting API to get the selected text, full text, file name and more by using the appropriate methods of the &lt;tt&gt;document&lt;/tt&gt; and &lt;tt&gt;view&lt;/tt&gt; objects. Refer to the scripting API documentation for more information.&quot;&gt;More...&lt;/a&gt;</string>
0089           </property>
0090           <property name="wordWrap">
0091            <bool>true</bool>
0092           </property>
0093          </widget>
0094         </item>
0095        </layout>
0096       </widget>
0097      </widget>
0098      <widget class="QWidget" name="testWidget" native="true">
0099       <layout class="QVBoxLayout" name="verticalLayout_3">
0100        <item>
0101         <layout class="QHBoxLayout" name="horizontalLayout_4">
0102          <item>
0103           <widget class="QPushButton" name="dotest_button">
0104            <property name="text">
0105             <string>Test this snippet</string>
0106            </property>
0107           </widget>
0108          </item>
0109          <item>
0110           <spacer name="horizontalSpacer">
0111            <property name="orientation">
0112             <enum>Qt::Horizontal</enum>
0113            </property>
0114            <property name="sizeHint" stdset="0">
0115             <size>
0116              <width>40</width>
0117              <height>20</height>
0118             </size>
0119            </property>
0120           </spacer>
0121          </item>
0122         </layout>
0123        </item>
0124       </layout>
0125      </widget>
0126     </widget>
0127    </item>
0128    <item>
0129     <widget class="QDialogButtonBox" name="buttons">
0130      <property name="standardButtons">
0131       <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
0132      </property>
0133     </widget>
0134    </item>
0135   </layout>
0136  </widget>
0137  <customwidgets>
0138   <customwidget>
0139    <class>KKeySequenceWidget</class>
0140    <extends>QWidget</extends>
0141    <header>kkeysequencewidget.h</header>
0142   </customwidget>
0143   <customwidget>
0144    <class>KMessageWidget</class>
0145    <extends>QWidget</extends>
0146    <header>kmessagewidget.h</header>
0147   </customwidget>
0148  </customwidgets>
0149  <resources/>
0150  <connections/>
0151 </ui>