Reorganized the main window to properly resize. Added baud rate setting. Added ability to send frames from this application.

This commit is contained in:
Collin Kidder
2015-05-07 22:18:18 -04:00
parent 5f4fd37839
commit d86f539d5a
6 changed files with 292 additions and 133 deletions
+161 -116
View File
@@ -6,7 +6,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>927</width>
<width>800</width>
<height>500</height>
</rect>
</property>
@@ -26,127 +26,172 @@
<string>SavvyCAN</string>
</property>
<widget class="QWidget" name="centralWidget">
<widget class="QTableView" name="canFramesView">
<property name="geometry">
<rect>
<x>20</x>
<y>10</y>
<width>675</width>
<height>421</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>11</pointsize>
<weight>50</weight>
<bold>false</bold>
</font>
</property>
<property name="alternatingRowColors">
<bool>true</bool>
</property>
<property name="wordWrap">
<bool>false</bool>
</property>
</widget>
<widget class="QLabel" name="label">
<property name="geometry">
<rect>
<x>720</x>
<y>20</y>
<width>71</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>Serial Port</string>
</property>
</widget>
<widget class="QComboBox" name="cbSerialPorts">
<property name="geometry">
<rect>
<x>790</x>
<y>20</y>
<width>131</width>
<height>22</height>
</rect>
</property>
</widget>
<widget class="QPushButton" name="btnConnect">
<property name="geometry">
<rect>
<x>720</x>
<y>50</y>
<width>201</width>
<height>28</height>
</rect>
</property>
<property name="text">
<string>Connect To Dongle</string>
</property>
</widget>
<widget class="QLabel" name="label_2">
<property name="geometry">
<rect>
<x>720</x>
<y>160</y>
<width>71</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string># of frames:</string>
</property>
<property name="textFormat">
<enum>Qt::PlainText</enum>
</property>
</widget>
<widget class="QPushButton" name="btnClearFrames">
<property name="geometry">
<rect>
<x>710</x>
<y>180</y>
<width>201</width>
<height>28</height>
</rect>
</property>
<property name="text">
<string>Clear Frames</string>
</property>
</widget>
<widget class="QLabel" name="lbNumFrames">
<property name="geometry">
<rect>
<x>810</x>
<y>160</y>
<width>55</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string/>
</property>
</widget>
<widget class="QCheckBox" name="cbAutoScroll">
<property name="geometry">
<rect>
<x>710</x>
<y>250</y>
<width>201</width>
<height>20</height>
</rect>
</property>
<property name="text">
<string>Auto scroll window</string>
</property>
</widget>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QTableView" name="canFramesView">
<property name="font">
<font>
<pointsize>11</pointsize>
<weight>50</weight>
<bold>false</bold>
</font>
</property>
<property name="alternatingRowColors">
<bool>true</bool>
</property>
<property name="wordWrap">
<bool>false</bool>
</property>
</widget>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout">
<item alignment="Qt::AlignHCenter">
<widget class="QLabel" name="label_3">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Serial Port</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="cbSerialPorts"/>
</item>
<item>
<widget class="QPushButton" name="btnConnect">
<property name="text">
<string>Connect To Dongle</string>
</property>
</widget>
</item>
<item alignment="Qt::AlignHCenter">
<widget class="QLabel" name="label_2">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>CANBus Speeds:</string>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<property name="sizeConstraint">
<enum>QLayout::SetDefaultConstraint</enum>
</property>
<item>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<widget class="QLabel" name="label_5">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>First Bus:</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="cbSpeed1"/>
</item>
</layout>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout_2">
<property name="spacing">
<number>7</number>
</property>
<property name="sizeConstraint">
<enum>QLayout::SetDefaultConstraint</enum>
</property>
<item>
<widget class="QLabel" name="label_4">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Second Bus:</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="cbSpeed2"/>
</item>
</layout>
</item>
</layout>
</item>
<item>
<widget class="QPushButton" name="btnBaudSet">
<property name="text">
<string>Set Baud Rates</string>
</property>
</widget>
</item>
<item alignment="Qt::AlignHCenter">
<widget class="QLabel" name="label">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string># Of Frames:</string>
</property>
</widget>
</item>
<item alignment="Qt::AlignHCenter">
<widget class="QLabel" name="lbNumFrames">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="cbAutoScroll">
<property name="text">
<string>Auto Scroll Window</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="btnClearFrames">
<property name="text">
<string>Clear Frames</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<widget class="QMenuBar" name="menuBar">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>927</width>
<width>800</width>
<height>26</height>
</rect>
</property>