Skip to content
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

Added the capability to push Q to clipboard #42

Merged
merged 1 commit into from
Oct 7, 2020
Merged
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
8 changes: 8 additions & 0 deletions bioviz/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import numpy as np
import scipy
import biorbd
import pandas

if biorbd.currentLinearAlgebraBackend() == 1:
import casadi
Expand Down Expand Up @@ -369,6 +370,9 @@ def reset_q(self):
# Reset also muscle analyses graphs
self.__update_muscle_analyses_graphs(False, False, False, False)

def copy_q_to_clipboard(self):
pandas.DataFrame(self.Q[np.newaxis, :]).to_clipboard(sep=',', index=False, header=False)

def set_q(self, Q, refresh_window=True):
"""
Manually update
Expand Down Expand Up @@ -507,6 +511,10 @@ def add_options_panel(self):
reset_push_button.setPalette(self.palette_active)
reset_push_button.released.connect(self.reset_q)
button_layout.addWidget(reset_push_button)
copyq_push_button = QPushButton("Copy Q to clipboard")
copyq_push_button.setPalette(self.palette_active)
copyq_push_button.released.connect(self.copy_q_to_clipboard)
button_layout.addWidget(copyq_push_button)

# Add the radio button for analyses
option_analyses_group = QGroupBox()
Expand Down
1 change: 1 addition & 0 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ dependencies:
- pyomeca
- vtk
- pyqt
- pandas
- eigen
- rbdl
- biorbd
Expand Down