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 {
</property>
</widget>
</item>
<item row="3" column="3" colspan="2">
<widget class="QScrollArea" name="scrollArea">
<item row="3" column="0">
<widget class="QGroupBox" name="absValGBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="verticalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOn</enum>
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="horizontalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOff</enum>
<property name="styleSheet">
<string notr="true">border: 2px solid rgb(26, 149, 172);
</string>
</property>
<property name="widgetResizable">
<bool>false</bool>
<property name="title">
<string>Valores Absolutos</string>
</property>
<widget class="QWidget" name="scrollAreaWidgetContents">
<property name="geometry">
<rect>
<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>
<layout class="QVBoxLayout" name="verticalLayout" stretch="0,0">
<property name="topMargin">
<number>25</number>
</property>
<layout class="QGridLayout" name="gridLayout_7">
<item row="0" column="1">
<widget class="QLabel" name="consoleView">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="cursor">
<cursorShape>IBeamCursor</cursorShape>
</property>
<property name="styleSheet">
<string notr="true">padding: 2px;
border: 2px solid rgb(5, 5, 5);
font: 10pt &quot;Liberation Mono&quot;;</string>
</property>
<property name="text">
<string/>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
<item>
<widget class="QGroupBox" name="calibratorGBox">
<property name="styleSheet">
<string notr="true"/>
</property>
<property name="title">
<string>Amostra</string>
</property>
<property name="alignment">
<set>Qt::AlignBottom|Qt::AlignRight|Qt::AlignTrailing</set>
</property>
<property name="flat">
<bool>true</bool>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="topMargin">
<number>21</number>
</property>
<property name="wordWrap">
<bool>true</bool>
<item alignment="Qt::AlignRight">
<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>
</widget>
</item>
</layout>
</widget>
<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>
</item>
<item row="3" column="2">
<item row="3" column="1" colspan="2">
<widget class="QGroupBox" name="samplingBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
......@@ -163,7 +207,7 @@ font: 10pt &quot;Liberation Mono&quot;;</string>
</string>
</property>
<property name="title">
<string>Amostragem</string>
<string/>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
......@@ -224,109 +268,152 @@ font: 10pt &quot;Liberation Mono&quot;;</string>
</item>
</widget>
</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>
</widget>
</item>
<item row="3" column="0" colspan="2">
<widget class="QGroupBox" name="absValGBox">
<item row="3" column="3" colspan="2">
<widget class="QScrollArea" name="scrollArea">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
<property name="verticalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOn</enum>
</property>
<property name="styleSheet">
<string notr="true">border: 2px solid rgb(26, 149, 172);
</string>
<property name="horizontalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOff</enum>
</property>
<property name="title">
<string>Valores Absolutos</string>
<property name="widgetResizable">
<bool>false</bool>
</property>
<layout class="QVBoxLayout" name="verticalLayout" stretch="0,0">
<property name="topMargin">
<number>40</number>
<widget class="QWidget" name="scrollAreaWidgetContents">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>930</width>
<height>200</height>
</rect>
</property>
<item>
<widget class="QGroupBox" name="calibratorGBox">
<property name="styleSheet">
<string notr="true"/>
</property>
<property name="title">
<string>Amostra</string>
</property>
<property name="alignment">
<set>Qt::AlignBottom|Qt::AlignRight|Qt::AlignTrailing</set>
</property>
<property name="flat">
<bool>true</bool>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<item alignment="Qt::AlignRight">
<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">
<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>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<layout class="QGridLayout" name="gridLayout_7">
<item row="0" column="1">
<widget class="QLabel" name="consoleView">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="cursor">
<cursorShape>IBeamCursor</cursorShape>
</property>
<property name="styleSheet">
<string notr="true">padding: 2px;
border: 2px solid rgb(5, 5, 5);
font: 10pt &quot;Liberation Mono&quot;;</string>
</property>
<property name="text">
<string/>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
......@@ -340,45 +427,9 @@ font: 10pt &quot;Liberation Mono&quot;;</string>
<x>0</x>
<y>0</y>
<width>1366</width>
<height>20</height>
<height>28</height>
</rect>
</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 class="QStatusBar" name="menuStatusBar"/>
<action name="alternaCalibraP">
......
......@@ -2,12 +2,14 @@
# 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!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_Generico(object):
def setupUi(self, Generico):
Generico.setObjectName("Generico")
......@@ -68,77 +70,6 @@ class Ui_Generico(object):
self.mainGraph.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
self.mainGraph.setObjectName("mainGraph")
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)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(0)
......@@ -153,7 +84,7 @@ class Ui_Generico(object):
"")
self.absValGBox.setObjectName("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.setObjectName("verticalLayout")
self.calibratorGBox = QtWidgets.QGroupBox(self.absValGBox)
......@@ -162,7 +93,7 @@ class Ui_Generico(object):
self.calibratorGBox.setFlat(True)
self.calibratorGBox.setObjectName("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.setObjectName("horizontalLayout")
self.calibratorLabel = QtWidgets.QLabel(self.calibratorGBox)
......@@ -180,7 +111,7 @@ class Ui_Generico(object):
self.forceGBox.setStyleSheet("")
self.forceGBox.setObjectName("forceGBox")
self.horizontalLayout_2 = QtWidgets.QHBoxLayout(self.forceGBox)
self.horizontalLayout_2.setContentsMargins(11, 11, 11, 11)
self.horizontalLayout_2.setContentsMargins(11, 21, 11, 11)
self.horizontalLayout_2.setSpacing(6)
self.horizontalLayout_2.setObjectName("horizontalLayout_2")
self.forceLabel = QtWidgets.QLabel(self.forceGBox)
......@@ -194,7 +125,113 @@ class Ui_Generico(object):
self.forceLabel.setObjectName("forceLabel")
self.horizontalLayout_2.addWidget(self.forceLabel, 0, QtCore.Qt.AlignRight)
self.verticalLayout.addWidget(self.forceGBox)
self.gridLayout_2.addWidget(self.absValGBox, 3, 0, 1, 2)
self.gridLayout_2.addWidget(self.absValGBox, 3, 0, 1, 1)
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.setTitle("")
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("")