regex for numeric value for data from text files; closes #127

This commit is contained in:
Dominik Demuth
2023-11-05 17:11:28 +01:00
parent cb2bc78a2a
commit f956c111c2
5 changed files with 196 additions and 100 deletions

View File

@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>627</width>
<height>1245</height>
<width>665</width>
<height>904</height>
</rect>
</property>
<property name="windowTitle">
@ -301,9 +301,6 @@
</item>
</layout>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout_4"/>
</item>
</layout>
</widget>
</item>
@ -315,50 +312,78 @@
</widget>
</item>
<item>
<widget class="QLabel" name="label_8">
<property name="text">
<string>Filename</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="radioButton">
<property name="text">
<string>Regex</string>
</property>
<attribute name="buttonGroup">
<string notr="true">buttonGroup_2</string>
</attribute>
</widget>
</item>
<item>
<widget class="QLineEdit" name="lineEdit"/>
</item>
<item>
<widget class="QRadioButton" name="radioButton_2">
<property name="text">
<string>Custom value</string>
</property>
<attribute name="buttonGroup">
<string notr="true">buttonGroup_2</string>
</attribute>
</widget>
</item>
<item>
<widget class="QLineEdit" name="lineEdit_2"/>
</item>
<item>
<widget class="QRadioButton" name="radioButton_3">
<property name="text">
<string>Position in filename</string>
</property>
<attribute name="buttonGroup">
<string notr="true">buttonGroup_2</string>
</attribute>
</widget>
</item>
<item>
<widget class="QSpinBox" name="spinBox"/>
<layout class="QGridLayout" name="gridLayout">
<item row="1" column="3">
<widget class="QSpinBox" name="re_match_index">
<property name="minimum">
<number>1</number>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QLabel" name="label_9">
<property name="text">
<string>Match index</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="regex_input">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Token:&lt;br/&gt;[abc]: Matches any of a, b, or c&lt;br/&gt;[a-z]: Matches any digit in the range a-z&lt;br/&gt;\d: Matches any digit in the range 0-9 (equal to [0-9}&lt;/p&gt;&lt;p&gt;Quantifiers:&lt;br/&gt;a*: 0 or more of a&lt;br/&gt;a*: 1 or more of a&lt;br/&gt;a?: 0 or 1 of a&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QRadioButton" name="re_button">
<property name="text">
<string>Regex</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
<attribute name="buttonGroup">
<string notr="true">buttonGroup_2</string>
</attribute>
</widget>
</item>
<item row="2" column="1">
<widget class="QLineEdit" name="custom_input">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QRadioButton" name="custom_button">
<property name="text">
<string>Custom value</string>
</property>
<attribute name="buttonGroup">
<string notr="true">buttonGroup_2</string>
</attribute>
</widget>
</item>
<item row="0" column="0" colspan="4">
<widget class="QLabel" name="label_8">
<property name="text">
<string>Filename</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QGroupBox" name="groupBox_2">
@ -614,8 +639,8 @@
<slot>close()</slot>
<hints>
<hint type="sourcelabel">
<x>366</x>
<y>485</y>
<x>375</x>
<y>894</y>
</hint>
<hint type="destinationlabel">
<x>366</x>
@ -625,7 +650,7 @@
</connection>
</connections>
<buttongroups>
<buttongroup name="buttonGroup"/>
<buttongroup name="buttonGroup_2"/>
<buttongroup name="buttonGroup"/>
</buttongroups>
</ui>