Changeset - a8e30825928f
[Not reviewed]
new-reader
0 8 0
Hasan Yavuz Ă–ZDERYA - 9 years ago 2016-06-12 16:14:48
hy@ozderya.net
changed the visual style of framed reader settings

this also altered the binary stream reader settings because they make use of same widgets
8 files changed with 337 insertions and 208 deletions:
0 comments (0 inline, 0 general)
src/binarystreamreadersettings.ui
Show inline comments
 
@@ -6,35 +6,37 @@
 
   <rect>
 
    <x>0</x>
 
    <y>0</y>
 
    <width>432</width>
 
    <height>203</height>
 
    <width>588</width>
 
    <height>212</height>
 
   </rect>
 
  </property>
 
  <property name="windowTitle">
 
   <string>Form</string>
 
  </property>
 
  <layout class="QVBoxLayout" name="verticalLayout">
 
   <property name="leftMargin">
 
    <number>0</number>
 
   </property>
 
   <property name="topMargin">
 
    <number>0</number>
 
   </property>
 
   <property name="rightMargin">
 
    <number>0</number>
 
   </property>
 
   <property name="bottomMargin">
 
    <number>0</number>
 
   </property>
 
   <item>
 
    <layout class="QHBoxLayout" name="horizontalLayout_3">
 
     <item>
 
  <widget class="QLabel" name="label_4">
 
   <property name="geometry">
 
    <rect>
 
     <x>17</x>
 
     <y>10</y>
 
     <width>127</width>
 
     <height>27</height>
 
    </rect>
 
   </property>
 
   <property name="text">
 
    <string>Number Of Channels:</string>
 
   </property>
 
  </widget>
 
     </item>
 
     <item>
 
  <widget class="QSpinBox" name="spNumOfChannels">
 
   <property name="geometry">
 
    <rect>
 
     <x>150</x>
 
     <y>10</y>
 
     <width>60</width>
 
     <height>27</height>
 
    </rect>
 
   </property>
 
   <property name="minimumSize">
 
    <size>
 
     <width>60</width>
 
@@ -51,35 +53,22 @@
 
    <number>32</number>
 
   </property>
 
  </widget>
 
  <widget class="NumberFormatBox" name="nfBox" native="true">
 
   <property name="geometry">
 
    <rect>
 
     <x>20</x>
 
     <y>50</y>
 
     <width>161</width>
 
     <height>141</height>
 
    </rect>
 
     </item>
 
     <item>
 
      <spacer name="horizontalSpacer">
 
       <property name="orientation">
 
        <enum>Qt::Horizontal</enum>
 
   </property>
 
  </widget>
 
  <widget class="EndiannessBox" name="endiBox" native="true">
 
   <property name="geometry">
 
    <rect>
 
     <x>190</x>
 
     <y>50</y>
 
     <width>120</width>
 
     <height>80</height>
 
    </rect>
 
       <property name="sizeHint" stdset="0">
 
        <size>
 
         <width>40</width>
 
         <height>20</height>
 
        </size>
 
   </property>
 
  </widget>
 
      </spacer>
 
     </item>
 
     <item>
 
  <widget class="QPushButton" name="pbSkipByte">
 
   <property name="geometry">
 
    <rect>
 
     <x>220</x>
 
     <y>10</y>
 
     <width>85</width>
 
     <height>27</height>
 
    </rect>
 
   </property>
 
   <property name="toolTip">
 
    <string>Skip reading 1 byte to correct the alignment</string>
 
   </property>
 
@@ -87,6 +76,103 @@
 
    <string>Skip Byte</string>
 
   </property>
 
  </widget>
 
     </item>
 
    </layout>
 
   </item>
 
   <item>
 
    <layout class="QHBoxLayout" name="horizontalLayout">
 
     <item>
 
      <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>
 
      <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">
 
       <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>
 
       </property>
 
       <property name="sizeHint" stdset="0">
 
        <size>
 
         <width>1</width>
 
         <height>20</height>
 
        </size>
 
       </property>
 
      </spacer>
 
     </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>
src/endiannessbox.cpp
Show inline comments
 
@@ -21,7 +21,7 @@
 
#include "ui_endiannessbox.h"
 

	
 
EndiannessBox::EndiannessBox(QWidget *parent) :
 
    QGroupBox(parent),
 
    QWidget(parent),
 
    ui(new Ui::EndiannessBox)
 
{
 
    ui->setupUi(this);
src/endiannessbox.h
Show inline comments
 
@@ -20,7 +20,7 @@
 
#ifndef ENDIANNESSBOX_H
 
#define ENDIANNESSBOX_H
 

	
 
#include <QGroupBox>
 
#include <QWidget>
 

	
 
namespace Ui {
 
class EndiannessBox;
 
@@ -32,7 +32,7 @@ enum Endianness
 
    BigEndian
 
};
 

	
 
class EndiannessBox : public QGroupBox
 
class EndiannessBox : public QWidget
 
{
 
    Q_OBJECT
 

	
src/endiannessbox.ui
Show inline comments
 
<?xml version="1.0" encoding="UTF-8"?>
 
<ui version="4.0">
 
 <class>EndiannessBox</class>
 
 <widget class="QGroupBox" name="EndiannessBox">
 
 <widget class="QWidget" name="EndiannessBox">
 
  <property name="geometry">
 
   <rect>
 
    <x>0</x>
 
    <y>0</y>
 
    <width>131</width>
 
    <height>86</height>
 
    <width>202</width>
 
    <height>22</height>
 
   </rect>
 
  </property>
 
  <property name="windowTitle">
 
   <string>GroupBox</string>
 
   <string>EndiannessBox</string>
 
  </property>
 
  <layout class="QHBoxLayout" name="horizontalLayout">
 
   <property name="spacing">
 
    <number>3</number>
 
   </property>
 
   <property name="leftMargin">
 
    <number>0</number>
 
   </property>
 
   <property name="topMargin">
 
    <number>0</number>
 
  </property>
 
  <property name="title">
 
   <string>Byte Order:</string>
 
   <property name="rightMargin">
 
    <number>0</number>
 
   </property>
 
   <property name="bottomMargin">
 
    <number>0</number>
 
  </property>
 
  <layout class="QVBoxLayout" name="verticalLayout">
 
   <item>
 
    <widget class="QRadioButton" name="rbBigE">
 
     <property name="toolTip">
 
      <string>most significant byte first</string>
 
     </property>
 
     <property name="text">
 
      <string>Big Endian</string>
 
     </property>
 
    </widget>
 
   </item>
 
   <item>
 
    <widget class="QRadioButton" name="rbLittleE">
 
     <property name="toolTip">
 
@@ -30,16 +52,6 @@
 
     </property>
 
    </widget>
 
   </item>
 
   <item>
 
    <widget class="QRadioButton" name="rbBigE">
 
     <property name="toolTip">
 
      <string>most significant byte first</string>
 
     </property>
 
     <property name="text">
 
      <string>Big Endian</string>
 
     </property>
 
    </widget>
 
   </item>
 
  </layout>
 
 </widget>
 
 <resources/>
src/framedreadersettings.ui
Show inline comments
 
@@ -6,51 +6,45 @@
 
   <rect>
 
    <x>0</x>
 
    <y>0</y>
 
    <width>542</width>
 
    <width>852</width>
 
    <height>222</height>
 
   </rect>
 
  </property>
 
  <property name="windowTitle">
 
   <string>Form</string>
 
  </property>
 
  <widget class="NumberFormatBox" name="nfBox" native="true">
 
   <property name="geometry">
 
    <rect>
 
     <x>210</x>
 
     <y>40</y>
 
     <width>141</width>
 
     <height>141</height>
 
    </rect>
 
  <layout class="QVBoxLayout" name="verticalLayout">
 
   <property name="spacing">
 
    <number>3</number>
 
   </property>
 
   <property name="leftMargin">
 
    <number>0</number>
 
   </property>
 
   <property name="topMargin">
 
    <number>0</number>
 
   </property>
 
   <property name="rightMargin">
 
    <number>0</number>
 
   </property>
 
  </widget>
 
  <widget class="EndiannessBox" name="endiBox" native="true">
 
   <property name="geometry">
 
    <rect>
 
     <x>360</x>
 
     <y>40</y>
 
     <width>120</width>
 
     <height>80</height>
 
    </rect>
 
   <property name="bottomMargin">
 
    <number>0</number>
 
   </property>
 
  </widget>
 
  <widget class="QWidget" name="layoutWidget">
 
   <property name="geometry">
 
    <rect>
 
     <x>210</x>
 
     <y>0</y>
 
     <width>211</width>
 
     <height>29</height>
 
    </rect>
 
   <item>
 
    <layout class="QFormLayout" name="formLayout">
 
     <property name="fieldGrowthPolicy">
 
      <enum>QFormLayout::FieldsStayAtSizeHint</enum>
 
   </property>
 
   <layout class="QHBoxLayout" name="horizontalLayout_3">
 
    <item>
 
     <item row="0" column="1">
 
      <widget class="CommandEdit" name="leSyncWord"/>
 
     </item>
 
     <item row="1" column="0">
 
     <widget class="QLabel" name="label_2">
 
      <property name="text">
 
       <string>Number Of Channels:</string>
 
        <string># Channels:</string>
 
      </property>
 
     </widget>
 
    </item>
 
    <item>
 
     <item row="1" column="1">
 
     <widget class="QSpinBox" name="spNumOfChannels">
 
      <property name="minimum">
 
       <number>1</number>
 
@@ -60,51 +54,14 @@
 
      </property>
 
     </widget>
 
    </item>
 
   </layout>
 
  </widget>
 
  <widget class="QLabel" name="lMessage">
 
   <property name="geometry">
 
    <rect>
 
     <x>0</x>
 
     <y>180</y>
 
     <width>471</width>
 
     <height>17</height>
 
    </rect>
 
   </property>
 
     <item row="2" column="0">
 
      <widget class="QLabel" name="label_3">
 
   <property name="text">
 
    <string>All is well.</string>
 
        <string>Frame Size:</string>
 
   </property>
 
  </widget>
 
  <widget class="QCheckBox" name="cbDebugMode">
 
   <property name="geometry">
 
    <rect>
 
     <x>360</x>
 
     <y>160</y>
 
     <width>111</width>
 
     <height>22</height>
 
    </rect>
 
   </property>
 
   <property name="toolTip">
 
    <string>Enable printing of extra log messages that can be useful for debugging</string>
 
   </property>
 
   <property name="text">
 
    <string>Debug Mode</string>
 
   </property>
 
  </widget>
 
  <widget class="QGroupBox" name="groupBox">
 
   <property name="geometry">
 
    <rect>
 
     <x>1</x>
 
     <y>39</y>
 
     <width>204</width>
 
     <height>93</height>
 
    </rect>
 
   </property>
 
   <property name="title">
 
    <string>Frame Size:</string>
 
   </property>
 
   <layout class="QVBoxLayout" name="verticalLayout">
 
    <item>
 
     </item>
 
     <item row="2" column="1">
 
     <layout class="QHBoxLayout" name="horizontalLayout">
 
      <item>
 
       <widget class="QRadioButton" name="rbFixedSize">
 
@@ -126,8 +83,6 @@
 
        </property>
 
       </widget>
 
      </item>
 
     </layout>
 
    </item>
 
    <item>
 
     <widget class="QRadioButton" name="rbSizeByte">
 
      <property name="text">
 
@@ -139,34 +94,98 @@
 
     </widget>
 
    </item>
 
   </layout>
 
     </item>
 
     <item row="3" column="0">
 
      <widget class="QLabel" name="label_4">
 
       <property name="text">
 
        <string>Num. Type:</string>
 
       </property>
 
  </widget>
 
  <widget class="QWidget" name="">
 
   <layout class="QHBoxLayout" name="horizontalLayout_2">
 
    <item>
 
     </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="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="text">
 
        <string>Enabled</string>
 
       </property>
 
      </widget>
 
     </item>
 
     <item row="0" column="0">
 
     <widget class="QLabel" name="label">
 
      <property name="text">
 
       <string>Sync Word:</string>
 
        <string>Frame Start:</string>
 
       </property>
 
      </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>1</height>
 
      </size>
 
     </property>
 
    </spacer>
 
   </item>
 
   <item>
 
    <layout class="QHBoxLayout" name="horizontalLayout_4">
 
     <item>
 
      <widget class="QLabel" name="lMessage">
 
       <property name="sizePolicy">
 
        <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
 
         <horstretch>0</horstretch>
 
         <verstretch>0</verstretch>
 
        </sizepolicy>
 
       </property>
 
       <property name="text">
 
        <string>All is well.</string>
 
      </property>
 
     </widget>
 
    </item>
 
    <item>
 
     <widget class="CommandEdit" name="leSyncWord"/>
 
      <widget class="QCheckBox" name="cbDebugMode">
 
       <property name="toolTip">
 
        <string>Enable printing of extra log messages that can be useful for debugging</string>
 
       </property>
 
       <property name="text">
 
        <string>Debug Mode</string>
 
       </property>
 
      </widget>
 
    </item>
 
   </layout>
 
  </widget>
 
  <widget class="QCheckBox" name="cbChecksum">
 
   <property name="geometry">
 
    <rect>
 
     <x>1</x>
 
     <y>138</y>
 
     <width>123</width>
 
     <height>22</height>
 
    </rect>
 
   </property>
 
   <property name="text">
 
    <string>Checksum Byte</string>
 
   </property>
 
  </widget>
 
   </item>
 
  </layout>
 
 </widget>
 
 <customwidgets>
 
  <customwidget>
src/numberformatbox.cpp
Show inline comments
 
@@ -21,7 +21,7 @@
 
#include "ui_numberformatbox.h"
 

	
 
NumberFormatBox::NumberFormatBox(QWidget *parent) :
 
    QGroupBox(parent),
 
    QWidget(parent),
 
    ui(new Ui::NumberFormatBox)
 
{
 
    ui->setupUi(this);
src/numberformatbox.h
Show inline comments
 
@@ -20,7 +20,7 @@
 
#ifndef NUMBERFORMATBOX_H
 
#define NUMBERFORMATBOX_H
 

	
 
#include <QGroupBox>
 
#include <QWidget>
 
#include <QButtonGroup>
 

	
 
namespace Ui {
 
@@ -38,7 +38,7 @@ enum NumberFormat
 
    NumberFormat_float,
 
};
 

	
 
class NumberFormatBox : public QGroupBox
 
class NumberFormatBox : public QWidget
 
{
 
    Q_OBJECT
 

	
src/numberformatbox.ui
Show inline comments
 
<?xml version="1.0" encoding="UTF-8"?>
 
<ui version="4.0">
 
 <class>NumberFormatBox</class>
 
 <widget class="QGroupBox" name="NumberFormatBox">
 
 <widget class="QWidget" name="NumberFormatBox">
 
  <property name="geometry">
 
   <rect>
 
    <x>0</x>
 
    <y>0</y>
 
    <width>158</width>
 
    <height>142</height>
 
    <width>440</width>
 
    <height>22</height>
 
   </rect>
 
  </property>
 
  <property name="windowTitle">
 
   <string>GroupBox</string>
 
   <string>NumberFormat</string>
 
  </property>
 
  <layout class="QHBoxLayout" name="horizontalLayout">
 
   <property name="spacing">
 
    <number>3</number>
 
   </property>
 
   <property name="leftMargin">
 
    <number>0</number>
 
   </property>
 
   <property name="topMargin">
 
    <number>0</number>
 
   </property>
 
   <property name="rightMargin">
 
    <number>0</number>
 
   </property>
 
   <property name="bottomMargin">
 
    <number>0</number>
 
   </property>
 
   <item>
 
    <widget class="QRadioButton" name="rbFloat">
 
     <property name="toolTip">
 
      <string>4 bytes floating point number</string>
 
  </property>
 
  <property name="title">
 
   <string>Number Format:</string>
 
     <property name="text">
 
      <string>float</string>
 
     </property>
 
    </widget>
 
   </item>
 
   <item>
 
    <widget class="QRadioButton" name="rbUint32">
 
     <property name="toolTip">
 
      <string>unsigned 4 bytes integer</string>
 
     </property>
 
     <property name="text">
 
      <string>uint32</string>
 
  </property>
 
  <layout class="QGridLayout" name="gridLayout">
 
   <item row="0" column="0">
 
    </widget>
 
   </item>
 
   <item>
 
    <widget class="QRadioButton" name="rbUint16">
 
     <property name="toolTip">
 
      <string>unsigned 2 bytes integer</string>
 
     </property>
 
     <property name="text">
 
      <string>uint16</string>
 
     </property>
 
    </widget>
 
   </item>
 
   <item>
 
    <widget class="QRadioButton" name="rbUint8">
 
     <property name="toolTip">
 
      <string>unsigned 1 byte integer</string>
 
@@ -30,27 +72,17 @@
 
     </property>
 
    </widget>
 
   </item>
 
   <item row="0" column="1">
 
    <widget class="QRadioButton" name="rbInt8">
 
   <item>
 
    <widget class="QRadioButton" name="rbInt32">
 
     <property name="toolTip">
 
      <string>signed 1 byte integer</string>
 
      <string>signed 4 bytes integer</string>
 
     </property>
 
     <property name="text">
 
      <string>int8</string>
 
      <string>int32</string>
 
     </property>
 
    </widget>
 
   </item>
 
   <item row="1" column="0">
 
    <widget class="QRadioButton" name="rbUint16">
 
     <property name="toolTip">
 
      <string>unsigned 2 bytes integer</string>
 
     </property>
 
     <property name="text">
 
      <string>uint16</string>
 
     </property>
 
    </widget>
 
   </item>
 
   <item row="1" column="1">
 
   <item>
 
    <widget class="QRadioButton" name="rbInt16">
 
     <property name="toolTip">
 
      <string>signed 2 bytes integer</string>
 
@@ -60,33 +92,13 @@
 
     </property>
 
    </widget>
 
   </item>
 
   <item row="2" column="0">
 
    <widget class="QRadioButton" name="rbUint32">
 
   <item>
 
    <widget class="QRadioButton" name="rbInt8">
 
     <property name="toolTip">
 
      <string>unsigned 4 bytes integer</string>
 
      <string>signed 1 byte integer</string>
 
     </property>
 
     <property name="text">
 
      <string>uint32</string>
 
     </property>
 
    </widget>
 
   </item>
 
   <item row="2" column="1">
 
    <widget class="QRadioButton" name="rbInt32">
 
     <property name="toolTip">
 
      <string>signed 4 bytes integer</string>
 
     </property>
 
     <property name="text">
 
      <string>int32</string>
 
     </property>
 
    </widget>
 
   </item>
 
   <item row="3" column="0">
 
    <widget class="QRadioButton" name="rbFloat">
 
     <property name="toolTip">
 
      <string>4 bytes floating point number</string>
 
     </property>
 
     <property name="text">
 
      <string>float</string>
 
      <string>int8</string>
 
     </property>
 
    </widget>
 
   </item>
0 comments (0 inline, 0 general)