<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
 <class>TemplateDialog</class>
 <widget class="QDialog" name="TemplateDialog">
  <property name="geometry">
   <rect>
    <x>0</x>
    <y>0</y>
    <width>588</width>
    <height>546</height>
   </rect>
  </property>
  <property name="sizePolicy">
   <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
    <horstretch>0</horstretch>
    <verstretch>0</verstretch>
   </sizepolicy>
  </property>
  <property name="windowTitle">
   <string>Edit template</string>
  </property>
  <layout class="QVBoxLayout" name="verticalLayout">
   <item>
    <widget class="QScrollArea" name="scroll_area">
     <property name="widgetResizable">
      <bool>true</bool>
     </property>
     <widget class="QWidget" name="wid1">
      <layout class="QVBoxLayout" name="verticalLayout">
       <item>
        <widget class="QWidget" name="color_layout">
         <layout class="QGridLayout">
          <item row="0" column="0">
           <widget class="QLabel" name="colored_field_label">
            <property name="text">
             <string>Set the color of the column:</string>
            </property>
            <property name="buddy">
             <cstring>colored_field</cstring>
            </property>
           </widget>
          </item>
          <item row="0" column="1">
           <widget class="QComboBox" name="colored_field">
           </widget>
          </item>
          <item row="1" column="0">
           <widget class="QLabel" name="color_chooser_label">
            <property name="text">
             <string>Copy a color name to the clipboard:</string>
            </property>
            <property name="buddy">
             <cstring>color_name</cstring>
            </property>
           </widget>
          </item>
          <item row="1" column="1">
           <widget class="ColorButton" name="color_name">
           </widget>
          </item>
          <item row="1" column="2">
           <widget class="QToolButton" name="color_copy_button">
            <property name="icon">
             <iconset resource="../../../../resources/images.qrc">
              <normaloff>:/images/edit-copy.png</normaloff>:/images/edit-copy.png</iconset>
            </property>
            <property name="toolTip">
             <string>Copy the selected color name to the clipboard</string>
            </property>
           </widget>
          </item>
         </layout>
        </widget>
       </item>
       <item>
        <widget class="QWidget" name="icon_layout">
         <layout class="QGridLayout">
          <item row="0" column="0" colspan="2">
           <layout class="QHBoxLayout">
            <item>
             <widget class="QLabel" name="icon_kind_label">
              <property name="text">
               <string>Kind:</string>
              </property>
             </widget>
            </item>
            <item>
             <widget class="QComboBox" name="icon_kind">
             </widget>
            </item>
           </layout>
          </item>
          <item row="1" column="0">
           <widget class="QLabel" name="icon_chooser_label">
            <property name="text">
             <string>Apply the icon to column:</string>
            </property>
            <property name="buddy">
             <cstring>icon_field</cstring>
            </property>
           </widget>
          </item>
          <item row="1" column="1">
           <widget class="QComboBox" name="icon_field">
           </widget>
          </item>
          <item row="2" column="0">
           <widget class="QLabel" name="image_chooser_label">
            <property name="text">
             <string>Copy an icon file name to the clipboard:</string>
            </property>
            <property name="buddy">
             <cstring>color_name</cstring>
            </property>
           </widget>
          </item>
          <item row="2" column="1">
           <widget class="QWidget">
            <layout class="QHBoxLayout">
             <item>
              <widget class="QComboBox" name="icon_files">
              </widget>
             </item>
             <item>
              <widget class="QToolButton" name="icon_copy_button">
               <property name="icon">
                <iconset resource="../../../../resources/images.qrc">
                 <normaloff>:/images/edit-copy.png</normaloff>:/images/edit-copy.png</iconset>
               </property>
               <property name="toolTip">
                <string>Copy the selected icon file name to the clipboard</string>
               </property>
              </widget>
             </item>
             <item>
              <widget class="QPushButton" name="filename_button">
               <property name="text">
                <string>Add icon</string>
               </property>
               <property name="toolTip">
                <string>Add an icon file to the set of choices</string>
               </property>
              </widget>
             </item>
            </layout>
           </widget>
          </item>
         </layout>
        </widget>
       </item>
       <item>
        <layout class="QGridLayout" name="gridLayout">
         <item row="0" column="0">
          <layout class="QHBoxLayout">
           <item>
            <widget class="QLabel" name="template_name_label">
             <property name="text">
              <string>Template &amp;name:</string>
             </property>
             <property name="buddy">
              <cstring>template_name</cstring>
             </property>
            </widget>
           </item>
           <item>
            <widget class="QComboBox" name="template_name">
             <property name="editable">
              <bool>true</bool>
             </property>
             <property name="toolTip">
              <string>The name of the callable template</string>
             </property>
            </widget>
           </item>
          </layout>
         </item>
         <item row="1" column="0" colspan="3">
          <layout class="FlowLayout">
           <item>
            <widget class="QLabel">
             <property name="text">
              <string>T&amp;emplate:</string>
             </property>
             <property name="buddy">
              <cstring>textbox</cstring>
             </property>
             <property name="toolTip">
              <string>The text of the template program goes into the box below</string>
             </property>
             <property name="alignment">
              <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
             </property>
            </widget>
           </item>
           <item>
            <widget class="QLabel">
             <property name="text">
              <string>        </string>
             </property>
            </widget>
           </item>
           <item>
            <widget class="QCheckBox" name="break_box">
             <property name="text">
              <string>Enable &amp;breakpoints</string>
             </property>
             <property name="toolTip">
              <string>&lt;p&gt;If checked, the template evaluator will stop when it
evaluates an expression on a double-clicked line number, opening a dialog showing
you the value as well as all the local variables&lt;/p&gt;</string>
             </property>
            </widget>
           </item>
           <item>
            <widget class="Separator">
             <property name="buddy">
              <cstring>go_button</cstring>
             </property>
            </widget>
           </item>
           <item>
            <widget class="QToolButton" name="go_button">
             <property name="text">
              <string>&amp;Go</string>
             </property>
             <property name="icon">
              <iconset resource="../../../../resources/images.qrc">
               <normaloff>:/images/sync-right.png</normaloff>:/images/sync-right.png</iconset>
             </property>
             <property name="toolButtonStyle">
              <set>Qt::ToolButtonTextBesideIcon</set>
             </property>
             <property name="toolTip">
              <string>If 'Enable breakpoints' is checked then click this button to run your template</string>
             </property>
            </widget>
           </item>
           <item>
            <widget class="Separator">
             <property name="buddy">
              <cstring>go_button</cstring>
             </property>
            </widget>
           </item>
           <item>
            <widget class="QLabel" name="breakpoint_line_box_label">
             <property name="text">
              <string>&amp;Line:</string>
             </property>
             <property name="buddy">
              <cstring>breakpoint_line_box</cstring>
             </property>
             <property name="toolTip">
              <string>Line number to toggle</string>
             </property>
            </widget>
           </item>
           <item>
            <widget class="QSpinBox" name="breakpoint_line_box">
             <property name="toolTip">
              <string>Line number to toggle</string>
             </property>
             <property name="minimum">
              <number>1</number>
             </property>
             <property name="maximum">
              <number>999</number>
             </property>
             <property name="value">
              <number>1</number>
             </property>
             <property name="alignment">
              <set>Qt::AlignRight</set>
             </property>
            </widget>
           </item>
           <item>
            <widget class="QToolButton" name="toggle_button">
             <property name="text">
              <string>&amp;Toggle</string>
             </property>
             <property name="toolButtonStyle">
              <set>Qt::ToolButtonTextBesideIcon</set>
             </property>
             <property name="icon">
              <iconset resource="../../../../resources/images.qrc">
               <normaloff>:/images/swap.png</normaloff>:/images/swap.png</iconset>
             </property>
             <property name="toolTip">
              <string>Toggle the breakpoint on the line number in the box</string>
             </property>
            </widget>
           </item>
           <item>
            <widget class="Separator">
             <property name="buddy">
              <cstring>go_button</cstring>
             </property>
            </widget>
           </item>
           <item>
            <widget class="QToolButton" name="remove_all_button">
             <property name="text">
              <string>&amp;Remove all</string>
             </property>
             <property name="toolButtonStyle">
              <set>Qt::ToolButtonTextBesideIcon</set>
             </property>
             <property name="icon">
              <iconset resource="../../../../resources/images.qrc">
               <normaloff>:/images/list_remove.png</normaloff>:/images/list_remove.png</iconset>
             </property>
             <property name="toolTip">
              <string>Remove all breakpoints</string>
             </property>
            </widget>
           </item>
           <item>
            <widget class="QToolButton" name="set_all_button">
             <property name="text">
              <string>&amp;Set all</string>
             </property>
             <property name="toolButtonStyle">
              <set>Qt::ToolButtonTextBesideIcon</set>
             </property>
             <property name="icon">
              <iconset resource="../../../../resources/images.qrc">
               <normaloff>:/images/plus.png</normaloff>:/images/plus.png</iconset>
             </property>
             <property name="toolTip">
              <string>Set breakpoint on every line</string>
             </property>
            </widget>
           </item>
          </layout>
         </item>
         <item row="2" column="0" colspan="3">
          <widget class="CodeEditor" name="textbox">
           <property name="toolTip">
            <string>&lt;p&gt;The text of the template program goes in this box.
            Don't forget that a General Program Mode template must begin with
            the word "program:".&lt;/p&gt;</string>
           </property>
           <property name="sizePolicy">
            <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
             <horstretch>0</horstretch>
             <verstretch>1</verstretch>
            </sizepolicy>
           </property>
          </widget>
         </item>
         <item row="3" column="0">
          <widget class="QLabel" name="new_doc_label">
           <property name="text">
            <string>D&amp;ocumentation:</string>
           </property>
           <property name="buddy">
            <cstring>new_doc</cstring>
           </property>
           <property name="alignment">
            <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
           </property>
          </widget>
         </item>
         <item row="4" column="0" colspan="3">
          <widget class="QTextEdit" name="new_doc">
           <property name="toolTip">
            <string>Documentation for the function being defined or edited</string>
           </property>
          </widget>
         </item>
         <item row="7" column="0">
          <widget class="QLabel">
           <property name="text">
            <string>Template value:</string>
           </property>
           <property name="buddy">
            <cstring>template_value</cstring>
           </property>
           <property name="toolTip">
            <string>The value of the template using the current book in the library view</string>
           </property>
          </widget>
         </item>
         <item row="8" column="0" colspan="3">
          <widget class="QTableWidget" name="template_value">
          </widget>
         </item>
         <item row="11" column="0">
          <widget class="QLabel" name="user_label_1">
           <property name="text">
            <string>User label</string>
           </property>
           <property name="buddy">
            <cstring>template_value</cstring>
           </property>
           <property name="visible">
            <bool>false</bool>
           </property>
          </widget>
         </item>
         <item row="11" column="1">
          <layout class="BoxLayout" name="user_layout_1" dir="TopToBottom">
          </layout>
         </item>
         <item row="12" column="0">
          <widget class="QLabel" name="user_label_2">
           <property name="text">
            <string>User label</string>
           </property>
           <property name="buddy">
            <cstring>template_value</cstring>
           </property>
           <property name="visible">
            <bool>false</bool>
           </property>
          </widget>
         </item>
         <item row="12" column="1">
          <layout class="BoxLayout" name="user_layout_2" dir="TopToBottom">
          </layout>
         </item>
         <item row="13" column="0">
          <widget class="QLabel" name="user_label_3">
           <property name="text">
            <string>User label</string>
           </property>
           <property name="buddy">
            <cstring>template_value</cstring>
           </property>
           <property name="visible">
            <bool>false</bool>
           </property>
          </widget>
         </item>
         <item row="13" column="1">
          <layout class="BoxLayout" name="user_layout_3" dir="TopToBottom">
          </layout>
         </item>
         <item row="14" column="0">
          <widget class="QLabel" name="user_label_4">
           <property name="text">
            <string>User label</string>
           </property>
           <property name="buddy">
            <cstring>template_value</cstring>
           </property>
           <property name="visible">
            <bool>false</bool>
           </property>
          </widget>
         </item>
         <item row="14" column="1">
          <layout class="BoxLayout" name="user_layout_4" dir="TopToBottom">
          </layout>
         </item>
         <item row="15" column="0">
          <widget class="QLabel" name="user_label_5">
           <property name="text">
            <string>User label</string>
           </property>
           <property name="buddy">
            <cstring>template_value</cstring>
           </property>
           <property name="visible">
            <bool>false</bool>
           </property>
          </widget>
         </item>
         <item row="15" column="1">
          <layout class="BoxLayout" name="user_layout_5" dir="TopToBottom">
          </layout>
         </item>
         <item row="16" column="0">
          <widget class="QLabel" name="user_label_6">
           <property name="text">
            <string>User label</string>
           </property>
           <property name="buddy">
            <cstring>template_value</cstring>
           </property>
           <property name="visible">
            <bool>false</bool>
           </property>
          </widget>
         </item>
         <item row="16" column="1">
          <layout class="BoxLayout" name="user_layout_6" dir="TopToBottom">
          </layout>
         </item>
         <item row="17" column="0">
          <widget class="QLabel" name="user_label_7">
           <property name="text">
            <string>User label</string>
           </property>
           <property name="buddy">
            <cstring>template_value</cstring>
           </property>
           <property name="visible">
            <bool>false</bool>
           </property>
          </widget>
         </item>
         <item row="17" column="1">
          <layout class="BoxLayout" name="user_layout_7" dir="TopToBottom">
          </layout>
         </item>
         <item row="18" column="0">
          <widget class="QLabel" name="user_label_8">
           <property name="text">
            <string>User label</string>
           </property>
           <property name="buddy">
            <cstring>template_value</cstring>
           </property>
           <property name="visible">
            <bool>false</bool>
           </property>
          </widget>
         </item>
         <item row="18" column="1">
          <layout class="BoxLayout" name="user_layout_8" dir="TopToBottom">
          </layout>
         </item>
         <item row="19" column="0">
          <widget class="QLabel" name="user_label_9">
           <property name="text">
            <string>User label</string>
           </property>
           <property name="buddy">
            <cstring>template_value</cstring>
           </property>
           <property name="visible">
            <bool>false</bool>
           </property>
          </widget>
         </item>
         <item row="24" column="0" colspan="3">
          <layout class="QHBoxLayout">
           <item>
            <widget class="QLabel" name="font_name_label">
             <property name="text">
              <string>Font:</string>
             </property>
             <property name="buddy">
              <cstring>font_box</cstring>
             </property>
            </widget>
           </item>
           <item>
            <widget class="QFontComboBox" name="font_box">
             <property name="toolTip">
              <string>Select the font for the Template box</string>
             </property>
            </widget>
           </item>
           <item>
            <widget class="QLabel" name="font_size_label">
             <property name="text">
              <string>Size:</string>
             </property>
             <property name="buddy">
              <cstring>font_size_box</cstring>
             </property>
            </widget>
           </item>
           <item>
            <widget class="QSpinBox" name="font_size_box">
             <property name="toolTip">
              <string>Select the font size for the Template box</string>
             </property>
            </widget>
           </item>
           <item>
            <widget class="QFrame" name="frame">
             <property name="frameShape">
              <enum>QFrame::VLine</enum>
             </property>
             <property name="frameShadow">
              <enum>QFrame::Raised</enum>
             </property>
             <property name="lineWidth">
              <number>3</number>
             </property>
            </widget>
           </item>
           <item>
            <widget class="QToolButton" name="load_button">
             <property name="text">
              <string>Lo&amp;ad</string>
             </property>
             <property name="toolTip">
              <string>Load the template from a file</string>
             </property>
            </widget>
           </item>
           <item>
            <widget class="QToolButton" name="save_button">
             <property name="text">
              <string>Sa&amp;ve</string>
             </property>
             <property name="toolTip">
              <string>Save the template in a file</string>
             </property>
            </widget>
           </item>
           <item>
            <widget class="QFrame" name="frame">
             <property name="frameShape">
              <enum>QFrame::VLine</enum>
             </property>
             <property name="frameShadow">
              <enum>QFrame::Raised</enum>
             </property>
             <property name="lineWidth">
              <number>3</number>
             </property>
            </widget>
           </item>
           <item>
            <spacer>
             <property name="orientation">
              <enum>Qt::Horizontal</enum>
             </property>
             <property name="sizeHint" stdset="0">
              <size>
               <width>10</width>
               <height>0</height>
              </size>
             </property>
            </spacer>
           </item>
           <item>
            <widget class="QDialogButtonBox" name="buttonBox">
             <property name="orientation">
              <enum>Qt::Horizontal</enum>
             </property>
             <property name="standardButtons">
              <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
             </property>
            </widget>
           </item>
          </layout>
         </item>
         <item row="25" column="0" colspan="3">
          <widget class="QFrame">
           <property name="frameShape">
            <enum>QFrame::HLine</enum>
           </property>
          </widget>
         </item>
         <item row="30" column="0" colspan="3">
          <layout class="QGridLayout">
           <item row="0" column="0" colspan="2">
            <widget class="QLabel" name="label">
             <property name="text">
              <string>Template Function Reference</string>
             </property>
            </widget>
           </item>
           <item row="1" column="0">
            <widget class="QLabel" name="label">
             <property name="text">
              <string>Function &amp;name:</string>
             </property>
             <property name="buddy">
              <cstring>function</cstring>
             </property>
            </widget>
           </item>
           <item row="1" column="1">
            <widget class="QComboBox" name="function"/>
           </item>
           <item row="2" column="0">
            <widget class="QLabel" name="label_22">
             <property name="text">
              <string>&amp;Function type:</string>
             </property>
             <property name="alignment">
              <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
             </property>
             <property name="buddy">
              <cstring>func_type</cstring>
             </property>
            </widget>
           </item>
           <item row="2" column="1">
            <widget class="QLineEdit" name="func_type">
             <property name="readOnly">
              <bool>true</bool>
             </property>
            </widget>
           </item>
           <item row="3" column="0">
            <widget class="QLabel" name="label_2">
             <property name="text">
              <string>&amp;Documentation:</string>
             </property>
             <property name="alignment">
              <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
             </property>
             <property name="buddy">
              <cstring>documentation</cstring>
             </property>
            </widget>
           </item>
           <item row="3" column="1">
            <widget class="QPlainTextEdit" name="documentation">
             <property name="maximumSize">
              <size>
               <width>16777215</width>
               <height>75</height>
              </size>
             </property>
            </widget>
           </item>
           <item row="4" column="0">
            <widget class="QLabel" name="label_3">
             <property name="text">
              <string>&amp;Code:</string>
             </property>
             <property name="alignment">
              <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
             </property>
             <property name="buddy">
              <cstring>source_code</cstring>
             </property>
            </widget>
           </item>
           <item row="4" column="1">
            <widget class="QPlainTextEdit" name="source_code">
             <property name="maximumSize">
              <size>
               <width>16777215</width>
               <height>75</height>
              </size>
             </property>
            </widget>
           </item>
          </layout>
         </item>
         <item row="27" column="1">
          <widget class="QLabel" name="template_tutorial">
           <property name="openExternalLinks">
            <bool>true</bool>
           </property>
          </widget>
         </item>
         <item row="28" column="1">
          <widget class="QLabel" name="template_func_reference">
           <property name="openExternalLinks">
            <bool>true</bool>
           </property>
          </widget>
         </item>
        </layout>
       </item>
      </layout>
     </widget>
    </widget>
   </item>
  </layout>
 </widget>
 <customwidgets>
  <customwidget>
   <class>ColorButton</class>
   <extends>QPushButton</extends>
   <header>calibre/gui2/widgets2.h</header>
  </customwidget>
  <customwidget>
   <class>FlowLayout</class>
   <extends>QLayout</extends>
   <header>calibre/gui2/widgets2.h</header>
  </customwidget>
  <customwidget>
   <class>BoxLayout</class>
   <extends>QBoxLayout</extends>
   <header>calibre/gui2/dialogs/template_dialog_box_layout.h</header>
  </customwidget>
  <customwidget>
   <class>Separator</class>
   <extends>QWidget</extends>
   <header>calibre/gui2/widgets2.h</header>
  </customwidget>
  <customwidget>
   <class>CodeEditor</class>
   <extends>QPlainTextEdit</extends>
   <header>calibre/gui2/dialogs/template_dialog_code_widget.h</header>
  </customwidget>
 </customwidgets>
 <resources/>
 <connections>
  <connection>
   <sender>buttonBox</sender>
   <signal>accepted()</signal>
   <receiver>TemplateDialog</receiver>
   <slot>accept()</slot>
   <hints>
    <hint type="sourcelabel">
     <x>229</x>
     <y>211</y>
    </hint>
    <hint type="destinationlabel">
     <x>157</x>
     <y>234</y>
    </hint>
   </hints>
  </connection>
  <connection>
   <sender>buttonBox</sender>
   <signal>rejected()</signal>
   <receiver>TemplateDialog</receiver>
   <slot>reject()</slot>
   <hints>
    <hint type="sourcelabel">
     <x>297</x>
     <y>217</y>
    </hint>
    <hint type="destinationlabel">
     <x>286</x>
     <y>234</y>
    </hint>
   </hints>
  </connection>
 </connections>
</ui>
