-
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.
setup of pages, still need to do the positions of home page and conne…
…ct up the algorithms, next commit should hopefully be algorithms, also need to add a border/box around the connection status
- Loading branch information
1 parent
1ced617
commit ce1669e
Showing
4 changed files
with
108 additions
and
19 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
from PyQt5.QtWidgets import QWidget, QVBoxLayout, QLabel, QHBoxLayout, QFrame | ||
from PyQt5.QtGui import QPixmap | ||
|
||
class FacialExpressionRecognitionPage(QWidget): | ||
def __init__(self): | ||
super().__init__() | ||
self.setWindowTitle("Facial Expression Recognition") | ||
self.setGeometry(100, 100, 800, 600) | ||
|
||
main_layout = QHBoxLayout() | ||
|
||
self.stream_frame = QFrame() | ||
self.stream_frame.setStyleSheet("background-color: black;") | ||
self.stream_frame.setFixedSize(400, 600) | ||
|
||
emoji_layout = QVBoxLayout() | ||
self.emoji_label = QLabel("Expression:") | ||
self.face_emoji = QLabel() | ||
emoji_layout.addWidget(self.emoji_label) | ||
emoji_layout.addWidget(self.face_emoji) | ||
|
||
main_layout.addWidget(self.stream_frame) | ||
main_layout.addLayout(emoji_layout) | ||
|
||
self.setLayout(main_layout) | ||
|
||
def update_emojis(self, emoji_path): | ||
self.face_emoji.setPixmap(QPixmap(emoji_path)) |
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,42 @@ | ||
from PyQt5.QtWidgets import QWidget, QVBoxLayout, QLabel, QHBoxLayout, QFrame | ||
from PyQt5.QtCore import Qt | ||
|
||
|
||
class GeneralDemoPage(QWidget): | ||
def __init__(self, title: str, description: str): | ||
super().__init__() | ||
self.setWindowTitle(title) | ||
|
||
# Main layout (horizontal layout for video and right panel) | ||
main_layout = QHBoxLayout(self) | ||
|
||
# Video Stream Section (Left) | ||
self.video_frame = QFrame() | ||
self.video_frame.setStyleSheet("background-color: black;") | ||
self.video_frame.setMinimumSize(400, 300) # Minimum size for the video area | ||
main_layout.addWidget(self.video_frame, stretch=3) | ||
|
||
# Right Panel (Output and Description) | ||
right_panel = QVBoxLayout() | ||
|
||
# Output Section (Top of Right Panel) | ||
self.output_label = QLabel("Output Here") | ||
self.output_label.setStyleSheet( | ||
"background-color: lightgray; font-size: 16px; padding: 10px;" | ||
) | ||
self.output_label.setAlignment(Qt.AlignCenter) | ||
self.output_label.setFixedHeight(150) # Optional: Adjust height as needed | ||
right_panel.addWidget(self.output_label, stretch=1) | ||
|
||
# Description Section (Bottom of Right Panel) | ||
self.description_label = QLabel(description) | ||
self.description_label.setStyleSheet("font-size: 18px; color: gray;") | ||
self.description_label.setAlignment(Qt.AlignLeft | Qt.AlignTop) | ||
self.description_label.setWordWrap(True) | ||
right_panel.addWidget(self.description_label, stretch=2) | ||
|
||
# Add the right panel to the main layout | ||
main_layout.addLayout(right_panel, stretch=2) | ||
|
||
# Set the main layout | ||
self.setLayout(main_layout) |
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 |
---|---|---|
@@ -1,12 +1,22 @@ | ||
QLabel { | ||
#title { | ||
margin-top:10px; | ||
margin-bottom:5px; | ||
font-size: 24px; | ||
font-weight: bold; | ||
color: #333333; | ||
spacing:0px; | ||
} | ||
QPushButton { | ||
background-color: #4CAF50; | ||
color: white; | ||
padding: 10px 20px; | ||
border: none; | ||
border-radius: 5px; | ||
font-size: 16px; | ||
#intro_label { | ||
margin-left: 20px; | ||
spacing:0px; | ||
} | ||
|
||
#intro_container { | ||
margin-top: 0px; | ||
spacing:0px; | ||
} | ||
|
||
#button { | ||
font-size:16px; | ||
color: gray; | ||
} |