Skip to content

Feat/add tray state machine #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 6 commits into
base: nicegui-status
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

<!--next-version-placeholder-->

## v0.5.1 (2023-07-04)

### Fix

* Add pympler and psutil ([`f853839`](https://github.com/OpenAdaptAI/OpenAdapt/commit/f8538398d3c0da51dbd6fb56f3e891c7558df6fb))

## v0.5.0 (2023-07-03)

### Feature
Expand Down
2 changes: 1 addition & 1 deletion openadapt/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.5.0"
__version__ = "0.5.1"
Binary file added openadapt/app/assets/recording_inprogress.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added openadapt/app/assets/replay_available.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added openadapt/app/assets/replay_inprogress.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added openadapt/app/assets/replay_paused.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions openadapt/app/pyside6.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ def __init__(self):
self.menu.addAction(self.quit)

self.tray.setContextMenu(self.menu)
self.current_state = "default"

def _quick_record(self):
Notify("OpenAdapt", "Starting recording...", "OpenAdapt").send()
Expand All @@ -58,6 +59,23 @@ def populate_visualize_menu(self):
action.triggered.connect(partial(self.callback, recording))
self.visualize_menu.addAction(action)

def update_icon(self):
if self.current_state == "default":
self.tray.setIcon(QIcon("assets/recording_inprogress.png"))
self.current_state = "recording_in_progress"
elif self.current_state == "recording_in_progress":
self.tray.setIcon(QIcon("assets/replay_available.png"))
self.current_state = "replay_available"
elif self.current_state == "replay_available":
self.tray.setIcon(QIcon("assets/replay_inprogress.png"))
self.current_state = "replaying_in_progress"
elif self.current_state == "replaying_in_progress":
self.tray.setIcon(QIcon("assets/replay_paused.png"))
self.current_state = "replaying_paused"
elif self.current_state == "replaying_paused":
self.tray.setIcon(QIcon("assets/replay_inprogress.png"))
self.current_state = "replaying_in_progress"

def run(self):
self.app.exec_()

Expand Down
41 changes: 41 additions & 0 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "openadapt"
version = "0.5.0"
version = "0.5.1"
description = "GUI Process Automation with Transformers"
authors = [
'Mustafa Abdulrahman <mustafa@openadapt.ai>',
Expand Down Expand Up @@ -77,9 +77,14 @@ pillow = "9.5.0"
pywinauto = {version = "^0.6.8", markers = "sys_platform == 'win32'"}
moviepy = "1.0.3"
python-levenshtein = "^0.21.1"
<<<<<<< HEAD
pympler = "^1.0.1"
psutil = "^5.9.5"
=======
pyside6 = "^6.5.1.1"
notify-py = "^0.3.42"

>>>>>>> 7eb6794f21aec9c578c584847772897c58f704da

[tool.poetry.dependencies.en_core_web_trf]
url = "https://github.com/explosion/spacy-models/releases/download/en_core_web_trf-3.5.0/en_core_web_trf-3.5.0.tar.gz"
Expand Down