加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
mainwindow.ui 20.58 KB
一键复制 编辑 原始数据 按行查看 历史
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>MainWindow</class>
<widget class="QMainWindow" name="MainWindow">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>1100</width>
<height>750</height>
</rect>
</property>
<property name="windowTitle">
<string>Serial Port Plotter</string>
</property>
<property name="styleSheet">
<string notr="true"/>
</property>
<widget class="QWidget" name="centralWidget">
<layout class="QGridLayout" name="gridLayout_4">
<item row="0" column="0">
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QGroupBox" name="PortControlsBox">
<property name="title">
<string>串口设置</string>
</property>
<property name="flat">
<bool>false</bool>
</property>
<property name="checkable">
<bool>false</bool>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0">
<widget class="QLabel" name="labelPort">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>端 口:</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QComboBox" name="comboPort"/>
</item>
<item row="1" column="0">
<widget class="QLabel" name="labelBaud">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>波特率:</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QComboBox" name="comboBaud">
<property name="editable">
<bool>true</bool>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="labelData">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>数据位:</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QComboBox" name="comboData"/>
</item>
<item row="3" column="0">
<widget class="QLabel" name="labelStop">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>停止位:</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QComboBox" name="comboStop"/>
</item>
<item row="4" column="0">
<widget class="QLabel" name="labelParity">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>校验位:</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QComboBox" name="comboParity"/>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="PlotControlsBox">
<property name="title">
<string>绘图设置</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="2" column="1">
<widget class="QSpinBox" name="spinAxesMin">
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
<property name="minimum">
<number>-999999999</number>
</property>
<property name="maximum">
<number>999999999</number>
</property>
<property name="singleStep">
<number>1</number>
</property>
<property name="value">
<number>0</number>
</property>
</widget>
</item>
<item row="4" column="0" colspan="2">
<widget class="QPushButton" name="pushButton_AutoScale">
<property name="text">
<string>自动缩放</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QSpinBox" name="spinAxesMax">
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
<property name="minimum">
<number>-999999999</number>
</property>
<property name="maximum">
<number>999999999</number>
</property>
<property name="singleStep">
<number>1</number>
</property>
<property name="value">
<number>100</number>
</property>
</widget>
</item>
<item row="6" column="0" colspan="2">
<widget class="QPushButton" name="pushButton_ResetVisible">
<property name="text">
<string>复位视图</string>
</property>
<property name="checkable">
<bool>false</bool>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>最小值:</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QSpinBox" name="spinYStep">
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
<property name="maximum">
<number>999999999</number>
</property>
<property name="singleStep">
<number>1</number>
</property>
<property name="value">
<number>10</number>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="pointsLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>点 数:</string>
</property>
</widget>
</item>
<item row="5" column="0" colspan="2">
<widget class="QListWidget" name="listWidget_Channels">
<property name="sizePolicy">
<sizepolicy hsizetype="Ignored" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="layoutDirection">
<enum>Qt::LeftToRight</enum>
</property>
<property name="autoScroll">
<bool>false</bool>
</property>
<property name="editTriggers">
<set>QAbstractItemView::NoEditTriggers</set>
</property>
<property name="alternatingRowColors">
<bool>true</bool>
</property>
<property name="selectionBehavior">
<enum>QAbstractItemView::SelectItems</enum>
</property>
<property name="textElideMode">
<enum>Qt::ElideMiddle</enum>
</property>
<property name="resizeMode">
<enum>QListView::Adjust</enum>
</property>
<property name="modelColumn">
<number>0</number>
</property>
<property name="selectionRectVisible">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="labelYStep">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>刻 度:</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_2">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>最大值:</string>
</property>
</widget>
</item>
<item row="7" column="0" colspan="2">
<widget class="QPushButton" name="savePNGButton">
<property name="text">
<string>保存视图为PNG</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QSpinBox" name="spinPoints">
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
<property name="minimum">
<number>0</number>
</property>
<property name="maximum">
<number>999999999</number>
</property>
<property name="value">
<number>100</number>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="gridGroupBox">
<property name="title">
<string>接收设置</string>
</property>
<layout class="QGridLayout" name="gridLayout_3">
<item row="4" column="0">
<widget class="QCheckBox" name="dataFormatCheckBox">
<property name="text">
<string>显示原始数据</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QCheckBox" name="hideRecvAreaCheckBox">
<property name="text">
<string>隐藏接收框</string>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QPushButton" name="pushButton_ClearRecv">
<property name="text">
<string>清除接收</string>
</property>
<property name="checkable">
<bool>false</bool>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QCheckBox" name="hideRecvDataCheckBox">
<property name="text">
<string>不显示接收</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</item>
<item row="0" column="1">
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QCustomPlot" name="plot" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item>
<widget class="QTextBrowser" name="textBrowser">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>150</height>
</size>
</property>
<property name="cursor" stdset="0">
<cursorShape>IBeamCursor</cursorShape>
</property>
<property name="textInteractionFlags">
<set>Qt::TextSelectableByMouse</set>
</property>
<property name="openLinks">
<bool>false</bool>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<widget class="QStatusBar" name="statusBar"/>
<widget class="QToolBar" name="toolBar">
<property name="windowTitle">
<string>toolBar</string>
</property>
<property name="movable">
<bool>false</bool>
</property>
<property name="allowedAreas">
<set>Qt::TopToolBarArea</set>
</property>
<property name="floatable">
<bool>false</bool>
</property>
<attribute name="toolBarArea">
<enum>TopToolBarArea</enum>
</attribute>
<attribute name="toolBarBreak">
<bool>false</bool>
</attribute>
<addaction name="actionConnect"/>
<addaction name="actionPause_Plot"/>
<addaction name="actionDisconnect"/>
<addaction name="separator"/>
<addaction name="actionClear"/>
<addaction name="separator"/>
<addaction name="actionHow_to_use"/>
<addaction name="separator"/>
<addaction name="actionRecord_stream"/>
<addaction name="separator"/>
<addaction name="actionSettings"/>
</widget>
<action name="actionConnect">
<property name="icon">
<iconset resource="res/serial_port_plotter.qrc">
<normaloff>:/serial_port_plotter/play_nor.png</normaloff>
<normalon>:/serial_port_plotter/play_nor.png</normalon>
<disabledoff>:/serial_port_plotter/play_dis.png</disabledoff>
<disabledon>:/serial_port_plotter/play_dis.png</disabledon>
<activeoff>:/serial_port_plotter/play_act.png</activeoff>
<activeon>:/serial_port_plotter/play_act.png</activeon>
<selectedoff>:/serial_port_plotter/play_act.png</selectedoff>
<selectedon>:/serial_port_plotter/play_act.png</selectedon>:/serial_port_plotter/play_nor.png</iconset>
</property>
<property name="text">
<string>Connect</string>
</property>
<property name="toolTip">
<string>打开端口</string>
</property>
</action>
<action name="actionPause_Plot">
<property name="enabled">
<bool>false</bool>
</property>
<property name="icon">
<iconset resource="res/serial_port_plotter.qrc">
<normaloff>:/serial_port_plotter/pause_nor.png</normaloff>
<normalon>:/serial_port_plotter/pause_nor.png</normalon>
<disabledoff>:/serial_port_plotter/pause_dis.png</disabledoff>
<disabledon>:/serial_port_plotter/pause_dis.png</disabledon>
<activeoff>:/serial_port_plotter/pause_act.png</activeoff>
<activeon>:/serial_port_plotter/pause_act.png</activeon>
<selectedoff>:/serial_port_plotter/pause_act.png</selectedoff>
<selectedon>:/serial_port_plotter/pause_act.png</selectedon>:/serial_port_plotter/pause_nor.png</iconset>
</property>
<property name="text">
<string>Pause</string>
</property>
<property name="toolTip">
<string>暂停绘制</string>
</property>
</action>
<action name="actionDisconnect">
<property name="enabled">
<bool>false</bool>
</property>
<property name="icon">
<iconset resource="res/serial_port_plotter.qrc">
<normaloff>:/serial_port_plotter/stop_nor.png</normaloff>
<normalon>:/serial_port_plotter/stop_nor.png</normalon>
<disabledoff>:/serial_port_plotter/stop_dis.png</disabledoff>
<disabledon>:/serial_port_plotter/stop_dis.png</disabledon>
<activeoff>:/serial_port_plotter/stop_act.png</activeoff>
<activeon>:/serial_port_plotter/stop_act.png</activeon>
<selectedoff>:/serial_port_plotter/stop_act.png</selectedoff>
<selectedon>:/serial_port_plotter/stop_act.png</selectedon>:/serial_port_plotter/stop_nor.png</iconset>
</property>
<property name="text">
<string>Disconnect</string>
</property>
<property name="toolTip">
<string>关闭端口</string>
</property>
</action>
<action name="actionClear">
<property name="enabled">
<bool>true</bool>
</property>
<property name="icon">
<iconset resource="res/serial_port_plotter.qrc">
<normaloff>:/serial_port_plotter/clear_nor.png</normaloff>
<normalon>:/serial_port_plotter/clear_nor.png</normalon>
<disabledoff>:/serial_port_plotter/clear_dis.png</disabledoff>
<disabledon>:/serial_port_plotter/clear_dis.png</disabledon>
<activeoff>:/serial_port_plotter/clear_act.png</activeoff>
<activeon>:/serial_port_plotter/clear_act.png</activeon>
<selectedoff>:/serial_port_plotter/clear_act.png</selectedoff>
<selectedon>:/serial_port_plotter/clear_act.png</selectedon>:/serial_port_plotter/clear_nor.png</iconset>
</property>
<property name="text">
<string>Clear</string>
</property>
<property name="toolTip">
<string>清除曲线</string>
</property>
</action>
<action name="actionHow_to_use">
<property name="icon">
<iconset resource="res/serial_port_plotter.qrc">
<normaloff>:/serial_port_plotter/help_nor.png</normaloff>
<normalon>:/serial_port_plotter/help_nor.png</normalon>
<disabledoff>:/serial_port_plotter/help_dis.png</disabledoff>
<disabledon>:/serial_port_plotter/help_dis.png</disabledon>
<activeoff>:/serial_port_plotter/help_act.png</activeoff>
<activeon>:/serial_port_plotter/help_act.png</activeon>
<selectedoff>:/serial_port_plotter/help_act.png</selectedoff>
<selectedon>:/serial_port_plotter/help_act.png</selectedon>:/serial_port_plotter/help_nor.png</iconset>
</property>
<property name="text">
<string>How_to_use</string>
</property>
<property name="toolTip">
<string>如何使用本软件</string>
</property>
</action>
<action name="actionRecord_stream">
<property name="checkable">
<bool>true</bool>
</property>
<property name="checked">
<bool>false</bool>
</property>
<property name="enabled">
<bool>true</bool>
</property>
<property name="icon">
<iconset resource="res/serial_port_plotter.qrc">
<normaloff>:/icons/line_icon_set/document.png</normaloff>
<normalon>:/icons/line_icon_set_text/document.png</normalon>:/icons/line_icon_set/document.png</iconset>
</property>
<property name="text">
<string>Record_stream</string>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;将收到的数据保存到文件(快捷键:Ctrl+S)&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="shortcut">
<string>Ctrl+S</string>
</property>
<property name="visible">
<bool>true</bool>
</property>
</action>
<action name="actionSettings">
<property name="icon">
<iconset resource="res/serial_port_plotter.qrc">
<normaloff>:/serial_port_plotter/icons/lynny-2x_text/Settings 1.png</normaloff>
<normalon>:/serial_port_plotter/icons/lynny-2x_text/Settings 1.png</normalon>
<disabledoff>:/serial_port_plotter/icons/lynny-2x/Settings 1.png</disabledoff>
<disabledon>:/serial_port_plotter/icons/lynny-2x/Settings 1.png</disabledon>:/serial_port_plotter/icons/lynny-2x_text/Settings 1.png</iconset>
</property>
<property name="text">
<string>settings</string>
</property>
<property name="toolTip">
<string>设置</string>
</property>
</action>
</widget>
<layoutdefault spacing="6" margin="11"/>
<customwidgets>
<customwidget>
<class>QCustomPlot</class>
<extends>QWidget</extends>
<header location="global">qcustomplot/qcustomplot.h</header>
<container>1</container>
</customwidget>
</customwidgets>
<resources>
<include location="res/serial_port_plotter.qrc"/>
</resources>
<connections/>
</ui>
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化