-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ui changes, handle same sensors in main screen
- Loading branch information
Showing
5 changed files
with
196 additions
and
110 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
from PyQt5.QtWidgets import QLabel, QGraphicsColorizeEffect | ||
from PyQt5.QtGui import QColor | ||
from PyQt5.QtCore import Qt | ||
|
||
def set_green_label_color(label: QLabel): | ||
_set_label_color(label, Qt.darkGreen) | ||
|
||
def set_red_label_color(label: QLabel): | ||
_set_label_color(label, Qt.darkRed) | ||
|
||
def set_yellow_label_color(label: QLabel): | ||
_set_label_color(label, Qt.darkYellow) | ||
|
||
def _set_label_color(label: QLabel, color: QColor): | ||
color_effect = QGraphicsColorizeEffect() | ||
color_effect.setColor(color) | ||
label.setGraphicsEffect(color_effect) |
Oops, something went wrong.