LiquidGUI [1.1.1.0]

- Added button to reset min/max values.
This commit is contained in:
2024-07-13 21:57:08 +01:00
parent b483cdeb0e
commit 13393ed44d
2 changed files with 19 additions and 7 deletions
+15 -3
View File
@@ -1,7 +1,7 @@
# External Dependencies
import sys
import win32mica
from PySide6.QtWidgets import QApplication, QMainWindow, QWidget, QVBoxLayout, QLabel, QProgressBar
from PySide6.QtWidgets import QApplication, QMainWindow, QWidget, QVBoxLayout, QLabel, QProgressBar, QPushButton
from PySide6.QtCore import Qt, QTimer, QThreadPool
from PySide6.QtGui import QFont, QIcon
# Internal Imports
@@ -18,8 +18,8 @@ class MainWindow(QMainWindow):
def __init__(self, lctl):
super(MainWindow, self).__init__()
self.setWindowTitle("LiquidGUI (v.1.1.0.1)")
self.setFixedSize(450, 400)
self.setWindowTitle("LiquidGUI (v.1.1.1.0)")
self.setFixedSize(450, 450)
self.lctl = lctl
@@ -49,6 +49,8 @@ class MainWindow(QMainWindow):
minimum=1900,
maximum=2700)
self.lbl_value_prg_pumpspeed = SubLabelValue()
self.btn_reset_min_max = QPushButton("Reset Min/Max")
self.btn_reset_min_max.clicked.connect(self.on_reset_min_max)
self.lbl_fwvers = SubLabelValue()
@@ -66,6 +68,8 @@ class MainWindow(QMainWindow):
layout.addWidget(self.prg_pumpspeed)
layout.addWidget(self.lbl_value_prg_pumpspeed)
layout.addWidget(self.lbl_fwvers)
layout.addWidget(self.btn_reset_min_max)
layout.setSpacing(10)
self.setLayout(layout)
@@ -81,6 +85,14 @@ class MainWindow(QMainWindow):
self.timer.timeout.connect(self.update_widgets)
self.timer.start()
def on_reset_min_max(self):
""" Pauses the timer and creates new instances of MinMaxCurrent """
self.timer.stop()
self.min_max_cur_temp = common.MinMaxCurrent()
self.min_max_cur_fanspeed = common.MinMaxCurrent()
self.min_max_cur_pumpspeed = common.MinMaxCurrent()
self.timer.start()
def update_widgets(self):
""" Update widgets using LiquidCTL library."""
self.lbl_device_name.setText(self.lctl.device_name)