CAN Bus example▲
Sélectionnez
&
lt;?xml version=
"1.0"
encoding=
"UTF-8"
?&
gt;
&
lt;ui version=
"4.0"
&
gt;
&
lt;class
&
gt;MainWindow&
lt;/
class
&
gt;
&
lt;widget class
=
"QMainWindow"
name=
"MainWindow"
&
gt;
&
lt;property name=
"geometry"
&
gt;
&
lt;rect&
gt;
&
lt;x&
gt;0
&
lt;/
x&
gt;
&
lt;y&
gt;0
&
lt;/
y&
gt;
&
lt;width&
gt;551
&
lt;/
width&
gt;
&
lt;height&
gt;481
&
lt;/
height&
gt;
&
lt;/
rect&
gt;
&
lt;/
property&
gt;
&
lt;property name=
"windowTitle"
&
gt;
&
lt;string&
gt;CAN Example&
lt;/
string&
gt;
&
lt;/
property&
gt;
&
lt;widget class
=
"QWidget"
name=
"centralWidget"
&
gt;
&
lt;layout class
=
"QVBoxLayout"
name=
"verticalLayout"
&
gt;
&
lt;item&
gt;
&
lt;widget class
=
"SendFrameBox"
name=
"sendFrameBox"
&
gt;
&
lt;property name=
"title"
&
gt;
&
lt;string&
gt;Send CAN frame&
lt;/
string&
gt;
&
lt;/
property&
gt;
&
lt;/
widget&
gt;
&
lt;/
item&
gt;
&
lt;item&
gt;
&
lt;widget class
=
"QGroupBox"
name=
"receivedMessagesBox"
&
gt;
&
lt;property name=
"title"
&
gt;
&
lt;string&
gt;Received CAN messages&
lt;/
string&
gt;
&
lt;/
property&
gt;
&
lt;layout class
=
"QVBoxLayout"
name=
"verticalLayout_4"
&
gt;
&
lt;item&
gt;
&
lt;widget class
=
"QLabel"
name=
"label_3"
&
gt;
&
lt;property name=
"font"
&
gt;
&
lt;font&
gt;
&
lt;family&
gt;Courier&
lt;/
family&
gt;
&
lt;kerning&
gt;false
&
lt;/
kerning&
gt;
&
lt;/
font&
gt;
&
lt;/
property&
gt;
&
lt;property name=
"frameShape"
&
gt;
&
lt;enum
&
gt;QFrame::
StyledPanel&
lt;/
enum
&
gt;
&
lt;/
property&
gt;
&
lt;property name=
"text"
&
gt;
&
lt;string&
gt;Timestamp Flags CAN-
ID DLC Data&
lt;/
string&
gt;
&
lt;/
property&
gt;
&
lt;/
widget&
gt;
&
lt;/
item&
gt;
&
lt;item&
gt;
&
lt;widget class
=
"QTextEdit"
name=
"receivedMessagesEdit"
&
gt;
&
lt;property name=
"font"
&
gt;
&
lt;font&
gt;
&
lt;family&
gt;Courier&
lt;/
family&
gt;
&
lt;kerning&
gt;false
&
lt;/
kerning&
gt;
&
lt;/
font&
gt;
&
lt;/
property&
gt;
&
lt;property name=
"frameShape"
&
gt;
&
lt;enum
&
gt;QFrame::
StyledPanel&
lt;/
enum
&
gt;
&
lt;/
property&
gt;
&
lt;property name=
"undoRedoEnabled"
&
gt;
&
lt;bool
&
gt;false
&
lt;/
bool
&
gt;
&
lt;/
property&
gt;
&
lt;property name=
"lineWrapMode"
&
gt;
&
lt;enum
&
gt;QTextEdit::
NoWrap&
lt;/
enum
&
gt;
&
lt;/
property&
gt;
&
lt;property name=
"readOnly"
&
gt;
&
lt;bool
&
gt;true
&
lt;/
bool
&
gt;
&
lt;/
property&
gt;
&
lt;/
widget&
gt;
&
lt;/
item&
gt;
&
lt;/
layout&
gt;
&
lt;/
widget&
gt;
&
lt;/
item&
gt;
&
lt;/
layout&
gt;
&
lt;/
widget&
gt;
&
lt;widget class
=
"QMenuBar"
name=
"menuBar"
&
gt;
&
lt;property name=
"geometry"
&
gt;
&
lt;rect&
gt;
&
lt;x&
gt;0
&
lt;/
x&
gt;
&
lt;y&
gt;0
&
lt;/
y&
gt;
&
lt;width&
gt;551
&
lt;/
width&
gt;
&
lt;height&
gt;19
&
lt;/
height&
gt;
&
lt;/
rect&
gt;
&
lt;/
property&
gt;
&
lt;widget class
=
"QMenu"
name=
"menuCalls"
&
gt;
&
lt;property name=
"title"
&
gt;
&
lt;string&
gt;&
amp;amp;Calls&
lt;/
string&
gt;
&
lt;/
property&
gt;
&
lt;addaction name=
"actionConnect"
/&
gt;
&
lt;addaction name=
"actionDisconnect"
/&
gt;
&
lt;addaction name=
"separator"
/&
gt;
&
lt;addaction name=
"actionClearLog"
/&
gt;
&
lt;addaction name=
"separator"
/&
gt;
&
lt;addaction name=
"actionQuit"
/&
gt;
&
lt;/
widget&
gt;
&
lt;widget class
=
"QMenu"
name=
"menuHelp"
&
gt;
&
lt;property name=
"title"
&
gt;
&
lt;string&
gt;&
amp;amp;Help&
lt;/
string&
gt;
&
lt;/
property&
gt;
&
lt;addaction name=
"actionPluginDocumentation"
/&
gt;
&
lt;addaction name=
"actionAboutQt"
/&
gt;
&
lt;/
widget&
gt;
&
lt;addaction name=
"menuCalls"
/&
gt;
&
lt;addaction name=
"menuHelp"
/&
gt;
&
lt;/
widget&
gt;
&
lt;widget class
=
"QToolBar"
name=
"mainToolBar"
&
gt;
&
lt;attribute name=
"toolBarArea"
&
gt;
&
lt;enum
&
gt;TopToolBarArea&
lt;/
enum
&
gt;
&
lt;/
attribute&
gt;
&
lt;attribute name=
"toolBarBreak"
&
gt;
&
lt;bool
&
gt;false
&
lt;/
bool
&
gt;
&
lt;/
attribute&
gt;
&
lt;addaction name=
"actionConnect"
/&
gt;
&
lt;addaction name=
"actionDisconnect"
/&
gt;
&
lt;addaction name=
"separator"
/&
gt;
&
lt;addaction name=
"actionClearLog"
/&
gt;
&
lt;/
widget&
gt;
&
lt;widget class
=
"QStatusBar"
name=
"statusBar"
/&
gt;
&
lt;action name=
"actionConnect"
&
gt;
&
lt;property name=
"icon"
&
gt;
&
lt;iconset resource=
"can.qrc"
&
gt;
&
lt;normaloff&
gt;:/
images/
connect.png&
lt;/
normaloff&
gt;:/
images/
connect.png&
lt;/
iconset&
gt;
&
lt;/
property&
gt;
&
lt;property name=
"text"
&
gt;
&
lt;string&
gt;&
amp;amp;Connect&
lt;/
string&
gt;
&
lt;/
property&
gt;
&
lt;/
action&
gt;
&
lt;action name=
"actionDisconnect"
&
gt;
&
lt;property name=
"icon"
&
gt;
&
lt;iconset resource=
"can.qrc"
&
gt;
&
lt;normaloff&
gt;:/
images/
disconnect.png&
lt;/
normaloff&
gt;:/
images/
disconnect.png&
lt;/
iconset&
gt;
&
lt;/
property&
gt;
&
lt;property name=
"text"
&
gt;
&
lt;string&
gt;&
amp;amp;Disconnect&
lt;/
string&
gt;
&
lt;/
property&
gt;
&
lt;/
action&
gt;
&
lt;action name=
"actionQuit"
&
gt;
&
lt;property name=
"icon"
&
gt;
&
lt;iconset resource=
"can.qrc"
&
gt;
&
lt;normaloff&
gt;:/
images/
application-
exit.png&
lt;/
normaloff&
gt;:/
images/
application-
exit.png&
lt;/
iconset&
gt;
&
lt;/
property&
gt;
&
lt;property name=
"text"
&
gt;
&
lt;string&
gt;&
amp;amp;Quit&
lt;/
string&
gt;
&
lt;/
property&
gt;
&
lt;/
action&
gt;
&
lt;action name=
"actionAboutQt"
&
gt;
&
lt;property name=
"text"
&
gt;
&
lt;string&
gt;&
amp;amp;About Qt&
lt;/
string&
gt;
&
lt;/
property&
gt;
&
lt;/
action&
gt;
&
lt;action name=
"actionClearLog"
&
gt;
&
lt;property name=
"icon"
&
gt;
&
lt;iconset resource=
"can.qrc"
&
gt;
&
lt;normaloff&
gt;:/
images/
clear.png&
lt;/
normaloff&
gt;:/
images/
clear.png&
lt;/
iconset&
gt;
&
lt;/
property&
gt;
&
lt;property name=
"text"
&
gt;
&
lt;string&
gt;Clear &
amp;amp;Log&
lt;/
string&
gt;
&
lt;/
property&
gt;
&
lt;/
action&
gt;
&
lt;action name=
"actionPluginDocumentation"
&
gt;
&
lt;property name=
"text"
&
gt;
&
lt;string&
gt;Plugin Documentation&
lt;/
string&
gt;
&
lt;/
property&
gt;
&
lt;property name=
"toolTip"
&
gt;
&
lt;string&
gt;Open plugin documentation in Webbrowser&
lt;/
string&
gt;
&
lt;/
property&
gt;
&
lt;/
action&
gt;
&
lt;/
widget&
gt;
&
lt;layoutdefault spacing=
"6"
margin=
"11"
/&
gt;
&
lt;customwidgets&
gt;
&
lt;customwidget&
gt;
&
lt;class
&
gt;SendFrameBox&
lt;/
class
&
gt;
&
lt;extends&
gt;QGroupBox&
lt;/
extends&
gt;
&
lt;header location=
"global"
&
gt;sendframebox.h&
lt;/
header&
gt;
&
lt;container&
gt;1
&
lt;/
container&
gt;
&
lt;/
customwidget&
gt;
&
lt;/
customwidgets&
gt;
&
lt;resources&
gt;
&
lt;include location=
"can.qrc"
/&
gt;
&
lt;/
resources&
gt;
&
lt;connections/&
gt;
&
lt;/
ui&
gt;