Changeset - ef6fd2b206e6
[Not reviewed]
new-reader
0 2 0
Hasan Yavuz Ă–ZDERYA - 9 years ago 2016-06-12 16:40:20
hy@ozderya.net
use form layout in binary reader settings widget for consistency
2 files changed with 21 insertions and 45 deletions:
0 comments (0 inline, 0 general)
src/binarystreamreadersettings.ui
Show inline comments
 
@@ -38,159 +38,135 @@
 
     <item>
 
      <widget class="QSpinBox" name="spNumOfChannels">
 
       <property name="minimumSize">
 
        <size>
 
         <width>60</width>
 
         <height>0</height>
 
        </size>
 
       </property>
 
       <property name="toolTip">
 
        <string>Select number of channels</string>
 
       </property>
 
       <property name="keyboardTracking">
 
        <bool>false</bool>
 
       </property>
 
       <property name="minimum">
 
        <number>1</number>
 
       </property>
 
       <property name="maximum">
 
        <number>32</number>
 
       </property>
 
      </widget>
 
     </item>
 
     <item>
 
      <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>
 
      <widget class="QPushButton" name="pbSkipByte">
 
       <property name="toolTip">
 
        <string>Skip reading 1 byte to correct the alignment</string>
 
       </property>
 
       <property name="text">
 
        <string>Skip Byte</string>
 
       </property>
 
      </widget>
 
     </item>
 
    </layout>
 
   </item>
 
   <item>
 
    <layout class="QHBoxLayout" name="horizontalLayout">
 
     <item>
 
    <layout class="QFormLayout" name="formLayout">
 
     <property name="fieldGrowthPolicy">
 
      <enum>QFormLayout::FieldsStayAtSizeHint</enum>
 
     </property>
 
     <property name="horizontalSpacing">
 
      <number>3</number>
 
     </property>
 
     <item row="0" column="0">
 
      <widget class="QLabel" name="label_5">
 
       <property name="sizePolicy">
 
        <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
 
         <horstretch>0</horstretch>
 
         <verstretch>0</verstretch>
 
        </sizepolicy>
 
       </property>
 
       <property name="text">
 
        <string>Number Type:</string>
 
       </property>
 
      </widget>
 
     </item>
 
     <item>
 
      <widget class="NumberFormatBox" name="nfBox" native="true">
 
       <property name="sizePolicy">
 
        <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
 
         <horstretch>0</horstretch>
 
         <verstretch>0</verstretch>
 
        </sizepolicy>
 
       </property>
 
      </widget>
 
     </item>
 
     <item>
 
      <spacer name="horizontalSpacer_2">
 
       <property name="orientation">
 
        <enum>Qt::Horizontal</enum>
 
       </property>
 
       <property name="sizeHint" stdset="0">
 
        <size>
 
         <width>1</width>
 
         <height>20</height>
 
        </size>
 
       </property>
 
      </spacer>
 
     </item>
 
    </layout>
 
   </item>
 
   <item>
 
    <layout class="QHBoxLayout" name="horizontalLayout_2">
 
     <item>
 
     <item row="1" column="0">
 
      <widget class="QLabel" name="label_6">
 
       <property name="sizePolicy">
 
        <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
 
         <horstretch>0</horstretch>
 
         <verstretch>0</verstretch>
 
        </sizepolicy>
 
       </property>
 
       <property name="text">
 
        <string>Endianness:</string>
 
       </property>
 
      </widget>
 
     </item>
 
     <item>
 
      <widget class="EndiannessBox" name="endiBox" native="true">
 
     <item row="0" column="1">
 
      <widget class="NumberFormatBox" name="nfBox" native="true">
 
       <property name="sizePolicy">
 
        <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
 
         <horstretch>0</horstretch>
 
         <verstretch>0</verstretch>
 
        </sizepolicy>
 
       </property>
 
      </widget>
 
     </item>
 
     <item>
 
      <spacer name="horizontalSpacer_3">
 
       <property name="orientation">
 
        <enum>Qt::Horizontal</enum>
 
     <item row="1" column="1">
 
      <widget class="EndiannessBox" name="endiBox" native="true">
 
       <property name="sizePolicy">
 
        <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
 
         <horstretch>0</horstretch>
 
         <verstretch>0</verstretch>
 
        </sizepolicy>
 
       </property>
 
       <property name="sizeHint" stdset="0">
 
        <size>
 
         <width>1</width>
 
         <height>20</height>
 
        </size>
 
       </property>
 
      </spacer>
 
      </widget>
 
     </item>
 
    </layout>
 
   </item>
 
   <item>
 
    <spacer name="verticalSpacer">
 
     <property name="orientation">
 
      <enum>Qt::Vertical</enum>
 
     </property>
 
     <property name="sizeHint" stdset="0">
 
      <size>
 
       <width>20</width>
 
       <height>40</height>
 
      </size>
 
     </property>
 
    </spacer>
 
   </item>
 
  </layout>
 
 </widget>
 
 <customwidgets>
 
  <customwidget>
 
   <class>NumberFormatBox</class>
 
   <extends>QWidget</extends>
 
   <header>numberformatbox.h</header>
 
   <container>1</container>
 
  </customwidget>
 
  <customwidget>
 
   <class>EndiannessBox</class>
 
   <extends>QWidget</extends>
 
   <header>endiannessbox.h</header>
 
   <container>1</container>
 
  </customwidget>
 
 </customwidgets>
 
 <resources/>
 
 <connections/>
 
</ui>
src/framedreadersettings.ui
Show inline comments
 
@@ -72,100 +72,100 @@
 
      </widget>
 
     </item>
 
     <item row="2" column="1">
 
      <layout class="QHBoxLayout" name="horizontalLayout">
 
       <item>
 
        <widget class="QRadioButton" name="rbFixedSize">
 
         <property name="toolTip">
 
          <string>Frame size is always the same</string>
 
         </property>
 
         <property name="text">
 
          <string>Fixed Size:</string>
 
         </property>
 
        </widget>
 
       </item>
 
       <item>
 
        <widget class="QSpinBox" name="spSize">
 
         <property name="enabled">
 
          <bool>false</bool>
 
         </property>
 
         <property name="toolTip">
 
          <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Enter the frame size. It &lt;span style=&quot; font-weight:600;&quot;&gt;must&lt;/span&gt; be the multiple of (#channels * sample size).&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
 
         </property>
 
         <property name="minimum">
 
          <number>1</number>
 
         </property>
 
         <property name="maximum">
 
          <number>255</number>
 
         </property>
 
        </widget>
 
       </item>
 
       <item>
 
        <widget class="QRadioButton" name="rbSizeByte">
 
         <property name="toolTip">
 
          <string>First byte after the 'frame start' bytes should be the size of the frame. Not counting itself and checksum.</string>
 
         </property>
 
         <property name="text">
 
          <string>First byte of the payload is size</string>
 
         </property>
 
         <property name="checked">
 
          <bool>true</bool>
 
         </property>
 
        </widget>
 
       </item>
 
      </layout>
 
     </item>
 
     <item row="3" column="0">
 
      <widget class="QLabel" name="label_4">
 
       <property name="toolTip">
 
        <string>Number Type</string>
 
        <string/>
 
       </property>
 
       <property name="text">
 
        <string>Num. Type:</string>
 
        <string>Number Type:</string>
 
       </property>
 
      </widget>
 
     </item>
 
     <item row="3" column="1">
 
      <widget class="NumberFormatBox" name="nfBox" native="true">
 
       <property name="sizePolicy">
 
        <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
 
         <horstretch>0</horstretch>
 
         <verstretch>0</verstretch>
 
        </sizepolicy>
 
       </property>
 
      </widget>
 
     </item>
 
     <item row="4" column="0">
 
      <widget class="QLabel" name="label_5">
 
       <property name="toolTip">
 
        <string>Byte Order</string>
 
       </property>
 
       <property name="text">
 
        <string>Endianness:</string>
 
       </property>
 
      </widget>
 
     </item>
 
     <item row="4" column="1">
 
      <widget class="EndiannessBox" name="endiBox" native="true"/>
 
     </item>
 
     <item row="5" column="0">
 
      <widget class="QLabel" name="label_6">
 
       <property name="text">
 
        <string>Checksum:</string>
 
       </property>
 
      </widget>
 
     </item>
 
     <item row="5" column="1">
 
      <widget class="QCheckBox" name="cbChecksum">
 
       <property name="toolTip">
 
        <string>Last byte of the frame is checksum.</string>
 
       </property>
 
       <property name="text">
 
        <string>Enabled</string>
 
       </property>
 
      </widget>
 
     </item>
 
     <item row="0" column="0">
 
      <widget class="QLabel" name="label">
 
       <property name="text">
 
        <string>Frame Start:</string>
 
       </property>
0 comments (0 inline, 0 general)