Commit 857f1674 authored by Pedro Henrique Kopper's avatar Pedro Henrique Kopper
Browse files

Add manual scale control, pause button and remove top menu bar

parent 002c602a
...@@ -86,71 +86,115 @@ QGroupBox { ...@@ -86,71 +86,115 @@ QGroupBox {
</property> </property>
</widget> </widget>
</item> </item>
<item row="3" column="3" colspan="2"> <item row="3" column="0">
<widget class="QScrollArea" name="scrollArea"> <widget class="QGroupBox" name="absValGBox">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Expanding"> <sizepolicy hsizetype="Preferred" vsizetype="Expanding">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="verticalScrollBarPolicy"> <property name="font">
<enum>Qt::ScrollBarAlwaysOn</enum> <font>
<weight>75</weight>
<bold>true</bold>
</font>
</property> </property>
<property name="horizontalScrollBarPolicy"> <property name="styleSheet">
<enum>Qt::ScrollBarAlwaysOff</enum> <string notr="true">border: 2px solid rgb(26, 149, 172);
</string>
</property> </property>
<property name="widgetResizable"> <property name="title">
<bool>false</bool> <string>Valores Absolutos</string>
</property> </property>
<widget class="QWidget" name="scrollAreaWidgetContents"> <layout class="QVBoxLayout" name="verticalLayout" stretch="0,0">
<property name="geometry"> <property name="topMargin">
<rect> <number>25</number>
<x>0</x>
<y>0</y>
<width>930</width>
<height>200</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property> </property>
<layout class="QGridLayout" name="gridLayout_7"> <item>
<item row="0" column="1"> <widget class="QGroupBox" name="calibratorGBox">
<widget class="QLabel" name="consoleView"> <property name="styleSheet">
<property name="sizePolicy"> <string notr="true"/>
<sizepolicy hsizetype="Expanding" vsizetype="Expanding"> </property>
<horstretch>0</horstretch> <property name="title">
<verstretch>0</verstretch> <string>Amostra</string>
</sizepolicy> </property>
</property> <property name="alignment">
<property name="cursor"> <set>Qt::AlignBottom|Qt::AlignRight|Qt::AlignTrailing</set>
<cursorShape>IBeamCursor</cursorShape> </property>
</property> <property name="flat">
<property name="styleSheet"> <bool>true</bool>
<string notr="true">padding: 2px; </property>
border: 2px solid rgb(5, 5, 5); <layout class="QHBoxLayout" name="horizontalLayout">
font: 10pt &quot;Liberation Mono&quot;;</string> <property name="topMargin">
</property> <number>21</number>
<property name="text">
<string/>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property> </property>
<property name="wordWrap"> <item alignment="Qt::AlignRight">
<bool>true</bool> <widget class="QLabel" name="calibratorLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>150</width>
<height>0</height>
</size>
</property>
<property name="styleSheet">
<string notr="true"/>
</property>
<property name="text">
<string>0 mV</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="forceGBox">
<property name="styleSheet">
<string notr="true"/>
</property>
<property name="title">
<string>Pressão</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_2" stretch="0">
<property name="topMargin">
<number>21</number>
</property> </property>
</widget> <item alignment="Qt::AlignRight">
</item> <widget class="QLabel" name="forceLabel">
</layout> <property name="sizePolicy">
</widget> <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>150</width>
<height>0</height>
</size>
</property>
<property name="styleSheet">
<string notr="true"/>
</property>
<property name="text">
<string>0 Tonf</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget> </widget>
</item> </item>
<item row="3" column="2"> <item row="3" column="1" colspan="2">
<widget class="QGroupBox" name="samplingBox"> <widget class="QGroupBox" name="samplingBox">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Expanding"> <sizepolicy hsizetype="Preferred" vsizetype="Expanding">
...@@ -163,7 +207,7 @@ font: 10pt &quot;Liberation Mono&quot;;</string> ...@@ -163,7 +207,7 @@ font: 10pt &quot;Liberation Mono&quot;;</string>
</string> </string>
</property> </property>
<property name="title"> <property name="title">
<string>Amostragem</string> <string/>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_3"> <layout class="QVBoxLayout" name="verticalLayout_3">
<item> <item>
...@@ -224,109 +268,152 @@ font: 10pt &quot;Liberation Mono&quot;;</string> ...@@ -224,109 +268,152 @@ font: 10pt &quot;Liberation Mono&quot;;</string>
</item> </item>
</widget> </widget>
</item> </item>
<item>
<widget class="QPushButton" name="pushButton">
<property name="text">
<string>PAUSA</string>
</property>
</widget>
</item>
<item>
<widget class="QGroupBox" name="scaleGBox">
<property name="title">
<string>Escala</string>
</property>
<widget class="QWidget" name="gridLayoutWidget">
<property name="geometry">
<rect>
<x>10</x>
<y>30</y>
<width>381</width>
<height>91</height>
</rect>
</property>
<layout class="QGridLayout" name="grid">
<item row="1" column="0">
<widget class="QSpinBox" name="min_pressao">
<property name="suffix">
<string> bar</string>
</property>
<property name="prefix">
<string/>
</property>
<property name="maximum">
<number>400</number>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QSpinBox" name="min_amostra">
<property name="suffix">
<string> mV</string>
</property>
<property name="prefix">
<string/>
</property>
<property name="maximum">
<number>255</number>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QSpinBox" name="max_amostra">
<property name="suffix">
<string> mV</string>
</property>
<property name="maximum">
<number>256</number>
</property>
<property name="value">
<number>256</number>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QSpinBox" name="max_pressao">
<property name="suffix">
<string> bar</string>
</property>
<property name="prefix">
<string/>
</property>
<property name="maximum">
<number>400</number>
</property>
<property name="value">
<number>100</number>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
</item>
</layout> </layout>
</widget> </widget>
</item> </item>
<item row="3" column="0" colspan="2"> <item row="3" column="3" colspan="2">
<widget class="QGroupBox" name="absValGBox"> <widget class="QScrollArea" name="scrollArea">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Expanding"> <sizepolicy hsizetype="Preferred" vsizetype="Expanding">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="font"> <property name="verticalScrollBarPolicy">
<font> <enum>Qt::ScrollBarAlwaysOn</enum>
<weight>75</weight>
<bold>true</bold>
</font>
</property> </property>
<property name="styleSheet"> <property name="horizontalScrollBarPolicy">
<string notr="true">border: 2px solid rgb(26, 149, 172); <enum>Qt::ScrollBarAlwaysOff</enum>
</string>
</property> </property>
<property name="title"> <property name="widgetResizable">
<string>Valores Absolutos</string> <bool>false</bool>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout" stretch="0,0"> <widget class="QWidget" name="scrollAreaWidgetContents">
<property name="topMargin"> <property name="geometry">
<number>40</number> <rect>
<x>0</x>
<y>0</y>
<width>930</width>
<height>200</height>
</rect>
</property> </property>
<item> <property name="sizePolicy">
<widget class="QGroupBox" name="calibratorGBox"> <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<property name="styleSheet"> <horstretch>0</horstretch>
<string notr="true"/> <verstretch>0</verstretch>
</property> </sizepolicy>
<property name="title"> </property>
<string>Amostra</string> <layout class="QGridLayout" name="gridLayout_7">
</property> <item row="0" column="1">
<property name="alignment"> <widget class="QLabel" name="consoleView">
<set>Qt::AlignBottom|Qt::AlignRight|Qt::AlignTrailing</set> <property name="sizePolicy">
</property> <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<property name="flat"> <horstretch>0</horstretch>
<bool>true</bool> <verstretch>0</verstretch>
</property> </sizepolicy>
<layout class="QHBoxLayout" name="horizontalLayout"> </property>
<item alignment="Qt::AlignRight"> <property name="cursor">
<widget class="QLabel" name="calibratorLabel"> <cursorShape>IBeamCursor</cursorShape>
<property name="sizePolicy"> </property>
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred"> <property name="styleSheet">
<horstretch>0</horstretch> <string notr="true">padding: 2px;
<verstretch>0</verstretch> border: 2px solid rgb(5, 5, 5);
</sizepolicy> font: 10pt &quot;Liberation Mono&quot;;</string>
</property> </property>
<property name="minimumSize"> <property name="text">
<size> <string/>
<width>150</width> </property>
<height>0</height> <property name="alignment">
</size> <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property> </property>
<property name="styleSheet"> <property name="wordWrap">
<string notr="true"/> <bool>true</bool>
</property> </property>
<property name="text"> </widget>
<string>0 mV</string> </item>
</property> </layout>
</widget> </widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="forceGBox">
<property name="styleSheet">
<string notr="true"/>
</property>
<property name="title">
<string>Pressão</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_2" stretch="0">
<item alignment="Qt::AlignRight">
<widget class="QLabel" name="forceLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>150</width>
<height>0</height>
</size>
</property>
<property name="styleSheet">
<string notr="true"/>
</property>
<property name="text">
<string>0 Tonf</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget> </widget>
</item> </item>
</layout> </layout>
...@@ -340,45 +427,9 @@ font: 10pt &quot;Liberation Mono&quot;;</string> ...@@ -340,45 +427,9 @@ font: 10pt &quot;Liberation Mono&quot;;</string>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>1366</width> <width>1366</width>
<height>20</height> <height>28</height>
</rect> </rect>
</property> </property>
<widget class="QMenu" name="fileMenu">
<property name="title">
<string>Arquivo</string>
</property>
<addaction name="openButton"/>
<addaction name="saveButton"/>
<addaction name="saveAsButton"/>
</widget>
<widget class="QMenu" name="stageMenu">
<property name="title">
<string>Etapa</string>
</property>
<addaction name="alternaCalibraP"/>
<addaction name="alternaCalibraT"/>
<addaction name="alternaProc"/>
</widget>
<widget class="QMenu" name="serialMenu">
<property name="title">
<string>Porta</string>
</property>
</widget>
<widget class="QMenu" name="playPauseButton">
<property name="title">
<string>Iniciar/Pausar</string>
</property>
</widget>
<widget class="QMenu" name="finalizeButton">
<property name="title">
<string>Finalizar</string>
</property>
</widget>
<addaction name="fileMenu"/>
<addaction name="stageMenu"/>
<addaction name="serialMenu"/>
<addaction name="playPauseButton"/>
<addaction name="finalizeButton"/>
</widget> </widget>
<widget class="QStatusBar" name="menuStatusBar"/> <widget class="QStatusBar" name="menuStatusBar"/>
<action name="alternaCalibraP"> <action name="alternaCalibraP">
......
...@@ -2,12 +2,14 @@ ...@@ -2,12 +2,14 @@
# Form implementation generated from reading ui file 'resources/UI/Generico.ui' # Form implementation generated from reading ui file 'resources/UI/Generico.ui'
# #
# Created by: PyQt5 UI code generator 5.11.2 # Created by: PyQt5 UI code generator 5.14.0
# #
# WARNING! All changes made in this file will be lost! # WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_Generico(object): class Ui_Generico(object):
def setupUi(self, Generico): def setupUi(self, Generico):
Generico.setObjectName("Generico") Generico.setObjectName("Generico")
...@@ -68,77 +70,6 @@ class Ui_Generico(object): ...@@ -68,77 +70,6 @@ class Ui_Generico(object):
self.mainGraph.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff) self.mainGraph.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
self.mainGraph.setObjectName("mainGraph") self.mainGraph.setObjectName("mainGraph")
self.gridLayout_2.addWidget(self.mainGraph, 0, 0, 3, 5) self.gridLayout_2.addWidget(self.mainGraph, 0, 0, 3, 5)
self.scrollArea = QtWidgets.QScrollArea(self.widget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.scrollArea.sizePolicy().hasHeightForWidth())
self.scrollArea.setSizePolicy(sizePolicy)
self.scrollArea.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOn)
self.scrollArea.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
self.scrollArea.setWidgetResizable(False)
self.scrollArea.setObjectName("scrollArea")
self.scrollAreaWidgetContents = QtWidgets.QWidget()
self.scrollAreaWidgetContents.setGeometry(QtCore.QRect(0, 0, 930, 200))
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.scrollAreaWidgetContents.sizePolicy().hasHeightForWidth())
self.scrollAreaWidgetContents.setSizePolicy(sizePolicy)
self.scrollAreaWidgetContents.setObjectName("scrollAreaWidgetContents")
self.gridLayout_7 = QtWidgets.QGridLayout(self.scrollAreaWidgetContents)
self.gridLayout_7.setContentsMargins(11, 11, 11, 11)
self.gridLayout_7.setSpacing(6)
self.gridLayout_7.setObjectName("gridLayout_7")
self.consoleView = QtWidgets.QLabel(self.scrollAreaWidgetContents)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.consoleView.sizePolicy().hasHeightForWidth())
self.consoleView.setSizePolicy(sizePolicy)
self.consoleView.setCursor(QtGui.QCursor(QtCore.Qt.IBeamCursor))
self.consoleView.setStyleSheet("padding: 2px;\n"
"border: 2px solid rgb(5, 5, 5);\n"
"font: 10pt \"Liberation Mono\";")
self.consoleView.setText("")
self.consoleView.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignTop)
self.consoleView.setWordWrap(True)
self.consoleView.setObjectName("consoleView")
self.gridLayout_7.addWidget(self.consoleView, 0, 1, 1, 1)
self.scrollArea.setWidget(self.scrollAreaWidgetContents)
self.gridLayout_2.addWidget(self.scrollArea, 3, 3, 1, 2)
self.samplingBox = QtWidgets.QGroupBox(self.widget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.samplingBox.sizePolicy().hasHeightForWidth())
self.samplingBox.setSizePolicy(sizePolicy)
self.samplingBox.setStyleSheet("border: 2px solid rgb(255, 75, 0);\n"
"")
self.samplingBox.setObjectName("samplingBox")
self.verticalLayout_3 = QtWidgets.QVBoxLayout(self.samplingBox)
self.verticalLayout_3.setContentsMargins(11, 11, 11, 11)
self.verticalLayout_3.setSpacing(6)
self.verticalLayout_3.setObjectName("verticalLayout_3")
self.samplingCBox = QtWidgets.QComboBox(self.samplingBox)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.samplingCBox.sizePolicy().hasHeightForWidth())
self.samplingCBox.setSizePolicy(sizePolicy)
self.samplingCBox.setStyleSheet("")
self.samplingCBox.setObjectName("samplingCBox")
self.samplingCBox.addItem("")
self.samplingCBox.addItem("")
self.samplingCBox.addItem("")
self.samplingCBox.addItem("")
self.samplingCBox.addItem("")
self.samplingCBox.addItem("")
self.samplingCBox.addItem("")
self.samplingCBox.addItem("")
self.samplingCBox.addItem("")
self.verticalLayout_3.addWidget(self.samplingCBox)
self.gridLayout_2.addWidget(self.samplingBox, 3, 2, 1, 1)
self.absValGBox = QtWidgets.QGroupBox(self.widget) self.absValGBox = QtWidgets.QGroupBox(self.widget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Expanding) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(0) sizePolicy.setHorizontalStretch(0)
...@@ -153,7 +84,7 @@ class Ui_Generico(object): ...@@ -153,7 +84,7 @@ class Ui_Generico(object):
"") "")
self.absValGBox.setObjectName("absValGBox") self.absValGBox.setObjectName("absValGBox")
self.verticalLayout = QtWidgets.QVBoxLayout(self.absValGBox) self.verticalLayout = QtWidgets.QVBoxLayout(self.absValGBox)
self.verticalLayout.setContentsMargins(11, 40, 11, 11) self.verticalLayout.setContentsMargins(11, 25, 11, 11)
self.verticalLayout.setSpacing(6) self.verticalLayout.setSpacing(6)
self.verticalLayout.setObjectName("verticalLayout") self.verticalLayout.setObjectName("verticalLayout")
self.calibratorGBox = QtWidgets.QGroupBox(self.absValGBox) self.calibratorGBox = QtWidgets.QGroupBox(self.absValGBox)
...@@ -162,7 +93,7 @@ class Ui_Generico(object): ...@@ -162,7 +93,7 @@ class Ui_Generico(object):
self.calibratorGBox.setFlat(True) self.calibratorGBox.setFlat(True)
self.calibratorGBox.setObjectName("calibratorGBox") self.calibratorGBox.setObjectName("calibratorGBox")
self.horizontalLayout = QtWidgets.QHBoxLayout(self.calibratorGBox) self.horizontalLayout = QtWidgets.QHBoxLayout(self.calibratorGBox)
self.horizontalLayout.setContentsMargins(11, 11, 11, 11) self.horizontalLayout.setContentsMargins(11, 21, 11, 11)
self.horizontalLayout.setSpacing(6) self.horizontalLayout.setSpacing(6)
self.horizontalLayout.setObjectName("horizontalLayout") self.horizontalLayout.setObjectName(</