src/eric7/CodeFormatting/IsortConfigurationDialog.ui

Mon, 31 Oct 2022 15:29:18 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Mon, 31 Oct 2022 15:29:18 +0100
branch
eric7
changeset 9453
e5065dde905d
child 9476
3238ffc4b3df
permissions
-rw-r--r--

Code Formatting
- added an interface to resort the import statements of Python source files with the 'isort' utility

<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
 <class>IsortConfigurationDialog</class>
 <widget class="QDialog" name="IsortConfigurationDialog">
  <property name="geometry">
   <rect>
    <x>0</x>
    <y>0</y>
    <width>650</width>
    <height>700</height>
   </rect>
  </property>
  <property name="windowTitle">
   <string>isort Configuration</string>
  </property>
  <property name="sizeGripEnabled">
   <bool>true</bool>
  </property>
  <layout class="QGridLayout" name="gridLayout_2">
   <item row="0" column="0">
    <widget class="QLabel" name="label">
     <property name="text">
      <string>Configuration Source:</string>
     </property>
    </widget>
   </item>
   <item row="0" column="1">
    <widget class="QComboBox" name="sourceComboBox">
     <property name="sizePolicy">
      <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
       <horstretch>0</horstretch>
       <verstretch>0</verstretch>
      </sizepolicy>
     </property>
     <property name="toolTip">
      <string>Select the configuration source.</string>
     </property>
    </widget>
   </item>
   <item row="2" column="0" colspan="2">
    <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>
   <item row="1" column="0" colspan="2">
    <widget class="QGroupBox" name="configurationGroup">
     <property name="title">
      <string>Configuration</string>
     </property>
     <layout class="QVBoxLayout" name="verticalLayout">
      <item>
       <layout class="QGridLayout" name="gridLayout_3">
        <item row="0" column="0">
         <widget class="QLabel" name="label_2">
          <property name="text">
           <string>Profile:</string>
          </property>
         </widget>
        </item>
        <item row="0" column="1">
         <widget class="QComboBox" name="profileComboBox">
          <property name="toolTip">
           <string>Enter a profile to be used (empty for none) (see isort documentation).</string>
          </property>
          <property name="editable">
           <bool>true</bool>
          </property>
         </widget>
        </item>
        <item row="0" column="2">
         <widget class="QLabel" name="label_13">
          <property name="sizePolicy">
           <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
            <horstretch>0</horstretch>
            <verstretch>0</verstretch>
           </sizepolicy>
          </property>
          <property name="text">
           <string>&lt;a href=&quot;https://pycqa.github.io/isort/docs/configuration/profiles.html&quot;&gt;Built-In Profiles&lt;/a&gt;</string>
          </property>
          <property name="openExternalLinks">
           <bool>true</bool>
          </property>
         </widget>
        </item>
        <item row="1" column="0">
         <widget class="QLabel" name="label_3">
          <property name="text">
           <string>Target Version:</string>
          </property>
         </widget>
        </item>
        <item row="1" column="1">
         <widget class="QComboBox" name="pythonComboBox">
          <property name="toolTip">
           <string>Select the target Python version.</string>
          </property>
         </widget>
        </item>
        <item row="1" column="2">
         <spacer name="horizontalSpacer">
          <property name="orientation">
           <enum>Qt::Horizontal</enum>
          </property>
          <property name="sizeHint" stdset="0">
           <size>
            <width>40</width>
            <height>20</height>
           </size>
          </property>
         </spacer>
        </item>
        <item row="2" column="0">
         <widget class="QLabel" name="label_4">
          <property name="text">
           <string>Multi Line Output:</string>
          </property>
         </widget>
        </item>
        <item row="2" column="1">
         <widget class="QComboBox" name="multiLineComboBox">
          <property name="toolTip">
           <string>Select the type of multi line import statements (see isort documentation).</string>
          </property>
         </widget>
        </item>
        <item row="2" column="2">
         <widget class="QLabel" name="label_12">
          <property name="sizePolicy">
           <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
            <horstretch>0</horstretch>
            <verstretch>0</verstretch>
           </sizepolicy>
          </property>
          <property name="text">
           <string>&lt;a href=&quot;https://pycqa.github.io/isort/docs/configuration/multi_line_output_modes.html&quot;&gt;Defined Multi Line Output Modes&lt;/a&gt;</string>
          </property>
          <property name="openExternalLinks">
           <bool>true</bool>
          </property>
         </widget>
        </item>
        <item row="3" column="0">
         <widget class="QLabel" name="label_14">
          <property name="text">
           <string>Sort Order:</string>
          </property>
         </widget>
        </item>
        <item row="3" column="1">
         <widget class="QComboBox" name="sortOrderComboBox">
          <property name="toolTip">
           <string>Select the sort order (empty for default).</string>
          </property>
         </widget>
        </item>
        <item row="3" column="2">
         <widget class="QLabel" name="label_15">
          <property name="text">
           <string>&lt;a href=&quot;https://pycqa.github.io/isort/docs/configuration/options.html#sort-order&quot;&gt;Defined Sort Orders&lt;/a&gt;</string>
          </property>
          <property name="openExternalLinks">
           <bool>true</bool>
          </property>
         </widget>
        </item>
        <item row="4" column="0" colspan="3">
         <widget class="QCheckBox" name="sortCaseSensitiveCheckBox">
          <property name="toolTip">
           <string>Select to sort imports observing the case.</string>
          </property>
          <property name="text">
           <string>Sort Case Sensitively</string>
          </property>
         </widget>
        </item>
        <item row="5" column="0">
         <widget class="QLabel" name="label_16">
          <property name="text">
           <string>Supported Extensions:</string>
          </property>
         </widget>
        </item>
        <item row="5" column="1" colspan="2">
         <widget class="QLineEdit" name="extensionsEdit">
          <property name="toolTip">
           <string>Enter the supported extensions separated by space (empty for default).</string>
          </property>
          <property name="clearButtonEnabled">
           <bool>true</bool>
          </property>
         </widget>
        </item>
       </layout>
      </item>
      <item>
       <layout class="QGridLayout" name="gridLayout">
        <item row="0" column="0" colspan="2">
         <widget class="QLabel" name="label_5">
          <property name="text">
           <string>Line Length:</string>
          </property>
         </widget>
        </item>
        <item row="0" column="2">
         <widget class="QSpinBox" name="lineLengthSpinBox">
          <property name="toolTip">
           <string>Enter the allowed maximum line length.</string>
          </property>
          <property name="alignment">
           <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
          </property>
          <property name="minimum">
           <number>70</number>
          </property>
          <property name="maximum">
           <number>120</number>
          </property>
          <property name="value">
           <number>79</number>
          </property>
         </widget>
        </item>
        <item row="0" column="3">
         <spacer name="horizontalSpacer_2">
          <property name="orientation">
           <enum>Qt::Horizontal</enum>
          </property>
          <property name="sizeHint" stdset="0">
           <size>
            <width>55</width>
            <height>17</height>
           </size>
          </property>
         </spacer>
        </item>
        <item row="1" column="0" colspan="2">
         <widget class="QLabel" name="label_6">
          <property name="text">
           <string>Lines Before Imports:</string>
          </property>
         </widget>
        </item>
        <item row="1" column="2">
         <widget class="QSpinBox" name="linesBeforeImportsSpinBox">
          <property name="toolTip">
           <string>Enter the number of lines before import statements.</string>
          </property>
          <property name="alignment">
           <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
          </property>
          <property name="specialValueText">
           <string>automatic</string>
          </property>
          <property name="minimum">
           <number>-1</number>
          </property>
          <property name="maximum">
           <number>5</number>
          </property>
          <property name="value">
           <number>-1</number>
          </property>
         </widget>
        </item>
        <item row="1" column="4" colspan="2">
         <widget class="QLabel" name="label_7">
          <property name="text">
           <string>Lines After Imports:</string>
          </property>
         </widget>
        </item>
        <item row="1" column="6">
         <widget class="QSpinBox" name="linesAfterImportsSpinBox">
          <property name="toolTip">
           <string>Enter the number of lines after import statements.</string>
          </property>
          <property name="alignment">
           <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
          </property>
          <property name="specialValueText">
           <string>automatic</string>
          </property>
          <property name="minimum">
           <number>-1</number>
          </property>
          <property name="maximum">
           <number>120</number>
          </property>
          <property name="value">
           <number>-1</number>
          </property>
         </widget>
        </item>
        <item row="1" column="7">
         <spacer name="horizontalSpacer_3">
          <property name="orientation">
           <enum>Qt::Horizontal</enum>
          </property>
          <property name="sizeHint" stdset="0">
           <size>
            <width>87</width>
            <height>17</height>
           </size>
          </property>
         </spacer>
        </item>
        <item row="2" column="0" colspan="2">
         <widget class="QLabel" name="label_8">
          <property name="text">
           <string>Lines Between Sections:</string>
          </property>
         </widget>
        </item>
        <item row="2" column="2">
         <widget class="QSpinBox" name="linesBetweenSectionsSpinBox">
          <property name="toolTip">
           <string>Enter the number of lines between import sections.</string>
          </property>
          <property name="alignment">
           <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
          </property>
          <property name="minimum">
           <number>0</number>
          </property>
          <property name="maximum">
           <number>5</number>
          </property>
          <property name="value">
           <number>1</number>
          </property>
         </widget>
        </item>
        <item row="2" column="4" colspan="2">
         <widget class="QLabel" name="label_9">
          <property name="text">
           <string>Lines Between Types:</string>
          </property>
         </widget>
        </item>
        <item row="2" column="6">
         <widget class="QSpinBox" name="linesBetweenTypesSpinBox">
          <property name="toolTip">
           <string>Enter the number of lines between import types.</string>
          </property>
          <property name="alignment">
           <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
          </property>
          <property name="minimum">
           <number>0</number>
          </property>
          <property name="maximum">
           <number>5</number>
          </property>
          <property name="value">
           <number>0</number>
          </property>
         </widget>
        </item>
        <item row="3" column="0" colspan="4">
         <widget class="QCheckBox" name="trailingCommaCheckBox">
          <property name="toolTip">
           <string>Select to include a trailing comma.</string>
          </property>
          <property name="text">
           <string>Include Trailing Comma</string>
          </property>
         </widget>
        </item>
        <item row="3" column="4" colspan="4">
         <widget class="QCheckBox" name="parenthesesCheckBox">
          <property name="toolTip">
           <string>Select for parenthesized import statements.</string>
          </property>
          <property name="text">
           <string>Use Parentheses</string>
          </property>
         </widget>
        </item>
        <item row="4" column="0">
         <widget class="QLabel" name="label_10">
          <property name="text">
           <string>Sections:</string>
          </property>
          <property name="alignment">
           <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
          </property>
         </widget>
        </item>
        <item row="4" column="1" colspan="3">
         <widget class="QPlainTextEdit" name="sectionsEdit">
          <property name="toolTip">
           <string>Enter the order of sections (one per line).</string>
          </property>
         </widget>
        </item>
        <item row="4" column="4">
         <widget class="QLabel" name="label_11">
          <property name="text">
           <string>Exclude:</string>
          </property>
          <property name="alignment">
           <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
          </property>
         </widget>
        </item>
        <item row="4" column="5" colspan="3">
         <widget class="QPlainTextEdit" name="excludeEdit">
          <property name="toolTip">
           <string>Enter glob patterns for files to be skipped.</string>
          </property>
         </widget>
        </item>
       </layout>
      </item>
     </layout>
    </widget>
   </item>
  </layout>
 </widget>
 <tabstops>
  <tabstop>sourceComboBox</tabstop>
  <tabstop>profileComboBox</tabstop>
  <tabstop>pythonComboBox</tabstop>
  <tabstop>multiLineComboBox</tabstop>
  <tabstop>sortOrderComboBox</tabstop>
  <tabstop>sortCaseSensitiveCheckBox</tabstop>
  <tabstop>extensionsEdit</tabstop>
  <tabstop>lineLengthSpinBox</tabstop>
  <tabstop>linesBeforeImportsSpinBox</tabstop>
  <tabstop>linesAfterImportsSpinBox</tabstop>
  <tabstop>linesBetweenSectionsSpinBox</tabstop>
  <tabstop>linesBetweenTypesSpinBox</tabstop>
  <tabstop>trailingCommaCheckBox</tabstop>
  <tabstop>parenthesesCheckBox</tabstop>
  <tabstop>sectionsEdit</tabstop>
  <tabstop>excludeEdit</tabstop>
 </tabstops>
 <resources/>
 <connections>
  <connection>
   <sender>buttonBox</sender>
   <signal>accepted()</signal>
   <receiver>IsortConfigurationDialog</receiver>
   <slot>accept()</slot>
   <hints>
    <hint type="sourcelabel">
     <x>353</x>
     <y>453</y>
    </hint>
    <hint type="destinationlabel">
     <x>376</x>
     <y>371</y>
    </hint>
   </hints>
  </connection>
  <connection>
   <sender>buttonBox</sender>
   <signal>rejected()</signal>
   <receiver>IsortConfigurationDialog</receiver>
   <slot>reject()</slot>
   <hints>
    <hint type="sourcelabel">
     <x>166</x>
     <y>452</y>
    </hint>
    <hint type="destinationlabel">
     <x>186</x>
     <y>365</y>
    </hint>
   </hints>
  </connection>
 </connections>
</ui>

eric ide

mercurial